diff --git a/.gitignore b/.gitignore index c027f5873c87a..05f981a0acefd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,5 @@ node_modules/ built/* -tests/cases/*.js -tests/cases/*/*.js -tests/cases/*/*/*.js -tests/cases/*/*/*/*.js -tests/cases/*/*/*/*/*.js -tests/cases/*.js.map -tests/cases/*/*.js.map -tests/cases/*/*/*.js.map -tests/cases/*/*/*/*.js.map -tests/cases/*/*/*/*/*.js.map tests/cases/rwc/* tests/cases/test262/* tests/cases/perf/* diff --git a/AUTHORS.md b/AUTHORS.md index 0ade4c3122171..486a15bf47f6d 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -8,6 +8,7 @@ TypeScript is authored by: * Basarat Ali Syed * Ben Duffield * Bill Ticehurst +* Brett Mayen * Bryan Forbes * Caitlin Potter * Chris Bubernak @@ -17,11 +18,14 @@ TypeScript is authored by: * Dan Quirk * Daniel Rosenwasser * David Li -* Dick van den Brink -* Dirk Bumer +* Denis Nedelyaev +* Dick van den Brink +* Dirk Bäumer +* Eyas Sharaiha * Frank Wallis * Gabriel Isenberg * Gilad Peleg +* Graeme Wicksted * Guillaume Salles * Harald Niesche * Ingvar Stepanyan @@ -31,30 +35,39 @@ TypeScript is authored by: * Jason Ramsay * Jed Mao * Johannes Rieken +* John Vilk * Jonathan Bond-Caron * Jonathan Park * Jonathan Turner * Josh Kalderimis +* Julian Williams * Kagami Sascha Rosylight * Keith Mashinter +* Ken Howard * Kenji Imamula * Lorant Pinter +* Martin Všetička * Masahiro Wakame * Max Deepfield * Micah Zoltu * Mohamed Hegazy +* Nathan Shively-Sanders * Oleg Mihailik * Oleksandr Chekhovskyi * Paul van Brenk * Pedro Maltez * Philip Bulley * piloopin +* @progre +* Punya Biswal * Ron Buckton * Ryan Cavanaugh +* Ryohei Ikegami +* Sébastien Arod * Sheetal Nandi * Shengping Zhong * Shyyko Serhiy -* Simon Hrlimann +* Simon Hürlimann * Solal Pirelli * Stan Thomas * Steve Lucco @@ -63,8 +76,10 @@ TypeScript is authored by: * togru * Tomas Grubliauskas * TruongSinh Tran-Nguyen +* Viliv Vane * Vladimir Matveev * Wesley Wigham +* York Yao * Yui Tanglertsampan * Zev Spitz -* Zhengbo Li \ No newline at end of file +* Zhengbo Li diff --git a/Jakefile.js b/Jakefile.js index 5dfbcc26d74cb..6243ce8ff97ea 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -40,6 +40,7 @@ var compilerSources = [ "utilities.ts", "binder.ts", "checker.ts", + "sourcemap.ts", "declarationEmitter.ts", "emitter.ts", "program.ts", @@ -59,6 +60,7 @@ var servicesSources = [ "utilities.ts", "binder.ts", "checker.ts", + "sourcemap.ts", "declarationEmitter.ts", "emitter.ts", "program.ts", @@ -106,6 +108,16 @@ var serverCoreSources = [ return path.join(serverDirectory, f); }); +var scriptSources = [ + "tslint/booleanTriviaRule.ts", + "tslint/nextLineRule.ts", + "tslint/noNullRule.ts", + "tslint/preferConstRule.ts", + "tslint/typeOperatorSpacingRule.ts" +].map(function (f) { + return path.join(scriptsDirectory, f); +}); + var serverSources = serverCoreSources.concat(servicesSources); var languageServiceLibrarySources = [ @@ -365,7 +377,6 @@ file(builtGeneratedDiagnosticMessagesJSON,[generatedDiagnosticMessagesJSON], fun desc("Generates a diagnostic file in TypeScript based on an input JSON file"); task("generate-diagnostics", [diagnosticInfoMapTs]); - // Publish nightly var configureNightlyJs = path.join(scriptsDirectory, "configureNightly.js"); var configureNightlyTs = path.join(scriptsDirectory, "configureNightly.ts"); @@ -466,7 +477,7 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca var nodeDefinitionsFileContents = definitionFileContents + "\r\nexport = ts;"; fs.writeFileSync(nodeDefinitionsFile, nodeDefinitionsFileContents); - // Node package definition file to be distributed without the package. Created by replacing + // Node package definition file to be distributed without the package. Created by replacing // 'ts' namespace with '"typescript"' as a module. var nodeStandaloneDefinitionsFileContents = definitionFileContents.replace(/declare (namespace|module) ts/g, 'declare module "typescript"'); fs.writeFileSync(nodeStandaloneDefinitionsFile, nodeStandaloneDefinitionsFileContents); @@ -875,7 +886,7 @@ var tslintRulesOutFiles = tslintRules.map(function(p) { desc("Compiles tslint rules to js"); task("build-rules", tslintRulesOutFiles); tslintRulesFiles.forEach(function(ruleFile, i) { - compileFile(tslintRulesOutFiles[i], [ruleFile], [ruleFile], [], /*useBuiltCompiler*/ false, /*noOutFile*/ true, /*generateDeclarations*/ false, path.join(builtLocalDirectory, "tslint")); + compileFile(tslintRulesOutFiles[i], [ruleFile], [ruleFile], [], /*useBuiltCompiler*/ false, /*noOutFile*/ true, /*generateDeclarations*/ false, path.join(builtLocalDirectory, "tslint")); }); function getLinterOptions() { @@ -909,7 +920,8 @@ function lintFileAsync(options, path, cb) { var lintTargets = compilerSources .concat(harnessCoreSources) - .concat(serverCoreSources); + .concat(serverCoreSources) + .concat(scriptSources); desc("Runs tslint on the compiler sources"); task("lint", ["build-rules"], function() { @@ -937,7 +949,7 @@ function lintWatchFile(filename) { if (event !== "change") { return; } - + if (!lintSemaphores[filename]) { lintSemaphores[filename] = true; lintFileAsync(getLinterOptions(), filename, function(err, result) { diff --git a/README.md b/README.md index e27e7a99fa7b1..13e1f3e4786c6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Build Status](https://travis-ci.org/Microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript) -[![npm version](https://badge.fury.io/js/typescript.svg)](http://badge.fury.io/js/typescript) -[![Downloads](http://img.shields.io/npm/dm/TypeScript.svg)](https://npmjs.org/package/typescript) +[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript) +[![Downloads](https://img.shields.io/npm/dm/TypeScript.svg)](https://www.npmjs.com/package/typescript) # TypeScript diff --git a/lib/tsc.js b/lib/tsc.js index bbbcedf0f47a9..87a413af7294e 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -665,7 +665,7 @@ var ts; } ts.fileExtensionIs = fileExtensionIs; ts.supportedExtensions = [".ts", ".tsx", ".d.ts"]; - ts.moduleFileExtensions = ts.supportedExtensions; + ts.supportedJsExtensions = ts.supportedExtensions.concat(".js", ".jsx"); function isSupportedSourceFileName(fileName) { if (!fileName) { return false; @@ -716,17 +716,16 @@ var ts; } function Signature(checker) { } + function Node(kind, pos, end) { + this.kind = kind; + this.pos = pos; + this.end = end; + this.flags = 0; + this.parent = undefined; + } ts.objectAllocator = { - getNodeConstructor: function (kind) { - function Node(pos, end) { - this.pos = pos; - this.end = end; - this.flags = 0; - this.parent = undefined; - } - Node.prototype = { kind: kind }; - return Node; - }, + getNodeConstructor: function () { return Node; }, + getSourceFileConstructor: function () { return Node; }, getSymbolConstructor: function () { return Symbol; }, getTypeConstructor: function () { return Type; }, getSignatureConstructor: function () { return Signature; } @@ -1003,7 +1002,16 @@ var ts; if (writeByteOrderMark) { data = "\uFEFF" + data; } - _fs.writeFileSync(fileName, data, "utf8"); + var fd; + try { + fd = _fs.openSync(fileName, "w"); + _fs.writeSync(fd, data, undefined, "utf8"); + } + finally { + if (fd !== undefined) { + _fs.closeSync(fd); + } + } } function getCanonicalPath(path) { return useCaseSensitiveFileNames ? path.toLowerCase() : path; @@ -1688,6 +1696,7 @@ var ts; Disallow_inconsistently_cased_references_to_the_same_file: { code: 6078, category: ts.DiagnosticCategory.Message, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", message: "Disallow inconsistently-cased references to the same file." }, Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_or_react_6080", message: "Specify JSX code generation: 'preserve' or 'react'" }, Argument_for_jsx_must_be_preserve_or_react: { code: 6081, category: ts.DiagnosticCategory.Message, key: "Argument_for_jsx_must_be_preserve_or_react_6081", message: "Argument for '--jsx' must be 'preserve' or 'react'." }, + Only_amd_and_system_modules_are_supported_alongside_0: { code: 6082, category: ts.DiagnosticCategory.Error, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", message: "Only 'amd' and 'system' modules are supported alongside --{0}." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_an_1_type_7005", message: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter_0_implicitly_has_an_1_type_7006", message: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member_0_implicitly_has_an_1_type_7008", message: "Member '{0}' implicitly has an '{1}' type." }, @@ -2148,7 +2157,7 @@ var ts; function getCommentRanges(text, pos, trailing) { var result; var collecting = trailing || pos === 0; - while (true) { + while (pos < text.length) { var ch = text.charCodeAt(pos); switch (ch) { case 13: @@ -2217,6 +2226,7 @@ var ts; } return result; } + return result; } function getLeadingCommentRanges(text, pos) { return getCommentRanges(text, pos, false); @@ -2312,7 +2322,7 @@ var ts; error(ts.Diagnostics.Digit_expected); } } - return +(text.substring(start, end)); + return "" + +(text.substring(start, end)); } function scanOctalDigits() { var start = pos; @@ -2704,7 +2714,7 @@ var ts; return pos++, token = 36; case 46: if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = "" + scanNumber(); + tokenValue = scanNumber(); return token = 8; } if (text.charCodeAt(pos + 1) === 46 && text.charCodeAt(pos + 2) === 46) { @@ -2801,7 +2811,7 @@ var ts; case 55: case 56: case 57: - tokenValue = "" + scanNumber(); + tokenValue = scanNumber(); return token = 8; case 58: return pos++, token = 54; @@ -3094,3102 +3104,2150 @@ var ts; })(ts || (ts = {})); var ts; (function (ts) { - ts.bindTime = 0; - function or(state1, state2) { - return (state1 | state2) & 2 - ? 2 - : (state1 & state2) & 8 - ? 8 - : 4; - } - function getModuleInstanceState(node) { - if (node.kind === 215 || node.kind === 216) { - return 0; + function getDeclarationOfKind(symbol, kind) { + var declarations = symbol.declarations; + if (declarations) { + for (var _i = 0, declarations_1 = declarations; _i < declarations_1.length; _i++) { + var declaration = declarations_1[_i]; + if (declaration.kind === kind) { + return declaration; + } + } } - else if (ts.isConstEnumDeclaration(node)) { - return 2; + return undefined; + } + ts.getDeclarationOfKind = getDeclarationOfKind; + var stringWriters = []; + function getSingleLineStringWriter() { + if (stringWriters.length === 0) { + var str = ""; + var writeText = function (text) { return str += text; }; + return { + string: function () { return str; }, + writeKeyword: writeText, + writeOperator: writeText, + writePunctuation: writeText, + writeSpace: writeText, + writeStringLiteral: writeText, + writeParameter: writeText, + writeSymbol: writeText, + writeLine: function () { return str += " "; }, + increaseIndent: function () { }, + decreaseIndent: function () { }, + clear: function () { return str = ""; }, + trackSymbol: function () { }, + reportInaccessibleThisError: function () { } + }; } - else if ((node.kind === 222 || node.kind === 221) && !(node.flags & 2)) { - return 0; + return stringWriters.pop(); + } + ts.getSingleLineStringWriter = getSingleLineStringWriter; + function releaseStringWriter(writer) { + writer.clear(); + stringWriters.push(writer); + } + ts.releaseStringWriter = releaseStringWriter; + function getFullWidth(node) { + return node.end - node.pos; + } + ts.getFullWidth = getFullWidth; + function arrayIsEqualTo(array1, array2, equaler) { + if (!array1 || !array2) { + return array1 === array2; } - else if (node.kind === 219) { - var state = 0; - ts.forEachChild(node, function (n) { - switch (getModuleInstanceState(n)) { - case 0: - return false; - case 2: - state = 2; - return false; - case 1: - state = 1; - return true; - } - }); - return state; + if (array1.length !== array2.length) { + return false; } - else if (node.kind === 218) { - return getModuleInstanceState(node.body); + for (var i = 0; i < array1.length; ++i) { + var equals = equaler ? equaler(array1[i], array2[i]) : array1[i] === array2[i]; + if (!equals) { + return false; + } } - else { - return 1; + return true; + } + ts.arrayIsEqualTo = arrayIsEqualTo; + function hasResolvedModule(sourceFile, moduleNameText) { + return sourceFile.resolvedModules && ts.hasProperty(sourceFile.resolvedModules, moduleNameText); + } + ts.hasResolvedModule = hasResolvedModule; + function getResolvedModule(sourceFile, moduleNameText) { + return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules[moduleNameText] : undefined; + } + ts.getResolvedModule = getResolvedModule; + function setResolvedModule(sourceFile, moduleNameText, resolvedModule) { + if (!sourceFile.resolvedModules) { + sourceFile.resolvedModules = {}; } + sourceFile.resolvedModules[moduleNameText] = resolvedModule; } - ts.getModuleInstanceState = getModuleInstanceState; - var binder = createBinder(); - function bindSourceFile(file, options) { - var start = new Date().getTime(); - binder(file, options); - ts.bindTime += new Date().getTime() - start; + ts.setResolvedModule = setResolvedModule; + function containsParseError(node) { + aggregateChildData(node); + return (node.parserContextFlags & 64) !== 0; } - ts.bindSourceFile = bindSourceFile; - function createBinder() { - var file; - var options; - var parent; - var container; - var blockScopeContainer; - var lastContainer; - var seenThisKeyword; - var hasExplicitReturn; - var currentReachabilityState; - var labelStack; - var labelIndexMap; - var implicitLabels; - var inStrictMode; - var symbolCount = 0; - var Symbol; - var classifiableNames; - function bindSourceFile(f, opts) { - file = f; - options = opts; - inStrictMode = !!file.externalModuleIndicator; - classifiableNames = {}; - Symbol = ts.objectAllocator.getSymbolConstructor(); - if (!file.locals) { - bind(file); - file.symbolCount = symbolCount; - file.classifiableNames = classifiableNames; + ts.containsParseError = containsParseError; + function aggregateChildData(node) { + if (!(node.parserContextFlags & 128)) { + var thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & 16) !== 0) || + ts.forEachChild(node, containsParseError); + if (thisNodeOrAnySubNodesHasError) { + node.parserContextFlags |= 64; } - parent = undefined; - container = undefined; - blockScopeContainer = undefined; - lastContainer = undefined; - seenThisKeyword = false; - hasExplicitReturn = false; - labelStack = undefined; - labelIndexMap = undefined; - implicitLabels = undefined; + node.parserContextFlags |= 128; } - return bindSourceFile; - function createSymbol(flags, name) { - symbolCount++; - return new Symbol(flags, name); + } + function getSourceFileOfNode(node) { + while (node && node.kind !== 248) { + node = node.parent; } - function addDeclarationToSymbol(symbol, node, symbolFlags) { - symbol.flags |= symbolFlags; - node.symbol = symbol; - if (!symbol.declarations) { - symbol.declarations = []; - } - symbol.declarations.push(node); - if (symbolFlags & 1952 && !symbol.exports) { - symbol.exports = {}; - } - if (symbolFlags & 6240 && !symbol.members) { - symbol.members = {}; - } - if (symbolFlags & 107455 && !symbol.valueDeclaration) { - symbol.valueDeclaration = node; - } + return node; + } + ts.getSourceFileOfNode = getSourceFileOfNode; + function getStartPositionOfLine(line, sourceFile) { + ts.Debug.assert(line >= 0); + return ts.getLineStarts(sourceFile)[line]; + } + ts.getStartPositionOfLine = getStartPositionOfLine; + function nodePosToString(node) { + var file = getSourceFileOfNode(node); + var loc = ts.getLineAndCharacterOfPosition(file, node.pos); + return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")"; + } + ts.nodePosToString = nodePosToString; + function getStartPosOfNode(node) { + return node.pos; + } + ts.getStartPosOfNode = getStartPosOfNode; + function nodeIsMissing(node) { + if (!node) { + return true; } - function getDeclarationName(node) { - if (node.name) { - if (node.kind === 218 && node.name.kind === 9) { - return "\"" + node.name.text + "\""; - } - if (node.name.kind === 136) { - var nameExpression = node.name.expression; - ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression)); - return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text); - } - return node.name.text; - } - switch (node.kind) { - case 144: - return "__constructor"; - case 152: - case 147: - return "__call"; - case 153: - case 148: - return "__new"; - case 149: - return "__index"; - case 228: - return "__export"; - case 227: - return node.isExportEquals ? "export=" : "default"; - case 213: - case 214: - return node.flags & 512 ? "default" : undefined; - } + return node.pos === node.end && node.pos >= 0 && node.kind !== 1; + } + ts.nodeIsMissing = nodeIsMissing; + function nodeIsPresent(node) { + return !nodeIsMissing(node); + } + ts.nodeIsPresent = nodeIsPresent; + function getTokenPosOfNode(node, sourceFile) { + if (nodeIsMissing(node)) { + return node.pos; } - function getDisplayName(node) { - return node.name ? ts.declarationNameToString(node.name) : getDeclarationName(node); - } - function declareSymbol(symbolTable, parent, node, includes, excludes) { - ts.Debug.assert(!ts.hasDynamicName(node)); - var isDefaultExport = node.flags & 512; - var name = isDefaultExport && parent ? "default" : getDeclarationName(node); - var symbol; - if (name !== undefined) { - symbol = ts.hasProperty(symbolTable, name) - ? symbolTable[name] - : (symbolTable[name] = createSymbol(0, name)); - if (name && (includes & 788448)) { - classifiableNames[name] = name; - } - if (symbol.flags & excludes) { - if (node.name) { - node.name.parent = node; - } - var message = symbol.flags & 2 - ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 - : ts.Diagnostics.Duplicate_identifier_0; - ts.forEach(symbol.declarations, function (declaration) { - if (declaration.flags & 512) { - message = ts.Diagnostics.A_module_cannot_have_multiple_default_exports; - } - }); - ts.forEach(symbol.declarations, function (declaration) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration))); - }); - file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message, getDisplayName(node))); - symbol = createSymbol(0, name); - } - } - else { - symbol = createSymbol(0, "__missing"); - } - addDeclarationToSymbol(symbol, node, includes); - symbol.parent = parent; - return symbol; + return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); + } + ts.getTokenPosOfNode = getTokenPosOfNode; + function getNonDecoratorTokenPosOfNode(node, sourceFile) { + if (nodeIsMissing(node) || !node.decorators) { + return getTokenPosOfNode(node, sourceFile); } - function declareModuleMember(node, symbolFlags, symbolExcludes) { - var hasExportModifier = ts.getCombinedNodeFlags(node) & 2; - if (symbolFlags & 8388608) { - if (node.kind === 230 || (node.kind === 221 && hasExportModifier)) { - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - } - else { - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - else { - if (hasExportModifier || container.flags & 131072) { - var exportKind = (symbolFlags & 107455 ? 1048576 : 0) | - (symbolFlags & 793056 ? 2097152 : 0) | - (symbolFlags & 1536 ? 4194304 : 0); - var local = declareSymbol(container.locals, undefined, node, exportKind, symbolExcludes); - local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - node.localSymbol = local; - return local; - } - else { - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } - } + return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.decorators.end); + } + ts.getNonDecoratorTokenPosOfNode = getNonDecoratorTokenPosOfNode; + function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia) { + if (includeTrivia === void 0) { includeTrivia = false; } + if (nodeIsMissing(node)) { + return ""; } - function bindChildren(node) { - var saveParent = parent; - var saveContainer = container; - var savedBlockScopeContainer = blockScopeContainer; - parent = node; - var containerFlags = getContainerFlags(node); - if (containerFlags & 1) { - container = blockScopeContainer = node; - if (containerFlags & 4) { - container.locals = {}; - } - addToContainerChain(container); - } - else if (containerFlags & 2) { - blockScopeContainer = node; - blockScopeContainer.locals = undefined; - } - var savedReachabilityState; - var savedLabelStack; - var savedLabels; - var savedImplicitLabels; - var savedHasExplicitReturn; - var kind = node.kind; - var flags = node.flags; - flags &= ~1572864; - if (kind === 215) { - seenThisKeyword = false; - } - var saveState = kind === 248 || kind === 219 || ts.isFunctionLikeKind(kind); - if (saveState) { - savedReachabilityState = currentReachabilityState; - savedLabelStack = labelStack; - savedLabels = labelIndexMap; - savedImplicitLabels = implicitLabels; - savedHasExplicitReturn = hasExplicitReturn; - currentReachabilityState = 2; - hasExplicitReturn = false; - labelStack = labelIndexMap = implicitLabels = undefined; - } - bindReachableStatement(node); - if (currentReachabilityState === 2 && ts.isFunctionLikeKind(kind) && ts.nodeIsPresent(node.body)) { - flags |= 524288; - if (hasExplicitReturn) { - flags |= 1048576; - } - } - if (kind === 215) { - flags = seenThisKeyword ? flags | 262144 : flags & ~262144; - } - node.flags = flags; - if (saveState) { - hasExplicitReturn = savedHasExplicitReturn; - currentReachabilityState = savedReachabilityState; - labelStack = savedLabelStack; - labelIndexMap = savedLabels; - implicitLabels = savedImplicitLabels; - } - container = saveContainer; - parent = saveParent; - blockScopeContainer = savedBlockScopeContainer; + var text = sourceFile.text; + return text.substring(includeTrivia ? node.pos : ts.skipTrivia(text, node.pos), node.end); + } + ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; + function getTextOfNodeFromSourceText(sourceText, node) { + if (nodeIsMissing(node)) { + return ""; } - function bindReachableStatement(node) { - if (checkUnreachable(node)) { - ts.forEachChild(node, bind); - return; + return sourceText.substring(ts.skipTrivia(sourceText, node.pos), node.end); + } + ts.getTextOfNodeFromSourceText = getTextOfNodeFromSourceText; + function getTextOfNode(node, includeTrivia) { + if (includeTrivia === void 0) { includeTrivia = false; } + return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia); + } + ts.getTextOfNode = getTextOfNode; + function escapeIdentifier(identifier) { + return identifier.length >= 2 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 ? "_" + identifier : identifier; + } + ts.escapeIdentifier = escapeIdentifier; + function unescapeIdentifier(identifier) { + return identifier.length >= 3 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 && identifier.charCodeAt(2) === 95 ? identifier.substr(1) : identifier; + } + ts.unescapeIdentifier = unescapeIdentifier; + function makeIdentifierFromModuleName(moduleName) { + return ts.getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); + } + ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; + function isBlockOrCatchScoped(declaration) { + return (getCombinedNodeFlags(declaration) & 24576) !== 0 || + isCatchClauseVariableDeclaration(declaration); + } + ts.isBlockOrCatchScoped = isBlockOrCatchScoped; + function getEnclosingBlockScopeContainer(node) { + var current = node.parent; + while (current) { + if (isFunctionLike(current)) { + return current; } - switch (node.kind) { - case 198: - bindWhileStatement(node); - break; - case 197: - bindDoStatement(node); - break; + switch (current.kind) { + case 248: + case 220: + case 244: + case 218: case 199: - bindForStatement(node); - break; case 200: case 201: - bindForInOrForOfStatement(node); - break; - case 196: - bindIfStatement(node); - break; - case 204: - case 208: - bindReturnOrThrow(node); - break; - case 203: - case 202: - bindBreakOrContinueStatement(node); - break; - case 209: - bindTryStatement(node); - break; - case 206: - bindSwitchStatement(node); - break; - case 220: - bindCaseBlock(node); - break; - case 207: - bindLabeledStatement(node); - break; - default: - ts.forEachChild(node, bind); - break; + return current; + case 192: + if (!isFunctionLike(current.parent)) { + return current; + } } + current = current.parent; } - function bindWhileStatement(n) { - var preWhileState = n.expression.kind === 84 ? 4 : currentReachabilityState; - var postWhileState = n.expression.kind === 99 ? 4 : currentReachabilityState; - bind(n.expression); - currentReachabilityState = preWhileState; - var postWhileLabel = pushImplicitLabel(); - bind(n.statement); - popImplicitLabel(postWhileLabel, postWhileState); - } - function bindDoStatement(n) { - var preDoState = currentReachabilityState; - var postDoLabel = pushImplicitLabel(); - bind(n.statement); - var postDoState = n.expression.kind === 99 ? 4 : preDoState; - popImplicitLabel(postDoLabel, postDoState); - bind(n.expression); - } - function bindForStatement(n) { - var preForState = currentReachabilityState; - var postForLabel = pushImplicitLabel(); - bind(n.initializer); - bind(n.condition); - bind(n.incrementor); - bind(n.statement); - var isInfiniteLoop = (!n.condition || n.condition.kind === 99); - var postForState = isInfiniteLoop ? 4 : preForState; - popImplicitLabel(postForLabel, postForState); - } - function bindForInOrForOfStatement(n) { - var preStatementState = currentReachabilityState; - var postStatementLabel = pushImplicitLabel(); - bind(n.initializer); - bind(n.expression); - bind(n.statement); - popImplicitLabel(postStatementLabel, preStatementState); - } - function bindIfStatement(n) { - var ifTrueState = n.expression.kind === 84 ? 4 : currentReachabilityState; - var ifFalseState = n.expression.kind === 99 ? 4 : currentReachabilityState; - currentReachabilityState = ifTrueState; - bind(n.expression); - bind(n.thenStatement); - if (n.elseStatement) { - var preElseState = currentReachabilityState; - currentReachabilityState = ifFalseState; - bind(n.elseStatement); - currentReachabilityState = or(currentReachabilityState, preElseState); - } - else { - currentReachabilityState = or(currentReachabilityState, ifFalseState); - } - } - function bindReturnOrThrow(n) { - bind(n.expression); - if (n.kind === 204) { - hasExplicitReturn = true; - } - currentReachabilityState = 4; - } - function bindBreakOrContinueStatement(n) { - bind(n.label); - var isValidJump = jumpToLabel(n.label, n.kind === 203 ? currentReachabilityState : 4); - if (isValidJump) { - currentReachabilityState = 4; - } + } + ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; + function isCatchClauseVariableDeclaration(declaration) { + return declaration && + declaration.kind === 211 && + declaration.parent && + declaration.parent.kind === 244; + } + ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; + function declarationNameToString(name) { + return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); + } + ts.declarationNameToString = declarationNameToString; + function createDiagnosticForNode(node, message, arg0, arg1, arg2) { + var sourceFile = getSourceFileOfNode(node); + var span = getErrorSpanForNode(sourceFile, node); + return ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2); + } + ts.createDiagnosticForNode = createDiagnosticForNode; + function createDiagnosticForNodeFromMessageChain(node, messageChain) { + var sourceFile = getSourceFileOfNode(node); + var span = getErrorSpanForNode(sourceFile, node); + return { + file: sourceFile, + start: span.start, + length: span.length, + code: messageChain.code, + category: messageChain.category, + messageText: messageChain.next ? messageChain : messageChain.messageText + }; + } + ts.createDiagnosticForNodeFromMessageChain = createDiagnosticForNodeFromMessageChain; + function getSpanOfTokenAtPosition(sourceFile, pos) { + var scanner = ts.createScanner(sourceFile.languageVersion, true, sourceFile.languageVariant, sourceFile.text, undefined, pos); + scanner.scan(); + var start = scanner.getTokenPos(); + return ts.createTextSpanFromBounds(start, scanner.getTextPos()); + } + ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; + function getErrorSpanForNode(sourceFile, node) { + var errorNode = node; + switch (node.kind) { + case 248: + var pos_1 = ts.skipTrivia(sourceFile.text, 0, false); + if (pos_1 === sourceFile.text.length) { + return ts.createTextSpan(0, 0); + } + return getSpanOfTokenAtPosition(sourceFile, pos_1); + case 211: + case 163: + case 214: + case 186: + case 215: + case 218: + case 217: + case 247: + case 213: + case 173: + errorNode = node.name; + break; } - function bindTryStatement(n) { - var preTryState = currentReachabilityState; - bind(n.tryBlock); - var postTryState = currentReachabilityState; - currentReachabilityState = preTryState; - bind(n.catchClause); - var postCatchState = currentReachabilityState; - currentReachabilityState = preTryState; - bind(n.finallyBlock); - currentReachabilityState = or(postTryState, postCatchState); + if (errorNode === undefined) { + return getSpanOfTokenAtPosition(sourceFile, node.pos); } - function bindSwitchStatement(n) { - var preSwitchState = currentReachabilityState; - var postSwitchLabel = pushImplicitLabel(); - bind(n.expression); - bind(n.caseBlock); - var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 242; }); - var postSwitchState = hasDefault && currentReachabilityState !== 2 ? 4 : preSwitchState; - popImplicitLabel(postSwitchLabel, postSwitchState); + var pos = nodeIsMissing(errorNode) + ? errorNode.pos + : ts.skipTrivia(sourceFile.text, errorNode.pos); + return ts.createTextSpanFromBounds(pos, errorNode.end); + } + ts.getErrorSpanForNode = getErrorSpanForNode; + function isExternalModule(file) { + return file.externalModuleIndicator !== undefined; + } + ts.isExternalModule = isExternalModule; + function isExternalOrCommonJsModule(file) { + return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined; + } + ts.isExternalOrCommonJsModule = isExternalOrCommonJsModule; + function isDeclarationFile(file) { + return (file.flags & 4096) !== 0; + } + ts.isDeclarationFile = isDeclarationFile; + function isConstEnumDeclaration(node) { + return node.kind === 217 && isConst(node); + } + ts.isConstEnumDeclaration = isConstEnumDeclaration; + function walkUpBindingElementsAndPatterns(node) { + while (node && (node.kind === 163 || isBindingPattern(node))) { + node = node.parent; } - function bindCaseBlock(n) { - var startState = currentReachabilityState; - for (var _i = 0, _a = n.clauses; _i < _a.length; _i++) { - var clause = _a[_i]; - currentReachabilityState = startState; - bind(clause); - if (clause.statements.length && currentReachabilityState === 2 && options.noFallthroughCasesInSwitch) { - errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); - } - } + return node; + } + function getCombinedNodeFlags(node) { + node = walkUpBindingElementsAndPatterns(node); + var flags = node.flags; + if (node.kind === 211) { + node = node.parent; } - function bindLabeledStatement(n) { - bind(n.label); - var ok = pushNamedLabel(n.label); - bind(n.statement); - if (ok) { - popNamedLabel(n.label, currentReachabilityState); - } + if (node && node.kind === 212) { + flags |= node.flags; + node = node.parent; } - function getContainerFlags(node) { - switch (node.kind) { - case 186: - case 214: - case 215: - case 217: - case 155: - case 165: - return 1; - case 147: - case 148: - case 149: - case 143: - case 142: - case 213: - case 144: - case 145: - case 146: - case 152: - case 153: - case 173: - case 174: - case 218: - case 248: - case 216: - return 5; - case 244: - case 199: - case 200: - case 201: - case 220: - return 2; - case 192: - return ts.isFunctionLike(node.parent) ? 0 : 2; - } - return 0; + if (node && node.kind === 193) { + flags |= node.flags; } - function addToContainerChain(next) { - if (lastContainer) { - lastContainer.nextContainer = next; - } - lastContainer = next; + return flags; + } + ts.getCombinedNodeFlags = getCombinedNodeFlags; + function isConst(node) { + return !!(getCombinedNodeFlags(node) & 16384); + } + ts.isConst = isConst; + function isLet(node) { + return !!(getCombinedNodeFlags(node) & 8192); + } + ts.isLet = isLet; + function isPrologueDirective(node) { + return node.kind === 195 && node.expression.kind === 9; + } + ts.isPrologueDirective = isPrologueDirective; + function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { + return ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos); + } + ts.getLeadingCommentRangesOfNode = getLeadingCommentRangesOfNode; + function getLeadingCommentRangesOfNodeFromText(node, text) { + return ts.getLeadingCommentRanges(text, node.pos); + } + ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText; + function getJsDocComments(node, sourceFileOfNode) { + return getJsDocCommentsFromText(node, sourceFileOfNode.text); + } + ts.getJsDocComments = getJsDocComments; + function getJsDocCommentsFromText(node, text) { + var commentRanges = (node.kind === 138 || node.kind === 137) ? + ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : + getLeadingCommentRangesOfNodeFromText(node, text); + return ts.filter(commentRanges, isJsDocComment); + function isJsDocComment(comment) { + return text.charCodeAt(comment.pos + 1) === 42 && + text.charCodeAt(comment.pos + 2) === 42 && + text.charCodeAt(comment.pos + 3) !== 47; } - function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { - declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes); + } + ts.getJsDocCommentsFromText = getJsDocCommentsFromText; + ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; + ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; + function isTypeNode(node) { + if (151 <= node.kind && node.kind <= 160) { + return true; } - function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { - switch (container.kind) { - case 218: - return declareModuleMember(node, symbolFlags, symbolExcludes); - case 248: - return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 186: - case 214: - return declareClassMember(node, symbolFlags, symbolExcludes); - case 217: - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 155: - case 165: - case 215: - return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 152: - case 153: - case 147: - case 148: - case 149: - case 143: - case 142: - case 144: - case 145: - case 146: - case 213: - case 173: - case 174: - case 216: - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - function declareClassMember(node, symbolFlags, symbolExcludes) { - return node.flags & 64 - ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes) - : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - } - function declareSourceFileMember(node, symbolFlags, symbolExcludes) { - return ts.isExternalModule(file) - ? declareModuleMember(node, symbolFlags, symbolExcludes) - : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); - } - function hasExportDeclarations(node) { - var body = node.kind === 248 ? node : node.body; - if (body.kind === 248 || body.kind === 219) { - for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { - var stat = _a[_i]; - if (stat.kind === 228 || stat.kind === 227) { - return true; - } + switch (node.kind) { + case 117: + case 128: + case 130: + case 120: + case 131: + return true; + case 103: + return node.parent.kind !== 177; + case 9: + return node.parent.kind === 138; + case 188: + return !isExpressionWithTypeArgumentsInClassExtendsClause(node); + case 69: + if (node.parent.kind === 135 && node.parent.right === node) { + node = node.parent; } - } - return false; - } - function setExportContextFlag(node) { - if (ts.isInAmbientContext(node) && !hasExportDeclarations(node)) { - node.flags |= 131072; - } - else { - node.flags &= ~131072; - } - } - function bindModuleDeclaration(node) { - setExportContextFlag(node); - if (node.name.kind === 9) { - declareSymbolAndAddToSymbolTable(node, 512, 106639); - } - else { - var state = getModuleInstanceState(node); - if (state === 0) { - declareSymbolAndAddToSymbolTable(node, 1024, 0); + else if (node.parent.kind === 166 && node.parent.name === node) { + node = node.parent; } - else { - declareSymbolAndAddToSymbolTable(node, 512, 106639); - if (node.symbol.flags & (16 | 32 | 256)) { - node.symbol.constEnumOnlyModule = false; - } - else { - var currentModuleIsConstEnumOnly = state === 2; - if (node.symbol.constEnumOnlyModule === undefined) { - node.symbol.constEnumOnlyModule = currentModuleIsConstEnumOnly; - } - else { - node.symbol.constEnumOnlyModule = node.symbol.constEnumOnlyModule && currentModuleIsConstEnumOnly; - } - } + ts.Debug.assert(node.kind === 69 || node.kind === 135 || node.kind === 166, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); + case 135: + case 166: + case 97: + var parent_1 = node.parent; + if (parent_1.kind === 154) { + return false; } - } - } - function bindFunctionOrConstructorType(node) { - var symbol = createSymbol(131072, getDeclarationName(node)); - addDeclarationToSymbol(symbol, node, 131072); - var typeLiteralSymbol = createSymbol(2048, "__type"); - addDeclarationToSymbol(typeLiteralSymbol, node, 2048); - typeLiteralSymbol.members = (_a = {}, _a[symbol.name] = symbol, _a); - var _a; - } - function bindObjectLiteralExpression(node) { - if (inStrictMode) { - var seen = {}; - for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { - var prop = _a[_i]; - if (prop.name.kind !== 69) { - continue; - } - var identifier = prop.name; - var currentKind = prop.kind === 245 || prop.kind === 246 || prop.kind === 143 - ? 1 - : 2; - var existingKind = seen[identifier.text]; - if (!existingKind) { - seen[identifier.text] = currentKind; - continue; - } - if (currentKind === 1 && existingKind === 1) { - var span = ts.getErrorSpanForNode(file, identifier); - file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode)); - } + if (151 <= parent_1.kind && parent_1.kind <= 160) { + return true; + } + switch (parent_1.kind) { + case 188: + return !isExpressionWithTypeArgumentsInClassExtendsClause(parent_1); + case 137: + return node === parent_1.constraint; + case 141: + case 140: + case 138: + case 211: + return node === parent_1.type; + case 213: + case 173: + case 174: + case 144: + case 143: + case 142: + case 145: + case 146: + return node === parent_1.type; + case 147: + case 148: + case 149: + return node === parent_1.type; + case 171: + return node === parent_1.type; + case 168: + case 169: + return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0; + case 170: + return false; } - } - return bindAnonymousDeclaration(node, 4096, "__object"); } - function bindAnonymousDeclaration(node, symbolFlags, name) { - var symbol = createSymbol(symbolFlags, name); - addDeclarationToSymbol(symbol, node, symbolFlags); + return false; + } + ts.isTypeNode = isTypeNode; + function forEachReturnStatement(body, visitor) { + return traverse(body); + function traverse(node) { + switch (node.kind) { + case 204: + return visitor(node); + case 220: + case 192: + case 196: + case 197: + case 198: + case 199: + case 200: + case 201: + case 205: + case 206: + case 241: + case 242: + case 207: + case 209: + case 244: + return ts.forEachChild(node, traverse); + } } - function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { - switch (blockScopeContainer.kind) { - case 218: - declareModuleMember(node, symbolFlags, symbolExcludes); - break; - case 248: - if (ts.isExternalModule(container)) { - declareModuleMember(node, symbolFlags, symbolExcludes); - break; + } + ts.forEachReturnStatement = forEachReturnStatement; + function forEachYieldExpression(body, visitor) { + return traverse(body); + function traverse(node) { + switch (node.kind) { + case 184: + visitor(node); + var operand = node.expression; + if (operand) { + traverse(operand); } + case 217: + case 215: + case 218: + case 216: + case 214: + case 186: + return; default: - if (!blockScopeContainer.locals) { - blockScopeContainer.locals = {}; - addToContainerChain(blockScopeContainer); + if (isFunctionLike(node)) { + var name_5 = node.name; + if (name_5 && name_5.kind === 136) { + traverse(name_5.expression); + return; + } + } + else if (!isTypeNode(node)) { + ts.forEachChild(node, traverse); } - declareSymbol(blockScopeContainer.locals, undefined, node, symbolFlags, symbolExcludes); } } - function bindBlockScopedVariableDeclaration(node) { - bindBlockScopedDeclaration(node, 2, 107455); - } - function checkStrictModeIdentifier(node) { - if (inStrictMode && - node.originalKeywordKind >= 106 && - node.originalKeywordKind <= 114 && - !ts.isIdentifierName(node)) { - if (!file.parseDiagnostics.length) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(node, getStrictModeIdentifierMessage(node), ts.declarationNameToString(node))); - } + } + ts.forEachYieldExpression = forEachYieldExpression; + function isVariableLike(node) { + if (node) { + switch (node.kind) { + case 163: + case 247: + case 138: + case 245: + case 141: + case 140: + case 246: + case 211: + return true; } } - function getStrictModeIdentifierMessage(node) { - if (ts.getContainingClass(node)) { - return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode; - } - if (file.externalModuleIndicator) { - return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode; - } - return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode; - } - function checkStrictModeBinaryExpression(node) { - if (inStrictMode && ts.isLeftHandSideExpression(node.left) && ts.isAssignmentOperator(node.operatorToken.kind)) { - checkStrictModeEvalOrArguments(node, node.left); - } - } - function checkStrictModeCatchClause(node) { - if (inStrictMode && node.variableDeclaration) { - checkStrictModeEvalOrArguments(node, node.variableDeclaration.name); - } - } - function checkStrictModeDeleteExpression(node) { - if (inStrictMode && node.expression.kind === 69) { - var span = ts.getErrorSpanForNode(file, node.expression); - file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode)); - } + return false; + } + ts.isVariableLike = isVariableLike; + function isAccessor(node) { + return node && (node.kind === 145 || node.kind === 146); + } + ts.isAccessor = isAccessor; + function isClassLike(node) { + return node && (node.kind === 214 || node.kind === 186); + } + ts.isClassLike = isClassLike; + function isFunctionLike(node) { + return node && isFunctionLikeKind(node.kind); + } + ts.isFunctionLike = isFunctionLike; + function isFunctionLikeKind(kind) { + switch (kind) { + case 144: + case 173: + case 213: + case 174: + case 143: + case 142: + case 145: + case 146: + case 147: + case 148: + case 149: + case 152: + case 153: + return true; } - function isEvalOrArgumentsIdentifier(node) { - return node.kind === 69 && - (node.text === "eval" || node.text === "arguments"); + } + ts.isFunctionLikeKind = isFunctionLikeKind; + function introducesArgumentsExoticObject(node) { + switch (node.kind) { + case 143: + case 142: + case 144: + case 145: + case 146: + case 213: + case 173: + return true; } - function checkStrictModeEvalOrArguments(contextNode, name) { - if (name && name.kind === 69) { - var identifier = name; - if (isEvalOrArgumentsIdentifier(identifier)) { - var span = ts.getErrorSpanForNode(file, name); - file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, getStrictModeEvalOrArgumentsMessage(contextNode), identifier.text)); - } - } + return false; + } + ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject; + function isIterationStatement(node, lookInLabeledStatements) { + switch (node.kind) { + case 199: + case 200: + case 201: + case 197: + case 198: + return true; + case 207: + return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } - function getStrictModeEvalOrArgumentsMessage(node) { - if (ts.getContainingClass(node)) { - return ts.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode; - } - if (file.externalModuleIndicator) { - return ts.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode; + return false; + } + ts.isIterationStatement = isIterationStatement; + function isFunctionBlock(node) { + return node && node.kind === 192 && isFunctionLike(node.parent); + } + ts.isFunctionBlock = isFunctionBlock; + function isObjectLiteralMethod(node) { + return node && node.kind === 143 && node.parent.kind === 165; + } + ts.isObjectLiteralMethod = isObjectLiteralMethod; + function getContainingFunction(node) { + while (true) { + node = node.parent; + if (!node || isFunctionLike(node)) { + return node; } - return ts.Diagnostics.Invalid_use_of_0_in_strict_mode; } - function checkStrictModeFunctionName(node) { - if (inStrictMode) { - checkStrictModeEvalOrArguments(node, node.name); + } + ts.getContainingFunction = getContainingFunction; + function getContainingClass(node) { + while (true) { + node = node.parent; + if (!node || isClassLike(node)) { + return node; } } - function checkStrictModeNumericLiteral(node) { - if (inStrictMode && node.flags & 32768) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode)); + } + ts.getContainingClass = getContainingClass; + function getThisContainer(node, includeArrowFunctions) { + while (true) { + node = node.parent; + if (!node) { + return undefined; } - } - function checkStrictModePostfixUnaryExpression(node) { - if (inStrictMode) { - checkStrictModeEvalOrArguments(node, node.operand); + switch (node.kind) { + case 136: + if (isClassLike(node.parent.parent)) { + return node; + } + node = node.parent; + break; + case 139: + if (node.parent.kind === 138 && isClassElement(node.parent.parent)) { + node = node.parent.parent; + } + else if (isClassElement(node.parent)) { + node = node.parent; + } + break; + case 174: + if (!includeArrowFunctions) { + continue; + } + case 213: + case 173: + case 218: + case 141: + case 140: + case 143: + case 142: + case 144: + case 145: + case 146: + case 147: + case 148: + case 149: + case 217: + case 248: + return node; } } - function checkStrictModePrefixUnaryExpression(node) { - if (inStrictMode) { - if (node.operator === 41 || node.operator === 42) { - checkStrictModeEvalOrArguments(node, node.operand); - } + } + ts.getThisContainer = getThisContainer; + function getSuperContainer(node, includeFunctions) { + while (true) { + node = node.parent; + if (!node) + return node; + switch (node.kind) { + case 136: + if (isClassLike(node.parent.parent)) { + return node; + } + node = node.parent; + break; + case 139: + if (node.parent.kind === 138 && isClassElement(node.parent.parent)) { + node = node.parent.parent; + } + else if (isClassElement(node.parent)) { + node = node.parent; + } + break; + case 213: + case 173: + case 174: + if (!includeFunctions) { + continue; + } + case 141: + case 140: + case 143: + case 142: + case 144: + case 145: + case 146: + return node; } } - function checkStrictModeWithStatement(node) { - if (inStrictMode) { - errorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_strict_mode); + } + ts.getSuperContainer = getSuperContainer; + function getEntityNameFromTypeNode(node) { + if (node) { + switch (node.kind) { + case 151: + return node.typeName; + case 188: + return node.expression; + case 69: + case 135: + return node; } } - function errorOnFirstToken(node, message, arg0, arg1, arg2) { - var span = ts.getSpanOfTokenAtPosition(file, node.pos); - file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, message, arg0, arg1, arg2)); + return undefined; + } + ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode; + function getInvokedExpression(node) { + if (node.kind === 170) { + return node.tag; } - function getDestructuringParameterName(node) { - return "__" + ts.indexOf(node.parent.parameters, node); + return node.expression; + } + ts.getInvokedExpression = getInvokedExpression; + function nodeCanBeDecorated(node) { + switch (node.kind) { + case 214: + return true; + case 141: + return node.parent.kind === 214; + case 138: + return node.parent.body && node.parent.parent.kind === 214; + case 145: + case 146: + case 143: + return node.body && node.parent.kind === 214; } - function bind(node) { - if (!node) { - return; - } - node.parent = parent; - var savedInStrictMode = inStrictMode; - if (!savedInStrictMode) { - updateStrictMode(node); - } - bindWorker(node); - bindChildren(node); - inStrictMode = savedInStrictMode; + return false; + } + ts.nodeCanBeDecorated = nodeCanBeDecorated; + function nodeIsDecorated(node) { + switch (node.kind) { + case 214: + if (node.decorators) { + return true; + } + return false; + case 141: + case 138: + if (node.decorators) { + return true; + } + return false; + case 145: + if (node.body && node.decorators) { + return true; + } + return false; + case 143: + case 146: + if (node.body && node.decorators) { + return true; + } + return false; } - function updateStrictMode(node) { - switch (node.kind) { - case 248: - case 219: - updateStrictModeStatementList(node.statements); - return; - case 192: - if (ts.isFunctionLike(node.parent)) { - updateStrictModeStatementList(node.statements); - } - return; - case 214: - case 186: - inStrictMode = true; - return; - } + return false; + } + ts.nodeIsDecorated = nodeIsDecorated; + function childIsDecorated(node) { + switch (node.kind) { + case 214: + return ts.forEach(node.members, nodeOrChildIsDecorated); + case 143: + case 146: + return ts.forEach(node.parameters, nodeIsDecorated); } - function updateStrictModeStatementList(statements) { - for (var _i = 0, statements_1 = statements; _i < statements_1.length; _i++) { - var statement = statements_1[_i]; - if (!ts.isPrologueDirective(statement)) { - return; + return false; + } + ts.childIsDecorated = childIsDecorated; + function nodeOrChildIsDecorated(node) { + return nodeIsDecorated(node) || childIsDecorated(node); + } + ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated; + function isPropertyAccessExpression(node) { + return node.kind === 166; + } + ts.isPropertyAccessExpression = isPropertyAccessExpression; + function isElementAccessExpression(node) { + return node.kind === 167; + } + ts.isElementAccessExpression = isElementAccessExpression; + function isExpression(node) { + switch (node.kind) { + case 95: + case 93: + case 99: + case 84: + case 10: + case 164: + case 165: + case 166: + case 167: + case 168: + case 169: + case 170: + case 189: + case 171: + case 172: + case 173: + case 186: + case 174: + case 177: + case 175: + case 176: + case 179: + case 180: + case 181: + case 182: + case 185: + case 183: + case 11: + case 187: + case 233: + case 234: + case 184: + case 178: + return true; + case 135: + while (node.parent.kind === 135) { + node = node.parent; } - if (isUseStrictPrologueDirective(statement)) { - inStrictMode = true; - return; + return node.parent.kind === 154; + case 69: + if (node.parent.kind === 154) { + return true; + } + case 8: + case 9: + case 97: + var parent_2 = node.parent; + switch (parent_2.kind) { + case 211: + case 138: + case 141: + case 140: + case 247: + case 245: + case 163: + return parent_2.initializer === node; + case 195: + case 196: + case 197: + case 198: + case 204: + case 205: + case 206: + case 241: + case 208: + case 206: + return parent_2.expression === node; + case 199: + var forStatement = parent_2; + return (forStatement.initializer === node && forStatement.initializer.kind !== 212) || + forStatement.condition === node || + forStatement.incrementor === node; + case 200: + case 201: + var forInStatement = parent_2; + return (forInStatement.initializer === node && forInStatement.initializer.kind !== 212) || + forInStatement.expression === node; + case 171: + case 189: + return node === parent_2.expression; + case 190: + return node === parent_2.expression; + case 136: + return node === parent_2.expression; + case 139: + case 240: + case 239: + return true; + case 188: + return parent_2.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_2); + default: + if (isExpression(parent_2)) { + return true; + } } + } + return false; + } + ts.isExpression = isExpression; + function isExternalModuleNameRelative(moduleName) { + return moduleName.substr(0, 2) === "./" || moduleName.substr(0, 3) === "../" || moduleName.substr(0, 2) === ".\\" || moduleName.substr(0, 3) === "..\\"; + } + ts.isExternalModuleNameRelative = isExternalModuleNameRelative; + function isInstantiatedModule(node, preserveConstEnums) { + var moduleState = ts.getModuleInstanceState(node); + return moduleState === 1 || + (preserveConstEnums && moduleState === 2); + } + ts.isInstantiatedModule = isInstantiatedModule; + function isExternalModuleImportEqualsDeclaration(node) { + return node.kind === 221 && node.moduleReference.kind === 232; + } + ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; + function getExternalModuleImportEqualsDeclarationExpression(node) { + ts.Debug.assert(isExternalModuleImportEqualsDeclaration(node)); + return node.moduleReference.expression; + } + ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; + function isInternalModuleImportEqualsDeclaration(node) { + return node.kind === 221 && node.moduleReference.kind !== 232; + } + ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; + function isSourceFileJavaScript(file) { + return isInJavaScriptFile(file); + } + ts.isSourceFileJavaScript = isSourceFileJavaScript; + function isInJavaScriptFile(node) { + return node && !!(node.parserContextFlags & 32); + } + ts.isInJavaScriptFile = isInJavaScriptFile; + function isRequireCall(expression) { + return expression.kind === 168 && + expression.expression.kind === 69 && + expression.expression.text === "require" && + expression.arguments.length === 1 && + expression.arguments[0].kind === 9; + } + ts.isRequireCall = isRequireCall; + function isExportsPropertyAssignment(expression) { + return isInJavaScriptFile(expression) && + (expression.kind === 181) && + (expression.operatorToken.kind === 56) && + (expression.left.kind === 166) && + (expression.left.expression.kind === 69) && + ((expression.left.expression).text === "exports"); + } + ts.isExportsPropertyAssignment = isExportsPropertyAssignment; + function isModuleExportsAssignment(expression) { + return isInJavaScriptFile(expression) && + (expression.kind === 181) && + (expression.operatorToken.kind === 56) && + (expression.left.kind === 166) && + (expression.left.expression.kind === 69) && + ((expression.left.expression).text === "module") && + (expression.left.name.text === "exports"); + } + ts.isModuleExportsAssignment = isModuleExportsAssignment; + function getExternalModuleName(node) { + if (node.kind === 222) { + return node.moduleSpecifier; + } + if (node.kind === 221) { + var reference = node.moduleReference; + if (reference.kind === 232) { + return reference.expression; } } - function isUseStrictPrologueDirective(node) { - var nodeText = ts.getTextOfNodeFromSourceText(file.text, node.expression); - return nodeText === "\"use strict\"" || nodeText === "'use strict'"; + if (node.kind === 228) { + return node.moduleSpecifier; } - function bindWorker(node) { + } + ts.getExternalModuleName = getExternalModuleName; + function hasQuestionToken(node) { + if (node) { switch (node.kind) { - case 69: - return checkStrictModeIdentifier(node); - case 181: - return checkStrictModeBinaryExpression(node); - case 244: - return checkStrictModeCatchClause(node); - case 175: - return checkStrictModeDeleteExpression(node); - case 8: - return checkStrictModeNumericLiteral(node); - case 180: - return checkStrictModePostfixUnaryExpression(node); - case 179: - return checkStrictModePrefixUnaryExpression(node); - case 205: - return checkStrictModeWithStatement(node); - case 97: - seenThisKeyword = true; - return; - case 137: - return declareSymbolAndAddToSymbolTable(node, 262144, 530912); case 138: - return bindParameter(node); - case 211: - case 163: - return bindVariableDeclarationOrBindingElement(node); + case 143: + case 142: + case 246: + case 245: case 141: case 140: - return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 536870912 : 0), 107455); - case 245: - case 246: - return bindPropertyOrMethodOrAccessor(node, 4, 107455); - case 247: - return bindPropertyOrMethodOrAccessor(node, 8, 107455); - case 147: - case 148: - case 149: - return declareSymbolAndAddToSymbolTable(node, 131072, 0); - case 143: - case 142: - return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 536870912 : 0), ts.isObjectLiteralMethod(node) ? 107455 : 99263); - case 213: - checkStrictModeFunctionName(node); - return declareSymbolAndAddToSymbolTable(node, 16, 106927); - case 144: - return declareSymbolAndAddToSymbolTable(node, 16384, 0); - case 145: - return bindPropertyOrMethodOrAccessor(node, 32768, 41919); - case 146: - return bindPropertyOrMethodOrAccessor(node, 65536, 74687); - case 152: - case 153: - return bindFunctionOrConstructorType(node); - case 155: - return bindAnonymousDeclaration(node, 2048, "__type"); - case 165: - return bindObjectLiteralExpression(node); - case 173: - case 174: - checkStrictModeFunctionName(node); - var bindingName = node.name ? node.name.text : "__function"; - return bindAnonymousDeclaration(node, 16, bindingName); - case 186: - case 214: - return bindClassLikeDeclaration(node); - case 215: - return bindBlockScopedDeclaration(node, 64, 792960); - case 216: - return bindBlockScopedDeclaration(node, 524288, 793056); - case 217: - return bindEnumDeclaration(node); - case 218: - return bindModuleDeclaration(node); - case 221: - case 224: - case 226: - case 230: - return declareSymbolAndAddToSymbolTable(node, 8388608, 8388608); - case 223: - return bindImportClause(node); - case 228: - return bindExportDeclaration(node); - case 227: - return bindExportAssignment(node); - case 248: - return bindSourceFileIfExternalModule(); - } - } - function bindSourceFileIfExternalModule() { - setExportContextFlag(file); - if (ts.isExternalModule(file)) { - bindAnonymousDeclaration(file, 512, "\"" + ts.removeFileExtension(file.fileName) + "\""); - } - } - function bindExportAssignment(node) { - if (!container.symbol || !container.symbol.exports) { - bindAnonymousDeclaration(node, 8388608, getDeclarationName(node)); - } - else if (node.expression.kind === 69) { - declareSymbol(container.symbol.exports, container.symbol, node, 8388608, 107455 | 8388608); - } - else { - declareSymbol(container.symbol.exports, container.symbol, node, 4, 107455 | 8388608); + return node.questionToken !== undefined; } } - function bindExportDeclaration(node) { - if (!container.symbol || !container.symbol.exports) { - bindAnonymousDeclaration(node, 1073741824, getDeclarationName(node)); - } - else if (!node.exportClause) { - declareSymbol(container.symbol.exports, container.symbol, node, 1073741824, 0); + return false; + } + ts.hasQuestionToken = hasQuestionToken; + function isJSDocConstructSignature(node) { + return node.kind === 261 && + node.parameters.length > 0 && + node.parameters[0].type.kind === 263; + } + ts.isJSDocConstructSignature = isJSDocConstructSignature; + function getJSDocTag(node, kind) { + if (node && node.jsDocComment) { + for (var _i = 0, _a = node.jsDocComment.tags; _i < _a.length; _i++) { + var tag = _a[_i]; + if (tag.kind === kind) { + return tag; + } } } - function bindImportClause(node) { - if (node.name) { - declareSymbolAndAddToSymbolTable(node, 8388608, 8388608); + } + function getJSDocTypeTag(node) { + return getJSDocTag(node, 269); + } + ts.getJSDocTypeTag = getJSDocTypeTag; + function getJSDocReturnTag(node) { + return getJSDocTag(node, 268); + } + ts.getJSDocReturnTag = getJSDocReturnTag; + function getJSDocTemplateTag(node) { + return getJSDocTag(node, 270); + } + ts.getJSDocTemplateTag = getJSDocTemplateTag; + function getCorrespondingJSDocParameterTag(parameter) { + if (parameter.name && parameter.name.kind === 69) { + var parameterName = parameter.name.text; + var docComment = parameter.parent.jsDocComment; + if (docComment) { + return ts.forEach(docComment.tags, function (t) { + if (t.kind === 267) { + var parameterTag = t; + var name_6 = parameterTag.preParameterName || parameterTag.postParameterName; + if (name_6.text === parameterName) { + return t; + } + } + }); } } - function bindClassLikeDeclaration(node) { - if (node.kind === 214) { - bindBlockScopedDeclaration(node, 32, 899519); - } - else { - var bindingName = node.name ? node.name.text : "__class"; - bindAnonymousDeclaration(node, 32, bindingName); - if (node.name) { - classifiableNames[node.name.text] = node.name.text; + } + ts.getCorrespondingJSDocParameterTag = getCorrespondingJSDocParameterTag; + function hasRestParameter(s) { + return isRestParameter(ts.lastOrUndefined(s.parameters)); + } + ts.hasRestParameter = hasRestParameter; + function isRestParameter(node) { + if (node) { + if (node.parserContextFlags & 32) { + if (node.type && node.type.kind === 262) { + return true; } - } - var symbol = node.symbol; - var prototypeSymbol = createSymbol(4 | 134217728, "prototype"); - if (ts.hasProperty(symbol.exports, prototypeSymbol.name)) { - if (node.name) { - node.name.parent = node; + var paramTag = getCorrespondingJSDocParameterTag(node); + if (paramTag && paramTag.typeExpression) { + return paramTag.typeExpression.type.kind === 262; } - file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name)); } - symbol.exports[prototypeSymbol.name] = prototypeSymbol; - prototypeSymbol.parent = symbol; + return node.dotDotDotToken !== undefined; } - function bindEnumDeclaration(node) { - return ts.isConst(node) - ? bindBlockScopedDeclaration(node, 128, 899967) - : bindBlockScopedDeclaration(node, 256, 899327); + return false; + } + ts.isRestParameter = isRestParameter; + function isLiteralKind(kind) { + return 8 <= kind && kind <= 11; + } + ts.isLiteralKind = isLiteralKind; + function isTextualLiteralKind(kind) { + return kind === 9 || kind === 11; + } + ts.isTextualLiteralKind = isTextualLiteralKind; + function isTemplateLiteralKind(kind) { + return 11 <= kind && kind <= 14; + } + ts.isTemplateLiteralKind = isTemplateLiteralKind; + function isBindingPattern(node) { + return !!node && (node.kind === 162 || node.kind === 161); + } + ts.isBindingPattern = isBindingPattern; + function isNodeDescendentOf(node, ancestor) { + while (node) { + if (node === ancestor) + return true; + node = node.parent; } - function bindVariableDeclarationOrBindingElement(node) { - if (inStrictMode) { - checkStrictModeEvalOrArguments(node, node.name); - } - if (!ts.isBindingPattern(node.name)) { - if (ts.isBlockOrCatchScoped(node)) { - bindBlockScopedVariableDeclaration(node); - } - else if (ts.isParameterDeclaration(node)) { - declareSymbolAndAddToSymbolTable(node, 1, 107455); - } - else { - declareSymbolAndAddToSymbolTable(node, 1, 107454); - } + return false; + } + ts.isNodeDescendentOf = isNodeDescendentOf; + function isInAmbientContext(node) { + while (node) { + if (node.flags & (4 | 4096)) { + return true; } + node = node.parent; } - function bindParameter(node) { - if (inStrictMode) { - checkStrictModeEvalOrArguments(node, node.name); - } - if (ts.isBindingPattern(node.name)) { - bindAnonymousDeclaration(node, 1, getDestructuringParameterName(node)); - } - else { - declareSymbolAndAddToSymbolTable(node, 1, 107455); - } - if (node.flags & 56 && - node.parent.kind === 144 && - ts.isClassLike(node.parent.parent)) { - var classDeclaration = node.parent.parent; - declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4, 107455); - } + return false; + } + ts.isInAmbientContext = isInAmbientContext; + function isDeclaration(node) { + switch (node.kind) { + case 174: + case 163: + case 214: + case 186: + case 144: + case 217: + case 247: + case 230: + case 213: + case 173: + case 145: + case 223: + case 221: + case 226: + case 215: + case 143: + case 142: + case 218: + case 224: + case 138: + case 245: + case 141: + case 140: + case 146: + case 246: + case 216: + case 137: + case 211: + return true; } - function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { - return ts.hasDynamicName(node) - ? bindAnonymousDeclaration(node, symbolFlags, "__computed") - : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); - } - function pushNamedLabel(name) { - initializeReachabilityStateIfNecessary(); - if (ts.hasProperty(labelIndexMap, name.text)) { + return false; + } + ts.isDeclaration = isDeclaration; + function isStatement(n) { + switch (n.kind) { + case 203: + case 202: + case 210: + case 197: + case 195: + case 194: + case 200: + case 201: + case 199: + case 196: + case 207: + case 204: + case 206: + case 208: + case 209: + case 193: + case 198: + case 205: + case 227: + return true; + default: return false; - } - labelIndexMap[name.text] = labelStack.push(1) - 1; - return true; } - function pushImplicitLabel() { - initializeReachabilityStateIfNecessary(); - var index = labelStack.push(1) - 1; - implicitLabels.push(index); - return index; + } + ts.isStatement = isStatement; + function isClassElement(n) { + switch (n.kind) { + case 144: + case 141: + case 143: + case 145: + case 146: + case 142: + case 149: + return true; + default: + return false; } - function popNamedLabel(label, outerState) { - var index = labelIndexMap[label.text]; - ts.Debug.assert(index !== undefined); - ts.Debug.assert(labelStack.length == index + 1); - labelIndexMap[label.text] = undefined; - setCurrentStateAtLabel(labelStack.pop(), outerState, label); + } + ts.isClassElement = isClassElement; + function isDeclarationName(name) { + if (name.kind !== 69 && name.kind !== 9 && name.kind !== 8) { + return false; } - function popImplicitLabel(implicitLabelIndex, outerState) { - if (labelStack.length !== implicitLabelIndex + 1) { - ts.Debug.assert(false, "Label stack: " + labelStack.length + ", index:" + implicitLabelIndex); - } - var i = implicitLabels.pop(); - if (implicitLabelIndex !== i) { - ts.Debug.assert(false, "i: " + i + ", index: " + implicitLabelIndex); + var parent = name.parent; + if (parent.kind === 226 || parent.kind === 230) { + if (parent.propertyName) { + return true; } - setCurrentStateAtLabel(labelStack.pop(), outerState, undefined); } - function setCurrentStateAtLabel(innerMergedState, outerState, label) { - if (innerMergedState === 1) { - if (label && !options.allowUnusedLabels) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(label, ts.Diagnostics.Unused_label)); - } - currentReachabilityState = outerState; - } - else { - currentReachabilityState = or(innerMergedState, outerState); - } + if (isDeclaration(parent)) { + return parent.name === name; } - function jumpToLabel(label, outerState) { - initializeReachabilityStateIfNecessary(); - var index = label ? labelIndexMap[label.text] : ts.lastOrUndefined(implicitLabels); - if (index === undefined) { + return false; + } + ts.isDeclarationName = isDeclarationName; + function isIdentifierName(node) { + var parent = node.parent; + switch (parent.kind) { + case 141: + case 140: + case 143: + case 142: + case 145: + case 146: + case 247: + case 245: + case 166: + return parent.name === node; + case 135: + if (parent.right === node) { + while (parent.kind === 135) { + parent = parent.parent; + } + return parent.kind === 154; + } return false; - } - var stateAtLabel = labelStack[index]; - labelStack[index] = stateAtLabel === 1 ? outerState : or(stateAtLabel, outerState); - return true; + case 163: + case 226: + return parent.propertyName === node; + case 230: + return true; } - function checkUnreachable(node) { - switch (currentReachabilityState) { - case 4: - var reportError = ts.isStatement(node) || - node.kind === 214 || - (node.kind === 218 && shouldReportErrorOnModuleDeclaration(node)) || - (node.kind === 217 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); - if (reportError) { - currentReachabilityState = 8; - var reportUnreachableCode = !options.allowUnreachableCode && - !ts.isInAmbientContext(node) && - (node.kind !== 193 || - ts.getCombinedNodeFlags(node.declarationList) & 24576 || - ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); - if (reportUnreachableCode) { - errorOnFirstToken(node, ts.Diagnostics.Unreachable_code_detected); - } - } - case 8: - return true; - default: - return false; - } - function shouldReportErrorOnModuleDeclaration(node) { - var instanceState = getModuleInstanceState(node); - return instanceState === 1 || (instanceState === 2 && options.preserveConstEnums); + return false; + } + ts.isIdentifierName = isIdentifierName; + function isAliasSymbolDeclaration(node) { + return node.kind === 221 || + node.kind === 223 && !!node.name || + node.kind === 224 || + node.kind === 226 || + node.kind === 230 || + node.kind === 227 && node.expression.kind === 69; + } + ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; + function getClassExtendsHeritageClauseElement(node) { + var heritageClause = getHeritageClause(node.heritageClauses, 83); + return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; + } + ts.getClassExtendsHeritageClauseElement = getClassExtendsHeritageClauseElement; + function getClassImplementsHeritageClauseElements(node) { + var heritageClause = getHeritageClause(node.heritageClauses, 106); + return heritageClause ? heritageClause.types : undefined; + } + ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; + function getInterfaceBaseTypeNodes(node) { + var heritageClause = getHeritageClause(node.heritageClauses, 83); + return heritageClause ? heritageClause.types : undefined; + } + ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; + function getHeritageClause(clauses, kind) { + if (clauses) { + for (var _i = 0, clauses_1 = clauses; _i < clauses_1.length; _i++) { + var clause = clauses_1[_i]; + if (clause.token === kind) { + return clause; + } } } - function initializeReachabilityStateIfNecessary() { - if (labelIndexMap) { - return; + return undefined; + } + ts.getHeritageClause = getHeritageClause; + function tryResolveScriptReference(host, sourceFile, reference) { + if (!host.getCompilerOptions().noResolve) { + var referenceFileName = ts.isRootedDiskPath(reference.fileName) ? reference.fileName : ts.combinePaths(ts.getDirectoryPath(sourceFile.fileName), reference.fileName); + return host.getSourceFile(referenceFileName); + } + } + ts.tryResolveScriptReference = tryResolveScriptReference; + function getAncestor(node, kind) { + while (node) { + if (node.kind === kind) { + return node; } - currentReachabilityState = 2; - labelIndexMap = {}; - labelStack = []; - implicitLabels = []; + node = node.parent; } + return undefined; } -})(ts || (ts = {})); -var ts; -(function (ts) { - function getDeclarationOfKind(symbol, kind) { - var declarations = symbol.declarations; - if (declarations) { - for (var _i = 0, declarations_1 = declarations; _i < declarations_1.length; _i++) { - var declaration = declarations_1[_i]; - if (declaration.kind === kind) { - return declaration; + ts.getAncestor = getAncestor; + function getFileReferenceFromReferencePath(comment, commentRange) { + var simpleReferenceRegEx = /^\/\/\/\s*/gim; + if (simpleReferenceRegEx.test(comment)) { + if (isNoDefaultLibRegEx.test(comment)) { + return { + isNoDefaultLib: true + }; + } + else { + var matchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment); + if (matchResult) { + var start = commentRange.pos; + var end = commentRange.end; + return { + fileReference: { + pos: start, + end: end, + fileName: matchResult[3] + }, + isNoDefaultLib: false + }; + } + else { + return { + diagnosticMessage: ts.Diagnostics.Invalid_reference_directive_syntax, + isNoDefaultLib: false + }; } } } return undefined; } - ts.getDeclarationOfKind = getDeclarationOfKind; - var stringWriters = []; - function getSingleLineStringWriter() { - if (stringWriters.length === 0) { - var str = ""; - var writeText = function (text) { return str += text; }; - return { - string: function () { return str; }, - writeKeyword: writeText, - writeOperator: writeText, - writePunctuation: writeText, - writeSpace: writeText, - writeStringLiteral: writeText, - writeParameter: writeText, - writeSymbol: writeText, - writeLine: function () { return str += " "; }, - increaseIndent: function () { }, - decreaseIndent: function () { }, - clear: function () { return str = ""; }, - trackSymbol: function () { }, - reportInaccessibleThisError: function () { } - }; - } - return stringWriters.pop(); - } - ts.getSingleLineStringWriter = getSingleLineStringWriter; - function releaseStringWriter(writer) { - writer.clear(); - stringWriters.push(writer); + ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; + function isKeyword(token) { + return 70 <= token && token <= 134; } - ts.releaseStringWriter = releaseStringWriter; - function getFullWidth(node) { - return node.end - node.pos; + ts.isKeyword = isKeyword; + function isTrivia(token) { + return 2 <= token && token <= 7; } - ts.getFullWidth = getFullWidth; - function arrayIsEqualTo(array1, array2, equaler) { - if (!array1 || !array2) { - return array1 === array2; - } - if (array1.length !== array2.length) { - return false; - } - for (var i = 0; i < array1.length; ++i) { - var equals = equaler ? equaler(array1[i], array2[i]) : array1[i] === array2[i]; - if (!equals) { - return false; - } - } - return true; + ts.isTrivia = isTrivia; + function isAsyncFunctionLike(node) { + return isFunctionLike(node) && (node.flags & 256) !== 0 && !isAccessor(node); } - ts.arrayIsEqualTo = arrayIsEqualTo; - function hasResolvedModule(sourceFile, moduleNameText) { - return sourceFile.resolvedModules && ts.hasProperty(sourceFile.resolvedModules, moduleNameText); + ts.isAsyncFunctionLike = isAsyncFunctionLike; + function isStringOrNumericLiteral(kind) { + return kind === 9 || kind === 8; } - ts.hasResolvedModule = hasResolvedModule; - function getResolvedModule(sourceFile, moduleNameText) { - return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules[moduleNameText] : undefined; + ts.isStringOrNumericLiteral = isStringOrNumericLiteral; + function hasDynamicName(declaration) { + return declaration.name && isDynamicName(declaration.name); } - ts.getResolvedModule = getResolvedModule; - function setResolvedModule(sourceFile, moduleNameText, resolvedModule) { - if (!sourceFile.resolvedModules) { - sourceFile.resolvedModules = {}; - } - sourceFile.resolvedModules[moduleNameText] = resolvedModule; + ts.hasDynamicName = hasDynamicName; + function isDynamicName(name) { + return name.kind === 136 && + !isStringOrNumericLiteral(name.expression.kind) && + !isWellKnownSymbolSyntactically(name.expression); } - ts.setResolvedModule = setResolvedModule; - function containsParseError(node) { - aggregateChildData(node); - return (node.parserContextFlags & 64) !== 0; + ts.isDynamicName = isDynamicName; + function isWellKnownSymbolSyntactically(node) { + return isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression); } - ts.containsParseError = containsParseError; - function aggregateChildData(node) { - if (!(node.parserContextFlags & 128)) { - var thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & 16) !== 0) || - ts.forEachChild(node, containsParseError); - if (thisNodeOrAnySubNodesHasError) { - node.parserContextFlags |= 64; - } - node.parserContextFlags |= 128; + ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically; + function getPropertyNameForPropertyNameNode(name) { + if (name.kind === 69 || name.kind === 9 || name.kind === 8) { + return name.text; } - } - function getSourceFileOfNode(node) { - while (node && node.kind !== 248) { - node = node.parent; + if (name.kind === 136) { + var nameExpression = name.expression; + if (isWellKnownSymbolSyntactically(nameExpression)) { + var rightHandSideName = nameExpression.name.text; + return getPropertyNameForKnownSymbolName(rightHandSideName); + } } - return node; - } - ts.getSourceFileOfNode = getSourceFileOfNode; - function getStartPositionOfLine(line, sourceFile) { - ts.Debug.assert(line >= 0); - return ts.getLineStarts(sourceFile)[line]; + return undefined; } - ts.getStartPositionOfLine = getStartPositionOfLine; - function nodePosToString(node) { - var file = getSourceFileOfNode(node); - var loc = ts.getLineAndCharacterOfPosition(file, node.pos); - return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")"; + ts.getPropertyNameForPropertyNameNode = getPropertyNameForPropertyNameNode; + function getPropertyNameForKnownSymbolName(symbolName) { + return "__@" + symbolName; } - ts.nodePosToString = nodePosToString; - function getStartPosOfNode(node) { - return node.pos; + ts.getPropertyNameForKnownSymbolName = getPropertyNameForKnownSymbolName; + function isESSymbolIdentifier(node) { + return node.kind === 69 && node.text === "Symbol"; } - ts.getStartPosOfNode = getStartPosOfNode; - function nodeIsMissing(node) { - if (!node) { - return true; + ts.isESSymbolIdentifier = isESSymbolIdentifier; + function isModifier(token) { + switch (token) { + case 115: + case 118: + case 74: + case 122: + case 77: + case 82: + case 112: + case 110: + case 111: + case 113: + return true; } - return node.pos === node.end && node.pos >= 0 && node.kind !== 1; + return false; } - ts.nodeIsMissing = nodeIsMissing; - function nodeIsPresent(node) { - return !nodeIsMissing(node); + ts.isModifier = isModifier; + function isParameterDeclaration(node) { + var root = getRootDeclaration(node); + return root.kind === 138; } - ts.nodeIsPresent = nodeIsPresent; - function getTokenPosOfNode(node, sourceFile) { - if (nodeIsMissing(node)) { - return node.pos; + ts.isParameterDeclaration = isParameterDeclaration; + function getRootDeclaration(node) { + while (node.kind === 163) { + node = node.parent.parent; } - return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); + return node; } - ts.getTokenPosOfNode = getTokenPosOfNode; - function getNonDecoratorTokenPosOfNode(node, sourceFile) { - if (nodeIsMissing(node) || !node.decorators) { - return getTokenPosOfNode(node, sourceFile); - } - return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.decorators.end); + ts.getRootDeclaration = getRootDeclaration; + function nodeStartsNewLexicalEnvironment(n) { + return isFunctionLike(n) || n.kind === 218 || n.kind === 248; } - ts.getNonDecoratorTokenPosOfNode = getNonDecoratorTokenPosOfNode; - function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia) { - if (includeTrivia === void 0) { includeTrivia = false; } - if (nodeIsMissing(node)) { - return ""; + ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; + function cloneEntityName(node) { + if (node.kind === 69) { + var clone_1 = createSynthesizedNode(69); + clone_1.text = node.text; + return clone_1; } - var text = sourceFile.text; - return text.substring(includeTrivia ? node.pos : ts.skipTrivia(text, node.pos), node.end); - } - ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; - function getTextOfNodeFromSourceText(sourceText, node) { - if (nodeIsMissing(node)) { - return ""; + else { + var clone_2 = createSynthesizedNode(135); + clone_2.left = cloneEntityName(node.left); + clone_2.left.parent = clone_2; + clone_2.right = cloneEntityName(node.right); + clone_2.right.parent = clone_2; + return clone_2; } - return sourceText.substring(ts.skipTrivia(sourceText, node.pos), node.end); - } - ts.getTextOfNodeFromSourceText = getTextOfNodeFromSourceText; - function getTextOfNode(node, includeTrivia) { - if (includeTrivia === void 0) { includeTrivia = false; } - return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia); - } - ts.getTextOfNode = getTextOfNode; - function escapeIdentifier(identifier) { - return identifier.length >= 2 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 ? "_" + identifier : identifier; } - ts.escapeIdentifier = escapeIdentifier; - function unescapeIdentifier(identifier) { - return identifier.length >= 3 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 && identifier.charCodeAt(2) === 95 ? identifier.substr(1) : identifier; + ts.cloneEntityName = cloneEntityName; + function nodeIsSynthesized(node) { + return node.pos === -1; } - ts.unescapeIdentifier = unescapeIdentifier; - function makeIdentifierFromModuleName(moduleName) { - return ts.getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); + ts.nodeIsSynthesized = nodeIsSynthesized; + function createSynthesizedNode(kind, startsOnNewLine) { + var node = ts.createNode(kind, -1, -1); + node.startsOnNewLine = startsOnNewLine; + return node; } - ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; - function isBlockOrCatchScoped(declaration) { - return (getCombinedNodeFlags(declaration) & 24576) !== 0 || - isCatchClauseVariableDeclaration(declaration); + ts.createSynthesizedNode = createSynthesizedNode; + function createSynthesizedNodeArray() { + var array = []; + array.pos = -1; + array.end = -1; + return array; } - ts.isBlockOrCatchScoped = isBlockOrCatchScoped; - function getEnclosingBlockScopeContainer(node) { - var current = node.parent; - while (current) { - if (isFunctionLike(current)) { - return current; - } - switch (current.kind) { - case 248: - case 220: - case 244: - case 218: - case 199: - case 200: - case 201: - return current; - case 192: - if (!isFunctionLike(current.parent)) { - return current; - } - } - current = current.parent; + ts.createSynthesizedNodeArray = createSynthesizedNodeArray; + function createDiagnosticCollection() { + var nonFileDiagnostics = []; + var fileDiagnostics = {}; + var diagnosticsModified = false; + var modificationCount = 0; + return { + add: add, + getGlobalDiagnostics: getGlobalDiagnostics, + getDiagnostics: getDiagnostics, + getModificationCount: getModificationCount, + reattachFileDiagnostics: reattachFileDiagnostics + }; + function getModificationCount() { + return modificationCount; } - } - ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; - function isCatchClauseVariableDeclaration(declaration) { - return declaration && - declaration.kind === 211 && - declaration.parent && - declaration.parent.kind === 244; - } - ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; - function declarationNameToString(name) { - return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); - } - ts.declarationNameToString = declarationNameToString; - function createDiagnosticForNode(node, message, arg0, arg1, arg2) { - var sourceFile = getSourceFileOfNode(node); - var span = getErrorSpanForNode(sourceFile, node); - return ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2); - } - ts.createDiagnosticForNode = createDiagnosticForNode; - function createDiagnosticForNodeFromMessageChain(node, messageChain) { - var sourceFile = getSourceFileOfNode(node); - var span = getErrorSpanForNode(sourceFile, node); - return { - file: sourceFile, - start: span.start, - length: span.length, - code: messageChain.code, - category: messageChain.category, - messageText: messageChain.next ? messageChain : messageChain.messageText - }; - } - ts.createDiagnosticForNodeFromMessageChain = createDiagnosticForNodeFromMessageChain; - function getSpanOfTokenAtPosition(sourceFile, pos) { - var scanner = ts.createScanner(sourceFile.languageVersion, true, sourceFile.languageVariant, sourceFile.text, undefined, pos); - scanner.scan(); - var start = scanner.getTokenPos(); - return ts.createTextSpanFromBounds(start, scanner.getTextPos()); - } - ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; - function getErrorSpanForNode(sourceFile, node) { - var errorNode = node; - switch (node.kind) { - case 248: - var pos_1 = ts.skipTrivia(sourceFile.text, 0, false); - if (pos_1 === sourceFile.text.length) { - return ts.createTextSpan(0, 0); + function reattachFileDiagnostics(newFile) { + if (!ts.hasProperty(fileDiagnostics, newFile.fileName)) { + return; + } + for (var _i = 0, _a = fileDiagnostics[newFile.fileName]; _i < _a.length; _i++) { + var diagnostic = _a[_i]; + diagnostic.file = newFile; + } + } + function add(diagnostic) { + var diagnostics; + if (diagnostic.file) { + diagnostics = fileDiagnostics[diagnostic.file.fileName]; + if (!diagnostics) { + diagnostics = []; + fileDiagnostics[diagnostic.file.fileName] = diagnostics; } - return getSpanOfTokenAtPosition(sourceFile, pos_1); - case 211: - case 163: - case 214: - case 186: - case 215: - case 218: - case 217: - case 247: - case 213: - case 173: - errorNode = node.name; - break; + } + else { + diagnostics = nonFileDiagnostics; + } + diagnostics.push(diagnostic); + diagnosticsModified = true; + modificationCount++; } - if (errorNode === undefined) { - return getSpanOfTokenAtPosition(sourceFile, node.pos); + function getGlobalDiagnostics() { + sortAndDeduplicate(); + return nonFileDiagnostics; + } + function getDiagnostics(fileName) { + sortAndDeduplicate(); + if (fileName) { + return fileDiagnostics[fileName] || []; + } + var allDiagnostics = []; + function pushDiagnostic(d) { + allDiagnostics.push(d); + } + ts.forEach(nonFileDiagnostics, pushDiagnostic); + for (var key in fileDiagnostics) { + if (ts.hasProperty(fileDiagnostics, key)) { + ts.forEach(fileDiagnostics[key], pushDiagnostic); + } + } + return ts.sortAndDeduplicateDiagnostics(allDiagnostics); + } + function sortAndDeduplicate() { + if (!diagnosticsModified) { + return; + } + diagnosticsModified = false; + nonFileDiagnostics = ts.sortAndDeduplicateDiagnostics(nonFileDiagnostics); + for (var key in fileDiagnostics) { + if (ts.hasProperty(fileDiagnostics, key)) { + fileDiagnostics[key] = ts.sortAndDeduplicateDiagnostics(fileDiagnostics[key]); + } + } } - var pos = nodeIsMissing(errorNode) - ? errorNode.pos - : ts.skipTrivia(sourceFile.text, errorNode.pos); - return ts.createTextSpanFromBounds(pos, errorNode.end); } - ts.getErrorSpanForNode = getErrorSpanForNode; - function isExternalModule(file) { - return file.externalModuleIndicator !== undefined; + ts.createDiagnosticCollection = createDiagnosticCollection; + var escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; + var escapedCharsMap = { + "\0": "\\0", + "\t": "\\t", + "\v": "\\v", + "\f": "\\f", + "\b": "\\b", + "\r": "\\r", + "\n": "\\n", + "\\": "\\\\", + "\"": "\\\"", + "\u2028": "\\u2028", + "\u2029": "\\u2029", + "\u0085": "\\u0085" + }; + function escapeString(s) { + s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s; + return s; + function getReplacement(c) { + return escapedCharsMap[c] || get16BitUnicodeEscapeSequence(c.charCodeAt(0)); + } } - ts.isExternalModule = isExternalModule; - function isDeclarationFile(file) { - return (file.flags & 4096) !== 0; + ts.escapeString = escapeString; + function isIntrinsicJsxName(name) { + var ch = name.substr(0, 1); + return ch.toLowerCase() === ch; } - ts.isDeclarationFile = isDeclarationFile; - function isConstEnumDeclaration(node) { - return node.kind === 217 && isConst(node); + ts.isIntrinsicJsxName = isIntrinsicJsxName; + function get16BitUnicodeEscapeSequence(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + var paddedHexCode = ("0000" + hexCharCode).slice(-4); + return "\\u" + paddedHexCode; } - ts.isConstEnumDeclaration = isConstEnumDeclaration; - function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 163 || isBindingPattern(node))) { - node = node.parent; + var nonAsciiCharacters = /[^\u0000-\u007F]/g; + function escapeNonAsciiCharacters(s) { + return nonAsciiCharacters.test(s) ? + s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) : + s; + } + ts.escapeNonAsciiCharacters = escapeNonAsciiCharacters; + var indentStrings = ["", " "]; + function getIndentString(level) { + if (indentStrings[level] === undefined) { + indentStrings[level] = getIndentString(level - 1) + indentStrings[1]; } - return node; + return indentStrings[level]; } - function getCombinedNodeFlags(node) { - node = walkUpBindingElementsAndPatterns(node); - var flags = node.flags; - if (node.kind === 211) { - node = node.parent; + ts.getIndentString = getIndentString; + function getIndentSize() { + return indentStrings[1].length; + } + ts.getIndentSize = getIndentSize; + function createTextWriter(newLine) { + var output; + var indent; + var lineStart; + var lineCount; + var linePos; + function write(s) { + if (s && s.length) { + if (lineStart) { + output += getIndentString(indent); + lineStart = false; + } + output += s; + } } - if (node && node.kind === 212) { - flags |= node.flags; - node = node.parent; + function reset() { + output = ""; + indent = 0; + lineStart = true; + lineCount = 0; + linePos = 0; } - if (node && node.kind === 193) { - flags |= node.flags; + function rawWrite(s) { + if (s !== undefined) { + if (lineStart) { + lineStart = false; + } + output += s; + } } - return flags; + function writeLiteral(s) { + if (s && s.length) { + write(s); + var lineStartsOfS = ts.computeLineStarts(s); + if (lineStartsOfS.length > 1) { + lineCount = lineCount + lineStartsOfS.length - 1; + linePos = output.length - s.length + ts.lastOrUndefined(lineStartsOfS); + } + } + } + function writeLine() { + if (!lineStart) { + output += newLine; + lineCount++; + linePos = output.length; + lineStart = true; + } + } + function writeTextOfNode(text, node) { + write(getTextOfNodeFromSourceText(text, node)); + } + reset(); + return { + write: write, + rawWrite: rawWrite, + writeTextOfNode: writeTextOfNode, + writeLiteral: writeLiteral, + writeLine: writeLine, + increaseIndent: function () { return indent++; }, + decreaseIndent: function () { return indent--; }, + getIndent: function () { return indent; }, + getTextPos: function () { return output.length; }, + getLine: function () { return lineCount + 1; }, + getColumn: function () { return lineStart ? indent * getIndentSize() + 1 : output.length - linePos + 1; }, + getText: function () { return output; }, + reset: reset + }; } - ts.getCombinedNodeFlags = getCombinedNodeFlags; - function isConst(node) { - return !!(getCombinedNodeFlags(node) & 16384); + ts.createTextWriter = createTextWriter; + function getExternalModuleNameFromPath(host, fileName) { + var dir = host.getCurrentDirectory(); + var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, fileName, dir, function (f) { return host.getCanonicalFileName(f); }, false); + return ts.removeFileExtension(relativePath); } - ts.isConst = isConst; - function isLet(node) { - return !!(getCombinedNodeFlags(node) & 8192); + ts.getExternalModuleNameFromPath = getExternalModuleNameFromPath; + function getOwnEmitOutputFilePath(sourceFile, host, extension) { + var compilerOptions = host.getCompilerOptions(); + var emitOutputFilePathWithoutExtension; + if (compilerOptions.outDir) { + emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); + } + else { + emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); + } + return emitOutputFilePathWithoutExtension + extension; } - ts.isLet = isLet; - function isPrologueDirective(node) { - return node.kind === 195 && node.expression.kind === 9; + ts.getOwnEmitOutputFilePath = getOwnEmitOutputFilePath; + function getSourceFilePathInNewDir(sourceFile, host, newDirPath) { + var sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory()); + sourceFilePath = sourceFilePath.replace(host.getCommonSourceDirectory(), ""); + return ts.combinePaths(newDirPath, sourceFilePath); } - ts.isPrologueDirective = isPrologueDirective; - function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { - return ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos); + ts.getSourceFilePathInNewDir = getSourceFilePathInNewDir; + function writeFile(host, diagnostics, fileName, data, writeByteOrderMark) { + host.writeFile(fileName, data, writeByteOrderMark, function (hostErrorMessage) { + diagnostics.push(ts.createCompilerDiagnostic(ts.Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); + }); } - ts.getLeadingCommentRangesOfNode = getLeadingCommentRangesOfNode; - function getJsDocComments(node, sourceFileOfNode) { - var commentRanges = (node.kind === 138 || node.kind === 137) ? - ts.concatenate(ts.getTrailingCommentRanges(sourceFileOfNode.text, node.pos), ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos)) : - getLeadingCommentRangesOfNode(node, sourceFileOfNode); - return ts.filter(commentRanges, isJsDocComment); - function isJsDocComment(comment) { - return sourceFileOfNode.text.charCodeAt(comment.pos + 1) === 42 && - sourceFileOfNode.text.charCodeAt(comment.pos + 2) === 42 && - sourceFileOfNode.text.charCodeAt(comment.pos + 3) !== 47; - } + ts.writeFile = writeFile; + function getLineOfLocalPosition(currentSourceFile, pos) { + return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; } - ts.getJsDocComments = getJsDocComments; - ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; - ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; - function isTypeNode(node) { - if (151 <= node.kind && node.kind <= 160) { - return true; - } - switch (node.kind) { - case 117: - case 128: - case 130: - case 120: - case 131: - return true; - case 103: - return node.parent.kind !== 177; - case 9: - return node.parent.kind === 138; - case 188: - return !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 69: - if (node.parent.kind === 135 && node.parent.right === node) { - node = node.parent; - } - else if (node.parent.kind === 166 && node.parent.name === node) { - node = node.parent; - } - ts.Debug.assert(node.kind === 69 || node.kind === 135 || node.kind === 166, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); - case 135: - case 166: - case 97: - var parent_1 = node.parent; - if (parent_1.kind === 154) { - return false; - } - if (151 <= parent_1.kind && parent_1.kind <= 160) { - return true; - } - switch (parent_1.kind) { - case 188: - return !isExpressionWithTypeArgumentsInClassExtendsClause(parent_1); - case 137: - return node === parent_1.constraint; - case 141: - case 140: - case 138: - case 211: - return node === parent_1.type; - case 213: - case 173: - case 174: - case 144: - case 143: - case 142: - case 145: - case 146: - return node === parent_1.type; - case 147: - case 148: - case 149: - return node === parent_1.type; - case 171: - return node === parent_1.type; - case 168: - case 169: - return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0; - case 170: - return false; - } + ts.getLineOfLocalPosition = getLineOfLocalPosition; + function getLineOfLocalPositionFromLineMap(lineMap, pos) { + return ts.computeLineAndCharacterOfPosition(lineMap, pos).line; + } + ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; + function getFirstConstructorWithBody(node) { + return ts.forEach(node.members, function (member) { + if (member.kind === 144 && nodeIsPresent(member.body)) { + return member; + } + }); + } + ts.getFirstConstructorWithBody = getFirstConstructorWithBody; + function getSetAccessorTypeAnnotationNode(accessor) { + return accessor && accessor.parameters.length > 0 && accessor.parameters[0].type; + } + ts.getSetAccessorTypeAnnotationNode = getSetAccessorTypeAnnotationNode; + function shouldEmitToOwnFile(sourceFile, compilerOptions) { + if (!isDeclarationFile(sourceFile)) { + if ((isExternalModule(sourceFile) || !(compilerOptions.outFile || compilerOptions.out))) { + return compilerOptions.isolatedModules || !ts.fileExtensionIs(sourceFile.fileName, ".js"); + } + return false; } return false; } - ts.isTypeNode = isTypeNode; - function forEachReturnStatement(body, visitor) { - return traverse(body); - function traverse(node) { - switch (node.kind) { - case 204: - return visitor(node); - case 220: - case 192: - case 196: - case 197: - case 198: - case 199: - case 200: - case 201: - case 205: - case 206: - case 241: - case 242: - case 207: - case 209: - case 244: - return ts.forEachChild(node, traverse); + ts.shouldEmitToOwnFile = shouldEmitToOwnFile; + function getAllAccessorDeclarations(declarations, accessor) { + var firstAccessor; + var secondAccessor; + var getAccessor; + var setAccessor; + if (hasDynamicName(accessor)) { + firstAccessor = accessor; + if (accessor.kind === 145) { + getAccessor = accessor; + } + else if (accessor.kind === 146) { + setAccessor = accessor; + } + else { + ts.Debug.fail("Accessor has wrong kind"); } } - } - ts.forEachReturnStatement = forEachReturnStatement; - function forEachYieldExpression(body, visitor) { - return traverse(body); - function traverse(node) { - switch (node.kind) { - case 184: - visitor(node); - var operand = node.expression; - if (operand) { - traverse(operand); - } - case 217: - case 215: - case 218: - case 216: - case 214: - case 186: - return; - default: - if (isFunctionLike(node)) { - var name_5 = node.name; - if (name_5 && name_5.kind === 136) { - traverse(name_5.expression); - return; + else { + ts.forEach(declarations, function (member) { + if ((member.kind === 145 || member.kind === 146) + && (member.flags & 64) === (accessor.flags & 64)) { + var memberName = getPropertyNameForPropertyNameNode(member.name); + var accessorName = getPropertyNameForPropertyNameNode(accessor.name); + if (memberName === accessorName) { + if (!firstAccessor) { + firstAccessor = member; + } + else if (!secondAccessor) { + secondAccessor = member; + } + if (member.kind === 145 && !getAccessor) { + getAccessor = member; + } + if (member.kind === 146 && !setAccessor) { + setAccessor = member; } } - else if (!isTypeNode(node)) { - ts.forEachChild(node, traverse); - } - } + } + }); } + return { + firstAccessor: firstAccessor, + secondAccessor: secondAccessor, + getAccessor: getAccessor, + setAccessor: setAccessor + }; } - ts.forEachYieldExpression = forEachYieldExpression; - function isVariableLike(node) { - if (node) { - switch (node.kind) { - case 163: - case 247: - case 138: - case 245: - case 141: - case 140: - case 246: - case 211: - return true; - } + ts.getAllAccessorDeclarations = getAllAccessorDeclarations; + function emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments) { + if (leadingComments && leadingComments.length && node.pos !== leadingComments[0].pos && + getLineOfLocalPositionFromLineMap(lineMap, node.pos) !== getLineOfLocalPositionFromLineMap(lineMap, leadingComments[0].pos)) { + writer.writeLine(); } - return false; - } - ts.isVariableLike = isVariableLike; - function isAccessor(node) { - return node && (node.kind === 145 || node.kind === 146); - } - ts.isAccessor = isAccessor; - function isClassLike(node) { - return node && (node.kind === 214 || node.kind === 186); } - ts.isClassLike = isClassLike; - function isFunctionLike(node) { - return node && isFunctionLikeKind(node.kind); + ts.emitNewLineBeforeLeadingComments = emitNewLineBeforeLeadingComments; + function emitComments(text, lineMap, writer, comments, trailingSeparator, newLine, writeComment) { + var emitLeadingSpace = !trailingSeparator; + ts.forEach(comments, function (comment) { + if (emitLeadingSpace) { + writer.write(" "); + emitLeadingSpace = false; + } + writeComment(text, lineMap, writer, comment, newLine); + if (comment.hasTrailingNewLine) { + writer.writeLine(); + } + else if (trailingSeparator) { + writer.write(" "); + } + else { + emitLeadingSpace = true; + } + }); } - ts.isFunctionLike = isFunctionLike; - function isFunctionLikeKind(kind) { - switch (kind) { - case 144: - case 173: - case 213: - case 174: - case 143: - case 142: - case 145: - case 146: - case 147: - case 148: - case 149: - case 152: - case 153: - return true; + ts.emitComments = emitComments; + function emitDetachedComments(text, lineMap, writer, writeComment, node, newLine, removeComments) { + var leadingComments; + var currentDetachedCommentInfo; + if (removeComments) { + if (node.pos === 0) { + leadingComments = ts.filter(ts.getLeadingCommentRanges(text, node.pos), isPinnedComment); + } } - } - ts.isFunctionLikeKind = isFunctionLikeKind; - function introducesArgumentsExoticObject(node) { - switch (node.kind) { - case 143: - case 142: - case 144: - case 145: - case 146: - case 213: - case 173: - return true; + else { + leadingComments = ts.getLeadingCommentRanges(text, node.pos); } - return false; - } - ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject; - function isIterationStatement(node, lookInLabeledStatements) { - switch (node.kind) { - case 199: - case 200: - case 201: - case 197: - case 198: - return true; - case 207: - return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); + if (leadingComments) { + var detachedComments = []; + var lastComment; + for (var _i = 0, leadingComments_1 = leadingComments; _i < leadingComments_1.length; _i++) { + var comment = leadingComments_1[_i]; + if (lastComment) { + var lastCommentLine = getLineOfLocalPositionFromLineMap(lineMap, lastComment.end); + var commentLine = getLineOfLocalPositionFromLineMap(lineMap, comment.pos); + if (commentLine >= lastCommentLine + 2) { + break; + } + } + detachedComments.push(comment); + lastComment = comment; + } + if (detachedComments.length) { + var lastCommentLine = getLineOfLocalPositionFromLineMap(lineMap, ts.lastOrUndefined(detachedComments).end); + var nodeLine = getLineOfLocalPositionFromLineMap(lineMap, ts.skipTrivia(text, node.pos)); + if (nodeLine >= lastCommentLine + 2) { + emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments); + emitComments(text, lineMap, writer, detachedComments, true, newLine, writeComment); + currentDetachedCommentInfo = { nodePos: node.pos, detachedCommentEndPos: ts.lastOrUndefined(detachedComments).end }; + } + } + } + return currentDetachedCommentInfo; + function isPinnedComment(comment) { + return text.charCodeAt(comment.pos + 1) === 42 && + text.charCodeAt(comment.pos + 2) === 33; } - return false; - } - ts.isIterationStatement = isIterationStatement; - function isFunctionBlock(node) { - return node && node.kind === 192 && isFunctionLike(node.parent); - } - ts.isFunctionBlock = isFunctionBlock; - function isObjectLiteralMethod(node) { - return node && node.kind === 143 && node.parent.kind === 165; } - ts.isObjectLiteralMethod = isObjectLiteralMethod; - function getContainingFunction(node) { - while (true) { - node = node.parent; - if (!node || isFunctionLike(node)) { - return node; + ts.emitDetachedComments = emitDetachedComments; + function writeCommentRange(text, lineMap, writer, comment, newLine) { + if (text.charCodeAt(comment.pos + 1) === 42) { + var firstCommentLineAndCharacter = ts.computeLineAndCharacterOfPosition(lineMap, comment.pos); + var lineCount = lineMap.length; + var firstCommentLineIndent; + for (var pos = comment.pos, currentLine = firstCommentLineAndCharacter.line; pos < comment.end; currentLine++) { + var nextLineStart = (currentLine + 1) === lineCount + ? text.length + 1 + : lineMap[currentLine + 1]; + if (pos !== comment.pos) { + if (firstCommentLineIndent === undefined) { + firstCommentLineIndent = calculateIndent(text, lineMap[firstCommentLineAndCharacter.line], comment.pos); + } + var currentWriterIndentSpacing = writer.getIndent() * getIndentSize(); + var spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(text, pos, nextLineStart); + if (spacesToEmit > 0) { + var numberOfSingleSpacesToEmit = spacesToEmit % getIndentSize(); + var indentSizeSpaceString = getIndentString((spacesToEmit - numberOfSingleSpacesToEmit) / getIndentSize()); + writer.rawWrite(indentSizeSpaceString); + while (numberOfSingleSpacesToEmit) { + writer.rawWrite(" "); + numberOfSingleSpacesToEmit--; + } + } + else { + writer.rawWrite(""); + } + } + writeTrimmedCurrentLine(text, comment, writer, newLine, pos, nextLineStart); + pos = nextLineStart; } } + else { + writer.write(text.substring(comment.pos, comment.end)); + } } - ts.getContainingFunction = getContainingFunction; - function getContainingClass(node) { - while (true) { - node = node.parent; - if (!node || isClassLike(node)) { - return node; + ts.writeCommentRange = writeCommentRange; + function writeTrimmedCurrentLine(text, comment, writer, newLine, pos, nextLineStart) { + var end = Math.min(comment.end, nextLineStart - 1); + var currentLineText = text.substring(pos, end).replace(/^\s+|\s+$/g, ""); + if (currentLineText) { + writer.write(currentLineText); + if (end !== comment.end) { + writer.writeLine(); } } + else { + writer.writeLiteral(newLine); + } } - ts.getContainingClass = getContainingClass; - function getThisContainer(node, includeArrowFunctions) { - while (true) { - node = node.parent; - if (!node) { - return undefined; + function calculateIndent(text, pos, end) { + var currentLineIndent = 0; + for (; pos < end && ts.isWhiteSpace(text.charCodeAt(pos)); pos++) { + if (text.charCodeAt(pos) === 9) { + currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); } - switch (node.kind) { - case 136: - if (isClassLike(node.parent.parent)) { - return node; - } - node = node.parent; - break; - case 139: - if (node.parent.kind === 138 && isClassElement(node.parent.parent)) { - node = node.parent.parent; - } - else if (isClassElement(node.parent)) { - node = node.parent; - } - break; - case 174: - if (!includeArrowFunctions) { - continue; - } - case 213: - case 173: - case 218: - case 141: - case 140: - case 143: - case 142: - case 144: - case 145: - case 146: - case 147: - case 148: - case 149: - case 217: - case 248: - return node; + else { + currentLineIndent++; } } + return currentLineIndent; } - ts.getThisContainer = getThisContainer; - function getSuperContainer(node, includeFunctions) { - while (true) { - node = node.parent; - if (!node) - return node; - switch (node.kind) { - case 136: - if (isClassLike(node.parent.parent)) { - return node; - } - node = node.parent; - break; - case 139: - if (node.parent.kind === 138 && isClassElement(node.parent.parent)) { - node = node.parent.parent; - } - else if (isClassElement(node.parent)) { - node = node.parent; - } - break; - case 213: - case 173: - case 174: - if (!includeFunctions) { - continue; - } - case 141: - case 140: - case 143: - case 142: - case 144: - case 145: - case 146: - return node; - } + function modifierToFlag(token) { + switch (token) { + case 113: return 64; + case 112: return 8; + case 111: return 32; + case 110: return 16; + case 115: return 128; + case 82: return 2; + case 122: return 4; + case 74: return 16384; + case 77: return 512; + case 118: return 256; } + return 0; } - ts.getSuperContainer = getSuperContainer; - function getEntityNameFromTypeNode(node) { - if (node) { - switch (node.kind) { - case 151: - return node.typeName; - case 188: - return node.expression; + ts.modifierToFlag = modifierToFlag; + function isLeftHandSideExpression(expr) { + if (expr) { + switch (expr.kind) { + case 166: + case 167: + case 169: + case 168: + case 233: + case 234: + case 170: + case 164: + case 172: + case 165: + case 186: + case 173: case 69: - case 135: - return node; + case 10: + case 8: + case 9: + case 11: + case 183: + case 84: + case 93: + case 97: + case 99: + case 95: + return true; } } - return undefined; + return false; } - ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode; - function getInvokedExpression(node) { - if (node.kind === 170) { - return node.tag; - } - return node.expression; + ts.isLeftHandSideExpression = isLeftHandSideExpression; + function isAssignmentOperator(token) { + return token >= 56 && token <= 68; } - ts.getInvokedExpression = getInvokedExpression; - function nodeCanBeDecorated(node) { - switch (node.kind) { - case 214: - return true; - case 141: - return node.parent.kind === 214; - case 138: - return node.parent.body && node.parent.parent.kind === 214; - case 145: - case 146: - case 143: - return node.body && node.parent.kind === 214; - } - return false; + ts.isAssignmentOperator = isAssignmentOperator; + function isExpressionWithTypeArgumentsInClassExtendsClause(node) { + return node.kind === 188 && + node.parent.token === 83 && + isClassLike(node.parent.parent); } - ts.nodeCanBeDecorated = nodeCanBeDecorated; - function nodeIsDecorated(node) { - switch (node.kind) { - case 214: - if (node.decorators) { - return true; - } - return false; - case 141: - case 138: - if (node.decorators) { - return true; - } - return false; - case 145: - if (node.body && node.decorators) { - return true; - } - return false; - case 143: - case 146: - if (node.body && node.decorators) { - return true; - } - return false; - } - return false; + ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause; + function isSupportedExpressionWithTypeArguments(node) { + return isSupportedExpressionWithTypeArgumentsRest(node.expression); } - ts.nodeIsDecorated = nodeIsDecorated; - function childIsDecorated(node) { - switch (node.kind) { - case 214: - return ts.forEach(node.members, nodeOrChildIsDecorated); - case 143: - case 146: - return ts.forEach(node.parameters, nodeIsDecorated); + ts.isSupportedExpressionWithTypeArguments = isSupportedExpressionWithTypeArguments; + function isSupportedExpressionWithTypeArgumentsRest(node) { + if (node.kind === 69) { + return true; + } + else if (isPropertyAccessExpression(node)) { + return isSupportedExpressionWithTypeArgumentsRest(node.expression); + } + else { + return false; } - return false; - } - ts.childIsDecorated = childIsDecorated; - function nodeOrChildIsDecorated(node) { - return nodeIsDecorated(node) || childIsDecorated(node); - } - ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated; - function isPropertyAccessExpression(node) { - return node.kind === 166; } - ts.isPropertyAccessExpression = isPropertyAccessExpression; - function isElementAccessExpression(node) { - return node.kind === 167; + function isRightSideOfQualifiedNameOrPropertyAccess(node) { + return (node.parent.kind === 135 && node.parent.right === node) || + (node.parent.kind === 166 && node.parent.name === node); } - ts.isElementAccessExpression = isElementAccessExpression; - function isExpression(node) { - switch (node.kind) { - case 95: - case 93: - case 99: - case 84: - case 10: - case 164: - case 165: - case 166: - case 167: - case 168: - case 169: - case 170: - case 189: - case 171: - case 172: - case 173: - case 186: - case 174: - case 177: - case 175: - case 176: - case 179: - case 180: - case 181: - case 182: - case 185: - case 183: - case 11: - case 187: - case 233: - case 234: - case 184: - case 178: - return true; - case 135: - while (node.parent.kind === 135) { - node = node.parent; - } - return node.parent.kind === 154; - case 69: - if (node.parent.kind === 154) { - return true; - } - case 8: - case 9: - case 97: - var parent_2 = node.parent; - switch (parent_2.kind) { - case 211: - case 138: - case 141: - case 140: - case 247: - case 245: - case 163: - return parent_2.initializer === node; - case 195: - case 196: - case 197: - case 198: - case 204: - case 205: - case 206: - case 241: - case 208: - case 206: - return parent_2.expression === node; - case 199: - var forStatement = parent_2; - return (forStatement.initializer === node && forStatement.initializer.kind !== 212) || - forStatement.condition === node || - forStatement.incrementor === node; - case 200: - case 201: - var forInStatement = parent_2; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 212) || - forInStatement.expression === node; - case 171: - case 189: - return node === parent_2.expression; - case 190: - return node === parent_2.expression; - case 136: - return node === parent_2.expression; - case 139: - case 240: - case 239: - return true; - case 188: - return parent_2.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_2); - default: - if (isExpression(parent_2)) { - return true; - } - } + ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; + function isEmptyObjectLiteralOrArrayLiteral(expression) { + var kind = expression.kind; + if (kind === 165) { + return expression.properties.length === 0; + } + if (kind === 164) { + return expression.elements.length === 0; } return false; } - ts.isExpression = isExpression; - function isExternalModuleNameRelative(moduleName) { - return moduleName.substr(0, 2) === "./" || moduleName.substr(0, 3) === "../" || moduleName.substr(0, 2) === ".\\" || moduleName.substr(0, 3) === "..\\"; - } - ts.isExternalModuleNameRelative = isExternalModuleNameRelative; - function isInstantiatedModule(node, preserveConstEnums) { - var moduleState = ts.getModuleInstanceState(node); - return moduleState === 1 || - (preserveConstEnums && moduleState === 2); - } - ts.isInstantiatedModule = isInstantiatedModule; - function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 221 && node.moduleReference.kind === 232; + ts.isEmptyObjectLiteralOrArrayLiteral = isEmptyObjectLiteralOrArrayLiteral; + function getLocalSymbolForExportDefault(symbol) { + return symbol && symbol.valueDeclaration && (symbol.valueDeclaration.flags & 512) ? symbol.valueDeclaration.localSymbol : undefined; } - ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; - function getExternalModuleImportEqualsDeclarationExpression(node) { - ts.Debug.assert(isExternalModuleImportEqualsDeclaration(node)); - return node.moduleReference.expression; + ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault; + function hasJavaScriptFileExtension(fileName) { + return ts.fileExtensionIs(fileName, ".js") || ts.fileExtensionIs(fileName, ".jsx"); } - ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; - function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 221 && node.moduleReference.kind !== 232; + ts.hasJavaScriptFileExtension = hasJavaScriptFileExtension; + function allowsJsxExpressions(fileName) { + return ts.fileExtensionIs(fileName, ".tsx") || ts.fileExtensionIs(fileName, ".jsx"); } - ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; - function getExternalModuleName(node) { - if (node.kind === 222) { - return node.moduleSpecifier; - } - if (node.kind === 221) { - var reference = node.moduleReference; - if (reference.kind === 232) { - return reference.expression; + ts.allowsJsxExpressions = allowsJsxExpressions; + function getExpandedCharCodes(input) { + var output = []; + var length = input.length; + for (var i = 0; i < length; i++) { + var charCode = input.charCodeAt(i); + if (charCode < 0x80) { + output.push(charCode); + } + else if (charCode < 0x800) { + output.push((charCode >> 6) | 192); + output.push((charCode & 63) | 128); + } + else if (charCode < 0x10000) { + output.push((charCode >> 12) | 224); + output.push(((charCode >> 6) & 63) | 128); + output.push((charCode & 63) | 128); + } + else if (charCode < 0x20000) { + output.push((charCode >> 18) | 240); + output.push(((charCode >> 12) & 63) | 128); + output.push(((charCode >> 6) & 63) | 128); + output.push((charCode & 63) | 128); + } + else { + ts.Debug.assert(false, "Unexpected code point"); } } - if (node.kind === 228) { - return node.moduleSpecifier; - } + return output; } - ts.getExternalModuleName = getExternalModuleName; - function hasQuestionToken(node) { - if (node) { - switch (node.kind) { - case 138: - case 143: - case 142: - case 246: - case 245: - case 141: - case 140: - return node.questionToken !== undefined; + var base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + function convertToBase64(input) { + var result = ""; + var charCodes = getExpandedCharCodes(input); + var i = 0; + var length = charCodes.length; + var byte1, byte2, byte3, byte4; + while (i < length) { + byte1 = charCodes[i] >> 2; + byte2 = (charCodes[i] & 3) << 4 | charCodes[i + 1] >> 4; + byte3 = (charCodes[i + 1] & 15) << 2 | charCodes[i + 2] >> 6; + byte4 = charCodes[i + 2] & 63; + if (i + 1 >= length) { + byte3 = byte4 = 64; } + else if (i + 2 >= length) { + byte4 = 64; + } + result += base64Digits.charAt(byte1) + base64Digits.charAt(byte2) + base64Digits.charAt(byte3) + base64Digits.charAt(byte4); + i += 3; } - return false; + return result; } - ts.hasQuestionToken = hasQuestionToken; - function isJSDocConstructSignature(node) { - return node.kind === 261 && - node.parameters.length > 0 && - node.parameters[0].type.kind === 263; + ts.convertToBase64 = convertToBase64; + function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { + return !ts.isRootedDiskPath(absoluteOrRelativePath) + ? absoluteOrRelativePath + : ts.getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, false); } - ts.isJSDocConstructSignature = isJSDocConstructSignature; - function getJSDocTag(node, kind) { - if (node && node.jsDocComment) { - for (var _i = 0, _a = node.jsDocComment.tags; _i < _a.length; _i++) { - var tag = _a[_i]; - if (tag.kind === kind) { - return tag; - } - } + ts.convertToRelativePath = convertToRelativePath; + var carriageReturnLineFeed = "\r\n"; + var lineFeed = "\n"; + function getNewLineCharacter(options) { + if (options.newLine === 0) { + return carriageReturnLineFeed; + } + else if (options.newLine === 1) { + return lineFeed; + } + else if (ts.sys) { + return ts.sys.newLine; } + return carriageReturnLineFeed; } - function getJSDocTypeTag(node) { - return getJSDocTag(node, 269); + ts.getNewLineCharacter = getNewLineCharacter; +})(ts || (ts = {})); +var ts; +(function (ts) { + function getDefaultLibFileName(options) { + return options.target === 2 ? "lib.es6.d.ts" : "lib.d.ts"; } - ts.getJSDocTypeTag = getJSDocTypeTag; - function getJSDocReturnTag(node) { - return getJSDocTag(node, 268); + ts.getDefaultLibFileName = getDefaultLibFileName; + function textSpanEnd(span) { + return span.start + span.length; } - ts.getJSDocReturnTag = getJSDocReturnTag; - function getJSDocTemplateTag(node) { - return getJSDocTag(node, 270); + ts.textSpanEnd = textSpanEnd; + function textSpanIsEmpty(span) { + return span.length === 0; } - ts.getJSDocTemplateTag = getJSDocTemplateTag; - function getCorrespondingJSDocParameterTag(parameter) { - if (parameter.name && parameter.name.kind === 69) { - var parameterName = parameter.name.text; - var docComment = parameter.parent.jsDocComment; - if (docComment) { - return ts.forEach(docComment.tags, function (t) { - if (t.kind === 267) { - var parameterTag = t; - var name_6 = parameterTag.preParameterName || parameterTag.postParameterName; - if (name_6.text === parameterName) { - return t; - } - } - }); - } - } + ts.textSpanIsEmpty = textSpanIsEmpty; + function textSpanContainsPosition(span, position) { + return position >= span.start && position < textSpanEnd(span); } - ts.getCorrespondingJSDocParameterTag = getCorrespondingJSDocParameterTag; - function hasRestParameter(s) { - return isRestParameter(ts.lastOrUndefined(s.parameters)); + ts.textSpanContainsPosition = textSpanContainsPosition; + function textSpanContainsTextSpan(span, other) { + return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span); } - ts.hasRestParameter = hasRestParameter; - function isRestParameter(node) { - if (node) { - if (node.parserContextFlags & 32) { - if (node.type && node.type.kind === 262) { - return true; - } - var paramTag = getCorrespondingJSDocParameterTag(node); - if (paramTag && paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 262; - } - } - return node.dotDotDotToken !== undefined; + ts.textSpanContainsTextSpan = textSpanContainsTextSpan; + function textSpanOverlapsWith(span, other) { + var overlapStart = Math.max(span.start, other.start); + var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other)); + return overlapStart < overlapEnd; + } + ts.textSpanOverlapsWith = textSpanOverlapsWith; + function textSpanOverlap(span1, span2) { + var overlapStart = Math.max(span1.start, span2.start); + var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); + if (overlapStart < overlapEnd) { + return createTextSpanFromBounds(overlapStart, overlapEnd); } - return false; + return undefined; } - ts.isRestParameter = isRestParameter; - function isLiteralKind(kind) { - return 8 <= kind && kind <= 11; + ts.textSpanOverlap = textSpanOverlap; + function textSpanIntersectsWithTextSpan(span, other) { + return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start; } - ts.isLiteralKind = isLiteralKind; - function isTextualLiteralKind(kind) { - return kind === 9 || kind === 11; + ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan; + function textSpanIntersectsWith(span, start, length) { + var end = start + length; + return start <= textSpanEnd(span) && end >= span.start; } - ts.isTextualLiteralKind = isTextualLiteralKind; - function isTemplateLiteralKind(kind) { - return 11 <= kind && kind <= 14; + ts.textSpanIntersectsWith = textSpanIntersectsWith; + function decodedTextSpanIntersectsWith(start1, length1, start2, length2) { + var end1 = start1 + length1; + var end2 = start2 + length2; + return start2 <= end1 && end2 >= start1; } - ts.isTemplateLiteralKind = isTemplateLiteralKind; - function isBindingPattern(node) { - return !!node && (node.kind === 162 || node.kind === 161); + ts.decodedTextSpanIntersectsWith = decodedTextSpanIntersectsWith; + function textSpanIntersectsWithPosition(span, position) { + return position <= textSpanEnd(span) && position >= span.start; } - ts.isBindingPattern = isBindingPattern; - function isNodeDescendentOf(node, ancestor) { - while (node) { - if (node === ancestor) - return true; - node = node.parent; + ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition; + function textSpanIntersection(span1, span2) { + var intersectStart = Math.max(span1.start, span2.start); + var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); + if (intersectStart <= intersectEnd) { + return createTextSpanFromBounds(intersectStart, intersectEnd); } - return false; + return undefined; } - ts.isNodeDescendentOf = isNodeDescendentOf; - function isInAmbientContext(node) { - while (node) { - if (node.flags & (4 | 4096)) { - return true; - } - node = node.parent; + ts.textSpanIntersection = textSpanIntersection; + function createTextSpan(start, length) { + if (start < 0) { + throw new Error("start < 0"); } - return false; - } - ts.isInAmbientContext = isInAmbientContext; - function isDeclaration(node) { - switch (node.kind) { - case 174: - case 163: - case 214: - case 186: - case 144: - case 217: - case 247: - case 230: - case 213: - case 173: - case 145: - case 223: - case 221: - case 226: - case 215: - case 143: - case 142: - case 218: - case 224: - case 138: - case 245: - case 141: - case 140: - case 146: - case 246: - case 216: - case 137: - case 211: - return true; + if (length < 0) { + throw new Error("length < 0"); } - return false; + return { start: start, length: length }; } - ts.isDeclaration = isDeclaration; - function isStatement(n) { - switch (n.kind) { - case 203: - case 202: - case 210: - case 197: - case 195: - case 194: - case 200: - case 201: - case 199: - case 196: - case 207: - case 204: - case 206: - case 208: - case 209: - case 193: - case 198: - case 205: - case 227: - return true; - default: - return false; - } + ts.createTextSpan = createTextSpan; + function createTextSpanFromBounds(start, end) { + return createTextSpan(start, end - start); } - ts.isStatement = isStatement; - function isClassElement(n) { - switch (n.kind) { - case 144: - case 141: - case 143: - case 145: - case 146: - case 142: - case 149: - return true; - default: - return false; - } + ts.createTextSpanFromBounds = createTextSpanFromBounds; + function textChangeRangeNewSpan(range) { + return createTextSpan(range.span.start, range.newLength); } - ts.isClassElement = isClassElement; - function isDeclarationName(name) { - if (name.kind !== 69 && name.kind !== 9 && name.kind !== 8) { - return false; - } - var parent = name.parent; - if (parent.kind === 226 || parent.kind === 230) { - if (parent.propertyName) { - return true; - } - } - if (isDeclaration(parent)) { - return parent.name === name; - } - return false; + ts.textChangeRangeNewSpan = textChangeRangeNewSpan; + function textChangeRangeIsUnchanged(range) { + return textSpanIsEmpty(range.span) && range.newLength === 0; } - ts.isDeclarationName = isDeclarationName; - function isIdentifierName(node) { - var parent = node.parent; - switch (parent.kind) { - case 141: - case 140: - case 143: - case 142: - case 145: - case 146: - case 247: - case 245: - case 166: - return parent.name === node; - case 135: - if (parent.right === node) { - while (parent.kind === 135) { - parent = parent.parent; - } - return parent.kind === 154; - } - return false; - case 163: - case 226: - return parent.propertyName === node; - case 230: - return true; + ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged; + function createTextChangeRange(span, newLength) { + if (newLength < 0) { + throw new Error("newLength < 0"); } - return false; - } - ts.isIdentifierName = isIdentifierName; - function isAliasSymbolDeclaration(node) { - return node.kind === 221 || - node.kind === 223 && !!node.name || - node.kind === 224 || - node.kind === 226 || - node.kind === 230 || - node.kind === 227 && node.expression.kind === 69; - } - ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; - function getClassExtendsHeritageClauseElement(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 83); - return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; - } - ts.getClassExtendsHeritageClauseElement = getClassExtendsHeritageClauseElement; - function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 106); - return heritageClause ? heritageClause.types : undefined; - } - ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; - function getInterfaceBaseTypeNodes(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 83); - return heritageClause ? heritageClause.types : undefined; + return { span: span, newLength: newLength }; } - ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; - function getHeritageClause(clauses, kind) { - if (clauses) { - for (var _i = 0, clauses_1 = clauses; _i < clauses_1.length; _i++) { - var clause = clauses_1[_i]; - if (clause.token === kind) { - return clause; - } - } + ts.createTextChangeRange = createTextChangeRange; + ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0); + function collapseTextChangeRangesAcrossMultipleVersions(changes) { + if (changes.length === 0) { + return ts.unchangedTextChangeRange; } - return undefined; - } - ts.getHeritageClause = getHeritageClause; - function tryResolveScriptReference(host, sourceFile, reference) { - if (!host.getCompilerOptions().noResolve) { - var referenceFileName = ts.isRootedDiskPath(reference.fileName) ? reference.fileName : ts.combinePaths(ts.getDirectoryPath(sourceFile.fileName), reference.fileName); - return host.getSourceFile(referenceFileName); + if (changes.length === 1) { + return changes[0]; } - } - ts.tryResolveScriptReference = tryResolveScriptReference; - function getAncestor(node, kind) { - while (node) { - if (node.kind === kind) { - return node; - } - node = node.parent; + var change0 = changes[0]; + var oldStartN = change0.span.start; + var oldEndN = textSpanEnd(change0.span); + var newEndN = oldStartN + change0.newLength; + for (var i = 1; i < changes.length; i++) { + var nextChange = changes[i]; + var oldStart1 = oldStartN; + var oldEnd1 = oldEndN; + var newEnd1 = newEndN; + var oldStart2 = nextChange.span.start; + var oldEnd2 = textSpanEnd(nextChange.span); + var newEnd2 = oldStart2 + nextChange.newLength; + oldStartN = Math.min(oldStart1, oldStart2); + oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)); + newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)); } - return undefined; + return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN); } - ts.getAncestor = getAncestor; - function getFileReferenceFromReferencePath(comment, commentRange) { - var simpleReferenceRegEx = /^\/\/\/\s*/gim; - if (simpleReferenceRegEx.exec(comment)) { - if (isNoDefaultLibRegEx.exec(comment)) { - return { - isNoDefaultLib: true - }; - } - else { - var matchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment); - if (matchResult) { - var start = commentRange.pos; - var end = commentRange.end; - return { - fileReference: { - pos: start, - end: end, - fileName: matchResult[3] - }, - isNoDefaultLib: false - }; - } - else { - return { - diagnosticMessage: ts.Diagnostics.Invalid_reference_directive_syntax, - isNoDefaultLib: false - }; + ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; + function getTypeParameterOwner(d) { + if (d && d.kind === 137) { + for (var current = d; current; current = current.parent) { + if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 215) { + return current; } } } - return undefined; - } - ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; - function isKeyword(token) { - return 70 <= token && token <= 134; - } - ts.isKeyword = isKeyword; - function isTrivia(token) { - return 2 <= token && token <= 7; - } - ts.isTrivia = isTrivia; - function isAsyncFunctionLike(node) { - return isFunctionLike(node) && (node.flags & 256) !== 0 && !isAccessor(node); - } - ts.isAsyncFunctionLike = isAsyncFunctionLike; - function hasDynamicName(declaration) { - return declaration.name && - declaration.name.kind === 136 && - !isWellKnownSymbolSyntactically(declaration.name.expression); } - ts.hasDynamicName = hasDynamicName; - function isWellKnownSymbolSyntactically(node) { - return isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression); - } - ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically; - function getPropertyNameForPropertyNameNode(name) { - if (name.kind === 69 || name.kind === 9 || name.kind === 8) { - return name.text; + ts.getTypeParameterOwner = getTypeParameterOwner; +})(ts || (ts = {})); +var ts; +(function (ts) { + ts.parseTime = 0; + var NodeConstructor; + var SourceFileConstructor; + function createNode(kind, pos, end) { + if (kind === 248) { + return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); } - if (name.kind === 136) { - var nameExpression = name.expression; - if (isWellKnownSymbolSyntactically(nameExpression)) { - var rightHandSideName = nameExpression.name.text; - return getPropertyNameForKnownSymbolName(rightHandSideName); - } + else { + return new (NodeConstructor || (NodeConstructor = ts.objectAllocator.getNodeConstructor()))(kind, pos, end); } - return undefined; - } - ts.getPropertyNameForPropertyNameNode = getPropertyNameForPropertyNameNode; - function getPropertyNameForKnownSymbolName(symbolName) { - return "__@" + symbolName; - } - ts.getPropertyNameForKnownSymbolName = getPropertyNameForKnownSymbolName; - function isESSymbolIdentifier(node) { - return node.kind === 69 && node.text === "Symbol"; } - ts.isESSymbolIdentifier = isESSymbolIdentifier; - function isModifier(token) { - switch (token) { - case 115: - case 118: - case 74: - case 122: - case 77: - case 82: - case 112: - case 110: - case 111: - case 113: - return true; + ts.createNode = createNode; + function visitNode(cbNode, node) { + if (node) { + return cbNode(node); } - return false; } - ts.isModifier = isModifier; - function isParameterDeclaration(node) { - var root = getRootDeclaration(node); - return root.kind === 138; + function visitNodeArray(cbNodes, nodes) { + if (nodes) { + return cbNodes(nodes); + } } - ts.isParameterDeclaration = isParameterDeclaration; - function getRootDeclaration(node) { - while (node.kind === 163) { - node = node.parent.parent; - } - return node; - } - ts.getRootDeclaration = getRootDeclaration; - function nodeStartsNewLexicalEnvironment(n) { - return isFunctionLike(n) || n.kind === 218 || n.kind === 248; - } - ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; - function cloneEntityName(node) { - if (node.kind === 69) { - var clone_1 = createSynthesizedNode(69); - clone_1.text = node.text; - return clone_1; - } - else { - var clone_2 = createSynthesizedNode(135); - clone_2.left = cloneEntityName(node.left); - clone_2.left.parent = clone_2; - clone_2.right = cloneEntityName(node.right); - clone_2.right.parent = clone_2; - return clone_2; - } - } - ts.cloneEntityName = cloneEntityName; - function nodeIsSynthesized(node) { - return node.pos === -1; - } - ts.nodeIsSynthesized = nodeIsSynthesized; - function createSynthesizedNode(kind, startsOnNewLine) { - var node = ts.createNode(kind, -1, -1); - node.startsOnNewLine = startsOnNewLine; - return node; - } - ts.createSynthesizedNode = createSynthesizedNode; - function createSynthesizedNodeArray() { - var array = []; - array.pos = -1; - array.end = -1; - return array; - } - ts.createSynthesizedNodeArray = createSynthesizedNodeArray; - function createDiagnosticCollection() { - var nonFileDiagnostics = []; - var fileDiagnostics = {}; - var diagnosticsModified = false; - var modificationCount = 0; - return { - add: add, - getGlobalDiagnostics: getGlobalDiagnostics, - getDiagnostics: getDiagnostics, - getModificationCount: getModificationCount, - reattachFileDiagnostics: reattachFileDiagnostics - }; - function getModificationCount() { - return modificationCount; - } - function reattachFileDiagnostics(newFile) { - if (!ts.hasProperty(fileDiagnostics, newFile.fileName)) { - return; - } - for (var _i = 0, _a = fileDiagnostics[newFile.fileName]; _i < _a.length; _i++) { - var diagnostic = _a[_i]; - diagnostic.file = newFile; - } - } - function add(diagnostic) { - var diagnostics; - if (diagnostic.file) { - diagnostics = fileDiagnostics[diagnostic.file.fileName]; - if (!diagnostics) { - diagnostics = []; - fileDiagnostics[diagnostic.file.fileName] = diagnostics; - } - } - else { - diagnostics = nonFileDiagnostics; - } - diagnostics.push(diagnostic); - diagnosticsModified = true; - modificationCount++; - } - function getGlobalDiagnostics() { - sortAndDeduplicate(); - return nonFileDiagnostics; - } - function getDiagnostics(fileName) { - sortAndDeduplicate(); - if (fileName) { - return fileDiagnostics[fileName] || []; - } - var allDiagnostics = []; - function pushDiagnostic(d) { - allDiagnostics.push(d); - } - ts.forEach(nonFileDiagnostics, pushDiagnostic); - for (var key in fileDiagnostics) { - if (ts.hasProperty(fileDiagnostics, key)) { - ts.forEach(fileDiagnostics[key], pushDiagnostic); - } - } - return ts.sortAndDeduplicateDiagnostics(allDiagnostics); - } - function sortAndDeduplicate() { - if (!diagnosticsModified) { - return; - } - diagnosticsModified = false; - nonFileDiagnostics = ts.sortAndDeduplicateDiagnostics(nonFileDiagnostics); - for (var key in fileDiagnostics) { - if (ts.hasProperty(fileDiagnostics, key)) { - fileDiagnostics[key] = ts.sortAndDeduplicateDiagnostics(fileDiagnostics[key]); - } - } - } - } - ts.createDiagnosticCollection = createDiagnosticCollection; - var escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - var escapedCharsMap = { - "\0": "\\0", - "\t": "\\t", - "\v": "\\v", - "\f": "\\f", - "\b": "\\b", - "\r": "\\r", - "\n": "\\n", - "\\": "\\\\", - "\"": "\\\"", - "\u2028": "\\u2028", - "\u2029": "\\u2029", - "\u0085": "\\u0085" - }; - function escapeString(s) { - s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s; - return s; - function getReplacement(c) { - return escapedCharsMap[c] || get16BitUnicodeEscapeSequence(c.charCodeAt(0)); - } - } - ts.escapeString = escapeString; - function isIntrinsicJsxName(name) { - var ch = name.substr(0, 1); - return ch.toLowerCase() === ch; - } - ts.isIntrinsicJsxName = isIntrinsicJsxName; - function get16BitUnicodeEscapeSequence(charCode) { - var hexCharCode = charCode.toString(16).toUpperCase(); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - var nonAsciiCharacters = /[^\u0000-\u007F]/g; - function escapeNonAsciiCharacters(s) { - return nonAsciiCharacters.test(s) ? - s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) : - s; - } - ts.escapeNonAsciiCharacters = escapeNonAsciiCharacters; - var indentStrings = ["", " "]; - function getIndentString(level) { - if (indentStrings[level] === undefined) { - indentStrings[level] = getIndentString(level - 1) + indentStrings[1]; - } - return indentStrings[level]; - } - ts.getIndentString = getIndentString; - function getIndentSize() { - return indentStrings[1].length; - } - ts.getIndentSize = getIndentSize; - function createTextWriter(newLine) { - var output = ""; - var indent = 0; - var lineStart = true; - var lineCount = 0; - var linePos = 0; - function write(s) { - if (s && s.length) { - if (lineStart) { - output += getIndentString(indent); - lineStart = false; - } - output += s; - } - } - function rawWrite(s) { - if (s !== undefined) { - if (lineStart) { - lineStart = false; - } - output += s; - } - } - function writeLiteral(s) { - if (s && s.length) { - write(s); - var lineStartsOfS = ts.computeLineStarts(s); - if (lineStartsOfS.length > 1) { - lineCount = lineCount + lineStartsOfS.length - 1; - linePos = output.length - s.length + ts.lastOrUndefined(lineStartsOfS); - } - } - } - function writeLine() { - if (!lineStart) { - output += newLine; - lineCount++; - linePos = output.length; - lineStart = true; - } - } - function writeTextOfNode(sourceFile, node) { - write(getSourceTextOfNodeFromSourceFile(sourceFile, node)); - } - return { - write: write, - rawWrite: rawWrite, - writeTextOfNode: writeTextOfNode, - writeLiteral: writeLiteral, - writeLine: writeLine, - increaseIndent: function () { return indent++; }, - decreaseIndent: function () { return indent--; }, - getIndent: function () { return indent; }, - getTextPos: function () { return output.length; }, - getLine: function () { return lineCount + 1; }, - getColumn: function () { return lineStart ? indent * getIndentSize() + 1 : output.length - linePos + 1; }, - getText: function () { return output; } - }; - } - ts.createTextWriter = createTextWriter; - function getOwnEmitOutputFilePath(sourceFile, host, extension) { - var compilerOptions = host.getCompilerOptions(); - var emitOutputFilePathWithoutExtension; - if (compilerOptions.outDir) { - emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); - } - else { - emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); - } - return emitOutputFilePathWithoutExtension + extension; - } - ts.getOwnEmitOutputFilePath = getOwnEmitOutputFilePath; - function getSourceFilePathInNewDir(sourceFile, host, newDirPath) { - var sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory()); - sourceFilePath = sourceFilePath.replace(host.getCommonSourceDirectory(), ""); - return ts.combinePaths(newDirPath, sourceFilePath); - } - ts.getSourceFilePathInNewDir = getSourceFilePathInNewDir; - function writeFile(host, diagnostics, fileName, data, writeByteOrderMark) { - host.writeFile(fileName, data, writeByteOrderMark, function (hostErrorMessage) { - diagnostics.push(ts.createCompilerDiagnostic(ts.Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); - }); - } - ts.writeFile = writeFile; - function getLineOfLocalPosition(currentSourceFile, pos) { - return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; - } - ts.getLineOfLocalPosition = getLineOfLocalPosition; - function getFirstConstructorWithBody(node) { - return ts.forEach(node.members, function (member) { - if (member.kind === 144 && nodeIsPresent(member.body)) { - return member; - } - }); - } - ts.getFirstConstructorWithBody = getFirstConstructorWithBody; - function getSetAccessorTypeAnnotationNode(accessor) { - return accessor && accessor.parameters.length > 0 && accessor.parameters[0].type; - } - ts.getSetAccessorTypeAnnotationNode = getSetAccessorTypeAnnotationNode; - function shouldEmitToOwnFile(sourceFile, compilerOptions) { - if (!isDeclarationFile(sourceFile)) { - if ((isExternalModule(sourceFile) || !(compilerOptions.outFile || compilerOptions.out))) { - return compilerOptions.isolatedModules || !ts.fileExtensionIs(sourceFile.fileName, ".js"); - } - return false; - } - return false; - } - ts.shouldEmitToOwnFile = shouldEmitToOwnFile; - function getAllAccessorDeclarations(declarations, accessor) { - var firstAccessor; - var secondAccessor; - var getAccessor; - var setAccessor; - if (hasDynamicName(accessor)) { - firstAccessor = accessor; - if (accessor.kind === 145) { - getAccessor = accessor; - } - else if (accessor.kind === 146) { - setAccessor = accessor; - } - else { - ts.Debug.fail("Accessor has wrong kind"); - } - } - else { - ts.forEach(declarations, function (member) { - if ((member.kind === 145 || member.kind === 146) - && (member.flags & 64) === (accessor.flags & 64)) { - var memberName = getPropertyNameForPropertyNameNode(member.name); - var accessorName = getPropertyNameForPropertyNameNode(accessor.name); - if (memberName === accessorName) { - if (!firstAccessor) { - firstAccessor = member; - } - else if (!secondAccessor) { - secondAccessor = member; - } - if (member.kind === 145 && !getAccessor) { - getAccessor = member; - } - if (member.kind === 146 && !setAccessor) { - setAccessor = member; - } - } - } - }); - } - return { - firstAccessor: firstAccessor, - secondAccessor: secondAccessor, - getAccessor: getAccessor, - setAccessor: setAccessor - }; - } - ts.getAllAccessorDeclarations = getAllAccessorDeclarations; - function emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments) { - if (leadingComments && leadingComments.length && node.pos !== leadingComments[0].pos && - getLineOfLocalPosition(currentSourceFile, node.pos) !== getLineOfLocalPosition(currentSourceFile, leadingComments[0].pos)) { - writer.writeLine(); - } - } - ts.emitNewLineBeforeLeadingComments = emitNewLineBeforeLeadingComments; - function emitComments(currentSourceFile, writer, comments, trailingSeparator, newLine, writeComment) { - var emitLeadingSpace = !trailingSeparator; - ts.forEach(comments, function (comment) { - if (emitLeadingSpace) { - writer.write(" "); - emitLeadingSpace = false; - } - writeComment(currentSourceFile, writer, comment, newLine); - if (comment.hasTrailingNewLine) { - writer.writeLine(); - } - else if (trailingSeparator) { - writer.write(" "); - } - else { - emitLeadingSpace = true; - } - }); - } - ts.emitComments = emitComments; - function emitDetachedComments(currentSourceFile, writer, writeComment, node, newLine, removeComments) { - var leadingComments; - var currentDetachedCommentInfo; - if (removeComments) { - if (node.pos === 0) { - leadingComments = ts.filter(ts.getLeadingCommentRanges(currentSourceFile.text, node.pos), isPinnedComment); - } - } - else { - leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos); - } - if (leadingComments) { - var detachedComments = []; - var lastComment; - for (var _i = 0, leadingComments_1 = leadingComments; _i < leadingComments_1.length; _i++) { - var comment = leadingComments_1[_i]; - if (lastComment) { - var lastCommentLine = getLineOfLocalPosition(currentSourceFile, lastComment.end); - var commentLine = getLineOfLocalPosition(currentSourceFile, comment.pos); - if (commentLine >= lastCommentLine + 2) { - break; - } - } - detachedComments.push(comment); - lastComment = comment; - } - if (detachedComments.length) { - var lastCommentLine = getLineOfLocalPosition(currentSourceFile, ts.lastOrUndefined(detachedComments).end); - var nodeLine = getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.pos)); - if (nodeLine >= lastCommentLine + 2) { - emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); - emitComments(currentSourceFile, writer, detachedComments, true, newLine, writeComment); - currentDetachedCommentInfo = { nodePos: node.pos, detachedCommentEndPos: ts.lastOrUndefined(detachedComments).end }; - } - } - } - return currentDetachedCommentInfo; - function isPinnedComment(comment) { - return currentSourceFile.text.charCodeAt(comment.pos + 1) === 42 && - currentSourceFile.text.charCodeAt(comment.pos + 2) === 33; - } - } - ts.emitDetachedComments = emitDetachedComments; - function writeCommentRange(currentSourceFile, writer, comment, newLine) { - if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42) { - var firstCommentLineAndCharacter = ts.getLineAndCharacterOfPosition(currentSourceFile, comment.pos); - var lineCount = ts.getLineStarts(currentSourceFile).length; - var firstCommentLineIndent; - for (var pos = comment.pos, currentLine = firstCommentLineAndCharacter.line; pos < comment.end; currentLine++) { - var nextLineStart = (currentLine + 1) === lineCount - ? currentSourceFile.text.length + 1 - : getStartPositionOfLine(currentLine + 1, currentSourceFile); - if (pos !== comment.pos) { - if (firstCommentLineIndent === undefined) { - firstCommentLineIndent = calculateIndent(getStartPositionOfLine(firstCommentLineAndCharacter.line, currentSourceFile), comment.pos); - } - var currentWriterIndentSpacing = writer.getIndent() * getIndentSize(); - var spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(pos, nextLineStart); - if (spacesToEmit > 0) { - var numberOfSingleSpacesToEmit = spacesToEmit % getIndentSize(); - var indentSizeSpaceString = getIndentString((spacesToEmit - numberOfSingleSpacesToEmit) / getIndentSize()); - writer.rawWrite(indentSizeSpaceString); - while (numberOfSingleSpacesToEmit) { - writer.rawWrite(" "); - numberOfSingleSpacesToEmit--; - } - } - else { - writer.rawWrite(""); - } - } - writeTrimmedCurrentLine(pos, nextLineStart); - pos = nextLineStart; - } - } - else { - writer.write(currentSourceFile.text.substring(comment.pos, comment.end)); - } - function writeTrimmedCurrentLine(pos, nextLineStart) { - var end = Math.min(comment.end, nextLineStart - 1); - var currentLineText = currentSourceFile.text.substring(pos, end).replace(/^\s+|\s+$/g, ""); - if (currentLineText) { - writer.write(currentLineText); - if (end !== comment.end) { - writer.writeLine(); - } - } - else { - writer.writeLiteral(newLine); - } - } - function calculateIndent(pos, end) { - var currentLineIndent = 0; - for (; pos < end && ts.isWhiteSpace(currentSourceFile.text.charCodeAt(pos)); pos++) { - if (currentSourceFile.text.charCodeAt(pos) === 9) { - currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); - } - else { - currentLineIndent++; - } - } - return currentLineIndent; - } - } - ts.writeCommentRange = writeCommentRange; - function modifierToFlag(token) { - switch (token) { - case 113: return 64; - case 112: return 8; - case 111: return 32; - case 110: return 16; - case 115: return 128; - case 82: return 2; - case 122: return 4; - case 74: return 16384; - case 77: return 512; - case 118: return 256; - } - return 0; - } - ts.modifierToFlag = modifierToFlag; - function isLeftHandSideExpression(expr) { - if (expr) { - switch (expr.kind) { - case 166: - case 167: - case 169: - case 168: - case 233: - case 234: - case 170: - case 164: - case 172: - case 165: - case 186: - case 173: - case 69: - case 10: - case 8: - case 9: - case 11: - case 183: - case 84: - case 93: - case 97: - case 99: - case 95: - return true; - } - } - return false; - } - ts.isLeftHandSideExpression = isLeftHandSideExpression; - function isAssignmentOperator(token) { - return token >= 56 && token <= 68; - } - ts.isAssignmentOperator = isAssignmentOperator; - function isExpressionWithTypeArgumentsInClassExtendsClause(node) { - return node.kind === 188 && - node.parent.token === 83 && - isClassLike(node.parent.parent); - } - ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause; - function isSupportedExpressionWithTypeArguments(node) { - return isSupportedExpressionWithTypeArgumentsRest(node.expression); - } - ts.isSupportedExpressionWithTypeArguments = isSupportedExpressionWithTypeArguments; - function isSupportedExpressionWithTypeArgumentsRest(node) { - if (node.kind === 69) { - return true; - } - else if (isPropertyAccessExpression(node)) { - return isSupportedExpressionWithTypeArgumentsRest(node.expression); - } - else { - return false; - } - } - function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 135 && node.parent.right === node) || - (node.parent.kind === 166 && node.parent.name === node); - } - ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; - function isEmptyObjectLiteralOrArrayLiteral(expression) { - var kind = expression.kind; - if (kind === 165) { - return expression.properties.length === 0; - } - if (kind === 164) { - return expression.elements.length === 0; - } - return false; - } - ts.isEmptyObjectLiteralOrArrayLiteral = isEmptyObjectLiteralOrArrayLiteral; - function getLocalSymbolForExportDefault(symbol) { - return symbol && symbol.valueDeclaration && (symbol.valueDeclaration.flags & 512) ? symbol.valueDeclaration.localSymbol : undefined; - } - ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault; - function isJavaScript(fileName) { - return ts.fileExtensionIs(fileName, ".js"); - } - ts.isJavaScript = isJavaScript; - function isTsx(fileName) { - return ts.fileExtensionIs(fileName, ".tsx"); - } - ts.isTsx = isTsx; - function getExpandedCharCodes(input) { - var output = []; - var length = input.length; - for (var i = 0; i < length; i++) { - var charCode = input.charCodeAt(i); - if (charCode < 0x80) { - output.push(charCode); - } - else if (charCode < 0x800) { - output.push((charCode >> 6) | 192); - output.push((charCode & 63) | 128); - } - else if (charCode < 0x10000) { - output.push((charCode >> 12) | 224); - output.push(((charCode >> 6) & 63) | 128); - output.push((charCode & 63) | 128); - } - else if (charCode < 0x20000) { - output.push((charCode >> 18) | 240); - output.push(((charCode >> 12) & 63) | 128); - output.push(((charCode >> 6) & 63) | 128); - output.push((charCode & 63) | 128); - } - else { - ts.Debug.assert(false, "Unexpected code point"); - } - } - return output; - } - var base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - function convertToBase64(input) { - var result = ""; - var charCodes = getExpandedCharCodes(input); - var i = 0; - var length = charCodes.length; - var byte1, byte2, byte3, byte4; - while (i < length) { - byte1 = charCodes[i] >> 2; - byte2 = (charCodes[i] & 3) << 4 | charCodes[i + 1] >> 4; - byte3 = (charCodes[i + 1] & 15) << 2 | charCodes[i + 2] >> 6; - byte4 = charCodes[i + 2] & 63; - if (i + 1 >= length) { - byte3 = byte4 = 64; - } - else if (i + 2 >= length) { - byte4 = 64; - } - result += base64Digits.charAt(byte1) + base64Digits.charAt(byte2) + base64Digits.charAt(byte3) + base64Digits.charAt(byte4); - i += 3; - } - return result; - } - ts.convertToBase64 = convertToBase64; - function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { - return !ts.isRootedDiskPath(absoluteOrRelativePath) - ? absoluteOrRelativePath - : ts.getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, false); - } - ts.convertToRelativePath = convertToRelativePath; - var carriageReturnLineFeed = "\r\n"; - var lineFeed = "\n"; - function getNewLineCharacter(options) { - if (options.newLine === 0) { - return carriageReturnLineFeed; - } - else if (options.newLine === 1) { - return lineFeed; - } - else if (ts.sys) { - return ts.sys.newLine; - } - return carriageReturnLineFeed; - } - ts.getNewLineCharacter = getNewLineCharacter; -})(ts || (ts = {})); -var ts; -(function (ts) { - function getDefaultLibFileName(options) { - return options.target === 2 ? "lib.es6.d.ts" : "lib.d.ts"; - } - ts.getDefaultLibFileName = getDefaultLibFileName; - function textSpanEnd(span) { - return span.start + span.length; - } - ts.textSpanEnd = textSpanEnd; - function textSpanIsEmpty(span) { - return span.length === 0; - } - ts.textSpanIsEmpty = textSpanIsEmpty; - function textSpanContainsPosition(span, position) { - return position >= span.start && position < textSpanEnd(span); - } - ts.textSpanContainsPosition = textSpanContainsPosition; - function textSpanContainsTextSpan(span, other) { - return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span); - } - ts.textSpanContainsTextSpan = textSpanContainsTextSpan; - function textSpanOverlapsWith(span, other) { - var overlapStart = Math.max(span.start, other.start); - var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other)); - return overlapStart < overlapEnd; - } - ts.textSpanOverlapsWith = textSpanOverlapsWith; - function textSpanOverlap(span1, span2) { - var overlapStart = Math.max(span1.start, span2.start); - var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); - if (overlapStart < overlapEnd) { - return createTextSpanFromBounds(overlapStart, overlapEnd); - } - return undefined; - } - ts.textSpanOverlap = textSpanOverlap; - function textSpanIntersectsWithTextSpan(span, other) { - return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start; - } - ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan; - function textSpanIntersectsWith(span, start, length) { - var end = start + length; - return start <= textSpanEnd(span) && end >= span.start; - } - ts.textSpanIntersectsWith = textSpanIntersectsWith; - function decodedTextSpanIntersectsWith(start1, length1, start2, length2) { - var end1 = start1 + length1; - var end2 = start2 + length2; - return start2 <= end1 && end2 >= start1; - } - ts.decodedTextSpanIntersectsWith = decodedTextSpanIntersectsWith; - function textSpanIntersectsWithPosition(span, position) { - return position <= textSpanEnd(span) && position >= span.start; - } - ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition; - function textSpanIntersection(span1, span2) { - var intersectStart = Math.max(span1.start, span2.start); - var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); - if (intersectStart <= intersectEnd) { - return createTextSpanFromBounds(intersectStart, intersectEnd); - } - return undefined; - } - ts.textSpanIntersection = textSpanIntersection; - function createTextSpan(start, length) { - if (start < 0) { - throw new Error("start < 0"); - } - if (length < 0) { - throw new Error("length < 0"); - } - return { start: start, length: length }; - } - ts.createTextSpan = createTextSpan; - function createTextSpanFromBounds(start, end) { - return createTextSpan(start, end - start); - } - ts.createTextSpanFromBounds = createTextSpanFromBounds; - function textChangeRangeNewSpan(range) { - return createTextSpan(range.span.start, range.newLength); - } - ts.textChangeRangeNewSpan = textChangeRangeNewSpan; - function textChangeRangeIsUnchanged(range) { - return textSpanIsEmpty(range.span) && range.newLength === 0; - } - ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged; - function createTextChangeRange(span, newLength) { - if (newLength < 0) { - throw new Error("newLength < 0"); - } - return { span: span, newLength: newLength }; - } - ts.createTextChangeRange = createTextChangeRange; - ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0); - function collapseTextChangeRangesAcrossMultipleVersions(changes) { - if (changes.length === 0) { - return ts.unchangedTextChangeRange; - } - if (changes.length === 1) { - return changes[0]; - } - var change0 = changes[0]; - var oldStartN = change0.span.start; - var oldEndN = textSpanEnd(change0.span); - var newEndN = oldStartN + change0.newLength; - for (var i = 1; i < changes.length; i++) { - var nextChange = changes[i]; - var oldStart1 = oldStartN; - var oldEnd1 = oldEndN; - var newEnd1 = newEndN; - var oldStart2 = nextChange.span.start; - var oldEnd2 = textSpanEnd(nextChange.span); - var newEnd2 = oldStart2 + nextChange.newLength; - oldStartN = Math.min(oldStart1, oldStart2); - oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)); - newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)); - } - return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN); - } - ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; - function getTypeParameterOwner(d) { - if (d && d.kind === 137) { - for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 215) { - return current; - } - } - } - } - ts.getTypeParameterOwner = getTypeParameterOwner; -})(ts || (ts = {})); -var ts; -(function (ts) { - var nodeConstructors = new Array(272); - ts.parseTime = 0; - function getNodeConstructor(kind) { - return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)); - } - ts.getNodeConstructor = getNodeConstructor; - function createNode(kind, pos, end) { - return new (getNodeConstructor(kind))(pos, end); - } - ts.createNode = createNode; - function visitNode(cbNode, node) { - if (node) { - return cbNode(node); - } - } - function visitNodeArray(cbNodes, nodes) { - if (nodes) { - return cbNodes(nodes); - } - } - function visitEachNode(cbNode, nodes) { - if (nodes) { - for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { - var node = nodes_1[_i]; - var result = cbNode(node); - if (result) { - return result; - } - } + function visitEachNode(cbNode, nodes) { + if (nodes) { + for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { + var node = nodes_1[_i]; + var result = cbNode(node); + if (result) { + return result; + } + } } } function forEachChild(node, cbNode, cbNodeArray) { @@ -6567,6 +5625,8 @@ var ts; (function (Parser) { var scanner = ts.createScanner(2, true); var disallowInAndDecoratorContext = 1 | 4; + var NodeConstructor; + var SourceFileConstructor; var sourceFile; var parseDiagnostics; var syntaxCursor; @@ -6579,13 +5639,16 @@ var ts; var contextFlags; var parseErrorBeforeNextFinishedNode = false; function parseSourceFile(fileName, _sourceText, languageVersion, _syntaxCursor, setParentNodes) { - initializeState(fileName, _sourceText, languageVersion, _syntaxCursor); + var isJavaScriptFile = ts.hasJavaScriptFileExtension(fileName) || _sourceText.lastIndexOf("// @language=javascript", 0) === 0; + initializeState(fileName, _sourceText, languageVersion, isJavaScriptFile, _syntaxCursor); var result = parseSourceFileWorker(fileName, languageVersion, setParentNodes); clearState(); return result; } Parser.parseSourceFile = parseSourceFile; - function initializeState(fileName, _sourceText, languageVersion, _syntaxCursor) { + function initializeState(fileName, _sourceText, languageVersion, isJavaScriptFile, _syntaxCursor) { + NodeConstructor = ts.objectAllocator.getNodeConstructor(); + SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor(); sourceText = _sourceText; syntaxCursor = _syntaxCursor; parseDiagnostics = []; @@ -6593,12 +5656,12 @@ var ts; identifiers = {}; identifierCount = 0; nodeCount = 0; - contextFlags = ts.isJavaScript(fileName) ? 32 : 0; + contextFlags = isJavaScriptFile ? 32 : 0; parseErrorBeforeNextFinishedNode = false; scanner.setText(sourceText); scanner.setOnError(scanError); scanner.setScriptTarget(languageVersion); - scanner.setLanguageVariant(ts.isTsx(fileName) ? 1 : 0); + scanner.setLanguageVariant(ts.allowsJsxExpressions(fileName) ? 1 : 0); } function clearState() { scanner.setText(""); @@ -6611,6 +5674,9 @@ var ts; } function parseSourceFileWorker(fileName, languageVersion, setParentNodes) { sourceFile = createSourceFile(fileName, languageVersion); + if (contextFlags & 32) { + sourceFile.parserContextFlags = 32; + } token = nextToken(); processReferenceComments(sourceFile); sourceFile.statements = parseList(0, parseStatement); @@ -6624,7 +5690,7 @@ var ts; if (setParentNodes) { fixupParentReferences(sourceFile); } - if (ts.isJavaScript(fileName)) { + if (ts.isSourceFileJavaScript(sourceFile)) { addJSDocComments(); } return sourceFile; @@ -6670,15 +5736,14 @@ var ts; } Parser.fixupParentReferences = fixupParentReferences; function createSourceFile(fileName, languageVersion) { - var sourceFile = createNode(248, 0); - sourceFile.pos = 0; - sourceFile.end = sourceText.length; + var sourceFile = new SourceFileConstructor(248, 0, sourceText.length); + nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; sourceFile.languageVersion = languageVersion; sourceFile.fileName = ts.normalizePath(fileName); sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 4096 : 0; - sourceFile.languageVariant = ts.isTsx(sourceFile.fileName) ? 1 : 0; + sourceFile.languageVariant = ts.allowsJsxExpressions(sourceFile.fileName) ? 1 : 0; return sourceFile; } function setContextFlag(val, flag) { @@ -6900,7 +5965,7 @@ var ts; if (!(pos >= 0)) { pos = scanner.getStartPos(); } - return new (nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)))(pos, pos); + return new NodeConstructor(kind, pos, pos); } function finishNode(node, end) { node.end = end === undefined ? scanner.getStartPos() : end; @@ -7038,7 +6103,7 @@ var ts; case 12: return token === 19 || token === 37 || isLiteralPropertyName(); case 9: - return isLiteralPropertyName(); + return token === 19 || isLiteralPropertyName(); case 7: if (token === 15) { return lookAhead(isValidHeritageClauseObjectLiteral); @@ -7328,3470 +6393,4539 @@ var ts; return true; } } - return false; + return false; + } + function isReusableEnumMember(node) { + return node.kind === 247; + } + function isReusableTypeMember(node) { + if (node) { + switch (node.kind) { + case 148: + case 142: + case 149: + case 140: + case 147: + return true; + } + } + return false; + } + function isReusableVariableDeclaration(node) { + if (node.kind !== 211) { + return false; + } + var variableDeclarator = node; + return variableDeclarator.initializer === undefined; + } + function isReusableParameter(node) { + if (node.kind !== 138) { + return false; + } + var parameter = node; + return parameter.initializer === undefined; + } + function abortParsingListOrMoveToNextToken(kind) { + parseErrorAtCurrentToken(parsingContextErrors(kind)); + if (isInSomeParsingContext()) { + return true; + } + nextToken(); + return false; + } + function parsingContextErrors(context) { + switch (context) { + case 0: return ts.Diagnostics.Declaration_or_statement_expected; + case 1: return ts.Diagnostics.Declaration_or_statement_expected; + case 2: return ts.Diagnostics.case_or_default_expected; + case 3: return ts.Diagnostics.Statement_expected; + case 4: return ts.Diagnostics.Property_or_signature_expected; + case 5: return ts.Diagnostics.Unexpected_token_A_constructor_method_accessor_or_property_was_expected; + case 6: return ts.Diagnostics.Enum_member_expected; + case 7: return ts.Diagnostics.Expression_expected; + case 8: return ts.Diagnostics.Variable_declaration_expected; + case 9: return ts.Diagnostics.Property_destructuring_pattern_expected; + case 10: return ts.Diagnostics.Array_element_destructuring_pattern_expected; + case 11: return ts.Diagnostics.Argument_expression_expected; + case 12: return ts.Diagnostics.Property_assignment_expected; + case 15: return ts.Diagnostics.Expression_or_comma_expected; + case 16: return ts.Diagnostics.Parameter_declaration_expected; + case 17: return ts.Diagnostics.Type_parameter_declaration_expected; + case 18: return ts.Diagnostics.Type_argument_expected; + case 19: return ts.Diagnostics.Type_expected; + case 20: return ts.Diagnostics.Unexpected_token_expected; + case 21: return ts.Diagnostics.Identifier_expected; + case 13: return ts.Diagnostics.Identifier_expected; + case 14: return ts.Diagnostics.Identifier_expected; + case 22: return ts.Diagnostics.Parameter_declaration_expected; + case 23: return ts.Diagnostics.Type_argument_expected; + case 25: return ts.Diagnostics.Type_expected; + case 24: return ts.Diagnostics.Property_assignment_expected; + } + } + ; + function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimeter) { + var saveParsingContext = parsingContext; + parsingContext |= 1 << kind; + var result = []; + result.pos = getNodePos(); + var commaStart = -1; + while (true) { + if (isListElement(kind, false)) { + result.push(parseListElement(kind, parseElement)); + commaStart = scanner.getTokenPos(); + if (parseOptional(24)) { + continue; + } + commaStart = -1; + if (isListTerminator(kind)) { + break; + } + parseExpected(24); + if (considerSemicolonAsDelimeter && token === 23 && !scanner.hasPrecedingLineBreak()) { + nextToken(); + } + continue; + } + if (isListTerminator(kind)) { + break; + } + if (abortParsingListOrMoveToNextToken(kind)) { + break; + } + } + if (commaStart >= 0) { + result.hasTrailingComma = true; + } + result.end = getNodeEnd(); + parsingContext = saveParsingContext; + return result; + } + function createMissingList() { + var pos = getNodePos(); + var result = []; + result.pos = pos; + result.end = pos; + return result; + } + function parseBracketedList(kind, parseElement, open, close) { + if (parseExpected(open)) { + var result = parseDelimitedList(kind, parseElement); + parseExpected(close); + return result; + } + return createMissingList(); + } + function parseEntityName(allowReservedWords, diagnosticMessage) { + var entity = parseIdentifier(diagnosticMessage); + while (parseOptional(21)) { + var node = createNode(135, entity.pos); + node.left = entity; + node.right = parseRightSideOfDot(allowReservedWords); + entity = finishNode(node); + } + return entity; + } + function parseRightSideOfDot(allowIdentifierNames) { + if (scanner.hasPrecedingLineBreak() && ts.tokenIsIdentifierOrKeyword(token)) { + var matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); + if (matchesPattern) { + return createMissingNode(69, true, ts.Diagnostics.Identifier_expected); + } + } + return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); + } + function parseTemplateExpression() { + var template = createNode(183); + template.head = parseLiteralNode(); + ts.Debug.assert(template.head.kind === 12, "Template head has wrong token kind"); + var templateSpans = []; + templateSpans.pos = getNodePos(); + do { + templateSpans.push(parseTemplateSpan()); + } while (ts.lastOrUndefined(templateSpans).literal.kind === 13); + templateSpans.end = getNodeEnd(); + template.templateSpans = templateSpans; + return finishNode(template); + } + function parseTemplateSpan() { + var span = createNode(190); + span.expression = allowInAnd(parseExpression); + var literal; + if (token === 16) { + reScanTemplateToken(); + literal = parseLiteralNode(); + } + else { + literal = parseExpectedToken(14, false, ts.Diagnostics._0_expected, ts.tokenToString(16)); + } + span.literal = literal; + return finishNode(span); + } + function parseLiteralNode(internName) { + var node = createNode(token); + var text = scanner.getTokenValue(); + node.text = internName ? internIdentifier(text) : text; + if (scanner.hasExtendedUnicodeEscape()) { + node.hasExtendedUnicodeEscape = true; + } + if (scanner.isUnterminated()) { + node.isUnterminated = true; + } + var tokenPos = scanner.getTokenPos(); + nextToken(); + finishNode(node); + if (node.kind === 8 + && sourceText.charCodeAt(tokenPos) === 48 + && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { + node.flags |= 32768; + } + return node; + } + function parseTypeReferenceOrTypePredicate() { + var typeName = parseEntityName(false, ts.Diagnostics.Type_expected); + if (typeName.kind === 69 && token === 124 && !scanner.hasPrecedingLineBreak()) { + nextToken(); + var node_1 = createNode(150, typeName.pos); + node_1.parameterName = typeName; + node_1.type = parseType(); + return finishNode(node_1); + } + var node = createNode(151, typeName.pos); + node.typeName = typeName; + if (!scanner.hasPrecedingLineBreak() && token === 25) { + node.typeArguments = parseBracketedList(18, parseType, 25, 27); + } + return finishNode(node); + } + function parseTypeQuery() { + var node = createNode(154); + parseExpected(101); + node.exprName = parseEntityName(true); + return finishNode(node); + } + function parseTypeParameter() { + var node = createNode(137); + node.name = parseIdentifier(); + if (parseOptional(83)) { + if (isStartOfType() || !isStartOfExpression()) { + node.constraint = parseType(); + } + else { + node.expression = parseUnaryExpressionOrHigher(); + } + } + return finishNode(node); + } + function parseTypeParameters() { + if (token === 25) { + return parseBracketedList(17, parseTypeParameter, 25, 27); + } + } + function parseParameterType() { + if (parseOptional(54)) { + return parseType(); + } + return undefined; + } + function isStartOfParameter() { + return token === 22 || isIdentifierOrPattern() || ts.isModifier(token) || token === 55; + } + function setModifiers(node, modifiers) { + if (modifiers) { + node.flags |= modifiers.flags; + node.modifiers = modifiers; + } + } + function parseParameter() { + var node = createNode(138); + node.decorators = parseDecorators(); + setModifiers(node, parseModifiers()); + node.dotDotDotToken = parseOptionalToken(22); + node.name = parseIdentifierOrPattern(); + if (ts.getFullWidth(node.name) === 0 && node.flags === 0 && ts.isModifier(token)) { + nextToken(); + } + node.questionToken = parseOptionalToken(53); + node.type = parseParameterType(); + node.initializer = parseBindingElementInitializer(true); + return finishNode(node); + } + function parseBindingElementInitializer(inParameter) { + return inParameter ? parseParameterInitializer() : parseNonParameterInitializer(); + } + function parseParameterInitializer() { + return parseInitializer(true); + } + function fillSignature(returnToken, yieldContext, awaitContext, requireCompleteParameterList, signature) { + var returnTokenRequired = returnToken === 34; + signature.typeParameters = parseTypeParameters(); + signature.parameters = parseParameterList(yieldContext, awaitContext, requireCompleteParameterList); + if (returnTokenRequired) { + parseExpected(returnToken); + signature.type = parseType(); + } + else if (parseOptional(returnToken)) { + signature.type = parseType(); + } + } + function parseParameterList(yieldContext, awaitContext, requireCompleteParameterList) { + if (parseExpected(17)) { + var savedYieldContext = inYieldContext(); + var savedAwaitContext = inAwaitContext(); + setYieldContext(yieldContext); + setAwaitContext(awaitContext); + var result = parseDelimitedList(16, parseParameter); + setYieldContext(savedYieldContext); + setAwaitContext(savedAwaitContext); + if (!parseExpected(18) && requireCompleteParameterList) { + return undefined; + } + return result; + } + return requireCompleteParameterList ? undefined : createMissingList(); } - function isReusableEnumMember(node) { - return node.kind === 247; + function parseTypeMemberSemicolon() { + if (parseOptional(24)) { + return; + } + parseSemicolon(); } - function isReusableTypeMember(node) { - if (node) { - switch (node.kind) { - case 148: - case 142: - case 149: - case 140: - case 147: - return true; - } + function parseSignatureMember(kind) { + var node = createNode(kind); + if (kind === 148) { + parseExpected(92); } - return false; + fillSignature(54, false, false, false, node); + parseTypeMemberSemicolon(); + return finishNode(node); } - function isReusableVariableDeclaration(node) { - if (node.kind !== 211) { + function isIndexSignature() { + if (token !== 19) { return false; } - var variableDeclarator = node; - return variableDeclarator.initializer === undefined; + return lookAhead(isUnambiguouslyIndexSignature); } - function isReusableParameter(node) { - if (node.kind !== 138) { + function isUnambiguouslyIndexSignature() { + nextToken(); + if (token === 22 || token === 20) { + return true; + } + if (ts.isModifier(token)) { + nextToken(); + if (isIdentifier()) { + return true; + } + } + else if (!isIdentifier()) { return false; } - var parameter = node; - return parameter.initializer === undefined; - } - function abortParsingListOrMoveToNextToken(kind) { - parseErrorAtCurrentToken(parsingContextErrors(kind)); - if (isInSomeParsingContext()) { + else { + nextToken(); + } + if (token === 54 || token === 24) { return true; } + if (token !== 53) { + return false; + } nextToken(); - return false; + return token === 54 || token === 24 || token === 20; } - function parsingContextErrors(context) { - switch (context) { - case 0: return ts.Diagnostics.Declaration_or_statement_expected; - case 1: return ts.Diagnostics.Declaration_or_statement_expected; - case 2: return ts.Diagnostics.case_or_default_expected; - case 3: return ts.Diagnostics.Statement_expected; - case 4: return ts.Diagnostics.Property_or_signature_expected; - case 5: return ts.Diagnostics.Unexpected_token_A_constructor_method_accessor_or_property_was_expected; - case 6: return ts.Diagnostics.Enum_member_expected; - case 7: return ts.Diagnostics.Expression_expected; - case 8: return ts.Diagnostics.Variable_declaration_expected; - case 9: return ts.Diagnostics.Property_destructuring_pattern_expected; - case 10: return ts.Diagnostics.Array_element_destructuring_pattern_expected; - case 11: return ts.Diagnostics.Argument_expression_expected; - case 12: return ts.Diagnostics.Property_assignment_expected; - case 15: return ts.Diagnostics.Expression_or_comma_expected; - case 16: return ts.Diagnostics.Parameter_declaration_expected; - case 17: return ts.Diagnostics.Type_parameter_declaration_expected; - case 18: return ts.Diagnostics.Type_argument_expected; - case 19: return ts.Diagnostics.Type_expected; - case 20: return ts.Diagnostics.Unexpected_token_expected; - case 21: return ts.Diagnostics.Identifier_expected; - case 13: return ts.Diagnostics.Identifier_expected; - case 14: return ts.Diagnostics.Identifier_expected; - case 22: return ts.Diagnostics.Parameter_declaration_expected; - case 23: return ts.Diagnostics.Type_argument_expected; - case 25: return ts.Diagnostics.Type_expected; - case 24: return ts.Diagnostics.Property_assignment_expected; + function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { + var node = createNode(149, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + node.parameters = parseBracketedList(16, parseParameter, 19, 20); + node.type = parseTypeAnnotation(); + parseTypeMemberSemicolon(); + return finishNode(node); + } + function parsePropertyOrMethodSignature() { + var fullStart = scanner.getStartPos(); + var name = parsePropertyName(); + var questionToken = parseOptionalToken(53); + if (token === 17 || token === 25) { + var method = createNode(142, fullStart); + method.name = name; + method.questionToken = questionToken; + fillSignature(54, false, false, false, method); + parseTypeMemberSemicolon(); + return finishNode(method); + } + else { + var property = createNode(140, fullStart); + property.name = name; + property.questionToken = questionToken; + property.type = parseTypeAnnotation(); + parseTypeMemberSemicolon(); + return finishNode(property); } } - ; - function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimeter) { - var saveParsingContext = parsingContext; - parsingContext |= 1 << kind; - var result = []; - result.pos = getNodePos(); - var commaStart = -1; - while (true) { - if (isListElement(kind, false)) { - result.push(parseListElement(kind, parseElement)); - commaStart = scanner.getTokenPos(); - if (parseOptional(24)) { - continue; + function isStartOfTypeMember() { + switch (token) { + case 17: + case 25: + case 19: + return true; + default: + if (ts.isModifier(token)) { + var result = lookAhead(isStartOfIndexSignatureDeclaration); + if (result) { + return result; + } } - commaStart = -1; - if (isListTerminator(kind)) { - break; + return isLiteralPropertyName() && lookAhead(isTypeMemberWithLiteralPropertyName); + } + } + function isStartOfIndexSignatureDeclaration() { + while (ts.isModifier(token)) { + nextToken(); + } + return isIndexSignature(); + } + function isTypeMemberWithLiteralPropertyName() { + nextToken(); + return token === 17 || + token === 25 || + token === 53 || + token === 54 || + canParseSemicolon(); + } + function parseTypeMember() { + switch (token) { + case 17: + case 25: + return parseSignatureMember(147); + case 19: + return isIndexSignature() + ? parseIndexSignatureDeclaration(scanner.getStartPos(), undefined, undefined) + : parsePropertyOrMethodSignature(); + case 92: + if (lookAhead(isStartOfConstructSignature)) { + return parseSignatureMember(148); } - parseExpected(24); - if (considerSemicolonAsDelimeter && token === 23 && !scanner.hasPrecedingLineBreak()) { - nextToken(); + case 9: + case 8: + return parsePropertyOrMethodSignature(); + default: + if (ts.isModifier(token)) { + var result = tryParse(parseIndexSignatureWithModifiers); + if (result) { + return result; + } } - continue; - } - if (isListTerminator(kind)) { - break; - } - if (abortParsingListOrMoveToNextToken(kind)) { - break; - } + if (ts.tokenIsIdentifierOrKeyword(token)) { + return parsePropertyOrMethodSignature(); + } + } + } + function parseIndexSignatureWithModifiers() { + var fullStart = scanner.getStartPos(); + var decorators = parseDecorators(); + var modifiers = parseModifiers(); + return isIndexSignature() + ? parseIndexSignatureDeclaration(fullStart, decorators, modifiers) + : undefined; + } + function isStartOfConstructSignature() { + nextToken(); + return token === 17 || token === 25; + } + function parseTypeLiteral() { + var node = createNode(155); + node.members = parseObjectTypeMembers(); + return finishNode(node); + } + function parseObjectTypeMembers() { + var members; + if (parseExpected(15)) { + members = parseList(4, parseTypeMember); + parseExpected(16); } - if (commaStart >= 0) { - result.hasTrailingComma = true; + else { + members = createMissingList(); } - result.end = getNodeEnd(); - parsingContext = saveParsingContext; - return result; + return members; } - function createMissingList() { - var pos = getNodePos(); - var result = []; - result.pos = pos; - result.end = pos; - return result; + function parseTupleType() { + var node = createNode(157); + node.elementTypes = parseBracketedList(19, parseType, 19, 20); + return finishNode(node); } - function parseBracketedList(kind, parseElement, open, close) { - if (parseExpected(open)) { - var result = parseDelimitedList(kind, parseElement); - parseExpected(close); - return result; + function parseParenthesizedType() { + var node = createNode(160); + parseExpected(17); + node.type = parseType(); + parseExpected(18); + return finishNode(node); + } + function parseFunctionOrConstructorType(kind) { + var node = createNode(kind); + if (kind === 153) { + parseExpected(92); } - return createMissingList(); + fillSignature(34, false, false, false, node); + return finishNode(node); } - function parseEntityName(allowReservedWords, diagnosticMessage) { - var entity = parseIdentifier(diagnosticMessage); - while (parseOptional(21)) { - var node = createNode(135, entity.pos); - node.left = entity; - node.right = parseRightSideOfDot(allowReservedWords); - entity = finishNode(node); + function parseKeywordAndNoDot() { + var node = parseTokenNode(); + return token === 21 ? undefined : node; + } + function parseNonArrayType() { + switch (token) { + case 117: + case 130: + case 128: + case 120: + case 131: + var node = tryParse(parseKeywordAndNoDot); + return node || parseTypeReferenceOrTypePredicate(); + case 9: + return parseLiteralNode(true); + case 103: + case 97: + return parseTokenNode(); + case 101: + return parseTypeQuery(); + case 15: + return parseTypeLiteral(); + case 19: + return parseTupleType(); + case 17: + return parseParenthesizedType(); + default: + return parseTypeReferenceOrTypePredicate(); } - return entity; } - function parseRightSideOfDot(allowIdentifierNames) { - if (scanner.hasPrecedingLineBreak() && ts.tokenIsIdentifierOrKeyword(token)) { - var matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); - if (matchesPattern) { - return createMissingNode(69, true, ts.Diagnostics.Identifier_expected); - } + function isStartOfType() { + switch (token) { + case 117: + case 130: + case 128: + case 120: + case 131: + case 103: + case 97: + case 101: + case 15: + case 19: + case 25: + case 92: + case 9: + return true; + case 17: + return lookAhead(isStartOfParenthesizedOrFunctionType); + default: + return isIdentifier(); } - return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } - function parseTemplateExpression() { - var template = createNode(183); - template.head = parseLiteralNode(); - ts.Debug.assert(template.head.kind === 12, "Template head has wrong token kind"); - var templateSpans = []; - templateSpans.pos = getNodePos(); - do { - templateSpans.push(parseTemplateSpan()); - } while (ts.lastOrUndefined(templateSpans).literal.kind === 13); - templateSpans.end = getNodeEnd(); - template.templateSpans = templateSpans; - return finishNode(template); + function isStartOfParenthesizedOrFunctionType() { + nextToken(); + return token === 18 || isStartOfParameter() || isStartOfType(); } - function parseTemplateSpan() { - var span = createNode(190); - span.expression = allowInAnd(parseExpression); - var literal; - if (token === 16) { - reScanTemplateToken(); - literal = parseLiteralNode(); - } - else { - literal = parseExpectedToken(14, false, ts.Diagnostics._0_expected, ts.tokenToString(16)); + function parseArrayTypeOrHigher() { + var type = parseNonArrayType(); + while (!scanner.hasPrecedingLineBreak() && parseOptional(19)) { + parseExpected(20); + var node = createNode(156, type.pos); + node.elementType = type; + type = finishNode(node); } - span.literal = literal; - return finishNode(span); + return type; } - function parseLiteralNode(internName) { - var node = createNode(token); - var text = scanner.getTokenValue(); - node.text = internName ? internIdentifier(text) : text; - if (scanner.hasExtendedUnicodeEscape()) { - node.hasExtendedUnicodeEscape = true; + function parseUnionOrIntersectionType(kind, parseConstituentType, operator) { + var type = parseConstituentType(); + if (token === operator) { + var types = [type]; + types.pos = type.pos; + while (parseOptional(operator)) { + types.push(parseConstituentType()); + } + types.end = getNodeEnd(); + var node = createNode(kind, type.pos); + node.types = types; + type = finishNode(node); } - if (scanner.isUnterminated()) { - node.isUnterminated = true; + return type; + } + function parseIntersectionTypeOrHigher() { + return parseUnionOrIntersectionType(159, parseArrayTypeOrHigher, 46); + } + function parseUnionTypeOrHigher() { + return parseUnionOrIntersectionType(158, parseIntersectionTypeOrHigher, 47); + } + function isStartOfFunctionType() { + if (token === 25) { + return true; } - var tokenPos = scanner.getTokenPos(); + return token === 17 && lookAhead(isUnambiguouslyStartOfFunctionType); + } + function isUnambiguouslyStartOfFunctionType() { nextToken(); - finishNode(node); - if (node.kind === 8 - && sourceText.charCodeAt(tokenPos) === 48 - && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { - node.flags |= 32768; + if (token === 18 || token === 22) { + return true; } - return node; - } - function parseTypeReferenceOrTypePredicate() { - var typeName = parseEntityName(false, ts.Diagnostics.Type_expected); - if (typeName.kind === 69 && token === 124 && !scanner.hasPrecedingLineBreak()) { + if (isIdentifier() || ts.isModifier(token)) { nextToken(); - var node_1 = createNode(150, typeName.pos); - node_1.parameterName = typeName; - node_1.type = parseType(); - return finishNode(node_1); - } - var node = createNode(151, typeName.pos); - node.typeName = typeName; - if (!scanner.hasPrecedingLineBreak() && token === 25) { - node.typeArguments = parseBracketedList(18, parseType, 25, 27); - } - return finishNode(node); - } - function parseTypeQuery() { - var node = createNode(154); - parseExpected(101); - node.exprName = parseEntityName(true); - return finishNode(node); - } - function parseTypeParameter() { - var node = createNode(137); - node.name = parseIdentifier(); - if (parseOptional(83)) { - if (isStartOfType() || !isStartOfExpression()) { - node.constraint = parseType(); + if (token === 54 || token === 24 || + token === 53 || token === 56 || + isIdentifier() || ts.isModifier(token)) { + return true; } - else { - node.expression = parseUnaryExpressionOrHigher(); + if (token === 18) { + nextToken(); + if (token === 34) { + return true; + } } } - return finishNode(node); + return false; } - function parseTypeParameters() { - if (token === 25) { - return parseBracketedList(17, parseTypeParameter, 25, 27); + function parseType() { + return doOutsideOfContext(10, parseTypeWorker); + } + function parseTypeWorker() { + if (isStartOfFunctionType()) { + return parseFunctionOrConstructorType(152); } + if (token === 92) { + return parseFunctionOrConstructorType(153); + } + return parseUnionTypeOrHigher(); } - function parseParameterType() { - if (parseOptional(54)) { - return token === 9 - ? parseLiteralNode(true) - : parseType(); + function parseTypeAnnotation() { + return parseOptional(54) ? parseType() : undefined; + } + function isStartOfLeftHandSideExpression() { + switch (token) { + case 97: + case 95: + case 93: + case 99: + case 84: + case 8: + case 9: + case 11: + case 12: + case 17: + case 19: + case 15: + case 87: + case 73: + case 92: + case 39: + case 61: + case 69: + return true; + default: + return isIdentifier(); } - return undefined; - } - function isStartOfParameter() { - return token === 22 || isIdentifierOrPattern() || ts.isModifier(token) || token === 55; } - function setModifiers(node, modifiers) { - if (modifiers) { - node.flags |= modifiers.flags; - node.modifiers = modifiers; + function isStartOfExpression() { + if (isStartOfLeftHandSideExpression()) { + return true; } - } - function parseParameter() { - var node = createNode(138); - node.decorators = parseDecorators(); - setModifiers(node, parseModifiers()); - node.dotDotDotToken = parseOptionalToken(22); - node.name = parseIdentifierOrPattern(); - if (ts.getFullWidth(node.name) === 0 && node.flags === 0 && ts.isModifier(token)) { - nextToken(); + switch (token) { + case 35: + case 36: + case 50: + case 49: + case 78: + case 101: + case 103: + case 41: + case 42: + case 25: + case 119: + case 114: + return true; + default: + if (isBinaryOperator()) { + return true; + } + return isIdentifier(); } - node.questionToken = parseOptionalToken(53); - node.type = parseParameterType(); - node.initializer = parseBindingElementInitializer(true); - return finishNode(node); } - function parseBindingElementInitializer(inParameter) { - return inParameter ? parseParameterInitializer() : parseNonParameterInitializer(); + function isStartOfExpressionStatement() { + return token !== 15 && + token !== 87 && + token !== 73 && + token !== 55 && + isStartOfExpression(); } - function parseParameterInitializer() { - return parseInitializer(true); + function allowInAndParseExpression() { + return allowInAnd(parseExpression); } - function fillSignature(returnToken, yieldContext, awaitContext, requireCompleteParameterList, signature) { - var returnTokenRequired = returnToken === 34; - signature.typeParameters = parseTypeParameters(); - signature.parameters = parseParameterList(yieldContext, awaitContext, requireCompleteParameterList); - if (returnTokenRequired) { - parseExpected(returnToken); - signature.type = parseType(); + function parseExpression() { + var saveDecoratorContext = inDecoratorContext(); + if (saveDecoratorContext) { + setDecoratorContext(false); } - else if (parseOptional(returnToken)) { - signature.type = parseType(); + var expr = parseAssignmentExpressionOrHigher(); + var operatorToken; + while ((operatorToken = parseOptionalToken(24))) { + expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher()); } + if (saveDecoratorContext) { + setDecoratorContext(true); + } + return expr; } - function parseParameterList(yieldContext, awaitContext, requireCompleteParameterList) { - if (parseExpected(17)) { - var savedYieldContext = inYieldContext(); - var savedAwaitContext = inAwaitContext(); - setYieldContext(yieldContext); - setAwaitContext(awaitContext); - var result = parseDelimitedList(16, parseParameter); - setYieldContext(savedYieldContext); - setAwaitContext(savedAwaitContext); - if (!parseExpected(18) && requireCompleteParameterList) { + function parseInitializer(inParameter) { + if (token !== 56) { + if (scanner.hasPrecedingLineBreak() || (inParameter && token === 15) || !isStartOfExpression()) { return undefined; } - return result; } - return requireCompleteParameterList ? undefined : createMissingList(); + parseExpected(56); + return parseAssignmentExpressionOrHigher(); } - function parseTypeMemberSemicolon() { - if (parseOptional(24)) { - return; + function parseAssignmentExpressionOrHigher() { + if (isYieldExpression()) { + return parseYieldExpression(); } - parseSemicolon(); - } - function parseSignatureMember(kind) { - var node = createNode(kind); - if (kind === 148) { - parseExpected(92); + var arrowExpression = tryParseParenthesizedArrowFunctionExpression(); + if (arrowExpression) { + return arrowExpression; } - fillSignature(54, false, false, false, node); - parseTypeMemberSemicolon(); - return finishNode(node); - } - function isIndexSignature() { - if (token !== 19) { - return false; + var expr = parseBinaryExpressionOrHigher(0); + if (expr.kind === 69 && token === 34) { + return parseSimpleArrowFunctionExpression(expr); } - return lookAhead(isUnambiguouslyIndexSignature); - } - function isUnambiguouslyIndexSignature() { - nextToken(); - if (token === 22 || token === 20) { - return true; + if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) { + return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher()); } - if (ts.isModifier(token)) { - nextToken(); - if (isIdentifier()) { + return parseConditionalExpressionRest(expr); + } + function isYieldExpression() { + if (token === 114) { + if (inYieldContext()) { return true; } + return lookAhead(nextTokenIsIdentifierOrKeywordOrNumberOnSameLine); } - else if (!isIdentifier()) { - return false; + return false; + } + function nextTokenIsIdentifierOnSameLine() { + nextToken(); + return !scanner.hasPrecedingLineBreak() && isIdentifier(); + } + function parseYieldExpression() { + var node = createNode(184); + nextToken(); + if (!scanner.hasPrecedingLineBreak() && + (token === 37 || isStartOfExpression())) { + node.asteriskToken = parseOptionalToken(37); + node.expression = parseAssignmentExpressionOrHigher(); + return finishNode(node); } else { - nextToken(); + return finishNode(node); } - if (token === 54 || token === 24) { - return true; + } + function parseSimpleArrowFunctionExpression(identifier) { + ts.Debug.assert(token === 34, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); + var node = createNode(174, identifier.pos); + var parameter = createNode(138, identifier.pos); + parameter.name = identifier; + finishNode(parameter); + node.parameters = [parameter]; + node.parameters.pos = parameter.pos; + node.parameters.end = parameter.end; + node.equalsGreaterThanToken = parseExpectedToken(34, false, ts.Diagnostics._0_expected, "=>"); + node.body = parseArrowFunctionExpressionBody(false); + return finishNode(node); + } + function tryParseParenthesizedArrowFunctionExpression() { + var triState = isParenthesizedArrowFunctionExpression(); + if (triState === 0) { + return undefined; } - if (token !== 53) { - return false; + var arrowFunction = triState === 1 + ? parseParenthesizedArrowFunctionExpressionHead(true) + : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); + if (!arrowFunction) { + return undefined; } - nextToken(); - return token === 54 || token === 24 || token === 20; + var isAsync = !!(arrowFunction.flags & 256); + var lastToken = token; + arrowFunction.equalsGreaterThanToken = parseExpectedToken(34, false, ts.Diagnostics._0_expected, "=>"); + arrowFunction.body = (lastToken === 34 || lastToken === 15) + ? parseArrowFunctionExpressionBody(isAsync) + : parseIdentifier(); + return finishNode(arrowFunction); } - function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(149, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.parameters = parseBracketedList(16, parseParameter, 19, 20); - node.type = parseTypeAnnotation(); - parseTypeMemberSemicolon(); - return finishNode(node); + function isParenthesizedArrowFunctionExpression() { + if (token === 17 || token === 25 || token === 118) { + return lookAhead(isParenthesizedArrowFunctionExpressionWorker); + } + if (token === 34) { + return 1; + } + return 0; } - function parsePropertyOrMethodSignature() { - var fullStart = scanner.getStartPos(); - var name = parsePropertyName(); - var questionToken = parseOptionalToken(53); - if (token === 17 || token === 25) { - var method = createNode(142, fullStart); - method.name = name; - method.questionToken = questionToken; - fillSignature(54, false, false, false, method); - parseTypeMemberSemicolon(); - return finishNode(method); + function isParenthesizedArrowFunctionExpressionWorker() { + if (token === 118) { + nextToken(); + if (scanner.hasPrecedingLineBreak()) { + return 0; + } + if (token !== 17 && token !== 25) { + return 0; + } + } + var first = token; + var second = nextToken(); + if (first === 17) { + if (second === 18) { + var third = nextToken(); + switch (third) { + case 34: + case 54: + case 15: + return 1; + default: + return 0; + } + } + if (second === 19 || second === 15) { + return 2; + } + if (second === 22) { + return 1; + } + if (!isIdentifier()) { + return 0; + } + if (nextToken() === 54) { + return 1; + } + return 2; } else { - var property = createNode(140, fullStart); - property.name = name; - property.questionToken = questionToken; - property.type = parseTypeAnnotation(); - parseTypeMemberSemicolon(); - return finishNode(property); - } - } - function isStartOfTypeMember() { - switch (token) { - case 17: - case 25: - case 19: - return true; - default: - if (ts.isModifier(token)) { - var result = lookAhead(isStartOfIndexSignatureDeclaration); - if (result) { - return result; + ts.Debug.assert(first === 25); + if (!isIdentifier()) { + return 0; + } + if (sourceFile.languageVariant === 1) { + var isArrowFunctionInJsx = lookAhead(function () { + var third = nextToken(); + if (third === 83) { + var fourth = nextToken(); + switch (fourth) { + case 56: + case 27: + return false; + default: + return true; + } } - } - return isLiteralPropertyName() && lookAhead(isTypeMemberWithLiteralPropertyName); - } - } - function isStartOfIndexSignatureDeclaration() { - while (ts.isModifier(token)) { - nextToken(); - } - return isIndexSignature(); - } - function isTypeMemberWithLiteralPropertyName() { - nextToken(); - return token === 17 || - token === 25 || - token === 53 || - token === 54 || - canParseSemicolon(); - } - function parseTypeMember() { - switch (token) { - case 17: - case 25: - return parseSignatureMember(147); - case 19: - return isIndexSignature() - ? parseIndexSignatureDeclaration(scanner.getStartPos(), undefined, undefined) - : parsePropertyOrMethodSignature(); - case 92: - if (lookAhead(isStartOfConstructSignature)) { - return parseSignatureMember(148); - } - case 9: - case 8: - return parsePropertyOrMethodSignature(); - default: - if (ts.isModifier(token)) { - var result = tryParse(parseIndexSignatureWithModifiers); - if (result) { - return result; + else if (third === 24) { + return true; } + return false; + }); + if (isArrowFunctionInJsx) { + return 1; } - if (ts.tokenIsIdentifierOrKeyword(token)) { - return parsePropertyOrMethodSignature(); - } + return 0; + } + return 2; } } - function parseIndexSignatureWithModifiers() { - var fullStart = scanner.getStartPos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - return isIndexSignature() - ? parseIndexSignatureDeclaration(fullStart, decorators, modifiers) - : undefined; - } - function isStartOfConstructSignature() { - nextToken(); - return token === 17 || token === 25; + function parsePossibleParenthesizedArrowFunctionExpressionHead() { + return parseParenthesizedArrowFunctionExpressionHead(false); } - function parseTypeLiteral() { - var node = createNode(155); - node.members = parseObjectTypeMembers(); - return finishNode(node); + function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { + var node = createNode(174); + setModifiers(node, parseModifiersForArrowFunction()); + var isAsync = !!(node.flags & 256); + fillSignature(54, false, isAsync, !allowAmbiguity, node); + if (!node.parameters) { + return undefined; + } + if (!allowAmbiguity && token !== 34 && token !== 15) { + return undefined; + } + return node; } - function parseObjectTypeMembers() { - var members; - if (parseExpected(15)) { - members = parseList(4, parseTypeMember); - parseExpected(16); + function parseArrowFunctionExpressionBody(isAsync) { + if (token === 15) { + return parseFunctionBlock(false, isAsync, false); } - else { - members = createMissingList(); + if (token !== 23 && + token !== 87 && + token !== 73 && + isStartOfStatement() && + !isStartOfExpressionStatement()) { + return parseFunctionBlock(false, isAsync, true); } - return members; + return isAsync + ? doInAwaitContext(parseAssignmentExpressionOrHigher) + : doOutsideOfAwaitContext(parseAssignmentExpressionOrHigher); } - function parseTupleType() { - var node = createNode(157); - node.elementTypes = parseBracketedList(19, parseType, 19, 20); + function parseConditionalExpressionRest(leftOperand) { + var questionToken = parseOptionalToken(53); + if (!questionToken) { + return leftOperand; + } + var node = createNode(182, leftOperand.pos); + node.condition = leftOperand; + node.questionToken = questionToken; + node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); + node.colonToken = parseExpectedToken(54, false, ts.Diagnostics._0_expected, ts.tokenToString(54)); + node.whenFalse = parseAssignmentExpressionOrHigher(); return finishNode(node); } - function parseParenthesizedType() { - var node = createNode(160); - parseExpected(17); - node.type = parseType(); - parseExpected(18); - return finishNode(node); + function parseBinaryExpressionOrHigher(precedence) { + var leftOperand = parseUnaryExpressionOrHigher(); + return parseBinaryExpressionRest(precedence, leftOperand); } - function parseFunctionOrConstructorType(kind) { - var node = createNode(kind); - if (kind === 153) { - parseExpected(92); - } - fillSignature(34, false, false, false, node); - return finishNode(node); + function isInOrOfKeyword(t) { + return t === 90 || t === 134; } - function parseKeywordAndNoDot() { - var node = parseTokenNode(); - return token === 21 ? undefined : node; + function parseBinaryExpressionRest(precedence, leftOperand) { + while (true) { + reScanGreaterToken(); + var newPrecedence = getBinaryOperatorPrecedence(); + var consumeCurrentOperator = token === 38 ? + newPrecedence >= precedence : + newPrecedence > precedence; + if (!consumeCurrentOperator) { + break; + } + if (token === 90 && inDisallowInContext()) { + break; + } + if (token === 116) { + if (scanner.hasPrecedingLineBreak()) { + break; + } + else { + nextToken(); + leftOperand = makeAsExpression(leftOperand, parseType()); + } + } + else { + leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence)); + } + } + return leftOperand; } - function parseNonArrayType() { - switch (token) { - case 117: - case 130: - case 128: - case 120: - case 131: - var node = tryParse(parseKeywordAndNoDot); - return node || parseTypeReferenceOrTypePredicate(); - case 103: - case 97: - return parseTokenNode(); - case 101: - return parseTypeQuery(); - case 15: - return parseTypeLiteral(); - case 19: - return parseTupleType(); - case 17: - return parseParenthesizedType(); - default: - return parseTypeReferenceOrTypePredicate(); + function isBinaryOperator() { + if (inDisallowInContext() && token === 90) { + return false; } + return getBinaryOperatorPrecedence() > 0; } - function isStartOfType() { + function getBinaryOperatorPrecedence() { switch (token) { - case 117: - case 130: - case 128: - case 120: - case 131: - case 103: - case 97: - case 101: - case 15: - case 19: - case 25: - case 92: - return true; - case 17: - return lookAhead(isStartOfParenthesizedOrFunctionType); - default: - return isIdentifier(); + case 52: + return 1; + case 51: + return 2; + case 47: + return 3; + case 48: + return 4; + case 46: + return 5; + case 30: + case 31: + case 32: + case 33: + return 6; + case 25: + case 27: + case 28: + case 29: + case 91: + case 90: + case 116: + return 7; + case 43: + case 44: + case 45: + return 8; + case 35: + case 36: + return 9; + case 37: + case 39: + case 40: + return 10; + case 38: + return 11; } + return -1; } - function isStartOfParenthesizedOrFunctionType() { - nextToken(); - return token === 18 || isStartOfParameter() || isStartOfType(); - } - function parseArrayTypeOrHigher() { - var type = parseNonArrayType(); - while (!scanner.hasPrecedingLineBreak() && parseOptional(19)) { - parseExpected(20); - var node = createNode(156, type.pos); - node.elementType = type; - type = finishNode(node); - } - return type; + function makeBinaryExpression(left, operatorToken, right) { + var node = createNode(181, left.pos); + node.left = left; + node.operatorToken = operatorToken; + node.right = right; + return finishNode(node); } - function parseUnionOrIntersectionType(kind, parseConstituentType, operator) { - var type = parseConstituentType(); - if (token === operator) { - var types = [type]; - types.pos = type.pos; - while (parseOptional(operator)) { - types.push(parseConstituentType()); - } - types.end = getNodeEnd(); - var node = createNode(kind, type.pos); - node.types = types; - type = finishNode(node); - } - return type; + function makeAsExpression(left, right) { + var node = createNode(189, left.pos); + node.expression = left; + node.type = right; + return finishNode(node); } - function parseIntersectionTypeOrHigher() { - return parseUnionOrIntersectionType(159, parseArrayTypeOrHigher, 46); + function parsePrefixUnaryExpression() { + var node = createNode(179); + node.operator = token; + nextToken(); + node.operand = parseSimpleUnaryExpression(); + return finishNode(node); } - function parseUnionTypeOrHigher() { - return parseUnionOrIntersectionType(158, parseIntersectionTypeOrHigher, 47); + function parseDeleteExpression() { + var node = createNode(175); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); } - function isStartOfFunctionType() { - if (token === 25) { - return true; - } - return token === 17 && lookAhead(isUnambiguouslyStartOfFunctionType); + function parseTypeOfExpression() { + var node = createNode(176); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); } - function isUnambiguouslyStartOfFunctionType() { + function parseVoidExpression() { + var node = createNode(177); nextToken(); - if (token === 18 || token === 22) { - return true; - } - if (isIdentifier() || ts.isModifier(token)) { - nextToken(); - if (token === 54 || token === 24 || - token === 53 || token === 56 || - isIdentifier() || ts.isModifier(token)) { + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); + } + function isAwaitExpression() { + if (token === 119) { + if (inAwaitContext()) { return true; } - if (token === 18) { - nextToken(); - if (token === 34) { - return true; - } - } + return lookAhead(nextTokenIsIdentifierOnSameLine); } return false; } - function parseType() { - return doOutsideOfContext(10, parseTypeWorker); + function parseAwaitExpression() { + var node = createNode(178); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); } - function parseTypeWorker() { - if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(152); + function parseUnaryExpressionOrHigher() { + if (isAwaitExpression()) { + return parseAwaitExpression(); } - if (token === 92) { - return parseFunctionOrConstructorType(153); + if (isIncrementExpression()) { + var incrementExpression = parseIncrementExpression(); + return token === 38 ? + parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : + incrementExpression; } - return parseUnionTypeOrHigher(); - } - function parseTypeAnnotation() { - return parseOptional(54) ? parseType() : undefined; - } - function isStartOfLeftHandSideExpression() { - switch (token) { - case 97: - case 95: - case 93: - case 99: - case 84: - case 8: - case 9: - case 11: - case 12: - case 17: - case 19: - case 15: - case 87: - case 73: - case 92: - case 39: - case 61: - case 69: - return true; - default: - return isIdentifier(); + var unaryOperator = token; + var simpleUnaryExpression = parseSimpleUnaryExpression(); + if (token === 38) { + var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); + if (simpleUnaryExpression.kind === 171) { + parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); + } + else { + parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, ts.tokenToString(unaryOperator)); + } } + return simpleUnaryExpression; } - function isStartOfExpression() { - if (isStartOfLeftHandSideExpression()) { - return true; - } + function parseSimpleUnaryExpression() { switch (token) { case 35: case 36: case 50: case 49: + return parsePrefixUnaryExpression(); case 78: + return parseDeleteExpression(); case 101: + return parseTypeOfExpression(); case 103: - case 41: - case 42: + return parseVoidExpression(); case 25: - case 119: - case 114: - return true; + return parseTypeAssertion(); default: - if (isBinaryOperator()) { - return true; - } - return isIdentifier(); - } - } - function isStartOfExpressionStatement() { - return token !== 15 && - token !== 87 && - token !== 73 && - token !== 55 && - isStartOfExpression(); - } - function allowInAndParseExpression() { - return allowInAnd(parseExpression); - } - function parseExpression() { - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var expr = parseAssignmentExpressionOrHigher(); - var operatorToken; - while ((operatorToken = parseOptionalToken(24))) { - expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher()); - } - if (saveDecoratorContext) { - setDecoratorContext(true); - } - return expr; - } - function parseInitializer(inParameter) { - if (token !== 56) { - if (scanner.hasPrecedingLineBreak() || (inParameter && token === 15) || !isStartOfExpression()) { - return undefined; - } - } - parseExpected(56); - return parseAssignmentExpressionOrHigher(); - } - function parseAssignmentExpressionOrHigher() { - if (isYieldExpression()) { - return parseYieldExpression(); - } - var arrowExpression = tryParseParenthesizedArrowFunctionExpression(); - if (arrowExpression) { - return arrowExpression; - } - var expr = parseBinaryExpressionOrHigher(0); - if (expr.kind === 69 && token === 34) { - return parseSimpleArrowFunctionExpression(expr); - } - if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) { - return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher()); + return parseIncrementExpression(); } - return parseConditionalExpressionRest(expr); } - function isYieldExpression() { - if (token === 114) { - if (inYieldContext()) { + function isIncrementExpression() { + switch (token) { + case 35: + case 36: + case 50: + case 49: + case 78: + case 101: + case 103: + return false; + case 25: + if (sourceFile.languageVariant !== 1) { + return false; + } + default: return true; - } - return lookAhead(nextTokenIsIdentifierOrKeywordOrNumberOnSameLine); } - return false; - } - function nextTokenIsIdentifierOnSameLine() { - nextToken(); - return !scanner.hasPrecedingLineBreak() && isIdentifier(); } - function parseYieldExpression() { - var node = createNode(184); - nextToken(); - if (!scanner.hasPrecedingLineBreak() && - (token === 37 || isStartOfExpression())) { - node.asteriskToken = parseOptionalToken(37); - node.expression = parseAssignmentExpressionOrHigher(); + function parseIncrementExpression() { + if (token === 41 || token === 42) { + var node = createNode(179); + node.operator = token; + nextToken(); + node.operand = parseLeftHandSideExpressionOrHigher(); return finishNode(node); } - else { + else if (sourceFile.languageVariant === 1 && token === 25 && lookAhead(nextTokenIsIdentifierOrKeyword)) { + return parseJsxElementOrSelfClosingElement(true); + } + var expression = parseLeftHandSideExpressionOrHigher(); + ts.Debug.assert(ts.isLeftHandSideExpression(expression)); + if ((token === 41 || token === 42) && !scanner.hasPrecedingLineBreak()) { + var node = createNode(180, expression.pos); + node.operand = expression; + node.operator = token; + nextToken(); return finishNode(node); } + return expression; } - function parseSimpleArrowFunctionExpression(identifier) { - ts.Debug.assert(token === 34, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); - var node = createNode(174, identifier.pos); - var parameter = createNode(138, identifier.pos); - parameter.name = identifier; - finishNode(parameter); - node.parameters = [parameter]; - node.parameters.pos = parameter.pos; - node.parameters.end = parameter.end; - node.equalsGreaterThanToken = parseExpectedToken(34, false, ts.Diagnostics._0_expected, "=>"); - node.body = parseArrowFunctionExpressionBody(false); + function parseLeftHandSideExpressionOrHigher() { + var expression = token === 95 + ? parseSuperExpression() + : parseMemberExpressionOrHigher(); + return parseCallExpressionRest(expression); + } + function parseMemberExpressionOrHigher() { + var expression = parsePrimaryExpression(); + return parseMemberExpressionRest(expression); + } + function parseSuperExpression() { + var expression = parseTokenNode(); + if (token === 17 || token === 21 || token === 19) { + return expression; + } + var node = createNode(166, expression.pos); + node.expression = expression; + node.dotToken = parseExpectedToken(21, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + node.name = parseRightSideOfDot(true); return finishNode(node); } - function tryParseParenthesizedArrowFunctionExpression() { - var triState = isParenthesizedArrowFunctionExpression(); - if (triState === 0) { - return undefined; + function parseJsxElementOrSelfClosingElement(inExpressionContext) { + var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); + var result; + if (opening.kind === 235) { + var node = createNode(233, opening.pos); + node.openingElement = opening; + node.children = parseJsxChildren(node.openingElement.tagName); + node.closingElement = parseJsxClosingElement(inExpressionContext); + result = finishNode(node); } - var arrowFunction = triState === 1 - ? parseParenthesizedArrowFunctionExpressionHead(true) - : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); - if (!arrowFunction) { - return undefined; + else { + ts.Debug.assert(opening.kind === 234); + result = opening; } - var isAsync = !!(arrowFunction.flags & 256); - var lastToken = token; - arrowFunction.equalsGreaterThanToken = parseExpectedToken(34, false, ts.Diagnostics._0_expected, "=>"); - arrowFunction.body = (lastToken === 34 || lastToken === 15) - ? parseArrowFunctionExpressionBody(isAsync) - : parseIdentifier(); - return finishNode(arrowFunction); - } - function isParenthesizedArrowFunctionExpression() { - if (token === 17 || token === 25 || token === 118) { - return lookAhead(isParenthesizedArrowFunctionExpressionWorker); + if (inExpressionContext && token === 25) { + var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(true); }); + if (invalidElement) { + parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); + var badNode = createNode(181, result.pos); + badNode.end = invalidElement.end; + badNode.left = result; + badNode.right = invalidElement; + badNode.operatorToken = createMissingNode(24, false, undefined); + badNode.operatorToken.pos = badNode.operatorToken.end = badNode.right.pos; + return badNode; + } } - if (token === 34) { - return 1; + return result; + } + function parseJsxText() { + var node = createNode(236, scanner.getStartPos()); + token = scanner.scanJsxToken(); + return finishNode(node); + } + function parseJsxChild() { + switch (token) { + case 236: + return parseJsxText(); + case 15: + return parseJsxExpression(false); + case 25: + return parseJsxElementOrSelfClosingElement(false); } - return 0; + ts.Debug.fail("Unknown JSX child kind " + token); } - function isParenthesizedArrowFunctionExpressionWorker() { - if (token === 118) { - nextToken(); - if (scanner.hasPrecedingLineBreak()) { - return 0; + function parseJsxChildren(openingTagName) { + var result = []; + result.pos = scanner.getStartPos(); + var saveParsingContext = parsingContext; + parsingContext |= 1 << 14; + while (true) { + token = scanner.reScanJsxToken(); + if (token === 26) { + break; } - if (token !== 17 && token !== 25) { - return 0; + else if (token === 1) { + parseErrorAtCurrentToken(ts.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, ts.getTextOfNodeFromSourceText(sourceText, openingTagName)); + break; } + result.push(parseJsxChild()); } - var first = token; - var second = nextToken(); - if (first === 17) { - if (second === 18) { - var third = nextToken(); - switch (third) { - case 34: - case 54: - case 15: - return 1; - default: - return 0; - } - } - if (second === 19 || second === 15) { - return 2; - } - if (second === 22) { - return 1; - } - if (!isIdentifier()) { - return 0; - } - if (nextToken() === 54) { - return 1; - } - return 2; + result.end = scanner.getTokenPos(); + parsingContext = saveParsingContext; + return result; + } + function parseJsxOpeningOrSelfClosingElement(inExpressionContext) { + var fullStart = scanner.getStartPos(); + parseExpected(25); + var tagName = parseJsxElementName(); + var attributes = parseList(13, parseJsxAttribute); + var node; + if (token === 27) { + node = createNode(235, fullStart); + scanJsxText(); } else { - ts.Debug.assert(first === 25); - if (!isIdentifier()) { - return 0; + parseExpected(39); + if (inExpressionContext) { + parseExpected(27); } - if (sourceFile.languageVariant === 1) { - var isArrowFunctionInJsx = lookAhead(function () { - var third = nextToken(); - if (third === 83) { - var fourth = nextToken(); - switch (fourth) { - case 56: - case 27: - return false; - default: - return true; - } - } - else if (third === 24) { - return true; - } - return false; - }); - if (isArrowFunctionInJsx) { - return 1; - } - return 0; + else { + parseExpected(27, undefined, false); + scanJsxText(); } - return 2; + node = createNode(234, fullStart); } + node.tagName = tagName; + node.attributes = attributes; + return finishNode(node); } - function parsePossibleParenthesizedArrowFunctionExpressionHead() { - return parseParenthesizedArrowFunctionExpressionHead(false); + function parseJsxElementName() { + scanJsxIdentifier(); + var elementName = parseIdentifierName(); + while (parseOptional(21)) { + scanJsxIdentifier(); + var node = createNode(135, elementName.pos); + node.left = elementName; + node.right = parseIdentifierName(); + elementName = finishNode(node); + } + return elementName; } - function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(174); - setModifiers(node, parseModifiersForArrowFunction()); - var isAsync = !!(node.flags & 256); - fillSignature(54, false, isAsync, !allowAmbiguity, node); - if (!node.parameters) { - return undefined; + function parseJsxExpression(inExpressionContext) { + var node = createNode(240); + parseExpected(15); + if (token !== 16) { + node.expression = parseExpression(); } - if (!allowAmbiguity && token !== 34 && token !== 15) { - return undefined; + if (inExpressionContext) { + parseExpected(16); + } + else { + parseExpected(16, undefined, false); + scanJsxText(); } - return node; + return finishNode(node); } - function parseArrowFunctionExpressionBody(isAsync) { + function parseJsxAttribute() { if (token === 15) { - return parseFunctionBlock(false, isAsync, false); + return parseJsxSpreadAttribute(); } - if (token !== 23 && - token !== 87 && - token !== 73 && - isStartOfStatement() && - !isStartOfExpressionStatement()) { - return parseFunctionBlock(false, isAsync, true); + scanJsxIdentifier(); + var node = createNode(238); + node.name = parseIdentifierName(); + if (parseOptional(56)) { + switch (token) { + case 9: + node.initializer = parseLiteralNode(); + break; + default: + node.initializer = parseJsxExpression(true); + break; + } } - return isAsync - ? doInAwaitContext(parseAssignmentExpressionOrHigher) - : doOutsideOfAwaitContext(parseAssignmentExpressionOrHigher); + return finishNode(node); } - function parseConditionalExpressionRest(leftOperand) { - var questionToken = parseOptionalToken(53); - if (!questionToken) { - return leftOperand; - } - var node = createNode(182, leftOperand.pos); - node.condition = leftOperand; - node.questionToken = questionToken; - node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); - node.colonToken = parseExpectedToken(54, false, ts.Diagnostics._0_expected, ts.tokenToString(54)); - node.whenFalse = parseAssignmentExpressionOrHigher(); + function parseJsxSpreadAttribute() { + var node = createNode(239); + parseExpected(15); + parseExpected(22); + node.expression = parseExpression(); + parseExpected(16); return finishNode(node); } - function parseBinaryExpressionOrHigher(precedence) { - var leftOperand = parseUnaryExpressionOrHigher(); - return parseBinaryExpressionRest(precedence, leftOperand); + function parseJsxClosingElement(inExpressionContext) { + var node = createNode(237); + parseExpected(26); + node.tagName = parseJsxElementName(); + if (inExpressionContext) { + parseExpected(27); + } + else { + parseExpected(27, undefined, false); + scanJsxText(); + } + return finishNode(node); } - function isInOrOfKeyword(t) { - return t === 90 || t === 134; + function parseTypeAssertion() { + var node = createNode(171); + parseExpected(25); + node.type = parseType(); + parseExpected(27); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); } - function parseBinaryExpressionRest(precedence, leftOperand) { + function parseMemberExpressionRest(expression) { while (true) { - reScanGreaterToken(); - var newPrecedence = getBinaryOperatorPrecedence(); - var consumeCurrentOperator = token === 38 ? - newPrecedence >= precedence : - newPrecedence > precedence; - if (!consumeCurrentOperator) { - break; - } - if (token === 90 && inDisallowInContext()) { - break; + var dotToken = parseOptionalToken(21); + if (dotToken) { + var propertyAccess = createNode(166, expression.pos); + propertyAccess.expression = expression; + propertyAccess.dotToken = dotToken; + propertyAccess.name = parseRightSideOfDot(true); + expression = finishNode(propertyAccess); + continue; } - if (token === 116) { - if (scanner.hasPrecedingLineBreak()) { - break; + if (!inDecoratorContext() && parseOptional(19)) { + var indexedAccess = createNode(167, expression.pos); + indexedAccess.expression = expression; + if (token !== 20) { + indexedAccess.argumentExpression = allowInAnd(parseExpression); + if (indexedAccess.argumentExpression.kind === 9 || indexedAccess.argumentExpression.kind === 8) { + var literal = indexedAccess.argumentExpression; + literal.text = internIdentifier(literal.text); + } } - else { - nextToken(); - leftOperand = makeAsExpression(leftOperand, parseType()); + parseExpected(20); + expression = finishNode(indexedAccess); + continue; + } + if (token === 11 || token === 12) { + var tagExpression = createNode(170, expression.pos); + tagExpression.tag = expression; + tagExpression.template = token === 11 + ? parseLiteralNode() + : parseTemplateExpression(); + expression = finishNode(tagExpression); + continue; + } + return expression; + } + } + function parseCallExpressionRest(expression) { + while (true) { + expression = parseMemberExpressionRest(expression); + if (token === 25) { + var typeArguments = tryParse(parseTypeArgumentsInExpression); + if (!typeArguments) { + return expression; } + var callExpr = createNode(168, expression.pos); + callExpr.expression = expression; + callExpr.typeArguments = typeArguments; + callExpr.arguments = parseArgumentList(); + expression = finishNode(callExpr); + continue; } - else { - leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence)); + else if (token === 17) { + var callExpr = createNode(168, expression.pos); + callExpr.expression = expression; + callExpr.arguments = parseArgumentList(); + expression = finishNode(callExpr); + continue; } + return expression; } - return leftOperand; } - function isBinaryOperator() { - if (inDisallowInContext() && token === 90) { - return false; + function parseArgumentList() { + parseExpected(17); + var result = parseDelimitedList(11, parseArgumentExpression); + parseExpected(18); + return result; + } + function parseTypeArgumentsInExpression() { + if (!parseOptional(25)) { + return undefined; } - return getBinaryOperatorPrecedence() > 0; + var typeArguments = parseDelimitedList(18, parseType); + if (!parseExpected(27)) { + return undefined; + } + return typeArguments && canFollowTypeArgumentsInExpression() + ? typeArguments + : undefined; } - function getBinaryOperatorPrecedence() { + function canFollowTypeArgumentsInExpression() { switch (token) { - case 52: - return 1; - case 51: - return 2; - case 47: - return 3; - case 48: - return 4; - case 46: - return 5; + case 17: + case 21: + case 18: + case 20: + case 54: + case 23: + case 53: case 30: - case 31: case 32: + case 31: case 33: - return 6; - case 25: - case 27: - case 28: - case 29: - case 91: - case 90: - case 116: - return 7; - case 43: - case 44: - case 45: - return 8; - case 35: - case 36: - return 9; - case 37: + case 51: + case 52: + case 48: + case 46: + case 47: + case 16: + case 1: + return true; + case 24: + case 15: + default: + return false; + } + } + function parsePrimaryExpression() { + switch (token) { + case 8: + case 9: + case 11: + return parseLiteralNode(); + case 97: + case 95: + case 93: + case 99: + case 84: + return parseTokenNode(); + case 17: + return parseParenthesizedExpression(); + case 19: + return parseArrayLiteralExpression(); + case 15: + return parseObjectLiteralExpression(); + case 118: + if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { + break; + } + return parseFunctionExpression(); + case 73: + return parseClassExpression(); + case 87: + return parseFunctionExpression(); + case 92: + return parseNewExpression(); case 39: - case 40: - return 10; - case 38: - return 11; + case 61: + if (reScanSlashToken() === 10) { + return parseLiteralNode(); + } + break; + case 12: + return parseTemplateExpression(); } - return -1; - } - function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(181, left.pos); - node.left = left; - node.operatorToken = operatorToken; - node.right = right; - return finishNode(node); + return parseIdentifier(ts.Diagnostics.Expression_expected); } - function makeAsExpression(left, right) { - var node = createNode(189, left.pos); - node.expression = left; - node.type = right; + function parseParenthesizedExpression() { + var node = createNode(172); + parseExpected(17); + node.expression = allowInAnd(parseExpression); + parseExpected(18); return finishNode(node); } - function parsePrefixUnaryExpression() { - var node = createNode(179); - node.operator = token; - nextToken(); - node.operand = parseSimpleUnaryExpression(); + function parseSpreadElement() { + var node = createNode(185); + parseExpected(22); + node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } - function parseDeleteExpression() { - var node = createNode(175); - nextToken(); - node.expression = parseSimpleUnaryExpression(); - return finishNode(node); + function parseArgumentOrArrayLiteralElement() { + return token === 22 ? parseSpreadElement() : + token === 24 ? createNode(187) : + parseAssignmentExpressionOrHigher(); } - function parseTypeOfExpression() { - var node = createNode(176); - nextToken(); - node.expression = parseSimpleUnaryExpression(); - return finishNode(node); + function parseArgumentExpression() { + return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); } - function parseVoidExpression() { - var node = createNode(177); - nextToken(); - node.expression = parseSimpleUnaryExpression(); + function parseArrayLiteralExpression() { + var node = createNode(164); + parseExpected(19); + if (scanner.hasPrecedingLineBreak()) + node.flags |= 1024; + node.elements = parseDelimitedList(15, parseArgumentOrArrayLiteralElement); + parseExpected(20); return finishNode(node); } - function isAwaitExpression() { - if (token === 119) { - if (inAwaitContext()) { - return true; - } - return lookAhead(nextTokenIsIdentifierOnSameLine); + function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { + if (parseContextualModifier(123)) { + return parseAccessorDeclaration(145, fullStart, decorators, modifiers); } - return false; - } - function parseAwaitExpression() { - var node = createNode(178); - nextToken(); - node.expression = parseSimpleUnaryExpression(); - return finishNode(node); + else if (parseContextualModifier(129)) { + return parseAccessorDeclaration(146, fullStart, decorators, modifiers); + } + return undefined; } - function parseUnaryExpressionOrHigher() { - if (isAwaitExpression()) { - return parseAwaitExpression(); + function parseObjectLiteralElement() { + var fullStart = scanner.getStartPos(); + var decorators = parseDecorators(); + var modifiers = parseModifiers(); + var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); + if (accessor) { + return accessor; } - if (isIncrementExpression()) { - var incrementExpression = parseIncrementExpression(); - return token === 38 ? - parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : - incrementExpression; + var asteriskToken = parseOptionalToken(37); + var tokenIsIdentifier = isIdentifier(); + var nameToken = token; + var propertyName = parsePropertyName(); + var questionToken = parseOptionalToken(53); + if (asteriskToken || token === 17 || token === 25) { + return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); } - var unaryOperator = token; - var simpleUnaryExpression = parseSimpleUnaryExpression(); - if (token === 38) { - var diagnostic; - var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 171) { - parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); - } - else { - parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, ts.tokenToString(unaryOperator)); + var isShorthandPropertyAssignment = tokenIsIdentifier && (token === 24 || token === 16 || token === 56); + if (isShorthandPropertyAssignment) { + var shorthandDeclaration = createNode(246, fullStart); + shorthandDeclaration.name = propertyName; + shorthandDeclaration.questionToken = questionToken; + var equalsToken = parseOptionalToken(56); + if (equalsToken) { + shorthandDeclaration.equalsToken = equalsToken; + shorthandDeclaration.objectAssignmentInitializer = allowInAnd(parseAssignmentExpressionOrHigher); } + return finishNode(shorthandDeclaration); } - return simpleUnaryExpression; - } - function parseSimpleUnaryExpression() { - switch (token) { - case 35: - case 36: - case 50: - case 49: - return parsePrefixUnaryExpression(); - case 78: - return parseDeleteExpression(); - case 101: - return parseTypeOfExpression(); - case 103: - return parseVoidExpression(); - case 25: - return parseTypeAssertion(); - default: - return parseIncrementExpression(); + else { + var propertyAssignment = createNode(245, fullStart); + propertyAssignment.name = propertyName; + propertyAssignment.questionToken = questionToken; + parseExpected(54); + propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); + return finishNode(propertyAssignment); } } - function isIncrementExpression() { - switch (token) { - case 35: - case 36: - case 50: - case 49: - case 78: - case 101: - case 103: - return false; - case 25: - if (sourceFile.languageVariant !== 1) { - return false; - } - default: - return true; + function parseObjectLiteralExpression() { + var node = createNode(165); + parseExpected(15); + if (scanner.hasPrecedingLineBreak()) { + node.flags |= 1024; } + node.properties = parseDelimitedList(12, parseObjectLiteralElement, true); + parseExpected(16); + return finishNode(node); } - function parseIncrementExpression() { - if (token === 41 || token === 42) { - var node = createNode(179); - node.operator = token; - nextToken(); - node.operand = parseLeftHandSideExpressionOrHigher(); - return finishNode(node); - } - else if (sourceFile.languageVariant === 1 && token === 25 && lookAhead(nextTokenIsIdentifierOrKeyword)) { - return parseJsxElementOrSelfClosingElement(true); + function parseFunctionExpression() { + var saveDecoratorContext = inDecoratorContext(); + if (saveDecoratorContext) { + setDecoratorContext(false); } - var expression = parseLeftHandSideExpressionOrHigher(); - ts.Debug.assert(ts.isLeftHandSideExpression(expression)); - if ((token === 41 || token === 42) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(180, expression.pos); - node.operand = expression; - node.operator = token; - nextToken(); - return finishNode(node); + var node = createNode(173); + setModifiers(node, parseModifiers()); + parseExpected(87); + node.asteriskToken = parseOptionalToken(37); + var isGenerator = !!node.asteriskToken; + var isAsync = !!(node.flags & 256); + node.name = + isGenerator && isAsync ? doInYieldAndAwaitContext(parseOptionalIdentifier) : + isGenerator ? doInYieldContext(parseOptionalIdentifier) : + isAsync ? doInAwaitContext(parseOptionalIdentifier) : + parseOptionalIdentifier(); + fillSignature(54, isGenerator, isAsync, false, node); + node.body = parseFunctionBlock(isGenerator, isAsync, false); + if (saveDecoratorContext) { + setDecoratorContext(true); } - return expression; - } - function parseLeftHandSideExpressionOrHigher() { - var expression = token === 95 - ? parseSuperExpression() - : parseMemberExpressionOrHigher(); - return parseCallExpressionRest(expression); + return finishNode(node); } - function parseMemberExpressionOrHigher() { - var expression = parsePrimaryExpression(); - return parseMemberExpressionRest(expression); + function parseOptionalIdentifier() { + return isIdentifier() ? parseIdentifier() : undefined; } - function parseSuperExpression() { - var expression = parseTokenNode(); - if (token === 17 || token === 21 || token === 19) { - return expression; + function parseNewExpression() { + var node = createNode(169); + parseExpected(92); + node.expression = parseMemberExpressionOrHigher(); + node.typeArguments = tryParse(parseTypeArgumentsInExpression); + if (node.typeArguments || token === 17) { + node.arguments = parseArgumentList(); } - var node = createNode(166, expression.pos); - node.expression = expression; - node.dotToken = parseExpectedToken(21, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); - node.name = parseRightSideOfDot(true); return finishNode(node); } - function parseJsxElementOrSelfClosingElement(inExpressionContext) { - var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); - var result; - if (opening.kind === 235) { - var node = createNode(233, opening.pos); - node.openingElement = opening; - node.children = parseJsxChildren(node.openingElement.tagName); - node.closingElement = parseJsxClosingElement(inExpressionContext); - result = finishNode(node); + function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { + var node = createNode(192); + if (parseExpected(15, diagnosticMessage) || ignoreMissingOpenBrace) { + node.statements = parseList(1, parseStatement); + parseExpected(16); } else { - ts.Debug.assert(opening.kind === 234); - result = opening; + node.statements = createMissingList(); + } + return finishNode(node); + } + function parseFunctionBlock(allowYield, allowAwait, ignoreMissingOpenBrace, diagnosticMessage) { + var savedYieldContext = inYieldContext(); + setYieldContext(allowYield); + var savedAwaitContext = inAwaitContext(); + setAwaitContext(allowAwait); + var saveDecoratorContext = inDecoratorContext(); + if (saveDecoratorContext) { + setDecoratorContext(false); } - if (inExpressionContext && token === 25) { - var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(true); }); - if (invalidElement) { - parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(181, result.pos); - badNode.end = invalidElement.end; - badNode.left = result; - badNode.right = invalidElement; - badNode.operatorToken = createMissingNode(24, false, undefined); - badNode.operatorToken.pos = badNode.operatorToken.end = badNode.right.pos; - return badNode; - } + var block = parseBlock(ignoreMissingOpenBrace, diagnosticMessage); + if (saveDecoratorContext) { + setDecoratorContext(true); } - return result; + setYieldContext(savedYieldContext); + setAwaitContext(savedAwaitContext); + return block; } - function parseJsxText() { - var node = createNode(236, scanner.getStartPos()); - token = scanner.scanJsxToken(); + function parseEmptyStatement() { + var node = createNode(194); + parseExpected(23); return finishNode(node); } - function parseJsxChild() { - switch (token) { - case 236: - return parseJsxText(); - case 15: - return parseJsxExpression(false); - case 25: - return parseJsxElementOrSelfClosingElement(false); - } - ts.Debug.fail("Unknown JSX child kind " + token); + function parseIfStatement() { + var node = createNode(196); + parseExpected(88); + parseExpected(17); + node.expression = allowInAnd(parseExpression); + parseExpected(18); + node.thenStatement = parseStatement(); + node.elseStatement = parseOptional(80) ? parseStatement() : undefined; + return finishNode(node); } - function parseJsxChildren(openingTagName) { - var result = []; - result.pos = scanner.getStartPos(); - var saveParsingContext = parsingContext; - parsingContext |= 1 << 14; - while (true) { - token = scanner.reScanJsxToken(); - if (token === 26) { - break; + function parseDoStatement() { + var node = createNode(197); + parseExpected(79); + node.statement = parseStatement(); + parseExpected(104); + parseExpected(17); + node.expression = allowInAnd(parseExpression); + parseExpected(18); + parseOptional(23); + return finishNode(node); + } + function parseWhileStatement() { + var node = createNode(198); + parseExpected(104); + parseExpected(17); + node.expression = allowInAnd(parseExpression); + parseExpected(18); + node.statement = parseStatement(); + return finishNode(node); + } + function parseForOrForInOrForOfStatement() { + var pos = getNodePos(); + parseExpected(86); + parseExpected(17); + var initializer = undefined; + if (token !== 23) { + if (token === 102 || token === 108 || token === 74) { + initializer = parseVariableDeclarationList(true); } - else if (token === 1) { - parseErrorAtCurrentToken(ts.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, ts.getTextOfNodeFromSourceText(sourceText, openingTagName)); - break; + else { + initializer = disallowInAnd(parseExpression); } - result.push(parseJsxChild()); } - result.end = scanner.getTokenPos(); - parsingContext = saveParsingContext; - return result; - } - function parseJsxOpeningOrSelfClosingElement(inExpressionContext) { - var fullStart = scanner.getStartPos(); - parseExpected(25); - var tagName = parseJsxElementName(); - var attributes = parseList(13, parseJsxAttribute); - var node; - if (token === 27) { - node = createNode(235, fullStart); - scanJsxText(); + var forOrForInOrForOfStatement; + if (parseOptional(90)) { + var forInStatement = createNode(200, pos); + forInStatement.initializer = initializer; + forInStatement.expression = allowInAnd(parseExpression); + parseExpected(18); + forOrForInOrForOfStatement = forInStatement; + } + else if (parseOptional(134)) { + var forOfStatement = createNode(201, pos); + forOfStatement.initializer = initializer; + forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); + parseExpected(18); + forOrForInOrForOfStatement = forOfStatement; } else { - parseExpected(39); - if (inExpressionContext) { - parseExpected(27); + var forStatement = createNode(199, pos); + forStatement.initializer = initializer; + parseExpected(23); + if (token !== 23 && token !== 18) { + forStatement.condition = allowInAnd(parseExpression); } - else { - parseExpected(27, undefined, false); - scanJsxText(); + parseExpected(23); + if (token !== 18) { + forStatement.incrementor = allowInAnd(parseExpression); } - node = createNode(234, fullStart); + parseExpected(18); + forOrForInOrForOfStatement = forStatement; } - node.tagName = tagName; - node.attributes = attributes; - return finishNode(node); + forOrForInOrForOfStatement.statement = parseStatement(); + return finishNode(forOrForInOrForOfStatement); } - function parseJsxElementName() { - scanJsxIdentifier(); - var elementName = parseIdentifierName(); - while (parseOptional(21)) { - scanJsxIdentifier(); - var node = createNode(135, elementName.pos); - node.left = elementName; - node.right = parseIdentifierName(); - elementName = finishNode(node); + function parseBreakOrContinueStatement(kind) { + var node = createNode(kind); + parseExpected(kind === 203 ? 70 : 75); + if (!canParseSemicolon()) { + node.label = parseIdentifier(); } - return elementName; + parseSemicolon(); + return finishNode(node); } - function parseJsxExpression(inExpressionContext) { - var node = createNode(240); - parseExpected(15); - if (token !== 16) { - node.expression = parseExpression(); - } - if (inExpressionContext) { - parseExpected(16); - } - else { - parseExpected(16, undefined, false); - scanJsxText(); + function parseReturnStatement() { + var node = createNode(204); + parseExpected(94); + if (!canParseSemicolon()) { + node.expression = allowInAnd(parseExpression); } + parseSemicolon(); return finishNode(node); } - function parseJsxAttribute() { - if (token === 15) { - return parseJsxSpreadAttribute(); - } - scanJsxIdentifier(); - var node = createNode(238); - node.name = parseIdentifierName(); - if (parseOptional(56)) { - switch (token) { - case 9: - node.initializer = parseLiteralNode(); - break; - default: - node.initializer = parseJsxExpression(true); - break; - } - } + function parseWithStatement() { + var node = createNode(205); + parseExpected(105); + parseExpected(17); + node.expression = allowInAnd(parseExpression); + parseExpected(18); + node.statement = parseStatement(); return finishNode(node); } - function parseJsxSpreadAttribute() { - var node = createNode(239); + function parseCaseClause() { + var node = createNode(241); + parseExpected(71); + node.expression = allowInAnd(parseExpression); + parseExpected(54); + node.statements = parseList(3, parseStatement); + return finishNode(node); + } + function parseDefaultClause() { + var node = createNode(242); + parseExpected(77); + parseExpected(54); + node.statements = parseList(3, parseStatement); + return finishNode(node); + } + function parseCaseOrDefaultClause() { + return token === 71 ? parseCaseClause() : parseDefaultClause(); + } + function parseSwitchStatement() { + var node = createNode(206); + parseExpected(96); + parseExpected(17); + node.expression = allowInAnd(parseExpression); + parseExpected(18); + var caseBlock = createNode(220, scanner.getStartPos()); parseExpected(15); - parseExpected(22); - node.expression = parseExpression(); + caseBlock.clauses = parseList(2, parseCaseOrDefaultClause); parseExpected(16); + node.caseBlock = finishNode(caseBlock); + return finishNode(node); + } + function parseThrowStatement() { + var node = createNode(208); + parseExpected(98); + node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); + parseSemicolon(); + return finishNode(node); + } + function parseTryStatement() { + var node = createNode(209); + parseExpected(100); + node.tryBlock = parseBlock(false); + node.catchClause = token === 72 ? parseCatchClause() : undefined; + if (!node.catchClause || token === 85) { + parseExpected(85); + node.finallyBlock = parseBlock(false); + } + return finishNode(node); + } + function parseCatchClause() { + var result = createNode(244); + parseExpected(72); + if (parseExpected(17)) { + result.variableDeclaration = parseVariableDeclaration(); + } + parseExpected(18); + result.block = parseBlock(false); + return finishNode(result); + } + function parseDebuggerStatement() { + var node = createNode(210); + parseExpected(76); + parseSemicolon(); return finishNode(node); } - function parseJsxClosingElement(inExpressionContext) { - var node = createNode(237); - parseExpected(26); - node.tagName = parseJsxElementName(); - if (inExpressionContext) { - parseExpected(27); + function parseExpressionOrLabeledStatement() { + var fullStart = scanner.getStartPos(); + var expression = allowInAnd(parseExpression); + if (expression.kind === 69 && parseOptional(54)) { + var labeledStatement = createNode(207, fullStart); + labeledStatement.label = expression; + labeledStatement.statement = parseStatement(); + return finishNode(labeledStatement); } else { - parseExpected(27, undefined, false); - scanJsxText(); + var expressionStatement = createNode(195, fullStart); + expressionStatement.expression = expression; + parseSemicolon(); + return finishNode(expressionStatement); } - return finishNode(node); } - function parseTypeAssertion() { - var node = createNode(171); - parseExpected(25); - node.type = parseType(); - parseExpected(27); - node.expression = parseSimpleUnaryExpression(); - return finishNode(node); + function nextTokenIsIdentifierOrKeywordOnSameLine() { + nextToken(); + return ts.tokenIsIdentifierOrKeyword(token) && !scanner.hasPrecedingLineBreak(); } - function parseMemberExpressionRest(expression) { + function nextTokenIsFunctionKeywordOnSameLine() { + nextToken(); + return token === 87 && !scanner.hasPrecedingLineBreak(); + } + function nextTokenIsIdentifierOrKeywordOrNumberOnSameLine() { + nextToken(); + return (ts.tokenIsIdentifierOrKeyword(token) || token === 8) && !scanner.hasPrecedingLineBreak(); + } + function isDeclaration() { while (true) { - var dotToken = parseOptionalToken(21); - if (dotToken) { - var propertyAccess = createNode(166, expression.pos); - propertyAccess.expression = expression; - propertyAccess.dotToken = dotToken; - propertyAccess.name = parseRightSideOfDot(true); - expression = finishNode(propertyAccess); - continue; - } - if (!inDecoratorContext() && parseOptional(19)) { - var indexedAccess = createNode(167, expression.pos); - indexedAccess.expression = expression; - if (token !== 20) { - indexedAccess.argumentExpression = allowInAnd(parseExpression); - if (indexedAccess.argumentExpression.kind === 9 || indexedAccess.argumentExpression.kind === 8) { - var literal = indexedAccess.argumentExpression; - literal.text = internIdentifier(literal.text); + switch (token) { + case 102: + case 108: + case 74: + case 87: + case 73: + case 81: + return true; + case 107: + case 132: + return nextTokenIsIdentifierOnSameLine(); + case 125: + case 126: + return nextTokenIsIdentifierOrStringLiteralOnSameLine(); + case 115: + case 118: + case 122: + case 110: + case 111: + case 112: + nextToken(); + if (scanner.hasPrecedingLineBreak()) { + return false; } - } - parseExpected(20); - expression = finishNode(indexedAccess); - continue; - } - if (token === 11 || token === 12) { - var tagExpression = createNode(170, expression.pos); - tagExpression.tag = expression; - tagExpression.template = token === 11 - ? parseLiteralNode() - : parseTemplateExpression(); - expression = finishNode(tagExpression); - continue; + continue; + case 89: + nextToken(); + return token === 9 || token === 37 || + token === 15 || ts.tokenIsIdentifierOrKeyword(token); + case 82: + nextToken(); + if (token === 56 || token === 37 || + token === 15 || token === 77) { + return true; + } + continue; + case 113: + nextToken(); + continue; + default: + return false; } - return expression; } } - function parseCallExpressionRest(expression) { - while (true) { - expression = parseMemberExpressionRest(expression); - if (token === 25) { - var typeArguments = tryParse(parseTypeArgumentsInExpression); - if (!typeArguments) { - return expression; - } - var callExpr = createNode(168, expression.pos); - callExpr.expression = expression; - callExpr.typeArguments = typeArguments; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); - continue; - } - else if (token === 17) { - var callExpr = createNode(168, expression.pos); - callExpr.expression = expression; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); - continue; - } - return expression; + function isStartOfDeclaration() { + return lookAhead(isDeclaration); + } + function isStartOfStatement() { + switch (token) { + case 55: + case 23: + case 15: + case 102: + case 108: + case 87: + case 73: + case 81: + case 88: + case 79: + case 104: + case 86: + case 75: + case 70: + case 94: + case 105: + case 96: + case 98: + case 100: + case 76: + case 72: + case 85: + return true; + case 74: + case 82: + case 89: + return isStartOfDeclaration(); + case 118: + case 122: + case 107: + case 125: + case 126: + case 132: + return true; + case 112: + case 110: + case 111: + case 113: + return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); + default: + return isStartOfExpression(); } } - function parseArgumentList() { - parseExpected(17); - var result = parseDelimitedList(11, parseArgumentExpression); - parseExpected(18); - return result; + function nextTokenIsIdentifierOrStartOfDestructuring() { + nextToken(); + return isIdentifier() || token === 15 || token === 19; } - function parseTypeArgumentsInExpression() { - if (!parseOptional(25)) { - return undefined; - } - var typeArguments = parseDelimitedList(18, parseType); - if (!parseExpected(27)) { - return undefined; + function isLetDeclaration() { + return lookAhead(nextTokenIsIdentifierOrStartOfDestructuring); + } + function parseStatement() { + switch (token) { + case 23: + return parseEmptyStatement(); + case 15: + return parseBlock(false); + case 102: + return parseVariableStatement(scanner.getStartPos(), undefined, undefined); + case 108: + if (isLetDeclaration()) { + return parseVariableStatement(scanner.getStartPos(), undefined, undefined); + } + break; + case 87: + return parseFunctionDeclaration(scanner.getStartPos(), undefined, undefined); + case 73: + return parseClassDeclaration(scanner.getStartPos(), undefined, undefined); + case 88: + return parseIfStatement(); + case 79: + return parseDoStatement(); + case 104: + return parseWhileStatement(); + case 86: + return parseForOrForInOrForOfStatement(); + case 75: + return parseBreakOrContinueStatement(202); + case 70: + return parseBreakOrContinueStatement(203); + case 94: + return parseReturnStatement(); + case 105: + return parseWithStatement(); + case 96: + return parseSwitchStatement(); + case 98: + return parseThrowStatement(); + case 100: + case 72: + case 85: + return parseTryStatement(); + case 76: + return parseDebuggerStatement(); + case 55: + return parseDeclaration(); + case 118: + case 107: + case 132: + case 125: + case 126: + case 122: + case 74: + case 81: + case 82: + case 89: + case 110: + case 111: + case 112: + case 115: + case 113: + if (isStartOfDeclaration()) { + return parseDeclaration(); + } + break; } - return typeArguments && canFollowTypeArgumentsInExpression() - ? typeArguments - : undefined; + return parseExpressionOrLabeledStatement(); } - function canFollowTypeArgumentsInExpression() { + function parseDeclaration() { + var fullStart = getNodePos(); + var decorators = parseDecorators(); + var modifiers = parseModifiers(); switch (token) { - case 17: - case 21: - case 18: - case 20: - case 54: - case 23: - case 53: - case 30: - case 32: - case 31: - case 33: - case 51: - case 52: - case 48: - case 46: - case 47: - case 16: - case 1: - return true; - case 24: - case 15: + case 102: + case 108: + case 74: + return parseVariableStatement(fullStart, decorators, modifiers); + case 87: + return parseFunctionDeclaration(fullStart, decorators, modifiers); + case 73: + return parseClassDeclaration(fullStart, decorators, modifiers); + case 107: + return parseInterfaceDeclaration(fullStart, decorators, modifiers); + case 132: + return parseTypeAliasDeclaration(fullStart, decorators, modifiers); + case 81: + return parseEnumDeclaration(fullStart, decorators, modifiers); + case 125: + case 126: + return parseModuleDeclaration(fullStart, decorators, modifiers); + case 89: + return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); + case 82: + nextToken(); + return token === 77 || token === 56 ? + parseExportAssignment(fullStart, decorators, modifiers) : + parseExportDeclaration(fullStart, decorators, modifiers); default: - return false; + if (decorators || modifiers) { + var node = createMissingNode(231, true, ts.Diagnostics.Declaration_expected); + node.pos = fullStart; + node.decorators = decorators; + setModifiers(node, modifiers); + return finishNode(node); + } } } - function parsePrimaryExpression() { - switch (token) { - case 8: - case 9: - case 11: - return parseLiteralNode(); - case 97: - case 95: - case 93: - case 99: - case 84: - return parseTokenNode(); - case 17: - return parseParenthesizedExpression(); - case 19: - return parseArrayLiteralExpression(); - case 15: - return parseObjectLiteralExpression(); - case 118: - if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { - break; - } - return parseFunctionExpression(); - case 73: - return parseClassExpression(); - case 87: - return parseFunctionExpression(); - case 92: - return parseNewExpression(); - case 39: - case 61: - if (reScanSlashToken() === 10) { - return parseLiteralNode(); - } - break; - case 12: - return parseTemplateExpression(); + function nextTokenIsIdentifierOrStringLiteralOnSameLine() { + nextToken(); + return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token === 9); + } + function parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage) { + if (token !== 15 && canParseSemicolon()) { + parseSemicolon(); + return; } - return parseIdentifier(ts.Diagnostics.Expression_expected); + return parseFunctionBlock(isGenerator, isAsync, false, diagnosticMessage); } - function parseParenthesizedExpression() { - var node = createNode(172); - parseExpected(17); - node.expression = allowInAnd(parseExpression); - parseExpected(18); + function parseArrayBindingElement() { + if (token === 24) { + return createNode(187); + } + var node = createNode(163); + node.dotDotDotToken = parseOptionalToken(22); + node.name = parseIdentifierOrPattern(); + node.initializer = parseBindingElementInitializer(false); return finishNode(node); } - function parseSpreadElement() { - var node = createNode(185); - parseExpected(22); - node.expression = parseAssignmentExpressionOrHigher(); + function parseObjectBindingElement() { + var node = createNode(163); + var tokenIsIdentifier = isIdentifier(); + var propertyName = parsePropertyName(); + if (tokenIsIdentifier && token !== 54) { + node.name = propertyName; + } + else { + parseExpected(54); + node.propertyName = propertyName; + node.name = parseIdentifierOrPattern(); + } + node.initializer = parseBindingElementInitializer(false); return finishNode(node); } - function parseArgumentOrArrayLiteralElement() { - return token === 22 ? parseSpreadElement() : - token === 24 ? createNode(187) : - parseAssignmentExpressionOrHigher(); - } - function parseArgumentExpression() { - return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); + function parseObjectBindingPattern() { + var node = createNode(161); + parseExpected(15); + node.elements = parseDelimitedList(9, parseObjectBindingElement); + parseExpected(16); + return finishNode(node); } - function parseArrayLiteralExpression() { - var node = createNode(164); + function parseArrayBindingPattern() { + var node = createNode(162); parseExpected(19); - if (scanner.hasPrecedingLineBreak()) - node.flags |= 1024; - node.elements = parseDelimitedList(15, parseArgumentOrArrayLiteralElement); + node.elements = parseDelimitedList(10, parseArrayBindingElement); parseExpected(20); return finishNode(node); } - function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { - if (parseContextualModifier(123)) { - return parseAccessorDeclaration(145, fullStart, decorators, modifiers); + function isIdentifierOrPattern() { + return token === 15 || token === 19 || isIdentifier(); + } + function parseIdentifierOrPattern() { + if (token === 19) { + return parseArrayBindingPattern(); } - else if (parseContextualModifier(129)) { - return parseAccessorDeclaration(146, fullStart, decorators, modifiers); + if (token === 15) { + return parseObjectBindingPattern(); } - return undefined; + return parseIdentifier(); } - function parseObjectLiteralElement() { - var fullStart = scanner.getStartPos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); - if (accessor) { - return accessor; + function parseVariableDeclaration() { + var node = createNode(211); + node.name = parseIdentifierOrPattern(); + node.type = parseTypeAnnotation(); + if (!isInOrOfKeyword(token)) { + node.initializer = parseInitializer(false); } - var asteriskToken = parseOptionalToken(37); - var tokenIsIdentifier = isIdentifier(); - var nameToken = token; - var propertyName = parsePropertyName(); - var questionToken = parseOptionalToken(53); - if (asteriskToken || token === 17 || token === 25) { - return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); + return finishNode(node); + } + function parseVariableDeclarationList(inForStatementInitializer) { + var node = createNode(212); + switch (token) { + case 102: + break; + case 108: + node.flags |= 8192; + break; + case 74: + node.flags |= 16384; + break; + default: + ts.Debug.fail(); } - var isShorthandPropertyAssignment = tokenIsIdentifier && (token === 24 || token === 16 || token === 56); - if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(246, fullStart); - shorthandDeclaration.name = propertyName; - shorthandDeclaration.questionToken = questionToken; - var equalsToken = parseOptionalToken(56); - if (equalsToken) { - shorthandDeclaration.equalsToken = equalsToken; - shorthandDeclaration.objectAssignmentInitializer = allowInAnd(parseAssignmentExpressionOrHigher); - } - return finishNode(shorthandDeclaration); + nextToken(); + if (token === 134 && lookAhead(canFollowContextualOfKeyword)) { + node.declarations = createMissingList(); } else { - var propertyAssignment = createNode(245, fullStart); - propertyAssignment.name = propertyName; - propertyAssignment.questionToken = questionToken; - parseExpected(54); - propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); - return finishNode(propertyAssignment); + var savedDisallowIn = inDisallowInContext(); + setDisallowInContext(inForStatementInitializer); + node.declarations = parseDelimitedList(8, parseVariableDeclaration); + setDisallowInContext(savedDisallowIn); } + return finishNode(node); } - function parseObjectLiteralExpression() { - var node = createNode(165); - parseExpected(15); - if (scanner.hasPrecedingLineBreak()) { - node.flags |= 1024; - } - node.properties = parseDelimitedList(12, parseObjectLiteralElement, true); - parseExpected(16); + function canFollowContextualOfKeyword() { + return nextTokenIsIdentifier() && nextToken() === 18; + } + function parseVariableStatement(fullStart, decorators, modifiers) { + var node = createNode(193, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + node.declarationList = parseVariableDeclarationList(false); + parseSemicolon(); return finishNode(node); } - function parseFunctionExpression() { - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var node = createNode(173); - setModifiers(node, parseModifiers()); + function parseFunctionDeclaration(fullStart, decorators, modifiers) { + var node = createNode(213, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); parseExpected(87); node.asteriskToken = parseOptionalToken(37); + node.name = node.flags & 512 ? parseOptionalIdentifier() : parseIdentifier(); var isGenerator = !!node.asteriskToken; var isAsync = !!(node.flags & 256); - node.name = - isGenerator && isAsync ? doInYieldAndAwaitContext(parseOptionalIdentifier) : - isGenerator ? doInYieldContext(parseOptionalIdentifier) : - isAsync ? doInAwaitContext(parseOptionalIdentifier) : - parseOptionalIdentifier(); fillSignature(54, isGenerator, isAsync, false, node); - node.body = parseFunctionBlock(isGenerator, isAsync, false); - if (saveDecoratorContext) { - setDecoratorContext(true); - } + node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, ts.Diagnostics.or_expected); return finishNode(node); } - function parseOptionalIdentifier() { - return isIdentifier() ? parseIdentifier() : undefined; - } - function parseNewExpression() { - var node = createNode(169); - parseExpected(92); - node.expression = parseMemberExpressionOrHigher(); - node.typeArguments = tryParse(parseTypeArgumentsInExpression); - if (node.typeArguments || token === 17) { - node.arguments = parseArgumentList(); - } + function parseConstructorDeclaration(pos, decorators, modifiers) { + var node = createNode(144, pos); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(121); + fillSignature(54, false, false, false, node); + node.body = parseFunctionBlockOrSemicolon(false, false, ts.Diagnostics.or_expected); return finishNode(node); } - function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(192); - if (parseExpected(15, diagnosticMessage) || ignoreMissingOpenBrace) { - node.statements = parseList(1, parseStatement); - parseExpected(16); + function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { + var method = createNode(143, fullStart); + method.decorators = decorators; + setModifiers(method, modifiers); + method.asteriskToken = asteriskToken; + method.name = name; + method.questionToken = questionToken; + var isGenerator = !!asteriskToken; + var isAsync = !!(method.flags & 256); + fillSignature(54, isGenerator, isAsync, false, method); + method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); + return finishNode(method); + } + function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { + var property = createNode(141, fullStart); + property.decorators = decorators; + setModifiers(property, modifiers); + property.name = name; + property.questionToken = questionToken; + property.type = parseTypeAnnotation(); + property.initializer = modifiers && modifiers.flags & 64 + ? allowInAnd(parseNonParameterInitializer) + : doOutsideOfContext(2 | 1, parseNonParameterInitializer); + parseSemicolon(); + return finishNode(property); + } + function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) { + var asteriskToken = parseOptionalToken(37); + var name = parsePropertyName(); + var questionToken = parseOptionalToken(53); + if (asteriskToken || token === 17 || token === 25) { + return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); } else { - node.statements = createMissingList(); + return parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken); } - return finishNode(node); } - function parseFunctionBlock(allowYield, allowAwait, ignoreMissingOpenBrace, diagnosticMessage) { - var savedYieldContext = inYieldContext(); - setYieldContext(allowYield); - var savedAwaitContext = inAwaitContext(); - setAwaitContext(allowAwait); - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var block = parseBlock(ignoreMissingOpenBrace, diagnosticMessage); - if (saveDecoratorContext) { - setDecoratorContext(true); - } - setYieldContext(savedYieldContext); - setAwaitContext(savedAwaitContext); - return block; + function parseNonParameterInitializer() { + return parseInitializer(false); } - function parseEmptyStatement() { - var node = createNode(194); - parseExpected(23); + function parseAccessorDeclaration(kind, fullStart, decorators, modifiers) { + var node = createNode(kind, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + node.name = parsePropertyName(); + fillSignature(54, false, false, false, node); + node.body = parseFunctionBlockOrSemicolon(false, false); return finishNode(node); } - function parseIfStatement() { - var node = createNode(196); - parseExpected(88); - parseExpected(17); - node.expression = allowInAnd(parseExpression); - parseExpected(18); - node.thenStatement = parseStatement(); - node.elseStatement = parseOptional(80) ? parseStatement() : undefined; - return finishNode(node); + function isClassMemberModifier(idToken) { + switch (idToken) { + case 112: + case 110: + case 111: + case 113: + return true; + default: + return false; + } } - function parseDoStatement() { - var node = createNode(197); - parseExpected(79); - node.statement = parseStatement(); - parseExpected(104); - parseExpected(17); - node.expression = allowInAnd(parseExpression); - parseExpected(18); - parseOptional(23); - return finishNode(node); + function isClassMemberStart() { + var idToken; + if (token === 55) { + return true; + } + while (ts.isModifier(token)) { + idToken = token; + if (isClassMemberModifier(idToken)) { + return true; + } + nextToken(); + } + if (token === 37) { + return true; + } + if (isLiteralPropertyName()) { + idToken = token; + nextToken(); + } + if (token === 19) { + return true; + } + if (idToken !== undefined) { + if (!ts.isKeyword(idToken) || idToken === 129 || idToken === 123) { + return true; + } + switch (token) { + case 17: + case 25: + case 54: + case 56: + case 53: + return true; + default: + return canParseSemicolon(); + } + } + return false; } - function parseWhileStatement() { - var node = createNode(198); - parseExpected(104); - parseExpected(17); - node.expression = allowInAnd(parseExpression); - parseExpected(18); - node.statement = parseStatement(); - return finishNode(node); + function parseDecorators() { + var decorators; + while (true) { + var decoratorStart = getNodePos(); + if (!parseOptional(55)) { + break; + } + if (!decorators) { + decorators = []; + decorators.pos = scanner.getStartPos(); + } + var decorator = createNode(139, decoratorStart); + decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); + decorators.push(finishNode(decorator)); + } + if (decorators) { + decorators.end = getNodeEnd(); + } + return decorators; } - function parseForOrForInOrForOfStatement() { - var pos = getNodePos(); - parseExpected(86); - parseExpected(17); - var initializer = undefined; - if (token !== 23) { - if (token === 102 || token === 108 || token === 74) { - initializer = parseVariableDeclarationList(true); + function parseModifiers() { + var flags = 0; + var modifiers; + while (true) { + var modifierStart = scanner.getStartPos(); + var modifierKind = token; + if (!parseAnyContextualModifier()) { + break; } - else { - initializer = disallowInAnd(parseExpression); + if (!modifiers) { + modifiers = []; + modifiers.pos = modifierStart; } + flags |= ts.modifierToFlag(modifierKind); + modifiers.push(finishNode(createNode(modifierKind, modifierStart))); + } + if (modifiers) { + modifiers.flags = flags; + modifiers.end = scanner.getStartPos(); + } + return modifiers; + } + function parseModifiersForArrowFunction() { + var flags = 0; + var modifiers; + if (token === 118) { + var modifierStart = scanner.getStartPos(); + var modifierKind = token; + nextToken(); + modifiers = []; + modifiers.pos = modifierStart; + flags |= ts.modifierToFlag(modifierKind); + modifiers.push(finishNode(createNode(modifierKind, modifierStart))); + modifiers.flags = flags; + modifiers.end = scanner.getStartPos(); + } + return modifiers; + } + function parseClassElement() { + if (token === 23) { + var result = createNode(191); + nextToken(); + return finishNode(result); } - var forOrForInOrForOfStatement; - if (parseOptional(90)) { - var forInStatement = createNode(200, pos); - forInStatement.initializer = initializer; - forInStatement.expression = allowInAnd(parseExpression); - parseExpected(18); - forOrForInOrForOfStatement = forInStatement; + var fullStart = getNodePos(); + var decorators = parseDecorators(); + var modifiers = parseModifiers(); + var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); + if (accessor) { + return accessor; } - else if (parseOptional(134)) { - var forOfStatement = createNode(201, pos); - forOfStatement.initializer = initializer; - forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(18); - forOrForInOrForOfStatement = forOfStatement; + if (token === 121) { + return parseConstructorDeclaration(fullStart, decorators, modifiers); } - else { - var forStatement = createNode(199, pos); - forStatement.initializer = initializer; - parseExpected(23); - if (token !== 23 && token !== 18) { - forStatement.condition = allowInAnd(parseExpression); - } - parseExpected(23); - if (token !== 18) { - forStatement.incrementor = allowInAnd(parseExpression); - } - parseExpected(18); - forOrForInOrForOfStatement = forStatement; + if (isIndexSignature()) { + return parseIndexSignatureDeclaration(fullStart, decorators, modifiers); } - forOrForInOrForOfStatement.statement = parseStatement(); - return finishNode(forOrForInOrForOfStatement); + if (ts.tokenIsIdentifierOrKeyword(token) || + token === 9 || + token === 8 || + token === 37 || + token === 19) { + return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); + } + if (decorators || modifiers) { + var name_7 = createMissingNode(69, true, ts.Diagnostics.Declaration_expected); + return parsePropertyDeclaration(fullStart, decorators, modifiers, name_7, undefined); + } + ts.Debug.fail("Should not have attempted to parse class member declaration."); } - function parseBreakOrContinueStatement(kind) { - var node = createNode(kind); - parseExpected(kind === 203 ? 70 : 75); - if (!canParseSemicolon()) { - node.label = parseIdentifier(); + function parseClassExpression() { + return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 186); + } + function parseClassDeclaration(fullStart, decorators, modifiers) { + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 214); + } + function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { + var node = createNode(kind, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(73); + node.name = parseNameOfClassDeclarationOrExpression(); + node.typeParameters = parseTypeParameters(); + node.heritageClauses = parseHeritageClauses(true); + if (parseExpected(15)) { + node.members = parseClassMembers(); + parseExpected(16); + } + else { + node.members = createMissingList(); } - parseSemicolon(); return finishNode(node); } - function parseReturnStatement() { - var node = createNode(204); - parseExpected(94); - if (!canParseSemicolon()) { - node.expression = allowInAnd(parseExpression); + function parseNameOfClassDeclarationOrExpression() { + return isIdentifier() && !isImplementsClause() + ? parseIdentifier() + : undefined; + } + function isImplementsClause() { + return token === 106 && lookAhead(nextTokenIsIdentifierOrKeyword); + } + function parseHeritageClauses(isClassHeritageClause) { + if (isHeritageClause()) { + return parseList(20, parseHeritageClause); } - parseSemicolon(); - return finishNode(node); + return undefined; } - function parseWithStatement() { - var node = createNode(205); - parseExpected(105); - parseExpected(17); - node.expression = allowInAnd(parseExpression); - parseExpected(18); - node.statement = parseStatement(); - return finishNode(node); + function parseHeritageClausesWorker() { + return parseList(20, parseHeritageClause); } - function parseCaseClause() { - var node = createNode(241); - parseExpected(71); - node.expression = allowInAnd(parseExpression); - parseExpected(54); - node.statements = parseList(3, parseStatement); - return finishNode(node); + function parseHeritageClause() { + if (token === 83 || token === 106) { + var node = createNode(243); + node.token = token; + nextToken(); + node.types = parseDelimitedList(7, parseExpressionWithTypeArguments); + return finishNode(node); + } + return undefined; } - function parseDefaultClause() { - var node = createNode(242); - parseExpected(77); - parseExpected(54); - node.statements = parseList(3, parseStatement); + function parseExpressionWithTypeArguments() { + var node = createNode(188); + node.expression = parseLeftHandSideExpressionOrHigher(); + if (token === 25) { + node.typeArguments = parseBracketedList(18, parseType, 25, 27); + } return finishNode(node); } - function parseCaseOrDefaultClause() { - return token === 71 ? parseCaseClause() : parseDefaultClause(); + function isHeritageClause() { + return token === 83 || token === 106; } - function parseSwitchStatement() { - var node = createNode(206); - parseExpected(96); - parseExpected(17); - node.expression = allowInAnd(parseExpression); - parseExpected(18); - var caseBlock = createNode(220, scanner.getStartPos()); - parseExpected(15); - caseBlock.clauses = parseList(2, parseCaseOrDefaultClause); - parseExpected(16); - node.caseBlock = finishNode(caseBlock); + function parseClassMembers() { + return parseList(5, parseClassElement); + } + function parseInterfaceDeclaration(fullStart, decorators, modifiers) { + var node = createNode(215, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(107); + node.name = parseIdentifier(); + node.typeParameters = parseTypeParameters(); + node.heritageClauses = parseHeritageClauses(false); + node.members = parseObjectTypeMembers(); return finishNode(node); } - function parseThrowStatement() { - var node = createNode(208); - parseExpected(98); - node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); + function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { + var node = createNode(216, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(132); + node.name = parseIdentifier(); + node.typeParameters = parseTypeParameters(); + parseExpected(56); + node.type = parseType(); parseSemicolon(); return finishNode(node); } - function parseTryStatement() { - var node = createNode(209); - parseExpected(100); - node.tryBlock = parseBlock(false); - node.catchClause = token === 72 ? parseCatchClause() : undefined; - if (!node.catchClause || token === 85) { - parseExpected(85); - node.finallyBlock = parseBlock(false); - } + function parseEnumMember() { + var node = createNode(247, scanner.getStartPos()); + node.name = parsePropertyName(); + node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); } - function parseCatchClause() { - var result = createNode(244); - parseExpected(72); - if (parseExpected(17)) { - result.variableDeclaration = parseVariableDeclaration(); + function parseEnumDeclaration(fullStart, decorators, modifiers) { + var node = createNode(217, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(81); + node.name = parseIdentifier(); + if (parseExpected(15)) { + node.members = parseDelimitedList(6, parseEnumMember); + parseExpected(16); + } + else { + node.members = createMissingList(); } - parseExpected(18); - result.block = parseBlock(false); - return finishNode(result); - } - function parseDebuggerStatement() { - var node = createNode(210); - parseExpected(76); - parseSemicolon(); return finishNode(node); } - function parseExpressionOrLabeledStatement() { - var fullStart = scanner.getStartPos(); - var expression = allowInAnd(parseExpression); - if (expression.kind === 69 && parseOptional(54)) { - var labeledStatement = createNode(207, fullStart); - labeledStatement.label = expression; - labeledStatement.statement = parseStatement(); - return finishNode(labeledStatement); + function parseModuleBlock() { + var node = createNode(219, scanner.getStartPos()); + if (parseExpected(15)) { + node.statements = parseList(1, parseStatement); + parseExpected(16); } else { - var expressionStatement = createNode(195, fullStart); - expressionStatement.expression = expression; - parseSemicolon(); - return finishNode(expressionStatement); + node.statements = createMissingList(); } + return finishNode(node); } - function nextTokenIsIdentifierOrKeywordOnSameLine() { - nextToken(); - return ts.tokenIsIdentifierOrKeyword(token) && !scanner.hasPrecedingLineBreak(); - } - function nextTokenIsFunctionKeywordOnSameLine() { - nextToken(); - return token === 87 && !scanner.hasPrecedingLineBreak(); - } - function nextTokenIsIdentifierOrKeywordOrNumberOnSameLine() { - nextToken(); - return (ts.tokenIsIdentifierOrKeyword(token) || token === 8) && !scanner.hasPrecedingLineBreak(); + function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { + var node = createNode(218, fullStart); + var namespaceFlag = flags & 65536; + node.decorators = decorators; + setModifiers(node, modifiers); + node.flags |= flags; + node.name = parseIdentifier(); + node.body = parseOptional(21) + ? parseModuleOrNamespaceDeclaration(getNodePos(), undefined, undefined, 2 | namespaceFlag) + : parseModuleBlock(); + return finishNode(node); } - function isDeclaration() { - while (true) { - switch (token) { - case 102: - case 108: - case 74: - case 87: - case 73: - case 81: - return true; - case 107: - case 132: - return nextTokenIsIdentifierOnSameLine(); - case 125: - case 126: - return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 115: - case 118: - case 122: - case 110: - case 111: - case 112: - nextToken(); - if (scanner.hasPrecedingLineBreak()) { - return false; - } - continue; - case 89: - nextToken(); - return token === 9 || token === 37 || - token === 15 || ts.tokenIsIdentifierOrKeyword(token); - case 82: - nextToken(); - if (token === 56 || token === 37 || - token === 15 || token === 77) { - return true; - } - continue; - case 113: - nextToken(); - continue; - default: - return false; + function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { + var node = createNode(218, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + node.name = parseLiteralNode(true); + node.body = parseModuleBlock(); + return finishNode(node); + } + function parseModuleDeclaration(fullStart, decorators, modifiers) { + var flags = modifiers ? modifiers.flags : 0; + if (parseOptional(126)) { + flags |= 65536; + } + else { + parseExpected(125); + if (token === 9) { + return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } } + return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); } - function isStartOfDeclaration() { - return lookAhead(isDeclaration); + function isExternalModuleReference() { + return token === 127 && + lookAhead(nextTokenIsOpenParen); } - function isStartOfStatement() { - switch (token) { - case 55: - case 23: - case 15: - case 102: - case 108: - case 87: - case 73: - case 81: - case 88: - case 79: - case 104: - case 86: - case 75: - case 70: - case 94: - case 105: - case 96: - case 98: - case 100: - case 76: - case 72: - case 85: - return true; - case 74: - case 82: - case 89: - return isStartOfDeclaration(); - case 118: - case 122: - case 107: - case 125: - case 126: - case 132: - return true; - case 112: - case 110: - case 111: - case 113: - return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); - default: - return isStartOfExpression(); - } + function nextTokenIsOpenParen() { + return nextToken() === 17; } - function nextTokenIsIdentifierOrStartOfDestructuring() { - nextToken(); - return isIdentifier() || token === 15 || token === 19; + function nextTokenIsSlash() { + return nextToken() === 39; } - function isLetDeclaration() { - return lookAhead(nextTokenIsIdentifierOrStartOfDestructuring); + function nextTokenIsCommaOrFromKeyword() { + nextToken(); + return token === 24 || + token === 133; } - function parseStatement() { - switch (token) { - case 23: - return parseEmptyStatement(); - case 15: - return parseBlock(false); - case 102: - return parseVariableStatement(scanner.getStartPos(), undefined, undefined); - case 108: - if (isLetDeclaration()) { - return parseVariableStatement(scanner.getStartPos(), undefined, undefined); - } - break; - case 87: - return parseFunctionDeclaration(scanner.getStartPos(), undefined, undefined); - case 73: - return parseClassDeclaration(scanner.getStartPos(), undefined, undefined); - case 88: - return parseIfStatement(); - case 79: - return parseDoStatement(); - case 104: - return parseWhileStatement(); - case 86: - return parseForOrForInOrForOfStatement(); - case 75: - return parseBreakOrContinueStatement(202); - case 70: - return parseBreakOrContinueStatement(203); - case 94: - return parseReturnStatement(); - case 105: - return parseWithStatement(); - case 96: - return parseSwitchStatement(); - case 98: - return parseThrowStatement(); - case 100: - case 72: - case 85: - return parseTryStatement(); - case 76: - return parseDebuggerStatement(); - case 55: - return parseDeclaration(); - case 118: - case 107: - case 132: - case 125: - case 126: - case 122: - case 74: - case 81: - case 82: - case 89: - case 110: - case 111: - case 112: - case 115: - case 113: - if (isStartOfDeclaration()) { - return parseDeclaration(); - } - break; + function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { + parseExpected(89); + var afterImportPos = scanner.getStartPos(); + var identifier; + if (isIdentifier()) { + identifier = parseIdentifier(); + if (token !== 24 && token !== 133) { + var importEqualsDeclaration = createNode(221, fullStart); + importEqualsDeclaration.decorators = decorators; + setModifiers(importEqualsDeclaration, modifiers); + importEqualsDeclaration.name = identifier; + parseExpected(56); + importEqualsDeclaration.moduleReference = parseModuleReference(); + parseSemicolon(); + return finishNode(importEqualsDeclaration); + } } - return parseExpressionOrLabeledStatement(); + var importDeclaration = createNode(222, fullStart); + importDeclaration.decorators = decorators; + setModifiers(importDeclaration, modifiers); + if (identifier || + token === 37 || + token === 15) { + importDeclaration.importClause = parseImportClause(identifier, afterImportPos); + parseExpected(133); + } + importDeclaration.moduleSpecifier = parseModuleSpecifier(); + parseSemicolon(); + return finishNode(importDeclaration); } - function parseDeclaration() { - var fullStart = getNodePos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - switch (token) { - case 102: - case 108: - case 74: - return parseVariableStatement(fullStart, decorators, modifiers); - case 87: - return parseFunctionDeclaration(fullStart, decorators, modifiers); - case 73: - return parseClassDeclaration(fullStart, decorators, modifiers); - case 107: - return parseInterfaceDeclaration(fullStart, decorators, modifiers); - case 132: - return parseTypeAliasDeclaration(fullStart, decorators, modifiers); - case 81: - return parseEnumDeclaration(fullStart, decorators, modifiers); - case 125: - case 126: - return parseModuleDeclaration(fullStart, decorators, modifiers); - case 89: - return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); - case 82: - nextToken(); - return token === 77 || token === 56 ? - parseExportAssignment(fullStart, decorators, modifiers) : - parseExportDeclaration(fullStart, decorators, modifiers); - default: - if (decorators || modifiers) { - var node = createMissingNode(231, true, ts.Diagnostics.Declaration_expected); - node.pos = fullStart; - node.decorators = decorators; - setModifiers(node, modifiers); - return finishNode(node); - } + function parseImportClause(identifier, fullStart) { + var importClause = createNode(223, fullStart); + if (identifier) { + importClause.name = identifier; + } + if (!importClause.name || + parseOptional(24)) { + importClause.namedBindings = token === 37 ? parseNamespaceImport() : parseNamedImportsOrExports(225); } + return finishNode(importClause); } - function nextTokenIsIdentifierOrStringLiteralOnSameLine() { - nextToken(); - return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token === 9); + function parseModuleReference() { + return isExternalModuleReference() + ? parseExternalModuleReference() + : parseEntityName(false); } - function parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage) { - if (token !== 15 && canParseSemicolon()) { - parseSemicolon(); - return; + function parseExternalModuleReference() { + var node = createNode(232); + parseExpected(127); + parseExpected(17); + node.expression = parseModuleSpecifier(); + parseExpected(18); + return finishNode(node); + } + function parseModuleSpecifier() { + var result = parseExpression(); + if (result.kind === 9) { + internIdentifier(result.text); } - return parseFunctionBlock(isGenerator, isAsync, false, diagnosticMessage); + return result; } - function parseArrayBindingElement() { - if (token === 24) { - return createNode(187); + function parseNamespaceImport() { + var namespaceImport = createNode(224); + parseExpected(37); + parseExpected(116); + namespaceImport.name = parseIdentifier(); + return finishNode(namespaceImport); + } + function parseNamedImportsOrExports(kind) { + var node = createNode(kind); + node.elements = parseBracketedList(21, kind === 225 ? parseImportSpecifier : parseExportSpecifier, 15, 16); + return finishNode(node); + } + function parseExportSpecifier() { + return parseImportOrExportSpecifier(230); + } + function parseImportSpecifier() { + return parseImportOrExportSpecifier(226); + } + function parseImportOrExportSpecifier(kind) { + var node = createNode(kind); + var checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); + var checkIdentifierStart = scanner.getTokenPos(); + var checkIdentifierEnd = scanner.getTextPos(); + var identifierName = parseIdentifierName(); + if (token === 116) { + node.propertyName = identifierName; + parseExpected(116); + checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); + checkIdentifierStart = scanner.getTokenPos(); + checkIdentifierEnd = scanner.getTextPos(); + node.name = parseIdentifierName(); + } + else { + node.name = identifierName; + } + if (kind === 226 && checkIdentifierIsKeyword) { + parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } - var node = createNode(163); - node.dotDotDotToken = parseOptionalToken(22); - node.name = parseIdentifierOrPattern(); - node.initializer = parseBindingElementInitializer(false); return finishNode(node); } - function parseObjectBindingElement() { - var node = createNode(163); - var tokenIsIdentifier = isIdentifier(); - var propertyName = parsePropertyName(); - if (tokenIsIdentifier && token !== 54) { - node.name = propertyName; + function parseExportDeclaration(fullStart, decorators, modifiers) { + var node = createNode(228, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + if (parseOptional(37)) { + parseExpected(133); + node.moduleSpecifier = parseModuleSpecifier(); + } + else { + node.exportClause = parseNamedImportsOrExports(229); + if (token === 133 || (token === 9 && !scanner.hasPrecedingLineBreak())) { + parseExpected(133); + node.moduleSpecifier = parseModuleSpecifier(); + } + } + parseSemicolon(); + return finishNode(node); + } + function parseExportAssignment(fullStart, decorators, modifiers) { + var node = createNode(227, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + if (parseOptional(56)) { + node.isExportEquals = true; + } + else { + parseExpected(77); + } + node.expression = parseAssignmentExpressionOrHigher(); + parseSemicolon(); + return finishNode(node); + } + function processReferenceComments(sourceFile) { + var triviaScanner = ts.createScanner(sourceFile.languageVersion, false, 0, sourceText); + var referencedFiles = []; + var amdDependencies = []; + var amdModuleName; + while (true) { + var kind = triviaScanner.scan(); + if (kind === 5 || kind === 4 || kind === 3) { + continue; + } + if (kind !== 2) { + break; + } + var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() }; + var comment = sourceText.substring(range.pos, range.end); + var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range); + if (referencePathMatchResult) { + var fileReference = referencePathMatchResult.fileReference; + sourceFile.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib; + var diagnosticMessage = referencePathMatchResult.diagnosticMessage; + if (fileReference) { + referencedFiles.push(fileReference); + } + if (diagnosticMessage) { + parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, diagnosticMessage)); + } + } + else { + var amdModuleNameRegEx = /^\/\/\/\s*".length; + return parseErrorAtPosition(start, end - start, ts.Diagnostics.Type_argument_list_cannot_be_empty); + } } - } - function isClassMemberStart() { - var idToken; - if (token === 55) { - return true; + function parseQualifiedName(left) { + var result = createNode(135, left.pos); + result.left = left; + result.right = parseIdentifierName(); + return finishNode(result); } - while (ts.isModifier(token)) { - idToken = token; - if (isClassMemberModifier(idToken)) { - return true; + function parseJSDocRecordType() { + var result = createNode(257); + nextToken(); + result.members = parseDelimitedList(24, parseJSDocRecordMember); + checkForTrailingComma(result.members); + parseExpected(16); + return finishNode(result); + } + function parseJSDocRecordMember() { + var result = createNode(258); + result.name = parseSimplePropertyName(); + if (token === 54) { + nextToken(); + result.type = parseJSDocType(); } + return finishNode(result); + } + function parseJSDocNonNullableType() { + var result = createNode(256); nextToken(); + result.type = parseJSDocType(); + return finishNode(result); } - if (token === 37) { - return true; + function parseJSDocTupleType() { + var result = createNode(254); + nextToken(); + result.types = parseDelimitedList(25, parseJSDocType); + checkForTrailingComma(result.types); + parseExpected(20); + return finishNode(result); } - if (isLiteralPropertyName()) { - idToken = token; + function checkForTrailingComma(list) { + if (parseDiagnostics.length === 0 && list.hasTrailingComma) { + var start = list.end - ",".length; + parseErrorAtPosition(start, ",".length, ts.Diagnostics.Trailing_comma_not_allowed); + } + } + function parseJSDocUnionType() { + var result = createNode(253); nextToken(); + result.types = parseJSDocTypeList(parseJSDocType()); + parseExpected(18); + return finishNode(result); } - if (token === 19) { - return true; + function parseJSDocTypeList(firstType) { + ts.Debug.assert(!!firstType); + var types = []; + types.pos = firstType.pos; + types.push(firstType); + while (parseOptional(47)) { + types.push(parseJSDocType()); + } + types.end = scanner.getStartPos(); + return types; } - if (idToken !== undefined) { - if (!ts.isKeyword(idToken) || idToken === 129 || idToken === 123) { - return true; + function parseJSDocAllType() { + var result = createNode(250); + nextToken(); + return finishNode(result); + } + function parseJSDocUnknownOrNullableType() { + var pos = scanner.getStartPos(); + nextToken(); + if (token === 24 || + token === 16 || + token === 18 || + token === 27 || + token === 56 || + token === 47) { + var result = createNode(251, pos); + return finishNode(result); } - switch (token) { - case 17: - case 25: - case 54: - case 56: - case 53: - return true; - default: - return canParseSemicolon(); + else { + var result = createNode(255, pos); + result.type = parseJSDocType(); + return finishNode(result); } } - return false; - } - function parseDecorators() { - var decorators; - while (true) { - var decoratorStart = getNodePos(); - if (!parseOptional(55)) { - break; + function parseIsolatedJSDocComment(content, start, length) { + initializeState("file.js", content, 2, true, undefined); + var jsDocComment = parseJSDocComment(undefined, start, length); + var diagnostics = parseDiagnostics; + clearState(); + return jsDocComment ? { jsDocComment: jsDocComment, diagnostics: diagnostics } : undefined; + } + JSDocParser.parseIsolatedJSDocComment = parseIsolatedJSDocComment; + function parseJSDocComment(parent, start, length) { + var comment = parseJSDocCommentWorker(start, length); + if (comment) { + fixupParentReferences(comment); + comment.parent = parent; + } + return comment; + } + JSDocParser.parseJSDocComment = parseJSDocComment; + function parseJSDocCommentWorker(start, length) { + var content = sourceText; + start = start || 0; + var end = length === undefined ? content.length : start + length; + length = end - start; + ts.Debug.assert(start >= 0); + ts.Debug.assert(start <= end); + ts.Debug.assert(end <= content.length); + var tags; + var pos; + if (length >= "/** */".length) { + if (content.charCodeAt(start) === 47 && + content.charCodeAt(start + 1) === 42 && + content.charCodeAt(start + 2) === 42 && + content.charCodeAt(start + 3) !== 42) { + var canParseTag = true; + var seenAsterisk = true; + for (pos = start + "/**".length; pos < end;) { + var ch = content.charCodeAt(pos); + pos++; + if (ch === 64 && canParseTag) { + parseTag(); + canParseTag = false; + continue; + } + if (ts.isLineBreak(ch)) { + canParseTag = true; + seenAsterisk = false; + continue; + } + if (ts.isWhiteSpace(ch)) { + continue; + } + if (ch === 42) { + if (seenAsterisk) { + canParseTag = false; + } + seenAsterisk = true; + continue; + } + canParseTag = false; + } + } + } + return createJSDocComment(); + function createJSDocComment() { + if (!tags) { + return undefined; + } + var result = createNode(265, start); + result.tags = tags; + return finishNode(result, end); + } + function skipWhitespace() { + while (pos < end && ts.isWhiteSpace(content.charCodeAt(pos))) { + pos++; + } + } + function parseTag() { + ts.Debug.assert(content.charCodeAt(pos - 1) === 64); + var atToken = createNode(55, pos - 1); + atToken.end = pos; + var tagName = scanIdentifier(); + if (!tagName) { + return; + } + var tag = handleTag(atToken, tagName) || handleUnknownTag(atToken, tagName); + addTag(tag); + } + function handleTag(atToken, tagName) { + if (tagName) { + switch (tagName.text) { + case "param": + return handleParamTag(atToken, tagName); + case "return": + case "returns": + return handleReturnTag(atToken, tagName); + case "template": + return handleTemplateTag(atToken, tagName); + case "type": + return handleTypeTag(atToken, tagName); + } + } + return undefined; + } + function handleUnknownTag(atToken, tagName) { + var result = createNode(266, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + return finishNode(result, pos); + } + function addTag(tag) { + if (tag) { + if (!tags) { + tags = []; + tags.pos = tag.pos; + } + tags.push(tag); + tags.end = tag.end; + } + } + function tryParseTypeExpression() { + skipWhitespace(); + if (content.charCodeAt(pos) !== 123) { + return undefined; + } + var typeExpression = parseJSDocTypeExpression(pos, end - pos); + pos = typeExpression.end; + return typeExpression; + } + function handleParamTag(atToken, tagName) { + var typeExpression = tryParseTypeExpression(); + skipWhitespace(); + var name; + var isBracketed; + if (content.charCodeAt(pos) === 91) { + pos++; + skipWhitespace(); + name = scanIdentifier(); + isBracketed = true; + } + else { + name = scanIdentifier(); + } + if (!name) { + parseErrorAtPosition(pos, 0, ts.Diagnostics.Identifier_expected); + } + var preName, postName; + if (typeExpression) { + postName = name; + } + else { + preName = name; + } + if (!typeExpression) { + typeExpression = tryParseTypeExpression(); + } + var result = createNode(267, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.preParameterName = preName; + result.typeExpression = typeExpression; + result.postParameterName = postName; + result.isBracketed = isBracketed; + return finishNode(result, pos); } - if (!decorators) { - decorators = []; - decorators.pos = scanner.getStartPos(); + function handleReturnTag(atToken, tagName) { + if (ts.forEach(tags, function (t) { return t.kind === 268; })) { + parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } + var result = createNode(268, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.typeExpression = tryParseTypeExpression(); + return finishNode(result, pos); } - var decorator = createNode(139, decoratorStart); - decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); - decorators.push(finishNode(decorator)); - } - if (decorators) { - decorators.end = getNodeEnd(); - } - return decorators; - } - function parseModifiers() { - var flags = 0; - var modifiers; - while (true) { - var modifierStart = scanner.getStartPos(); - var modifierKind = token; - if (!parseAnyContextualModifier()) { - break; + function handleTypeTag(atToken, tagName) { + if (ts.forEach(tags, function (t) { return t.kind === 269; })) { + parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } + var result = createNode(269, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.typeExpression = tryParseTypeExpression(); + return finishNode(result, pos); } - if (!modifiers) { - modifiers = []; - modifiers.pos = modifierStart; + function handleTemplateTag(atToken, tagName) { + if (ts.forEach(tags, function (t) { return t.kind === 270; })) { + parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } + var typeParameters = []; + typeParameters.pos = pos; + while (true) { + skipWhitespace(); + var startPos = pos; + var name_8 = scanIdentifier(); + if (!name_8) { + parseErrorAtPosition(startPos, 0, ts.Diagnostics.Identifier_expected); + return undefined; + } + var typeParameter = createNode(137, name_8.pos); + typeParameter.name = name_8; + finishNode(typeParameter, pos); + typeParameters.push(typeParameter); + skipWhitespace(); + if (content.charCodeAt(pos) !== 44) { + break; + } + pos++; + } + typeParameters.end = pos; + var result = createNode(270, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.typeParameters = typeParameters; + return finishNode(result, pos); + } + function scanIdentifier() { + var startPos = pos; + for (; pos < end; pos++) { + var ch = content.charCodeAt(pos); + if (pos === startPos && ts.isIdentifierStart(ch, 2)) { + continue; + } + else if (pos > startPos && ts.isIdentifierPart(ch, 2)) { + continue; + } + break; + } + if (startPos === pos) { + return undefined; + } + var result = createNode(69, startPos); + result.text = content.substring(startPos, pos); + return finishNode(result, pos); } - flags |= ts.modifierToFlag(modifierKind); - modifiers.push(finishNode(createNode(modifierKind, modifierStart))); - } - if (modifiers) { - modifiers.flags = flags; - modifiers.end = scanner.getStartPos(); - } - return modifiers; - } - function parseModifiersForArrowFunction() { - var flags = 0; - var modifiers; - if (token === 118) { - var modifierStart = scanner.getStartPos(); - var modifierKind = token; - nextToken(); - modifiers = []; - modifiers.pos = modifierStart; - flags |= ts.modifierToFlag(modifierKind); - modifiers.push(finishNode(createNode(modifierKind, modifierStart))); - modifiers.flags = flags; - modifiers.end = scanner.getStartPos(); - } - return modifiers; - } - function parseClassElement() { - if (token === 23) { - var result = createNode(191); - nextToken(); - return finishNode(result); - } - var fullStart = getNodePos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); - if (accessor) { - return accessor; - } - if (token === 121) { - return parseConstructorDeclaration(fullStart, decorators, modifiers); - } - if (isIndexSignature()) { - return parseIndexSignatureDeclaration(fullStart, decorators, modifiers); - } - if (ts.tokenIsIdentifierOrKeyword(token) || - token === 9 || - token === 8 || - token === 37 || - token === 19) { - return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); - } - if (decorators || modifiers) { - var name_7 = createMissingNode(69, true, ts.Diagnostics.Declaration_expected); - return parsePropertyDeclaration(fullStart, decorators, modifiers, name_7, undefined); - } - ts.Debug.fail("Should not have attempted to parse class member declaration."); - } - function parseClassExpression() { - return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 186); - } - function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 214); - } - function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { - var node = createNode(kind, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(73); - node.name = parseNameOfClassDeclarationOrExpression(); - node.typeParameters = parseTypeParameters(); - node.heritageClauses = parseHeritageClauses(true); - if (parseExpected(15)) { - node.members = parseClassMembers(); - parseExpected(16); - } - else { - node.members = createMissingList(); - } - return finishNode(node); - } - function parseNameOfClassDeclarationOrExpression() { - return isIdentifier() && !isImplementsClause() - ? parseIdentifier() - : undefined; - } - function isImplementsClause() { - return token === 106 && lookAhead(nextTokenIsIdentifierOrKeyword); - } - function parseHeritageClauses(isClassHeritageClause) { - if (isHeritageClause()) { - return parseList(20, parseHeritageClause); - } - return undefined; - } - function parseHeritageClausesWorker() { - return parseList(20, parseHeritageClause); - } - function parseHeritageClause() { - if (token === 83 || token === 106) { - var node = createNode(243); - node.token = token; - nextToken(); - node.types = parseDelimitedList(7, parseExpressionWithTypeArguments); - return finishNode(node); - } - return undefined; - } - function parseExpressionWithTypeArguments() { - var node = createNode(188); - node.expression = parseLeftHandSideExpressionOrHigher(); - if (token === 25) { - node.typeArguments = parseBracketedList(18, parseType, 25, 27); - } - return finishNode(node); - } - function isHeritageClause() { - return token === 83 || token === 106; - } - function parseClassMembers() { - return parseList(5, parseClassElement); - } - function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(215, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(107); - node.name = parseIdentifier(); - node.typeParameters = parseTypeParameters(); - node.heritageClauses = parseHeritageClauses(false); - node.members = parseObjectTypeMembers(); - return finishNode(node); - } - function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(216, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(132); - node.name = parseIdentifier(); - node.typeParameters = parseTypeParameters(); - parseExpected(56); - node.type = parseType(); - parseSemicolon(); - return finishNode(node); - } - function parseEnumMember() { - var node = createNode(247, scanner.getStartPos()); - node.name = parsePropertyName(); - node.initializer = allowInAnd(parseNonParameterInitializer); - return finishNode(node); - } - function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(217, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(81); - node.name = parseIdentifier(); - if (parseExpected(15)) { - node.members = parseDelimitedList(6, parseEnumMember); - parseExpected(16); - } - else { - node.members = createMissingList(); } - return finishNode(node); - } - function parseModuleBlock() { - var node = createNode(219, scanner.getStartPos()); - if (parseExpected(15)) { - node.statements = parseList(1, parseStatement); - parseExpected(16); + JSDocParser.parseJSDocCommentWorker = parseJSDocCommentWorker; + })(JSDocParser = Parser.JSDocParser || (Parser.JSDocParser = {})); + })(Parser || (Parser = {})); + var IncrementalParser; + (function (IncrementalParser) { + function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) { + aggressiveChecks = aggressiveChecks || ts.Debug.shouldAssert(2); + checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks); + if (ts.textChangeRangeIsUnchanged(textChangeRange)) { + return sourceFile; } - else { - node.statements = createMissingList(); + if (sourceFile.statements.length === 0) { + return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, undefined, true); } - return finishNode(node); - } - function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(218, fullStart); - var namespaceFlag = flags & 65536; - node.decorators = decorators; - setModifiers(node, modifiers); - node.flags |= flags; - node.name = parseIdentifier(); - node.body = parseOptional(21) - ? parseModuleOrNamespaceDeclaration(getNodePos(), undefined, undefined, 2 | namespaceFlag) - : parseModuleBlock(); - return finishNode(node); - } - function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(218, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.name = parseLiteralNode(true); - node.body = parseModuleBlock(); - return finishNode(node); + var incrementalSourceFile = sourceFile; + ts.Debug.assert(!incrementalSourceFile.hasBeenIncrementallyParsed); + incrementalSourceFile.hasBeenIncrementallyParsed = true; + var oldText = sourceFile.text; + var syntaxCursor = createSyntaxCursor(sourceFile); + var changeRange = extendToAffectedRange(sourceFile, textChangeRange); + checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks); + ts.Debug.assert(changeRange.span.start <= textChangeRange.span.start); + ts.Debug.assert(ts.textSpanEnd(changeRange.span) === ts.textSpanEnd(textChangeRange.span)); + ts.Debug.assert(ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)) === ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange))); + var delta = ts.textChangeRangeNewSpan(changeRange).length - changeRange.span.length; + updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, ts.textSpanEnd(changeRange.span), ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); + var result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, true); + return result; } - function parseModuleDeclaration(fullStart, decorators, modifiers) { - var flags = modifiers ? modifiers.flags : 0; - if (parseOptional(126)) { - flags |= 65536; + IncrementalParser.updateSourceFile = updateSourceFile; + function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) { + if (isArray) { + visitArray(element); } else { - parseExpected(125); - if (token === 9) { - return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); - } + visitNode(element); } - return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); - } - function isExternalModuleReference() { - return token === 127 && - lookAhead(nextTokenIsOpenParen); - } - function nextTokenIsOpenParen() { - return nextToken() === 17; - } - function nextTokenIsSlash() { - return nextToken() === 39; - } - function nextTokenIsCommaOrFromKeyword() { - nextToken(); - return token === 24 || - token === 133; - } - function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { - parseExpected(89); - var afterImportPos = scanner.getStartPos(); - var identifier; - if (isIdentifier()) { - identifier = parseIdentifier(); - if (token !== 24 && token !== 133) { - var importEqualsDeclaration = createNode(221, fullStart); - importEqualsDeclaration.decorators = decorators; - setModifiers(importEqualsDeclaration, modifiers); - importEqualsDeclaration.name = identifier; - parseExpected(56); - importEqualsDeclaration.moduleReference = parseModuleReference(); - parseSemicolon(); - return finishNode(importEqualsDeclaration); + return; + function visitNode(node) { + var text = ""; + if (aggressiveChecks && shouldCheckNode(node)) { + text = oldText.substring(node.pos, node.end); } + if (node._children) { + node._children = undefined; + } + if (node.jsDocComment) { + node.jsDocComment = undefined; + } + node.pos += delta; + node.end += delta; + if (aggressiveChecks && shouldCheckNode(node)) { + ts.Debug.assert(text === newText.substring(node.pos, node.end)); + } + forEachChild(node, visitNode, visitArray); + checkNodePositions(node, aggressiveChecks); } - var importDeclaration = createNode(222, fullStart); - importDeclaration.decorators = decorators; - setModifiers(importDeclaration, modifiers); - if (identifier || - token === 37 || - token === 15) { - importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(133); - } - importDeclaration.moduleSpecifier = parseModuleSpecifier(); - parseSemicolon(); - return finishNode(importDeclaration); - } - function parseImportClause(identifier, fullStart) { - var importClause = createNode(223, fullStart); - if (identifier) { - importClause.name = identifier; - } - if (!importClause.name || - parseOptional(24)) { - importClause.namedBindings = token === 37 ? parseNamespaceImport() : parseNamedImportsOrExports(225); + function visitArray(array) { + array._children = undefined; + array.pos += delta; + array.end += delta; + for (var _i = 0, array_7 = array; _i < array_7.length; _i++) { + var node = array_7[_i]; + visitNode(node); + } } - return finishNode(importClause); - } - function parseModuleReference() { - return isExternalModuleReference() - ? parseExternalModuleReference() - : parseEntityName(false); - } - function parseExternalModuleReference() { - var node = createNode(232); - parseExpected(127); - parseExpected(17); - node.expression = parseModuleSpecifier(); - parseExpected(18); - return finishNode(node); } - function parseModuleSpecifier() { - var result = parseExpression(); - if (result.kind === 9) { - internIdentifier(result.text); + function shouldCheckNode(node) { + switch (node.kind) { + case 9: + case 8: + case 69: + return true; } - return result; - } - function parseNamespaceImport() { - var namespaceImport = createNode(224); - parseExpected(37); - parseExpected(116); - namespaceImport.name = parseIdentifier(); - return finishNode(namespaceImport); - } - function parseNamedImportsOrExports(kind) { - var node = createNode(kind); - node.elements = parseBracketedList(21, kind === 225 ? parseImportSpecifier : parseExportSpecifier, 15, 16); - return finishNode(node); - } - function parseExportSpecifier() { - return parseImportOrExportSpecifier(230); - } - function parseImportSpecifier() { - return parseImportOrExportSpecifier(226); + return false; } - function parseImportOrExportSpecifier(kind) { - var node = createNode(kind); - var checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); - var checkIdentifierStart = scanner.getTokenPos(); - var checkIdentifierEnd = scanner.getTextPos(); - var identifierName = parseIdentifierName(); - if (token === 116) { - node.propertyName = identifierName; - parseExpected(116); - checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); - checkIdentifierStart = scanner.getTokenPos(); - checkIdentifierEnd = scanner.getTextPos(); - node.name = parseIdentifierName(); + function adjustIntersectingElement(element, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta) { + ts.Debug.assert(element.end >= changeStart, "Adjusting an element that was entirely before the change range"); + ts.Debug.assert(element.pos <= changeRangeOldEnd, "Adjusting an element that was entirely after the change range"); + ts.Debug.assert(element.pos <= element.end); + element.pos = Math.min(element.pos, changeRangeNewEnd); + if (element.end >= changeRangeOldEnd) { + element.end += delta; } else { - node.name = identifierName; + element.end = Math.min(element.end, changeRangeNewEnd); } - if (kind === 226 && checkIdentifierIsKeyword) { - parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); + ts.Debug.assert(element.pos <= element.end); + if (element.parent) { + ts.Debug.assert(element.pos >= element.parent.pos); + ts.Debug.assert(element.end <= element.parent.end); } - return finishNode(node); } - function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(228, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - if (parseOptional(37)) { - parseExpected(133); - node.moduleSpecifier = parseModuleSpecifier(); + function checkNodePositions(node, aggressiveChecks) { + if (aggressiveChecks) { + var pos = node.pos; + forEachChild(node, function (child) { + ts.Debug.assert(child.pos >= pos); + pos = child.end; + }); + ts.Debug.assert(pos <= node.end); + } + } + function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) { + visitNode(sourceFile); + return; + function visitNode(child) { + ts.Debug.assert(child.pos <= child.end); + if (child.pos > changeRangeOldEnd) { + moveElementEntirelyPastChangeRange(child, false, delta, oldText, newText, aggressiveChecks); + return; + } + var fullEnd = child.end; + if (fullEnd >= changeStart) { + child.intersectsChange = true; + child._children = undefined; + adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); + forEachChild(child, visitNode, visitArray); + checkNodePositions(child, aggressiveChecks); + return; + } + ts.Debug.assert(fullEnd < changeStart); } - else { - node.exportClause = parseNamedImportsOrExports(229); - if (token === 133 || (token === 9 && !scanner.hasPrecedingLineBreak())) { - parseExpected(133); - node.moduleSpecifier = parseModuleSpecifier(); + function visitArray(array) { + ts.Debug.assert(array.pos <= array.end); + if (array.pos > changeRangeOldEnd) { + moveElementEntirelyPastChangeRange(array, true, delta, oldText, newText, aggressiveChecks); + return; + } + var fullEnd = array.end; + if (fullEnd >= changeStart) { + array.intersectsChange = true; + array._children = undefined; + adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); + for (var _i = 0, array_8 = array; _i < array_8.length; _i++) { + var node = array_8[_i]; + visitNode(node); + } + return; } + ts.Debug.assert(fullEnd < changeStart); } - parseSemicolon(); - return finishNode(node); } - function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(227, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - if (parseOptional(56)) { - node.isExportEquals = true; - } - else { - parseExpected(77); + function extendToAffectedRange(sourceFile, changeRange) { + var maxLookahead = 1; + var start = changeRange.span.start; + for (var i = 0; start > 0 && i <= maxLookahead; i++) { + var nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start); + ts.Debug.assert(nearestNode.pos <= start); + var position = nearestNode.pos; + start = Math.max(0, position - 1); } - node.expression = parseAssignmentExpressionOrHigher(); - parseSemicolon(); - return finishNode(node); + var finalSpan = ts.createTextSpanFromBounds(start, ts.textSpanEnd(changeRange.span)); + var finalLength = changeRange.newLength + (changeRange.span.start - start); + return ts.createTextChangeRange(finalSpan, finalLength); } - function processReferenceComments(sourceFile) { - var triviaScanner = ts.createScanner(sourceFile.languageVersion, false, 0, sourceText); - var referencedFiles = []; - var amdDependencies = []; - var amdModuleName; - while (true) { - var kind = triviaScanner.scan(); - if (kind === 5 || kind === 4 || kind === 3) { - continue; + function findNearestNodeStartingBeforeOrAtPosition(sourceFile, position) { + var bestResult = sourceFile; + var lastNodeEntirelyBeforePosition; + forEachChild(sourceFile, visit); + if (lastNodeEntirelyBeforePosition) { + var lastChildOfLastEntireNodeBeforePosition = getLastChild(lastNodeEntirelyBeforePosition); + if (lastChildOfLastEntireNodeBeforePosition.pos > bestResult.pos) { + bestResult = lastChildOfLastEntireNodeBeforePosition; } - if (kind !== 2) { - break; + } + return bestResult; + function getLastChild(node) { + while (true) { + var lastChild = getLastChildWorker(node); + if (lastChild) { + node = lastChild; + } + else { + return node; + } } - var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() }; - var comment = sourceText.substring(range.pos, range.end); - var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range); - if (referencePathMatchResult) { - var fileReference = referencePathMatchResult.fileReference; - sourceFile.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib; - var diagnosticMessage = referencePathMatchResult.diagnosticMessage; - if (fileReference) { - referencedFiles.push(fileReference); + } + function getLastChildWorker(node) { + var last = undefined; + forEachChild(node, function (child) { + if (ts.nodeIsPresent(child)) { + last = child; } - if (diagnosticMessage) { - parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, diagnosticMessage)); + }); + return last; + } + function visit(child) { + if (ts.nodeIsMissing(child)) { + return; + } + if (child.pos <= position) { + if (child.pos >= bestResult.pos) { + bestResult = child; + } + if (position < child.end) { + forEachChild(child, visit); + return true; + } + else { + ts.Debug.assert(child.end <= position); + lastNodeEntirelyBeforePosition = child; } } else { - var amdModuleNameRegEx = /^\/\/\/\s* position); + return true; + } + } + } + function checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks) { + var oldText = sourceFile.text; + if (textChangeRange) { + ts.Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); + if (aggressiveChecks || ts.Debug.shouldAssert(3)) { + var oldTextPrefix = oldText.substr(0, textChangeRange.span.start); + var newTextPrefix = newText.substr(0, textChangeRange.span.start); + ts.Debug.assert(oldTextPrefix === newTextPrefix); + var oldTextSuffix = oldText.substring(ts.textSpanEnd(textChangeRange.span), oldText.length); + var newTextSuffix = newText.substring(ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange)), newText.length); + ts.Debug.assert(oldTextSuffix === newTextSuffix); + } + } + } + function createSyntaxCursor(sourceFile) { + var currentArray = sourceFile.statements; + var currentArrayIndex = 0; + ts.Debug.assert(currentArrayIndex < currentArray.length); + var current = currentArray[currentArrayIndex]; + var lastQueriedPosition = -1; + return { + currentNode: function (position) { + if (position !== lastQueriedPosition) { + if (current && current.end === position && currentArrayIndex < (currentArray.length - 1)) { + currentArrayIndex++; + current = currentArray[currentArrayIndex]; + } + if (!current || current.pos !== position) { + findHighestListElementThatStartsAtPosition(position); } - amdModuleName = amdModuleNameMatchResult[2]; } - var amdDependencyRegEx = /^\/\/\/\s*= node.pos && position < node.end) { + forEachChild(node, visitNode, visitArray); + return true; + } + return false; + } + function visitArray(array) { + if (position >= array.pos && position < array.end) { + for (var i = 0, n = array.length; i < n; i++) { + var child = array[i]; + if (child) { + if (child.pos === position) { + currentArray = array; + currentArrayIndex = i; + current = child; + return true; + } + else { + if (child.pos < position && position < child.end) { + forEachChild(child, visitNode, visitArray); + return true; + } + } + } } } + return false; + } + } + } + })(IncrementalParser || (IncrementalParser = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + ts.bindTime = 0; + function or(state1, state2) { + return (state1 | state2) & 2 + ? 2 + : (state1 & state2) & 8 + ? 8 + : 4; + } + function getModuleInstanceState(node) { + if (node.kind === 215 || node.kind === 216) { + return 0; + } + else if (ts.isConstEnumDeclaration(node)) { + return 2; + } + else if ((node.kind === 222 || node.kind === 221) && !(node.flags & 2)) { + return 0; + } + else if (node.kind === 219) { + var state = 0; + ts.forEachChild(node, function (n) { + switch (getModuleInstanceState(n)) { + case 0: + return false; + case 2: + state = 2; + return false; + case 1: + state = 1; + return true; } + }); + return state; + } + else if (node.kind === 218) { + return getModuleInstanceState(node.body); + } + else { + return 1; + } + } + ts.getModuleInstanceState = getModuleInstanceState; + var binder = createBinder(); + function bindSourceFile(file, options) { + var start = new Date().getTime(); + binder(file, options); + ts.bindTime += new Date().getTime() - start; + } + ts.bindSourceFile = bindSourceFile; + function createBinder() { + var file; + var options; + var parent; + var container; + var blockScopeContainer; + var lastContainer; + var seenThisKeyword; + var hasExplicitReturn; + var currentReachabilityState; + var labelStack; + var labelIndexMap; + var implicitLabels; + var inStrictMode; + var symbolCount = 0; + var Symbol; + var classifiableNames; + function bindSourceFile(f, opts) { + file = f; + options = opts; + inStrictMode = !!file.externalModuleIndicator; + classifiableNames = {}; + Symbol = ts.objectAllocator.getSymbolConstructor(); + if (!file.locals) { + bind(file); + file.symbolCount = symbolCount; + file.classifiableNames = classifiableNames; } - sourceFile.referencedFiles = referencedFiles; - sourceFile.amdDependencies = amdDependencies; - sourceFile.moduleName = amdModuleName; + parent = undefined; + container = undefined; + blockScopeContainer = undefined; + lastContainer = undefined; + seenThisKeyword = false; + hasExplicitReturn = false; + labelStack = undefined; + labelIndexMap = undefined; + implicitLabels = undefined; } - function setExternalModuleIndicator(sourceFile) { - sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { - return node.flags & 2 - || node.kind === 221 && node.moduleReference.kind === 232 - || node.kind === 222 - || node.kind === 227 - || node.kind === 228 - ? node - : undefined; - }); + return bindSourceFile; + function createSymbol(flags, name) { + symbolCount++; + return new Symbol(flags, name); } - var JSDocParser; - (function (JSDocParser) { - function isJSDocType() { - switch (token) { - case 37: - case 53: - case 17: - case 19: - case 49: - case 15: - case 87: - case 22: - case 92: - case 97: - return true; - } - return ts.tokenIsIdentifierOrKeyword(token); + function addDeclarationToSymbol(symbol, node, symbolFlags) { + symbol.flags |= symbolFlags; + node.symbol = symbol; + if (!symbol.declarations) { + symbol.declarations = []; } - JSDocParser.isJSDocType = isJSDocType; - function parseJSDocTypeExpressionForTests(content, start, length) { - initializeState("file.js", content, 2, undefined); - var jsDocTypeExpression = parseJSDocTypeExpression(start, length); - var diagnostics = parseDiagnostics; - clearState(); - return jsDocTypeExpression ? { jsDocTypeExpression: jsDocTypeExpression, diagnostics: diagnostics } : undefined; + symbol.declarations.push(node); + if (symbolFlags & 1952 && !symbol.exports) { + symbol.exports = {}; } - JSDocParser.parseJSDocTypeExpressionForTests = parseJSDocTypeExpressionForTests; - function parseJSDocTypeExpression(start, length) { - scanner.setText(sourceText, start, length); - token = nextToken(); - var result = createNode(249); - parseExpected(15); - result.type = parseJSDocTopLevelType(); - parseExpected(16); - fixupParentReferences(result); - return finishNode(result); + if (symbolFlags & 6240 && !symbol.members) { + symbol.members = {}; } - JSDocParser.parseJSDocTypeExpression = parseJSDocTypeExpression; - function parseJSDocTopLevelType() { - var type = parseJSDocType(); - if (token === 47) { - var unionType = createNode(253, type.pos); - unionType.types = parseJSDocTypeList(type); - type = finishNode(unionType); - } - if (token === 56) { - var optionalType = createNode(260, type.pos); - nextToken(); - optionalType.type = type; - type = finishNode(optionalType); - } - return type; + if (symbolFlags & 107455 && !symbol.valueDeclaration) { + symbol.valueDeclaration = node; } - function parseJSDocType() { - var type = parseBasicTypeExpression(); - while (true) { - if (token === 19) { - var arrayType = createNode(252, type.pos); - arrayType.elementType = type; - nextToken(); - parseExpected(20); - type = finishNode(arrayType); - } - else if (token === 53) { - var nullableType = createNode(255, type.pos); - nullableType.type = type; - nextToken(); - type = finishNode(nullableType); - } - else if (token === 49) { - var nonNullableType = createNode(256, type.pos); - nonNullableType.type = type; - nextToken(); - type = finishNode(nonNullableType); - } - else { - break; - } + } + function getDeclarationName(node) { + if (node.name) { + if (node.kind === 218 && node.name.kind === 9) { + return "\"" + node.name.text + "\""; } - return type; - } - function parseBasicTypeExpression() { - switch (token) { - case 37: - return parseJSDocAllType(); - case 53: - return parseJSDocUnknownOrNullableType(); - case 17: - return parseJSDocUnionType(); - case 19: - return parseJSDocTupleType(); - case 49: - return parseJSDocNonNullableType(); - case 15: - return parseJSDocRecordType(); - case 87: - return parseJSDocFunctionType(); - case 22: - return parseJSDocVariadicType(); - case 92: - return parseJSDocConstructorType(); - case 97: - return parseJSDocThisType(); - case 117: - case 130: - case 128: - case 120: - case 131: - case 103: - return parseTokenNode(); + if (node.name.kind === 136) { + var nameExpression = node.name.expression; + if (ts.isStringOrNumericLiteral(nameExpression.kind)) { + return nameExpression.text; + } + ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression)); + return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text); } - return parseJSDocTypeReference(); - } - function parseJSDocThisType() { - var result = createNode(264); - nextToken(); - parseExpected(54); - result.type = parseJSDocType(); - return finishNode(result); - } - function parseJSDocConstructorType() { - var result = createNode(263); - nextToken(); - parseExpected(54); - result.type = parseJSDocType(); - return finishNode(result); + return node.name.text; } - function parseJSDocVariadicType() { - var result = createNode(262); - nextToken(); - result.type = parseJSDocType(); - return finishNode(result); + switch (node.kind) { + case 144: + return "__constructor"; + case 152: + case 147: + return "__call"; + case 153: + case 148: + return "__new"; + case 149: + return "__index"; + case 228: + return "__export"; + case 227: + return node.isExportEquals ? "export=" : "default"; + case 181: + return "export="; + case 213: + case 214: + return node.flags & 512 ? "default" : undefined; } - function parseJSDocFunctionType() { - var result = createNode(261); - nextToken(); - parseExpected(17); - result.parameters = parseDelimitedList(22, parseJSDocParameter); - checkForTrailingComma(result.parameters); - parseExpected(18); - if (token === 54) { - nextToken(); - result.type = parseJSDocType(); + } + function getDisplayName(node) { + return node.name ? ts.declarationNameToString(node.name) : getDeclarationName(node); + } + function declareSymbol(symbolTable, parent, node, includes, excludes) { + ts.Debug.assert(!ts.hasDynamicName(node)); + var isDefaultExport = node.flags & 512; + var name = isDefaultExport && parent ? "default" : getDeclarationName(node); + var symbol; + if (name !== undefined) { + symbol = ts.hasProperty(symbolTable, name) + ? symbolTable[name] + : (symbolTable[name] = createSymbol(0, name)); + if (name && (includes & 788448)) { + classifiableNames[name] = name; + } + if (symbol.flags & excludes) { + if (node.name) { + node.name.parent = node; + } + var message = symbol.flags & 2 + ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 + : ts.Diagnostics.Duplicate_identifier_0; + ts.forEach(symbol.declarations, function (declaration) { + if (declaration.flags & 512) { + message = ts.Diagnostics.A_module_cannot_have_multiple_default_exports; + } + }); + ts.forEach(symbol.declarations, function (declaration) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration))); + }); + file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message, getDisplayName(node))); + symbol = createSymbol(0, name); } - return finishNode(result); - } - function parseJSDocParameter() { - var parameter = createNode(138); - parameter.type = parseJSDocType(); - return finishNode(parameter); } - function parseJSDocOptionalType(type) { - var result = createNode(260, type.pos); - nextToken(); - result.type = type; - return finishNode(result); + else { + symbol = createSymbol(0, "__missing"); } - function parseJSDocTypeReference() { - var result = createNode(259); - result.name = parseSimplePropertyName(); - while (parseOptional(21)) { - if (token === 25) { - result.typeArguments = parseTypeArguments(); - break; - } - else { - result.name = parseQualifiedName(result.name); - } + addDeclarationToSymbol(symbol, node, includes); + symbol.parent = parent; + return symbol; + } + function declareModuleMember(node, symbolFlags, symbolExcludes) { + var hasExportModifier = ts.getCombinedNodeFlags(node) & 2; + if (symbolFlags & 8388608) { + if (node.kind === 230 || (node.kind === 221 && hasExportModifier)) { + return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); + } + else { + return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); } - return finishNode(result); } - function parseTypeArguments() { - nextToken(); - var typeArguments = parseDelimitedList(23, parseJSDocType); - checkForTrailingComma(typeArguments); - checkForEmptyTypeArgumentList(typeArguments); - parseExpected(27); - return typeArguments; + else { + if (hasExportModifier || container.flags & 131072) { + var exportKind = (symbolFlags & 107455 ? 1048576 : 0) | + (symbolFlags & 793056 ? 2097152 : 0) | + (symbolFlags & 1536 ? 4194304 : 0); + var local = declareSymbol(container.locals, undefined, node, exportKind, symbolExcludes); + local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); + node.localSymbol = local; + return local; + } + else { + return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); + } } - function checkForEmptyTypeArgumentList(typeArguments) { - if (parseDiagnostics.length === 0 && typeArguments && typeArguments.length === 0) { - var start = typeArguments.pos - "<".length; - var end = ts.skipTrivia(sourceText, typeArguments.end) + ">".length; - return parseErrorAtPosition(start, end - start, ts.Diagnostics.Type_argument_list_cannot_be_empty); + } + function bindChildren(node) { + var saveParent = parent; + var saveContainer = container; + var savedBlockScopeContainer = blockScopeContainer; + parent = node; + var containerFlags = getContainerFlags(node); + if (containerFlags & 1) { + container = blockScopeContainer = node; + if (containerFlags & 4) { + container.locals = {}; } + addToContainerChain(container); } - function parseQualifiedName(left) { - var result = createNode(135, left.pos); - result.left = left; - result.right = parseIdentifierName(); - return finishNode(result); + else if (containerFlags & 2) { + blockScopeContainer = node; + blockScopeContainer.locals = undefined; } - function parseJSDocRecordType() { - var result = createNode(257); - nextToken(); - result.members = parseDelimitedList(24, parseJSDocRecordMember); - checkForTrailingComma(result.members); - parseExpected(16); - return finishNode(result); + var savedReachabilityState; + var savedLabelStack; + var savedLabels; + var savedImplicitLabels; + var savedHasExplicitReturn; + var kind = node.kind; + var flags = node.flags; + flags &= ~1572864; + if (kind === 215) { + seenThisKeyword = false; } - function parseJSDocRecordMember() { - var result = createNode(258); - result.name = parseSimplePropertyName(); - if (token === 54) { - nextToken(); - result.type = parseJSDocType(); + var saveState = kind === 248 || kind === 219 || ts.isFunctionLikeKind(kind); + if (saveState) { + savedReachabilityState = currentReachabilityState; + savedLabelStack = labelStack; + savedLabels = labelIndexMap; + savedImplicitLabels = implicitLabels; + savedHasExplicitReturn = hasExplicitReturn; + currentReachabilityState = 2; + hasExplicitReturn = false; + labelStack = labelIndexMap = implicitLabels = undefined; + } + bindReachableStatement(node); + if (currentReachabilityState === 2 && ts.isFunctionLikeKind(kind) && ts.nodeIsPresent(node.body)) { + flags |= 524288; + if (hasExplicitReturn) { + flags |= 1048576; } - return finishNode(result); } - function parseJSDocNonNullableType() { - var result = createNode(256); - nextToken(); - result.type = parseJSDocType(); - return finishNode(result); + if (kind === 215) { + flags = seenThisKeyword ? flags | 262144 : flags & ~262144; } - function parseJSDocTupleType() { - var result = createNode(254); - nextToken(); - result.types = parseDelimitedList(25, parseJSDocType); - checkForTrailingComma(result.types); - parseExpected(20); - return finishNode(result); + node.flags = flags; + if (saveState) { + hasExplicitReturn = savedHasExplicitReturn; + currentReachabilityState = savedReachabilityState; + labelStack = savedLabelStack; + labelIndexMap = savedLabels; + implicitLabels = savedImplicitLabels; } - function checkForTrailingComma(list) { - if (parseDiagnostics.length === 0 && list.hasTrailingComma) { - var start = list.end - ",".length; - parseErrorAtPosition(start, ",".length, ts.Diagnostics.Trailing_comma_not_allowed); - } + container = saveContainer; + parent = saveParent; + blockScopeContainer = savedBlockScopeContainer; + } + function bindReachableStatement(node) { + if (checkUnreachable(node)) { + ts.forEachChild(node, bind); + return; } - function parseJSDocUnionType() { - var result = createNode(253); - nextToken(); - result.types = parseJSDocTypeList(parseJSDocType()); - parseExpected(18); - return finishNode(result); + switch (node.kind) { + case 198: + bindWhileStatement(node); + break; + case 197: + bindDoStatement(node); + break; + case 199: + bindForStatement(node); + break; + case 200: + case 201: + bindForInOrForOfStatement(node); + break; + case 196: + bindIfStatement(node); + break; + case 204: + case 208: + bindReturnOrThrow(node); + break; + case 203: + case 202: + bindBreakOrContinueStatement(node); + break; + case 209: + bindTryStatement(node); + break; + case 206: + bindSwitchStatement(node); + break; + case 220: + bindCaseBlock(node); + break; + case 207: + bindLabeledStatement(node); + break; + default: + ts.forEachChild(node, bind); + break; + } + } + function bindWhileStatement(n) { + var preWhileState = n.expression.kind === 84 ? 4 : currentReachabilityState; + var postWhileState = n.expression.kind === 99 ? 4 : currentReachabilityState; + bind(n.expression); + currentReachabilityState = preWhileState; + var postWhileLabel = pushImplicitLabel(); + bind(n.statement); + popImplicitLabel(postWhileLabel, postWhileState); + } + function bindDoStatement(n) { + var preDoState = currentReachabilityState; + var postDoLabel = pushImplicitLabel(); + bind(n.statement); + var postDoState = n.expression.kind === 99 ? 4 : preDoState; + popImplicitLabel(postDoLabel, postDoState); + bind(n.expression); + } + function bindForStatement(n) { + var preForState = currentReachabilityState; + var postForLabel = pushImplicitLabel(); + bind(n.initializer); + bind(n.condition); + bind(n.incrementor); + bind(n.statement); + var isInfiniteLoop = (!n.condition || n.condition.kind === 99); + var postForState = isInfiniteLoop ? 4 : preForState; + popImplicitLabel(postForLabel, postForState); + } + function bindForInOrForOfStatement(n) { + var preStatementState = currentReachabilityState; + var postStatementLabel = pushImplicitLabel(); + bind(n.initializer); + bind(n.expression); + bind(n.statement); + popImplicitLabel(postStatementLabel, preStatementState); + } + function bindIfStatement(n) { + var ifTrueState = n.expression.kind === 84 ? 4 : currentReachabilityState; + var ifFalseState = n.expression.kind === 99 ? 4 : currentReachabilityState; + currentReachabilityState = ifTrueState; + bind(n.expression); + bind(n.thenStatement); + if (n.elseStatement) { + var preElseState = currentReachabilityState; + currentReachabilityState = ifFalseState; + bind(n.elseStatement); + currentReachabilityState = or(currentReachabilityState, preElseState); } - function parseJSDocTypeList(firstType) { - ts.Debug.assert(!!firstType); - var types = []; - types.pos = firstType.pos; - types.push(firstType); - while (parseOptional(47)) { - types.push(parseJSDocType()); - } - types.end = scanner.getStartPos(); - return types; + else { + currentReachabilityState = or(currentReachabilityState, ifFalseState); } - function parseJSDocAllType() { - var result = createNode(250); - nextToken(); - return finishNode(result); + } + function bindReturnOrThrow(n) { + bind(n.expression); + if (n.kind === 204) { + hasExplicitReturn = true; } - function parseJSDocUnknownOrNullableType() { - var pos = scanner.getStartPos(); - nextToken(); - if (token === 24 || - token === 16 || - token === 18 || - token === 27 || - token === 56 || - token === 47) { - var result = createNode(251, pos); - return finishNode(result); - } - else { - var result = createNode(255, pos); - result.type = parseJSDocType(); - return finishNode(result); + currentReachabilityState = 4; + } + function bindBreakOrContinueStatement(n) { + bind(n.label); + var isValidJump = jumpToLabel(n.label, n.kind === 203 ? currentReachabilityState : 4); + if (isValidJump) { + currentReachabilityState = 4; + } + } + function bindTryStatement(n) { + var preTryState = currentReachabilityState; + bind(n.tryBlock); + var postTryState = currentReachabilityState; + currentReachabilityState = preTryState; + bind(n.catchClause); + var postCatchState = currentReachabilityState; + currentReachabilityState = preTryState; + bind(n.finallyBlock); + currentReachabilityState = or(postTryState, postCatchState); + } + function bindSwitchStatement(n) { + var preSwitchState = currentReachabilityState; + var postSwitchLabel = pushImplicitLabel(); + bind(n.expression); + bind(n.caseBlock); + var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 242; }); + var postSwitchState = hasDefault && currentReachabilityState !== 2 ? 4 : preSwitchState; + popImplicitLabel(postSwitchLabel, postSwitchState); + } + function bindCaseBlock(n) { + var startState = currentReachabilityState; + for (var _i = 0, _a = n.clauses; _i < _a.length; _i++) { + var clause = _a[_i]; + currentReachabilityState = startState; + bind(clause); + if (clause.statements.length && currentReachabilityState === 2 && options.noFallthroughCasesInSwitch) { + errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); } } - function parseIsolatedJSDocComment(content, start, length) { - initializeState("file.js", content, 2, undefined); - var jsDocComment = parseJSDocComment(undefined, start, length); - var diagnostics = parseDiagnostics; - clearState(); - return jsDocComment ? { jsDocComment: jsDocComment, diagnostics: diagnostics } : undefined; + } + function bindLabeledStatement(n) { + bind(n.label); + var ok = pushNamedLabel(n.label); + bind(n.statement); + if (ok) { + popNamedLabel(n.label, currentReachabilityState); } - JSDocParser.parseIsolatedJSDocComment = parseIsolatedJSDocComment; - function parseJSDocComment(parent, start, length) { - var comment = parseJSDocCommentWorker(start, length); - if (comment) { - fixupParentReferences(comment); - comment.parent = parent; - } - return comment; + } + function getContainerFlags(node) { + switch (node.kind) { + case 186: + case 214: + case 215: + case 217: + case 155: + case 165: + return 1; + case 147: + case 148: + case 149: + case 143: + case 142: + case 213: + case 144: + case 145: + case 146: + case 152: + case 153: + case 173: + case 174: + case 218: + case 248: + case 216: + return 5; + case 244: + case 199: + case 200: + case 201: + case 220: + return 2; + case 192: + return ts.isFunctionLike(node.parent) ? 0 : 2; } - JSDocParser.parseJSDocComment = parseJSDocComment; - function parseJSDocCommentWorker(start, length) { - var content = sourceText; - start = start || 0; - var end = length === undefined ? content.length : start + length; - length = end - start; - ts.Debug.assert(start >= 0); - ts.Debug.assert(start <= end); - ts.Debug.assert(end <= content.length); - var tags; - var pos; - if (length >= "/** */".length) { - if (content.charCodeAt(start) === 47 && - content.charCodeAt(start + 1) === 42 && - content.charCodeAt(start + 2) === 42 && - content.charCodeAt(start + 3) !== 42) { - var canParseTag = true; - var seenAsterisk = true; - for (pos = start + "/**".length; pos < end;) { - var ch = content.charCodeAt(pos); - pos++; - if (ch === 64 && canParseTag) { - parseTag(); - canParseTag = false; - continue; - } - if (ts.isLineBreak(ch)) { - canParseTag = true; - seenAsterisk = false; - continue; - } - if (ts.isWhiteSpace(ch)) { - continue; - } - if (ch === 42) { - if (seenAsterisk) { - canParseTag = false; - } - seenAsterisk = true; - continue; - } - canParseTag = false; - } - } - } - return createJSDocComment(); - function createJSDocComment() { - if (!tags) { - return undefined; - } - var result = createNode(265, start); - result.tags = tags; - return finishNode(result, end); - } - function skipWhitespace() { - while (pos < end && ts.isWhiteSpace(content.charCodeAt(pos))) { - pos++; - } - } - function parseTag() { - ts.Debug.assert(content.charCodeAt(pos - 1) === 64); - var atToken = createNode(55, pos - 1); - atToken.end = pos; - var tagName = scanIdentifier(); - if (!tagName) { - return; - } - var tag = handleTag(atToken, tagName) || handleUnknownTag(atToken, tagName); - addTag(tag); - } - function handleTag(atToken, tagName) { - if (tagName) { - switch (tagName.text) { - case "param": - return handleParamTag(atToken, tagName); - case "return": - case "returns": - return handleReturnTag(atToken, tagName); - case "template": - return handleTemplateTag(atToken, tagName); - case "type": - return handleTypeTag(atToken, tagName); - } - } - return undefined; - } - function handleUnknownTag(atToken, tagName) { - var result = createNode(266, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - return finishNode(result, pos); - } - function addTag(tag) { - if (tag) { - if (!tags) { - tags = []; - tags.pos = tag.pos; - } - tags.push(tag); - tags.end = tag.end; + return 0; + } + function addToContainerChain(next) { + if (lastContainer) { + lastContainer.nextContainer = next; + } + lastContainer = next; + } + function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { + declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes); + } + function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { + switch (container.kind) { + case 218: + return declareModuleMember(node, symbolFlags, symbolExcludes); + case 248: + return declareSourceFileMember(node, symbolFlags, symbolExcludes); + case 186: + case 214: + return declareClassMember(node, symbolFlags, symbolExcludes); + case 217: + return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); + case 155: + case 165: + case 215: + return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); + case 152: + case 153: + case 147: + case 148: + case 149: + case 143: + case 142: + case 144: + case 145: + case 146: + case 213: + case 173: + case 174: + case 216: + return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); + } + } + function declareClassMember(node, symbolFlags, symbolExcludes) { + return node.flags & 64 + ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes) + : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); + } + function declareSourceFileMember(node, symbolFlags, symbolExcludes) { + return ts.isExternalModule(file) + ? declareModuleMember(node, symbolFlags, symbolExcludes) + : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); + } + function hasExportDeclarations(node) { + var body = node.kind === 248 ? node : node.body; + if (body.kind === 248 || body.kind === 219) { + for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { + var stat = _a[_i]; + if (stat.kind === 228 || stat.kind === 227) { + return true; } } - function tryParseTypeExpression() { - skipWhitespace(); - if (content.charCodeAt(pos) !== 123) { - return undefined; - } - var typeExpression = parseJSDocTypeExpression(pos, end - pos); - pos = typeExpression.end; - return typeExpression; + } + return false; + } + function setExportContextFlag(node) { + if (ts.isInAmbientContext(node) && !hasExportDeclarations(node)) { + node.flags |= 131072; + } + else { + node.flags &= ~131072; + } + } + function bindModuleDeclaration(node) { + setExportContextFlag(node); + if (node.name.kind === 9) { + declareSymbolAndAddToSymbolTable(node, 512, 106639); + } + else { + var state = getModuleInstanceState(node); + if (state === 0) { + declareSymbolAndAddToSymbolTable(node, 1024, 0); } - function handleParamTag(atToken, tagName) { - var typeExpression = tryParseTypeExpression(); - skipWhitespace(); - var name; - var isBracketed; - if (content.charCodeAt(pos) === 91) { - pos++; - skipWhitespace(); - name = scanIdentifier(); - isBracketed = true; - } - else { - name = scanIdentifier(); - } - if (!name) { - parseErrorAtPosition(pos, 0, ts.Diagnostics.Identifier_expected); - } - var preName, postName; - if (typeExpression) { - postName = name; + else { + declareSymbolAndAddToSymbolTable(node, 512, 106639); + if (node.symbol.flags & (16 | 32 | 256)) { + node.symbol.constEnumOnlyModule = false; } else { - preName = name; - } - if (!typeExpression) { - typeExpression = tryParseTypeExpression(); - } - var result = createNode(267, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.preParameterName = preName; - result.typeExpression = typeExpression; - result.postParameterName = postName; - result.isBracketed = isBracketed; - return finishNode(result, pos); - } - function handleReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 268; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + var currentModuleIsConstEnumOnly = state === 2; + if (node.symbol.constEnumOnlyModule === undefined) { + node.symbol.constEnumOnlyModule = currentModuleIsConstEnumOnly; + } + else { + node.symbol.constEnumOnlyModule = node.symbol.constEnumOnlyModule && currentModuleIsConstEnumOnly; + } } - var result = createNode(268, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); } - function handleTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 269; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } + } + function bindFunctionOrConstructorType(node) { + var symbol = createSymbol(131072, getDeclarationName(node)); + addDeclarationToSymbol(symbol, node, 131072); + var typeLiteralSymbol = createSymbol(2048, "__type"); + addDeclarationToSymbol(typeLiteralSymbol, node, 2048); + typeLiteralSymbol.members = (_a = {}, _a[symbol.name] = symbol, _a); + var _a; + } + function bindObjectLiteralExpression(node) { + if (inStrictMode) { + var seen = {}; + for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { + var prop = _a[_i]; + if (prop.name.kind !== 69) { + continue; } - var result = createNode(269, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); - } - function handleTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 270; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + var identifier = prop.name; + var currentKind = prop.kind === 245 || prop.kind === 246 || prop.kind === 143 + ? 1 + : 2; + var existingKind = seen[identifier.text]; + if (!existingKind) { + seen[identifier.text] = currentKind; + continue; } - var typeParameters = []; - typeParameters.pos = pos; - while (true) { - skipWhitespace(); - var startPos = pos; - var name_8 = scanIdentifier(); - if (!name_8) { - parseErrorAtPosition(startPos, 0, ts.Diagnostics.Identifier_expected); - return undefined; - } - var typeParameter = createNode(137, name_8.pos); - typeParameter.name = name_8; - finishNode(typeParameter, pos); - typeParameters.push(typeParameter); - skipWhitespace(); - if (content.charCodeAt(pos) !== 44) { - break; - } - pos++; + if (currentKind === 1 && existingKind === 1) { + var span = ts.getErrorSpanForNode(file, identifier); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode)); } - typeParameters.end = pos; - var result = createNode(270, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeParameters = typeParameters; - return finishNode(result, pos); } - function scanIdentifier() { - var startPos = pos; - for (; pos < end; pos++) { - var ch = content.charCodeAt(pos); - if (pos === startPos && ts.isIdentifierStart(ch, 2)) { - continue; - } - else if (pos > startPos && ts.isIdentifierPart(ch, 2)) { - continue; - } + } + return bindAnonymousDeclaration(node, 4096, "__object"); + } + function bindAnonymousDeclaration(node, symbolFlags, name) { + var symbol = createSymbol(symbolFlags, name); + addDeclarationToSymbol(symbol, node, symbolFlags); + } + function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { + switch (blockScopeContainer.kind) { + case 218: + declareModuleMember(node, symbolFlags, symbolExcludes); + break; + case 248: + if (ts.isExternalModule(container)) { + declareModuleMember(node, symbolFlags, symbolExcludes); break; } - if (startPos === pos) { - return undefined; + default: + if (!blockScopeContainer.locals) { + blockScopeContainer.locals = {}; + addToContainerChain(blockScopeContainer); } - var result = createNode(69, startPos); - result.text = content.substring(startPos, pos); - return finishNode(result, pos); + declareSymbol(blockScopeContainer.locals, undefined, node, symbolFlags, symbolExcludes); + } + } + function bindBlockScopedVariableDeclaration(node) { + bindBlockScopedDeclaration(node, 2, 107455); + } + function checkStrictModeIdentifier(node) { + if (inStrictMode && + node.originalKeywordKind >= 106 && + node.originalKeywordKind <= 114 && + !ts.isIdentifierName(node)) { + if (!file.parseDiagnostics.length) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(node, getStrictModeIdentifierMessage(node), ts.declarationNameToString(node))); + } + } + } + function getStrictModeIdentifierMessage(node) { + if (ts.getContainingClass(node)) { + return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode; + } + if (file.externalModuleIndicator) { + return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode; + } + return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode; + } + function checkStrictModeBinaryExpression(node) { + if (inStrictMode && ts.isLeftHandSideExpression(node.left) && ts.isAssignmentOperator(node.operatorToken.kind)) { + checkStrictModeEvalOrArguments(node, node.left); + } + } + function checkStrictModeCatchClause(node) { + if (inStrictMode && node.variableDeclaration) { + checkStrictModeEvalOrArguments(node, node.variableDeclaration.name); + } + } + function checkStrictModeDeleteExpression(node) { + if (inStrictMode && node.expression.kind === 69) { + var span = ts.getErrorSpanForNode(file, node.expression); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode)); + } + } + function isEvalOrArgumentsIdentifier(node) { + return node.kind === 69 && + (node.text === "eval" || node.text === "arguments"); + } + function checkStrictModeEvalOrArguments(contextNode, name) { + if (name && name.kind === 69) { + var identifier = name; + if (isEvalOrArgumentsIdentifier(identifier)) { + var span = ts.getErrorSpanForNode(file, name); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, getStrictModeEvalOrArgumentsMessage(contextNode), identifier.text)); } } - JSDocParser.parseJSDocCommentWorker = parseJSDocCommentWorker; - })(JSDocParser = Parser.JSDocParser || (Parser.JSDocParser = {})); - })(Parser || (Parser = {})); - var IncrementalParser; - (function (IncrementalParser) { - function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) { - aggressiveChecks = aggressiveChecks || ts.Debug.shouldAssert(2); - checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks); - if (ts.textChangeRangeIsUnchanged(textChangeRange)) { - return sourceFile; + } + function getStrictModeEvalOrArgumentsMessage(node) { + if (ts.getContainingClass(node)) { + return ts.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode; } - if (sourceFile.statements.length === 0) { - return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, undefined, true); + if (file.externalModuleIndicator) { + return ts.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode; } - var incrementalSourceFile = sourceFile; - ts.Debug.assert(!incrementalSourceFile.hasBeenIncrementallyParsed); - incrementalSourceFile.hasBeenIncrementallyParsed = true; - var oldText = sourceFile.text; - var syntaxCursor = createSyntaxCursor(sourceFile); - var changeRange = extendToAffectedRange(sourceFile, textChangeRange); - checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks); - ts.Debug.assert(changeRange.span.start <= textChangeRange.span.start); - ts.Debug.assert(ts.textSpanEnd(changeRange.span) === ts.textSpanEnd(textChangeRange.span)); - ts.Debug.assert(ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)) === ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange))); - var delta = ts.textChangeRangeNewSpan(changeRange).length - changeRange.span.length; - updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, ts.textSpanEnd(changeRange.span), ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); - var result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, true); - return result; + return ts.Diagnostics.Invalid_use_of_0_in_strict_mode; } - IncrementalParser.updateSourceFile = updateSourceFile; - function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) { - if (isArray) { - visitArray(element); + function checkStrictModeFunctionName(node) { + if (inStrictMode) { + checkStrictModeEvalOrArguments(node, node.name); } - else { - visitNode(element); + } + function checkStrictModeNumericLiteral(node) { + if (inStrictMode && node.flags & 32768) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode)); } - return; - function visitNode(node) { - var text = ""; - if (aggressiveChecks && shouldCheckNode(node)) { - text = oldText.substring(node.pos, node.end); - } - if (node._children) { - node._children = undefined; - } - if (node.jsDocComment) { - node.jsDocComment = undefined; - } - node.pos += delta; - node.end += delta; - if (aggressiveChecks && shouldCheckNode(node)) { - ts.Debug.assert(text === newText.substring(node.pos, node.end)); + } + function checkStrictModePostfixUnaryExpression(node) { + if (inStrictMode) { + checkStrictModeEvalOrArguments(node, node.operand); + } + } + function checkStrictModePrefixUnaryExpression(node) { + if (inStrictMode) { + if (node.operator === 41 || node.operator === 42) { + checkStrictModeEvalOrArguments(node, node.operand); } - forEachChild(node, visitNode, visitArray); - checkNodePositions(node, aggressiveChecks); } - function visitArray(array) { - array._children = undefined; - array.pos += delta; - array.end += delta; - for (var _i = 0, array_7 = array; _i < array_7.length; _i++) { - var node = array_7[_i]; - visitNode(node); + } + function checkStrictModeWithStatement(node) { + if (inStrictMode) { + errorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_strict_mode); + } + } + function errorOnFirstToken(node, message, arg0, arg1, arg2) { + var span = ts.getSpanOfTokenAtPosition(file, node.pos); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, message, arg0, arg1, arg2)); + } + function getDestructuringParameterName(node) { + return "__" + ts.indexOf(node.parent.parameters, node); + } + function bind(node) { + if (!node) { + return; + } + node.parent = parent; + var savedInStrictMode = inStrictMode; + if (!savedInStrictMode) { + updateStrictMode(node); + } + bindWorker(node); + bindChildren(node); + inStrictMode = savedInStrictMode; + } + function updateStrictMode(node) { + switch (node.kind) { + case 248: + case 219: + updateStrictModeStatementList(node.statements); + return; + case 192: + if (ts.isFunctionLike(node.parent)) { + updateStrictModeStatementList(node.statements); + } + return; + case 214: + case 186: + inStrictMode = true; + return; + } + } + function updateStrictModeStatementList(statements) { + for (var _i = 0, statements_1 = statements; _i < statements_1.length; _i++) { + var statement = statements_1[_i]; + if (!ts.isPrologueDirective(statement)) { + return; + } + if (isUseStrictPrologueDirective(statement)) { + inStrictMode = true; + return; } } } - function shouldCheckNode(node) { + function isUseStrictPrologueDirective(node) { + var nodeText = ts.getTextOfNodeFromSourceText(file.text, node.expression); + return nodeText === "\"use strict\"" || nodeText === "'use strict'"; + } + function bindWorker(node) { switch (node.kind) { - case 9: - case 8: case 69: - return true; + return checkStrictModeIdentifier(node); + case 181: + if (ts.isInJavaScriptFile(node)) { + if (ts.isExportsPropertyAssignment(node)) { + bindExportsPropertyAssignment(node); + } + else if (ts.isModuleExportsAssignment(node)) { + bindModuleExportsAssignment(node); + } + } + return checkStrictModeBinaryExpression(node); + case 244: + return checkStrictModeCatchClause(node); + case 175: + return checkStrictModeDeleteExpression(node); + case 8: + return checkStrictModeNumericLiteral(node); + case 180: + return checkStrictModePostfixUnaryExpression(node); + case 179: + return checkStrictModePrefixUnaryExpression(node); + case 205: + return checkStrictModeWithStatement(node); + case 97: + seenThisKeyword = true; + return; + case 137: + return declareSymbolAndAddToSymbolTable(node, 262144, 530912); + case 138: + return bindParameter(node); + case 211: + case 163: + return bindVariableDeclarationOrBindingElement(node); + case 141: + case 140: + return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 536870912 : 0), 107455); + case 245: + case 246: + return bindPropertyOrMethodOrAccessor(node, 4, 107455); + case 247: + return bindPropertyOrMethodOrAccessor(node, 8, 107455); + case 147: + case 148: + case 149: + return declareSymbolAndAddToSymbolTable(node, 131072, 0); + case 143: + case 142: + return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 536870912 : 0), ts.isObjectLiteralMethod(node) ? 107455 : 99263); + case 213: + checkStrictModeFunctionName(node); + return declareSymbolAndAddToSymbolTable(node, 16, 106927); + case 144: + return declareSymbolAndAddToSymbolTable(node, 16384, 0); + case 145: + return bindPropertyOrMethodOrAccessor(node, 32768, 41919); + case 146: + return bindPropertyOrMethodOrAccessor(node, 65536, 74687); + case 152: + case 153: + return bindFunctionOrConstructorType(node); + case 155: + return bindAnonymousDeclaration(node, 2048, "__type"); + case 165: + return bindObjectLiteralExpression(node); + case 173: + case 174: + checkStrictModeFunctionName(node); + var bindingName = node.name ? node.name.text : "__function"; + return bindAnonymousDeclaration(node, 16, bindingName); + case 168: + if (ts.isInJavaScriptFile(node)) { + bindCallExpression(node); + } + break; + case 186: + case 214: + return bindClassLikeDeclaration(node); + case 215: + return bindBlockScopedDeclaration(node, 64, 792960); + case 216: + return bindBlockScopedDeclaration(node, 524288, 793056); + case 217: + return bindEnumDeclaration(node); + case 218: + return bindModuleDeclaration(node); + case 221: + case 224: + case 226: + case 230: + return declareSymbolAndAddToSymbolTable(node, 8388608, 8388608); + case 223: + return bindImportClause(node); + case 228: + return bindExportDeclaration(node); + case 227: + return bindExportAssignment(node); + case 248: + return bindSourceFileIfExternalModule(); } - return false; } - function adjustIntersectingElement(element, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta) { - ts.Debug.assert(element.end >= changeStart, "Adjusting an element that was entirely before the change range"); - ts.Debug.assert(element.pos <= changeRangeOldEnd, "Adjusting an element that was entirely after the change range"); - ts.Debug.assert(element.pos <= element.end); - element.pos = Math.min(element.pos, changeRangeNewEnd); - if (element.end >= changeRangeOldEnd) { - element.end += delta; + function bindSourceFileIfExternalModule() { + setExportContextFlag(file); + if (ts.isExternalModule(file)) { + bindSourceFileAsExternalModule(); + } + } + function bindSourceFileAsExternalModule() { + bindAnonymousDeclaration(file, 512, "\"" + ts.removeFileExtension(file.fileName) + "\""); + } + function bindExportAssignment(node) { + var boundExpression = node.kind === 227 ? node.expression : node.right; + if (!container.symbol || !container.symbol.exports) { + bindAnonymousDeclaration(node, 8388608, getDeclarationName(node)); } - else { - element.end = Math.min(element.end, changeRangeNewEnd); + else if (boundExpression.kind === 69) { + declareSymbol(container.symbol.exports, container.symbol, node, 8388608, 107455 | 8388608); } - ts.Debug.assert(element.pos <= element.end); - if (element.parent) { - ts.Debug.assert(element.pos >= element.parent.pos); - ts.Debug.assert(element.end <= element.parent.end); + else { + declareSymbol(container.symbol.exports, container.symbol, node, 4, 107455 | 8388608); } } - function checkNodePositions(node, aggressiveChecks) { - if (aggressiveChecks) { - var pos = node.pos; - forEachChild(node, function (child) { - ts.Debug.assert(child.pos >= pos); - pos = child.end; - }); - ts.Debug.assert(pos <= node.end); + function bindExportDeclaration(node) { + if (!container.symbol || !container.symbol.exports) { + bindAnonymousDeclaration(node, 1073741824, getDeclarationName(node)); + } + else if (!node.exportClause) { + declareSymbol(container.symbol.exports, container.symbol, node, 1073741824, 0); } } - function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) { - visitNode(sourceFile); - return; - function visitNode(child) { - ts.Debug.assert(child.pos <= child.end); - if (child.pos > changeRangeOldEnd) { - moveElementEntirelyPastChangeRange(child, false, delta, oldText, newText, aggressiveChecks); - return; - } - var fullEnd = child.end; - if (fullEnd >= changeStart) { - child.intersectsChange = true; - child._children = undefined; - adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - forEachChild(child, visitNode, visitArray); - checkNodePositions(child, aggressiveChecks); - return; - } - ts.Debug.assert(fullEnd < changeStart); + function bindImportClause(node) { + if (node.name) { + declareSymbolAndAddToSymbolTable(node, 8388608, 8388608); } - function visitArray(array) { - ts.Debug.assert(array.pos <= array.end); - if (array.pos > changeRangeOldEnd) { - moveElementEntirelyPastChangeRange(array, true, delta, oldText, newText, aggressiveChecks); - return; - } - var fullEnd = array.end; - if (fullEnd >= changeStart) { - array.intersectsChange = true; - array._children = undefined; - adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - for (var _i = 0, array_8 = array; _i < array_8.length; _i++) { - var node = array_8[_i]; - visitNode(node); - } - return; - } - ts.Debug.assert(fullEnd < changeStart); + } + function setCommonJsModuleIndicator(node) { + if (!file.commonJsModuleIndicator) { + file.commonJsModuleIndicator = node; + bindSourceFileAsExternalModule(); } } - function extendToAffectedRange(sourceFile, changeRange) { - var maxLookahead = 1; - var start = changeRange.span.start; - for (var i = 0; start > 0 && i <= maxLookahead; i++) { - var nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start); - ts.Debug.assert(nearestNode.pos <= start); - var position = nearestNode.pos; - start = Math.max(0, position - 1); + function bindExportsPropertyAssignment(node) { + setCommonJsModuleIndicator(node); + declareSymbol(file.symbol.exports, file.symbol, node.left, 4 | 7340032, 0); + } + function bindModuleExportsAssignment(node) { + setCommonJsModuleIndicator(node); + bindExportAssignment(node); + } + function bindCallExpression(node) { + if (!file.commonJsModuleIndicator && ts.isRequireCall(node)) { + setCommonJsModuleIndicator(node); } - var finalSpan = ts.createTextSpanFromBounds(start, ts.textSpanEnd(changeRange.span)); - var finalLength = changeRange.newLength + (changeRange.span.start - start); - return ts.createTextChangeRange(finalSpan, finalLength); } - function findNearestNodeStartingBeforeOrAtPosition(sourceFile, position) { - var bestResult = sourceFile; - var lastNodeEntirelyBeforePosition; - forEachChild(sourceFile, visit); - if (lastNodeEntirelyBeforePosition) { - var lastChildOfLastEntireNodeBeforePosition = getLastChild(lastNodeEntirelyBeforePosition); - if (lastChildOfLastEntireNodeBeforePosition.pos > bestResult.pos) { - bestResult = lastChildOfLastEntireNodeBeforePosition; + function bindClassLikeDeclaration(node) { + if (node.kind === 214) { + bindBlockScopedDeclaration(node, 32, 899519); + } + else { + var bindingName = node.name ? node.name.text : "__class"; + bindAnonymousDeclaration(node, 32, bindingName); + if (node.name) { + classifiableNames[node.name.text] = node.name.text; } } - return bestResult; - function getLastChild(node) { - while (true) { - var lastChild = getLastChildWorker(node); - if (lastChild) { - node = lastChild; - } - else { - return node; - } + var symbol = node.symbol; + var prototypeSymbol = createSymbol(4 | 134217728, "prototype"); + if (ts.hasProperty(symbol.exports, prototypeSymbol.name)) { + if (node.name) { + node.name.parent = node; } + file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name)); } - function getLastChildWorker(node) { - var last = undefined; - forEachChild(node, function (child) { - if (ts.nodeIsPresent(child)) { - last = child; - } - }); - return last; + symbol.exports[prototypeSymbol.name] = prototypeSymbol; + prototypeSymbol.parent = symbol; + } + function bindEnumDeclaration(node) { + return ts.isConst(node) + ? bindBlockScopedDeclaration(node, 128, 899967) + : bindBlockScopedDeclaration(node, 256, 899327); + } + function bindVariableDeclarationOrBindingElement(node) { + if (inStrictMode) { + checkStrictModeEvalOrArguments(node, node.name); } - function visit(child) { - if (ts.nodeIsMissing(child)) { - return; + if (!ts.isBindingPattern(node.name)) { + if (ts.isBlockOrCatchScoped(node)) { + bindBlockScopedVariableDeclaration(node); } - if (child.pos <= position) { - if (child.pos >= bestResult.pos) { - bestResult = child; - } - if (position < child.end) { - forEachChild(child, visit); - return true; - } - else { - ts.Debug.assert(child.end <= position); - lastNodeEntirelyBeforePosition = child; - } + else if (ts.isParameterDeclaration(node)) { + declareSymbolAndAddToSymbolTable(node, 1, 107455); } else { - ts.Debug.assert(child.pos > position); - return true; + declareSymbolAndAddToSymbolTable(node, 1, 107454); } } } - function checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks) { - var oldText = sourceFile.text; - if (textChangeRange) { - ts.Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); - if (aggressiveChecks || ts.Debug.shouldAssert(3)) { - var oldTextPrefix = oldText.substr(0, textChangeRange.span.start); - var newTextPrefix = newText.substr(0, textChangeRange.span.start); - ts.Debug.assert(oldTextPrefix === newTextPrefix); - var oldTextSuffix = oldText.substring(ts.textSpanEnd(textChangeRange.span), oldText.length); - var newTextSuffix = newText.substring(ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange)), newText.length); - ts.Debug.assert(oldTextSuffix === newTextSuffix); - } + function bindParameter(node) { + if (inStrictMode) { + checkStrictModeEvalOrArguments(node, node.name); + } + if (ts.isBindingPattern(node.name)) { + bindAnonymousDeclaration(node, 1, getDestructuringParameterName(node)); + } + else { + declareSymbolAndAddToSymbolTable(node, 1, 107455); + } + if (node.flags & 56 && + node.parent.kind === 144 && + ts.isClassLike(node.parent.parent)) { + var classDeclaration = node.parent.parent; + declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4, 107455); } } - function createSyntaxCursor(sourceFile) { - var currentArray = sourceFile.statements; - var currentArrayIndex = 0; - ts.Debug.assert(currentArrayIndex < currentArray.length); - var current = currentArray[currentArrayIndex]; - var lastQueriedPosition = -1; - return { - currentNode: function (position) { - if (position !== lastQueriedPosition) { - if (current && current.end === position && currentArrayIndex < (currentArray.length - 1)) { - currentArrayIndex++; - current = currentArray[currentArrayIndex]; - } - if (!current || current.pos !== position) { - findHighestListElementThatStartsAtPosition(position); - } - } - lastQueriedPosition = position; - ts.Debug.assert(!current || current.pos === position); - return current; - } - }; - function findHighestListElementThatStartsAtPosition(position) { - currentArray = undefined; - currentArrayIndex = -1; - current = undefined; - forEachChild(sourceFile, visitNode, visitArray); - return; - function visitNode(node) { - if (position >= node.pos && position < node.end) { - forEachChild(node, visitNode, visitArray); - return true; - } - return false; + function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { + return ts.hasDynamicName(node) + ? bindAnonymousDeclaration(node, symbolFlags, "__computed") + : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); + } + function pushNamedLabel(name) { + initializeReachabilityStateIfNecessary(); + if (ts.hasProperty(labelIndexMap, name.text)) { + return false; + } + labelIndexMap[name.text] = labelStack.push(1) - 1; + return true; + } + function pushImplicitLabel() { + initializeReachabilityStateIfNecessary(); + var index = labelStack.push(1) - 1; + implicitLabels.push(index); + return index; + } + function popNamedLabel(label, outerState) { + var index = labelIndexMap[label.text]; + ts.Debug.assert(index !== undefined); + ts.Debug.assert(labelStack.length == index + 1); + labelIndexMap[label.text] = undefined; + setCurrentStateAtLabel(labelStack.pop(), outerState, label); + } + function popImplicitLabel(implicitLabelIndex, outerState) { + if (labelStack.length !== implicitLabelIndex + 1) { + ts.Debug.assert(false, "Label stack: " + labelStack.length + ", index:" + implicitLabelIndex); + } + var i = implicitLabels.pop(); + if (implicitLabelIndex !== i) { + ts.Debug.assert(false, "i: " + i + ", index: " + implicitLabelIndex); + } + setCurrentStateAtLabel(labelStack.pop(), outerState, undefined); + } + function setCurrentStateAtLabel(innerMergedState, outerState, label) { + if (innerMergedState === 1) { + if (label && !options.allowUnusedLabels) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(label, ts.Diagnostics.Unused_label)); } - function visitArray(array) { - if (position >= array.pos && position < array.end) { - for (var i = 0, n = array.length; i < n; i++) { - var child = array[i]; - if (child) { - if (child.pos === position) { - currentArray = array; - currentArrayIndex = i; - current = child; - return true; - } - else { - if (child.pos < position && position < child.end) { - forEachChild(child, visitNode, visitArray); - return true; - } - } - } + currentReachabilityState = outerState; + } + else { + currentReachabilityState = or(innerMergedState, outerState); + } + } + function jumpToLabel(label, outerState) { + initializeReachabilityStateIfNecessary(); + var index = label ? labelIndexMap[label.text] : ts.lastOrUndefined(implicitLabels); + if (index === undefined) { + return false; + } + var stateAtLabel = labelStack[index]; + labelStack[index] = stateAtLabel === 1 ? outerState : or(stateAtLabel, outerState); + return true; + } + function checkUnreachable(node) { + switch (currentReachabilityState) { + case 4: + var reportError = (ts.isStatement(node) && node.kind !== 194) || + node.kind === 214 || + (node.kind === 218 && shouldReportErrorOnModuleDeclaration(node)) || + (node.kind === 217 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + if (reportError) { + currentReachabilityState = 8; + var reportUnreachableCode = !options.allowUnreachableCode && + !ts.isInAmbientContext(node) && + (node.kind !== 193 || + ts.getCombinedNodeFlags(node.declarationList) & 24576 || + ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); + if (reportUnreachableCode) { + errorOnFirstToken(node, ts.Diagnostics.Unreachable_code_detected); } } + case 8: + return true; + default: return false; - } + } + function shouldReportErrorOnModuleDeclaration(node) { + var instanceState = getModuleInstanceState(node); + return instanceState === 1 || (instanceState === 2 && options.preserveConstEnums); } } - })(IncrementalParser || (IncrementalParser = {})); + function initializeReachabilityStateIfNecessary() { + if (labelIndexMap) { + return; + } + currentReachabilityState = 2; + labelIndexMap = {}; + labelStack = []; + implicitLabels = []; + } + } })(ts || (ts = {})); var ts; (function (ts) { @@ -10853,7 +10987,7 @@ var ts; symbolToString: symbolToString, getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, getRootSymbols: getRootSymbols, - getContextualType: getContextualType, + getContextualType: getApparentTypeOfContextualType, getFullyQualifiedName: getFullyQualifiedName, getResolvedSignature: getResolvedSignature, getConstantValue: getConstantValue, @@ -11109,7 +11243,7 @@ var ts; return ts.getAncestor(node, 248); } function isGlobalSourceFile(node) { - return node.kind === 248 && !ts.isExternalModule(node); + return node.kind === 248 && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -11195,23 +11329,24 @@ var ts; } switch (location.kind) { case 248: - if (!ts.isExternalModule(location)) + if (!ts.isExternalOrCommonJsModule(location)) break; case 218: var moduleExports = getSymbolOfNode(location).exports; if (location.kind === 248 || (location.kind === 218 && location.name.kind === 9)) { + if (result = moduleExports["default"]) { + var localSymbol = ts.getLocalSymbolForExportDefault(result); + if (localSymbol && (result.flags & meaning) && localSymbol.name === name) { + break loop; + } + result = undefined; + } if (ts.hasProperty(moduleExports, name) && moduleExports[name].flags === 8388608 && ts.getDeclarationOfKind(moduleExports[name], 230)) { break; } - result = moduleExports["default"]; - var localSymbol = ts.getLocalSymbolForExportDefault(result); - if (result && localSymbol && (result.flags & meaning) && localSymbol.name === name) { - break loop; - } - result = undefined; } if (result = getSymbol(moduleExports, name, meaning & 8914931)) { break loop; @@ -11569,6 +11704,9 @@ var ts; if (moduleName === undefined) { return; } + if (moduleName.indexOf("!") >= 0) { + moduleName = moduleName.substr(0, moduleName.indexOf("!")); + } var isRelative = ts.isExternalModuleNameRelative(moduleName); if (!isRelative) { var symbol = getSymbol(globals, "\"" + moduleName + "\"", 512); @@ -11739,7 +11877,7 @@ var ts; } switch (location_1.kind) { case 248: - if (!ts.isExternalModule(location_1)) { + if (!ts.isExternalOrCommonJsModule(location_1)) { break; } case 218: @@ -11866,7 +12004,7 @@ var ts; } function hasExternalModuleSymbol(declaration) { return (declaration.kind === 218 && declaration.name.kind === 9) || - (declaration.kind === 248 && ts.isExternalModule(declaration)); + (declaration.kind === 248 && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -12064,7 +12202,7 @@ var ts; writeAnonymousType(type, flags); } else if (type.flags & 256) { - writer.writeStringLiteral(type.text); + writer.writeStringLiteral("\"" + ts.escapeString(type.text) + "\""); } else { writePunctuation(writer, 15); @@ -12428,7 +12566,7 @@ var ts; } } else if (node.kind === 248) { - return ts.isExternalModule(node) ? node : undefined; + return ts.isExternalOrCommonJsModule(node) ? node : undefined; } } ts.Debug.fail("getContainingModule cant reach here"); @@ -12633,6 +12771,23 @@ var ts; var symbol = getSymbolOfNode(node); return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node); } + function getTextOfPropertyName(name) { + switch (name.kind) { + case 69: + return name.text; + case 9: + case 8: + return name.text; + case 136: + if (ts.isStringOrNumericLiteral(name.expression.kind)) { + return name.expression.text; + } + } + return undefined; + } + function isComputedNonLiteralName(name) { + return name.kind === 136 && !ts.isStringOrNumericLiteral(name.expression.kind); + } function getTypeForBindingElement(declaration) { var pattern = declaration.parent; var parentType = getTypeForBindingElementParent(pattern.parent); @@ -12648,8 +12803,12 @@ var ts; var type; if (pattern.kind === 161) { var name_10 = declaration.propertyName || declaration.name; - type = getTypeOfPropertyOfType(parentType, name_10.text) || - isNumericLiteralName(name_10.text) && getIndexTypeOfType(parentType, 1) || + if (isComputedNonLiteralName(name_10)) { + return anyType; + } + var text = getTextOfPropertyName(name_10); + type = getTypeOfPropertyOfType(parentType, text) || + isNumericLiteralName(text) && getIndexTypeOfType(parentType, 1) || getIndexTypeOfType(parentType, 0); if (!type) { error(name_10, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_10)); @@ -12727,10 +12886,16 @@ var ts; } function getTypeFromObjectBindingPattern(pattern, includePatternInType) { var members = {}; + var hasComputedProperties = false; ts.forEach(pattern.elements, function (e) { - var flags = 4 | 67108864 | (e.initializer ? 536870912 : 0); var name = e.propertyName || e.name; - var symbol = createSymbol(flags, name.text); + if (isComputedNonLiteralName(name)) { + hasComputedProperties = true; + return; + } + var text = getTextOfPropertyName(name); + var flags = 4 | 67108864 | (e.initializer ? 536870912 : 0); + var symbol = createSymbol(flags, text); symbol.type = getTypeFromBindingElement(e, includePatternInType); symbol.bindingElement = e; members[symbol.name] = symbol; @@ -12739,6 +12904,9 @@ var ts; if (includePatternInType) { result.pattern = pattern; } + if (hasComputedProperties) { + result.flags |= 67108864; + } return result; } function getTypeFromArrayBindingPattern(pattern, includePatternInType) { @@ -12789,6 +12957,12 @@ var ts; if (declaration.kind === 227) { return links.type = checkExpression(declaration.expression); } + if (declaration.kind === 181) { + return links.type = checkExpression(declaration.right); + } + if (declaration.kind === 166) { + return checkExpressionCached(declaration.parent.right); + } if (!pushTypeResolution(symbol, 0)) { return unknownType; } @@ -13038,17 +13212,19 @@ var ts; } function resolveBaseTypesOfClass(type) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; - var baseContructorType = getBaseConstructorTypeOfClass(type); - if (!(baseContructorType.flags & 80896)) { + var baseConstructorType = getBaseConstructorTypeOfClass(type); + if (!(baseConstructorType.flags & 80896)) { return; } var baseTypeNode = getBaseTypeNodeOfClass(type); var baseType; - if (baseContructorType.symbol && baseContructorType.symbol.flags & 32) { - baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseContructorType.symbol); + var originalBaseType = baseConstructorType && baseConstructorType.symbol ? getDeclaredTypeOfSymbol(baseConstructorType.symbol) : undefined; + if (baseConstructorType.symbol && baseConstructorType.symbol.flags & 32 && + areAllOuterTypeParametersApplied(originalBaseType)) { + baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol); } else { - var constructors = getInstantiatedConstructorsForTypeArguments(baseContructorType, baseTypeNode.typeArguments); + var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments); if (!constructors.length) { error(baseTypeNode.expression, ts.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments); return; @@ -13073,6 +13249,15 @@ var ts; type.resolvedBaseTypes.push(baseType); } } + function areAllOuterTypeParametersApplied(type) { + var outerTypeParameters = type.outerTypeParameters; + if (outerTypeParameters) { + var last = outerTypeParameters.length - 1; + var typeArguments = type.typeArguments; + return outerTypeParameters[last].symbol !== typeArguments[last].symbol; + } + return true; + } function resolveBaseTypesOfInterface(type) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { @@ -13144,7 +13329,7 @@ var ts; type.typeArguments = type.typeParameters; type.thisType = createType(512 | 33554432); type.thisType.symbol = symbol; - type.thisType.constraint = getTypeWithThisArgument(type); + type.thisType.constraint = type; } } return links.declaredType; @@ -13619,14 +13804,19 @@ var ts; type = getApparentType(type); return type.flags & 49152 ? getPropertiesOfUnionOrIntersectionType(type) : getPropertiesOfObjectType(type); } + function getApparentTypeOfTypeParameter(type) { + if (!type.resolvedApparentType) { + var constraintType = getConstraintOfTypeParameter(type); + while (constraintType && constraintType.flags & 512) { + constraintType = getConstraintOfTypeParameter(constraintType); + } + type.resolvedApparentType = getTypeWithThisArgument(constraintType || emptyObjectType, type); + } + return type.resolvedApparentType; + } function getApparentType(type) { if (type.flags & 512) { - do { - type = getConstraintOfTypeParameter(type); - } while (type && type.flags & 512); - if (!type) { - type = emptyObjectType; - } + type = getApparentTypeOfTypeParameter(type); } if (type.flags & 258) { type = globalStringType; @@ -13779,7 +13969,7 @@ var ts; if (node.initializer) { var signatureDeclaration = node.parent; var signature = getSignatureFromDeclaration(signatureDeclaration); - var parameterIndex = signatureDeclaration.parameters.indexOf(node); + var parameterIndex = ts.indexOf(signatureDeclaration.parameters, node); ts.Debug.assert(parameterIndex >= 0); return parameterIndex >= signature.minArgumentCount; } @@ -13874,6 +14064,16 @@ var ts; } return result; } + function resolveExternalModuleTypeByLiteral(name) { + var moduleSym = resolveExternalModuleName(name, name); + if (moduleSym) { + var resolvedModuleSymbol = resolveExternalModuleSymbol(moduleSym); + if (resolvedModuleSymbol) { + return getTypeOfSymbol(resolvedModuleSymbol); + } + } + return anyType; + } function getReturnTypeOfSignature(signature) { if (!signature.resolvedReturnType) { if (!pushTypeResolution(signature, 3)) { @@ -14335,11 +14535,12 @@ var ts; return links.resolvedType; } function getStringLiteralType(node) { - if (ts.hasProperty(stringLiteralTypes, node.text)) { - return stringLiteralTypes[node.text]; + var text = node.text; + if (ts.hasProperty(stringLiteralTypes, text)) { + return stringLiteralTypes[text]; } - var type = stringLiteralTypes[node.text] = createType(256); - type.text = ts.getTextOfNode(node); + var type = stringLiteralTypes[text] = createType(256); + type.text = text; return type; } function getTypeFromStringLiteral(node) { @@ -14808,7 +15009,7 @@ var ts; return false; } function hasExcessProperties(source, target, reportErrors) { - if (someConstituentTypeHasKind(target, 80896)) { + if (!(target.flags & 67108864) && someConstituentTypeHasKind(target, 80896)) { for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) { var prop = _a[_i]; if (!isKnownProperty(target, prop.name)) { @@ -14898,9 +15099,6 @@ var ts; return result; } function typeParameterIdenticalTo(source, target) { - if (source.symbol.name !== target.symbol.name) { - return 0; - } if (source.constraint === target.constraint) { return -1; } @@ -15345,18 +15543,24 @@ var ts; } return compareTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); } + function isMatchingSignature(source, target, partialMatch) { + if (source.parameters.length === target.parameters.length && + source.minArgumentCount === target.minArgumentCount && + source.hasRestParameter === target.hasRestParameter) { + return true; + } + if (partialMatch && source.minArgumentCount <= target.minArgumentCount && (source.hasRestParameter && !target.hasRestParameter || + source.hasRestParameter === target.hasRestParameter && source.parameters.length >= target.parameters.length)) { + return true; + } + return false; + } function compareSignatures(source, target, partialMatch, ignoreReturnTypes, compareTypes) { if (source === target) { return -1; } - if (source.parameters.length !== target.parameters.length || - source.minArgumentCount !== target.minArgumentCount || - source.hasRestParameter !== target.hasRestParameter) { - if (!partialMatch || - source.parameters.length < target.parameters.length && !source.hasRestParameter || - source.minArgumentCount > target.minArgumentCount) { - return 0; - } + if (!(isMatchingSignature(source, target, partialMatch))) { + return 0; } var result = -1; if (source.typeParameters && target.typeParameters) { @@ -15441,6 +15645,9 @@ var ts; function isTupleLikeType(type) { return !!getPropertyOfType(type, "0"); } + function isStringLiteralType(type) { + return type.flags & 256; + } function isTupleType(type) { return !!(type.flags & 8192); } @@ -16032,7 +16239,7 @@ var ts; } } function narrowTypeByInstanceof(type, expr, assumeTrue) { - if (isTypeAny(type) || !assumeTrue || expr.left.kind !== 69 || getResolvedSymbol(expr.left) !== symbol) { + if (isTypeAny(type) || expr.left.kind !== 69 || getResolvedSymbol(expr.left) !== symbol) { return type; } var rightType = checkExpression(expr.right); @@ -16060,6 +16267,12 @@ var ts; } } if (targetType) { + if (!assumeTrue) { + if (type.flags & 16384) { + return getUnionType(ts.filter(type.types, function (t) { return !isTypeSubtypeOf(t, targetType); })); + } + return type; + } return getNarrowedType(type, targetType); } return type; @@ -16471,6 +16684,9 @@ var ts; function getIndexTypeOfContextualType(type, kind) { return applyToContextualType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); }); } + function contextualTypeIsStringLiteralType(type) { + return !!(type.flags & 16384 ? ts.forEach(type.types, isStringLiteralType) : isStringLiteralType(type)); + } function contextualTypeIsTupleLikeType(type) { return !!(type.flags & 16384 ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type)); } @@ -16486,7 +16702,7 @@ var ts; } function getContextualTypeForObjectLiteralElement(element) { var objectLiteral = element.parent; - var type = getContextualType(objectLiteral); + var type = getApparentTypeOfContextualType(objectLiteral); if (type) { if (!ts.hasDynamicName(element)) { var symbolName = getSymbolOfNode(element).name; @@ -16502,7 +16718,7 @@ var ts; } function getContextualTypeForElementExpression(node) { var arrayLiteral = node.parent; - var type = getContextualType(arrayLiteral); + var type = getApparentTypeOfContextualType(arrayLiteral); if (type) { var index = ts.indexOf(arrayLiteral.elements, node); return getTypeOfPropertyOfContextualType(type, "" + index) @@ -16531,11 +16747,11 @@ var ts; } return undefined; } - function getContextualType(node) { - var type = getContextualTypeWorker(node); + function getApparentTypeOfContextualType(node) { + var type = getContextualType(node); return type && getApparentType(type); } - function getContextualTypeWorker(node) { + function getContextualType(node) { if (isInsideWithStatementBody(node)) { return undefined; } @@ -16601,7 +16817,7 @@ var ts; ts.Debug.assert(node.kind !== 143 || ts.isObjectLiteralMethod(node)); var type = ts.isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) - : getContextualType(node); + : getApparentTypeOfContextualType(node); if (!type) { return undefined; } @@ -16684,7 +16900,7 @@ var ts; type.pattern = node; return type; } - var contextualType = getContextualType(node); + var contextualType = getApparentTypeOfContextualType(node); if (contextualType && contextualTypeIsTupleLikeType(contextualType)) { var pattern = contextualType.pattern; if (pattern && (pattern.kind === 162 || pattern.kind === 164)) { @@ -16739,10 +16955,11 @@ var ts; checkGrammarObjectLiteralExpression(node, inDestructuringPattern); var propertiesTable = {}; var propertiesArray = []; - var contextualType = getContextualType(node); + var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 161 || contextualType.pattern.kind === 165); var typeFlags = 0; + var patternWithComputedProperties = false; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var memberDecl = _a[_i]; var member = memberDecl.symbol; @@ -16768,8 +16985,11 @@ var ts; if (isOptional) { prop.flags |= 536870912; } + if (ts.hasDynamicName(memberDecl)) { + patternWithComputedProperties = true; + } } - else if (contextualTypeHasPattern) { + else if (contextualTypeHasPattern && !(contextualType.flags & 67108864)) { var impliedProp = getPropertyOfType(contextualType, member.name); if (impliedProp) { prop.flags |= impliedProp.flags & 536870912; @@ -16812,7 +17032,7 @@ var ts; var numberIndexType = getIndexType(1); var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType); var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576; - result.flags |= 524288 | 4194304 | freshObjectLiteralFlag | (typeFlags & 14680064); + result.flags |= 524288 | 4194304 | freshObjectLiteralFlag | (typeFlags & 14680064) | (patternWithComputedProperties ? 67108864 : 0); if (inDestructuringPattern) { result.pattern = node; } @@ -18027,6 +18247,9 @@ var ts; return anyType; } } + if (ts.isInJavaScriptFile(node) && ts.isRequireCall(node)) { + return resolveExternalModuleTypeByLiteral(node.arguments[0]); + } return getReturnTypeOfSignature(signature); } function checkTaggedTemplateExpression(node) { @@ -18037,7 +18260,9 @@ var ts; var targetType = getTypeFromTypeNode(node.type); if (produceDiagnostics && targetType !== unknownType) { var widenedType = getWidenedType(exprType); - if (!(isTypeAssignableTo(targetType, widenedType))) { + var bothAreStringLike = someConstituentTypeHasKind(targetType, 258) && + someConstituentTypeHasKind(widenedType, 258); + if (!bothAreStringLike && !(isTypeAssignableTo(targetType, widenedType))) { checkTypeAssignableTo(exprType, targetType, node, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); } } @@ -18476,17 +18701,24 @@ var ts; var p = properties_3[_i]; if (p.kind === 245 || p.kind === 246) { var name_13 = p.name; + if (name_13.kind === 136) { + checkComputedPropertyName(name_13); + } + if (isComputedNonLiteralName(name_13)) { + continue; + } + var text = getTextOfPropertyName(name_13); var type = isTypeAny(sourceType) ? sourceType - : getTypeOfPropertyOfType(sourceType, name_13.text) || - isNumericLiteralName(name_13.text) && getIndexTypeOfType(sourceType, 1) || + : getTypeOfPropertyOfType(sourceType, text) || + isNumericLiteralName(text) && getIndexTypeOfType(sourceType, 1) || getIndexTypeOfType(sourceType, 0); if (type) { if (p.kind === 246) { checkDestructuringAssignment(p, type); } else { - checkDestructuringAssignment(p.initializer || name_13, type); + checkDestructuringAssignment(p.initializer, type); } } else { @@ -18664,6 +18896,9 @@ var ts; case 31: case 32: case 33: + if (someConstituentTypeHasKind(leftType, 258) && someConstituentTypeHasKind(rightType, 258)) { + return booleanType; + } if (!isTypeAssignableTo(leftType, rightType) && !isTypeAssignableTo(rightType, leftType)) { reportOperatorError(); } @@ -18771,6 +19006,13 @@ var ts; var type2 = checkExpression(node.whenFalse, contextualMapper); return getUnionType([type1, type2]); } + function checkStringLiteralExpression(node) { + var contextualType = getContextualType(node); + if (contextualType && contextualTypeIsStringLiteralType(contextualType)) { + return getStringLiteralType(node); + } + return stringType; + } function checkTemplateExpression(node) { ts.forEach(node.templateSpans, function (templateSpan) { checkExpression(templateSpan.expression); @@ -18809,7 +19051,7 @@ var ts; if (isInferentialContext(contextualMapper)) { var signature = getSingleCallSignature(type); if (signature && signature.typeParameters) { - var contextualType = getContextualType(node); + var contextualType = getApparentTypeOfContextualType(node); if (contextualType) { var contextualSignature = getSingleCallSignature(contextualType); if (contextualSignature && !contextualSignature.typeParameters) { @@ -18861,6 +19103,7 @@ var ts; case 183: return checkTemplateExpression(node); case 9: + return checkStringLiteralExpression(node); case 11: return stringType; case 10: @@ -19922,7 +20165,7 @@ var ts; return; } var parent = getDeclarationContainer(node); - if (parent.kind === 248 && ts.isExternalModule(parent)) { + if (parent.kind === 248 && ts.isExternalOrCommonJsModule(parent)) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } @@ -19993,6 +20236,11 @@ var ts; checkExpressionCached(node.initializer); } } + if (node.kind === 163) { + if (node.propertyName && node.propertyName.kind === 136) { + checkComputedPropertyName(node.propertyName); + } + } if (ts.isBindingPattern(node.name)) { ts.forEach(node.name.elements, checkSourceElement); } @@ -20351,6 +20599,7 @@ var ts; var firstDefaultClause; var hasDuplicateDefaultClause = false; var expressionType = checkExpression(node.expression); + var expressionTypeIsStringLike = someConstituentTypeHasKind(expressionType, 258); ts.forEach(node.caseBlock.clauses, function (clause) { if (clause.kind === 242 && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { @@ -20367,6 +20616,9 @@ var ts; if (produceDiagnostics && clause.kind === 241) { var caseClause = clause; var caseType = checkExpression(caseClause.expression); + if (expressionTypeIsStringLike && someConstituentTypeHasKind(caseType, 258)) { + return; + } if (!isTypeAssignableTo(expressionType, caseType)) { checkTypeAssignableTo(caseType, expressionType, caseClause.expression, undefined); } @@ -20774,11 +21026,14 @@ var ts; var enumIsConst = ts.isConst(node); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.name.kind === 136) { + if (isComputedNonLiteralName(member.name)) { error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums); } - else if (isNumericLiteralName(member.name.text)) { - error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name); + else { + var text = getTextOfPropertyName(member.name); + if (isNumericLiteralName(text)) { + error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name); + } } var previousEnumMemberIsNonConstant = autoValue === undefined; var initializer = member.initializer; @@ -21476,8 +21731,10 @@ var ts; function checkSourceFileWorker(node) { var links = getNodeLinks(node); if (!(links.flags & 1)) { - if (node.isDefaultLib && compilerOptions.skipDefaultLibCheck) { - return; + if (compilerOptions.skipDefaultLibCheck) { + if (node.hasNoDefaultLib) { + return; + } } checkGrammarSourceFile(node); emitExtends = false; @@ -21486,7 +21743,7 @@ var ts; potentialThisCollisions.length = 0; ts.forEach(node.statements, checkSourceElement); checkFunctionAndClassExpressionBodies(node); - if (ts.isExternalModule(node)) { + if (ts.isExternalOrCommonJsModule(node)) { checkExternalModuleExports(node); } if (potentialThisCollisions.length) { @@ -21564,7 +21821,7 @@ var ts; } switch (location.kind) { case 248: - if (!ts.isExternalModule(location)) { + if (!ts.isExternalOrCommonJsModule(location)) { break; } case 218: @@ -22123,15 +22380,24 @@ var ts; getReferencedValueDeclaration: getReferencedValueDeclaration, getTypeReferenceSerializationKind: getTypeReferenceSerializationKind, isOptionalParameter: isOptionalParameter, - isArgumentsLocalBinding: isArgumentsLocalBinding + isArgumentsLocalBinding: isArgumentsLocalBinding, + getExternalModuleFileFromDeclaration: getExternalModuleFileFromDeclaration }; } + function getExternalModuleFileFromDeclaration(declaration) { + var specifier = ts.getExternalModuleName(declaration); + var moduleSymbol = getSymbolAtLocation(specifier); + if (!moduleSymbol) { + return undefined; + } + return ts.getDeclarationOfKind(moduleSymbol, 248); + } function initializeTypeChecker() { ts.forEach(host.getSourceFiles(), function (file) { ts.bindSourceFile(file, compilerOptions); }); ts.forEach(host.getSourceFiles(), function (file) { - if (!ts.isExternalModule(file)) { + if (!ts.isExternalOrCommonJsModule(file)) { mergeSymbolTable(globals, file.locals); } }); @@ -22808,7 +23074,7 @@ var ts; } } function checkGrammarForNonSymbolComputedProperty(node, message) { - if (node.kind === 136 && !ts.isWellKnownSymbolSyntactically(node.expression)) { + if (ts.isDynamicName(node)) { return grammarErrorOnNode(node, message); } } @@ -23122,11 +23388,15 @@ var ts; var writeTextOfNode; var writer = createAndSetNewTextWriterWithSymbolWriter(); var enclosingDeclaration; - var currentSourceFile; + var currentText; + var currentLineMap; + var currentIdentifiers; + var isCurrentFileExternalModule; var reportedDeclarationError = false; var errorNameNode; var emitJsDocComments = compilerOptions.removeComments ? function (declaration) { } : writeJsDocComments; var emit = compilerOptions.stripInternal ? stripInternal : emitNode; + var noDeclare = !root; var moduleElementDeclarationEmitInfo = []; var asynchronousSubModuleDeclarationEmitInfo; var referencePathsOutput = ""; @@ -23162,21 +23432,53 @@ var ts; } else { var emittedReferencedFiles = []; + var prevModuleElementDeclarationEmitInfo = []; ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (!ts.isExternalModuleOrDeclarationFile(sourceFile)) { + if (!ts.isDeclarationFile(sourceFile)) { if (!compilerOptions.noResolve) { ts.forEach(sourceFile.referencedFiles, function (fileReference) { var referencedFile = ts.tryResolveScriptReference(host, sourceFile, fileReference); - if (referencedFile && (ts.isExternalModuleOrDeclarationFile(referencedFile) && + if (referencedFile && (ts.isDeclarationFile(referencedFile) && !ts.contains(emittedReferencedFiles, referencedFile))) { writeReferencePath(referencedFile); emittedReferencedFiles.push(referencedFile); } }); } + } + if (!ts.isExternalModuleOrDeclarationFile(sourceFile)) { + noDeclare = false; emitSourceFile(sourceFile); } + else if (ts.isExternalModule(sourceFile)) { + noDeclare = true; + write("declare module \"" + ts.getResolvedExternalModuleName(host, sourceFile) + "\" {"); + writeLine(); + increaseIndent(); + emitSourceFile(sourceFile); + decreaseIndent(); + write("}"); + writeLine(); + if (moduleElementDeclarationEmitInfo.length) { + var oldWriter = writer; + ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { + if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { + ts.Debug.assert(aliasEmitInfo.node.kind === 222); + createAndSetNewTextWriterWithSymbolWriter(); + ts.Debug.assert(aliasEmitInfo.indent === 1); + increaseIndent(); + writeImportDeclaration(aliasEmitInfo.node); + aliasEmitInfo.asynchronousOutput = writer.getText(); + decreaseIndent(); + } + }); + setWriter(oldWriter); + } + prevModuleElementDeclarationEmitInfo = prevModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); + moduleElementDeclarationEmitInfo = []; + } }); + moduleElementDeclarationEmitInfo = moduleElementDeclarationEmitInfo.concat(prevModuleElementDeclarationEmitInfo); } return { reportedDeclarationError: reportedDeclarationError, @@ -23185,13 +23487,12 @@ var ts; referencePathsOutput: referencePathsOutput }; function hasInternalAnnotation(range) { - var text = currentSourceFile.text; - var comment = text.substring(range.pos, range.end); + var comment = currentText.substring(range.pos, range.end); return comment.indexOf("@internal") >= 0; } function stripInternal(node) { if (node) { - var leadingCommentRanges = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos); + var leadingCommentRanges = ts.getLeadingCommentRanges(currentText, node.pos); if (ts.forEach(leadingCommentRanges, hasInternalAnnotation)) { return; } @@ -23272,7 +23573,7 @@ var ts; var errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccesibilityResult); if (errorInfo) { if (errorInfo.typeName) { - diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); + diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getTextOfNodeFromSourceText(currentText, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); } else { diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); @@ -23336,9 +23637,9 @@ var ts; } function writeJsDocComments(declaration) { if (declaration) { - var jsDocComments = ts.getJsDocComments(declaration, currentSourceFile); - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, declaration, jsDocComments); - ts.emitComments(currentSourceFile, writer, jsDocComments, true, newLine, ts.writeCommentRange); + var jsDocComments = ts.getJsDocCommentsFromText(declaration, currentText); + ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, declaration, jsDocComments); + ts.emitComments(currentText, currentLineMap, writer, jsDocComments, true, newLine, ts.writeCommentRange); } } function emitTypeWithNewGetSymbolAccessibilityDiagnostic(type, getSymbolAccessibilityDiagnostic) { @@ -23355,7 +23656,7 @@ var ts; case 103: case 97: case 9: - return writeTextOfNode(currentSourceFile, type); + return writeTextOfNode(currentText, type); case 188: return emitExpressionWithTypeArguments(type); case 151: @@ -23386,14 +23687,14 @@ var ts; } function writeEntityName(entityName) { if (entityName.kind === 69) { - writeTextOfNode(currentSourceFile, entityName); + writeTextOfNode(currentText, entityName); } else { var left = entityName.kind === 135 ? entityName.left : entityName.expression; var right = entityName.kind === 135 ? entityName.right : entityName.name; writeEntityName(left); write("."); - writeTextOfNode(currentSourceFile, right); + writeTextOfNode(currentText, right); } } function emitEntityName(entityName) { @@ -23421,7 +23722,7 @@ var ts; } } function emitTypePredicate(type) { - writeTextOfNode(currentSourceFile, type.parameterName); + writeTextOfNode(currentText, type.parameterName); write(" is "); emitType(type.type); } @@ -23461,20 +23762,23 @@ var ts; } } function emitSourceFile(node) { - currentSourceFile = node; + currentText = node.text; + currentLineMap = ts.getLineStarts(node); + currentIdentifiers = node.identifiers; + isCurrentFileExternalModule = ts.isExternalModule(node); enclosingDeclaration = node; - ts.emitDetachedComments(currentSourceFile, writer, ts.writeCommentRange, node, newLine, true); + ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, true); emitLines(node.statements); } function getExportDefaultTempVariableName() { var baseName = "_default"; - if (!ts.hasProperty(currentSourceFile.identifiers, baseName)) { + if (!ts.hasProperty(currentIdentifiers, baseName)) { return baseName; } var count = 0; while (true) { var name_18 = baseName + "_" + (++count); - if (!ts.hasProperty(currentSourceFile.identifiers, name_18)) { + if (!ts.hasProperty(currentIdentifiers, name_18)) { return name_18; } } @@ -23482,7 +23786,7 @@ var ts; function emitExportAssignment(node) { if (node.expression.kind === 69) { write(node.isExportEquals ? "export = " : "export default "); - writeTextOfNode(currentSourceFile, node.expression); + writeTextOfNode(currentText, node.expression); } else { var tempVarName = getExportDefaultTempVariableName(); @@ -23517,7 +23821,7 @@ var ts; writeModuleElement(node); } else if (node.kind === 221 || - (node.parent.kind === 248 && ts.isExternalModule(currentSourceFile))) { + (node.parent.kind === 248 && isCurrentFileExternalModule)) { var isVisible; if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 248) { asynchronousSubModuleDeclarationEmitInfo.push({ @@ -23569,14 +23873,14 @@ var ts; } } function emitModuleElementDeclarationFlags(node) { - if (node.parent === currentSourceFile) { + if (node.parent.kind === 248) { if (node.flags & 2) { write("export "); } if (node.flags & 512) { write("default "); } - else if (node.kind !== 215) { + else if (node.kind !== 215 && !noDeclare) { write("declare "); } } @@ -23601,7 +23905,7 @@ var ts; write("export "); } write("import "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); write(" = "); if (ts.isInternalModuleImportEqualsDeclaration(node)) { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.moduleReference, getImportEntityNameVisibilityError); @@ -23609,7 +23913,7 @@ var ts; } else { write("require("); - writeTextOfNode(currentSourceFile, ts.getExternalModuleImportEqualsDeclarationExpression(node)); + writeTextOfNode(currentText, ts.getExternalModuleImportEqualsDeclarationExpression(node)); write(");"); } writer.writeLine(); @@ -23643,7 +23947,7 @@ var ts; if (node.importClause) { var currentWriterPos = writer.getTextPos(); if (node.importClause.name && resolver.isDeclarationVisible(node.importClause)) { - writeTextOfNode(currentSourceFile, node.importClause.name); + writeTextOfNode(currentText, node.importClause.name); } if (node.importClause.namedBindings && isVisibleNamedBinding(node.importClause.namedBindings)) { if (currentWriterPos !== writer.getTextPos()) { @@ -23651,7 +23955,7 @@ var ts; } if (node.importClause.namedBindings.kind === 224) { write("* as "); - writeTextOfNode(currentSourceFile, node.importClause.namedBindings.name); + writeTextOfNode(currentText, node.importClause.namedBindings.name); } else { write("{ "); @@ -23661,16 +23965,28 @@ var ts; } write(" from "); } - writeTextOfNode(currentSourceFile, node.moduleSpecifier); + emitExternalModuleSpecifier(node.moduleSpecifier); write(";"); writer.writeLine(); } + function emitExternalModuleSpecifier(moduleSpecifier) { + if (moduleSpecifier.kind === 9 && (!root) && (compilerOptions.out || compilerOptions.outFile)) { + var moduleName = ts.getExternalModuleNameFromDeclaration(host, resolver, moduleSpecifier.parent); + if (moduleName) { + write("\""); + write(moduleName); + write("\""); + return; + } + } + writeTextOfNode(currentText, moduleSpecifier); + } function emitImportOrExportSpecifier(node) { if (node.propertyName) { - writeTextOfNode(currentSourceFile, node.propertyName); + writeTextOfNode(currentText, node.propertyName); write(" as "); } - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } function emitExportSpecifier(node) { emitImportOrExportSpecifier(node); @@ -23690,7 +24006,7 @@ var ts; } if (node.moduleSpecifier) { write(" from "); - writeTextOfNode(currentSourceFile, node.moduleSpecifier); + emitExternalModuleSpecifier(node.moduleSpecifier); } write(";"); writer.writeLine(); @@ -23704,11 +24020,11 @@ var ts; else { write("module "); } - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); while (node.body.kind !== 219) { node = node.body; write("."); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; @@ -23727,7 +24043,7 @@ var ts; emitJsDocComments(node); emitModuleElementDeclarationFlags(node); write("type "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); emitTypeParameters(node.typeParameters); write(" = "); emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.type, getTypeAliasDeclarationVisibilityError); @@ -23749,7 +24065,7 @@ var ts; write("const "); } write("enum "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); write(" {"); writeLine(); increaseIndent(); @@ -23760,7 +24076,7 @@ var ts; } function emitEnumMemberDeclaration(node) { emitJsDocComments(node); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); var enumMemberValue = resolver.getConstantValue(node); if (enumMemberValue !== undefined) { write(" = "); @@ -23777,7 +24093,7 @@ var ts; increaseIndent(); emitJsDocComments(node); decreaseIndent(); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); if (node.parent.kind === 152 || @@ -23887,7 +24203,7 @@ var ts; write("abstract "); } write("class "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; emitTypeParameters(node.typeParameters); @@ -23910,7 +24226,7 @@ var ts; emitJsDocComments(node); emitModuleElementDeclarationFlags(node); write("interface "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; emitTypeParameters(node.typeParameters); @@ -23940,7 +24256,7 @@ var ts; emitBindingPattern(node.name); } else { - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); if ((node.kind === 141 || node.kind === 140) && ts.hasQuestionToken(node)) { write("?"); } @@ -24014,7 +24330,7 @@ var ts; emitBindingPattern(bindingElement.name); } else { - writeTextOfNode(currentSourceFile, bindingElement.name); + writeTextOfNode(currentText, bindingElement.name); writeTypeOfDeclaration(bindingElement, undefined, getBindingElementTypeVisibilityError); } } @@ -24055,7 +24371,7 @@ var ts; emitJsDocComments(accessors.getAccessor); emitJsDocComments(accessors.setAccessor); emitClassMemberDeclarationFlags(node); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); if (!(node.flags & 16)) { accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); @@ -24136,13 +24452,13 @@ var ts; } if (node.kind === 213) { write("function "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } else if (node.kind === 144) { write("constructor"); } else { - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); if (ts.hasQuestionToken(node)) { write("?"); } @@ -24255,7 +24571,7 @@ var ts; emitBindingPattern(node.name); } else { - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } if (resolver.isOptionalParameter(node)) { write("?"); @@ -24354,7 +24670,7 @@ var ts; } else if (bindingElement.kind === 163) { if (bindingElement.propertyName) { - writeTextOfNode(currentSourceFile, bindingElement.propertyName); + writeTextOfNode(currentText, bindingElement.propertyName); write(": "); } if (bindingElement.name) { @@ -24366,7 +24682,7 @@ var ts; if (bindingElement.dotDotDotToken) { write("..."); } - writeTextOfNode(currentSourceFile, bindingElement.name); + writeTextOfNode(currentText, bindingElement.name); } } } @@ -24449,6 +24765,18 @@ var ts; return ts.isExternalModule(sourceFile) || ts.isDeclarationFile(sourceFile); } ts.isExternalModuleOrDeclarationFile = isExternalModuleOrDeclarationFile; + function getResolvedExternalModuleName(host, file) { + return file.moduleName || ts.getExternalModuleNameFromPath(host, file.fileName); + } + ts.getResolvedExternalModuleName = getResolvedExternalModuleName; + function getExternalModuleNameFromDeclaration(host, resolver, declaration) { + var file = resolver.getExternalModuleFileFromDeclaration(declaration); + if (!file || ts.isDeclarationFile(file)) { + return undefined; + } + return getResolvedExternalModuleName(host, file); + } + ts.getExternalModuleNameFromDeclaration = getExternalModuleNameFromDeclaration; var entities = { "quot": 0x0022, "amp": 0x0026, @@ -24718,15 +25046,19 @@ var ts; var newLine = host.getNewLine(); var jsxDesugaring = host.getCompilerOptions().jsx !== 1; var shouldEmitJsx = function (s) { return (s.languageVariant === 1 && !jsxDesugaring); }; + var outFile = compilerOptions.outFile || compilerOptions.out; + var emitJavaScript = createFileEmitter(); if (targetSourceFile === undefined) { - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (ts.shouldEmitToOwnFile(sourceFile, compilerOptions)) { - var jsFilePath = ts.getOwnEmitOutputFilePath(sourceFile, host, shouldEmitJsx(sourceFile) ? ".jsx" : ".js"); - emitFile(jsFilePath, sourceFile); - } - }); - if (compilerOptions.outFile || compilerOptions.out) { - emitFile(compilerOptions.outFile || compilerOptions.out); + if (outFile) { + emitFile(outFile); + } + else { + ts.forEach(host.getSourceFiles(), function (sourceFile) { + if (ts.shouldEmitToOwnFile(sourceFile, compilerOptions)) { + var jsFilePath = ts.getOwnEmitOutputFilePath(sourceFile, host, shouldEmitJsx(sourceFile) ? ".jsx" : ".js"); + emitFile(jsFilePath, sourceFile); + } + }); } } else { @@ -24734,8 +25066,8 @@ var ts; var jsFilePath = ts.getOwnEmitOutputFilePath(targetSourceFile, host, shouldEmitJsx(targetSourceFile) ? ".jsx" : ".js"); emitFile(jsFilePath, targetSourceFile); } - else if (!ts.isDeclarationFile(targetSourceFile) && (compilerOptions.outFile || compilerOptions.out)) { - emitFile(compilerOptions.outFile || compilerOptions.out); + else if (!ts.isDeclarationFile(targetSourceFile) && outFile) { + emitFile(outFile); } } diagnostics = ts.sortAndDeduplicateDiagnostics(diagnostics); @@ -24785,20 +25117,26 @@ var ts; } } } - function emitJavaScript(jsFilePath, root) { + function createFileEmitter() { var writer = ts.createTextWriter(newLine); var write = writer.write, writeTextOfNode = writer.writeTextOfNode, writeLine = writer.writeLine, increaseIndent = writer.increaseIndent, decreaseIndent = writer.decreaseIndent; var currentSourceFile; + var currentText; + var currentLineMap; + var currentFileIdentifiers; + var renamedDependencies; + var isEs6Module; + var isCurrentFileExternalModule; var exportFunctionForFile; - var generatedNameSet = {}; - var nodeToGeneratedName = []; + var generatedNameSet; + var nodeToGeneratedName; var computedPropertyNamesToGeneratedNames; var convertedLoopState; - var extendsEmitted = false; - var decorateEmitted = false; - var paramEmitted = false; - var awaiterEmitted = false; - var tempFlags = 0; + var extendsEmitted; + var decorateEmitted; + var paramEmitted; + var awaiterEmitted; + var tempFlags; var tempVariables; var tempParameters; var externalImports; @@ -24815,6 +25153,7 @@ var ts; var scopeEmitStart = function (scopeDeclaration, scopeName) { }; var scopeEmitEnd = function () { }; var sourceMapData; + var root; var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfPositionWorker; var moduleEmitDelegates = (_a = {}, _a[5] = emitES6Module, @@ -24824,30 +25163,75 @@ var ts; _a[1] = emitCommonJSModule, _a ); - if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) { - initializeEmitterWithSourceMaps(); - } - if (root) { - emitSourceFile(root); - } - else { - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (!isExternalModuleOrDeclarationFile(sourceFile)) { - emitSourceFile(sourceFile); + var bundleEmitDelegates = (_b = {}, + _b[5] = function () { }, + _b[2] = emitAMDModule, + _b[4] = emitSystemModule, + _b[3] = function () { }, + _b[1] = function () { }, + _b + ); + return doEmit; + function doEmit(jsFilePath, rootFile) { + writer.reset(); + currentSourceFile = undefined; + currentText = undefined; + currentLineMap = undefined; + exportFunctionForFile = undefined; + generatedNameSet = {}; + nodeToGeneratedName = []; + computedPropertyNamesToGeneratedNames = undefined; + convertedLoopState = undefined; + extendsEmitted = false; + decorateEmitted = false; + paramEmitted = false; + awaiterEmitted = false; + tempFlags = 0; + tempVariables = undefined; + tempParameters = undefined; + externalImports = undefined; + exportSpecifiers = undefined; + exportEquals = undefined; + hasExportStars = undefined; + detachedCommentsInfo = undefined; + sourceMapData = undefined; + isEs6Module = false; + renamedDependencies = undefined; + isCurrentFileExternalModule = false; + root = rootFile; + if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) { + initializeEmitterWithSourceMaps(jsFilePath, root); + } + if (root) { + emitSourceFile(root); + } + else { + if (modulekind) { + ts.forEach(host.getSourceFiles(), emitEmitHelpers); } - }); + ts.forEach(host.getSourceFiles(), function (sourceFile) { + if ((!isExternalModuleOrDeclarationFile(sourceFile)) || (modulekind && ts.isExternalModule(sourceFile))) { + emitSourceFile(sourceFile); + } + }); + } + writeLine(); + writeEmittedFiles(writer.getText(), jsFilePath, compilerOptions.emitBOM); } - writeLine(); - writeEmittedFiles(writer.getText(), compilerOptions.emitBOM); - return; function emitSourceFile(sourceFile) { currentSourceFile = sourceFile; + currentText = sourceFile.text; + currentLineMap = ts.getLineStarts(sourceFile); exportFunctionForFile = undefined; + isEs6Module = sourceFile.symbol && sourceFile.symbol.exports && !!sourceFile.symbol.exports["___esModule"]; + renamedDependencies = sourceFile.renamedDependencies; + currentFileIdentifiers = sourceFile.identifiers; + isCurrentFileExternalModule = ts.isExternalModule(sourceFile); emit(sourceFile); } function isUniqueName(name) { return !resolver.hasGlobalName(name) && - !ts.hasProperty(currentSourceFile.identifiers, name) && + !ts.hasProperty(currentFileIdentifiers, name) && !ts.hasProperty(generatedNameSet, name); } function makeTempVariableName(flags) { @@ -24920,7 +25304,7 @@ var ts; var id = ts.getNodeId(node); return nodeToGeneratedName[id] || (nodeToGeneratedName[id] = ts.unescapeIdentifier(generateNameForNode(node))); } - function initializeEmitterWithSourceMaps() { + function initializeEmitterWithSourceMaps(jsFilePath, root) { var sourceMapDir; var sourceMapSourceIndex = -1; var sourceMapNameIndexMap = {}; @@ -24989,7 +25373,7 @@ var ts; } } function recordSourceMapSpan(pos) { - var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos); + var sourceLinePos = ts.computeLineAndCharacterOfPosition(currentLineMap, pos); sourceLinePos.line++; sourceLinePos.character++; var emittedLine = writer.getLine(); @@ -25017,13 +25401,13 @@ var ts; } } function recordEmitNodeStartSpan(node) { - recordSourceMapSpan(ts.skipTrivia(currentSourceFile.text, node.pos)); + recordSourceMapSpan(ts.skipTrivia(currentText, node.pos)); } function recordEmitNodeEndSpan(node) { recordSourceMapSpan(node.end); } function writeTextWithSpanRecord(tokenKind, startPos, emitFn) { - var tokenStartPos = ts.skipTrivia(currentSourceFile.text, startPos); + var tokenStartPos = ts.skipTrivia(currentText, startPos); recordSourceMapSpan(tokenStartPos); var tokenEndPos = emitTokenText(tokenKind, tokenStartPos, emitFn); recordSourceMapSpan(tokenEndPos); @@ -25093,9 +25477,9 @@ var ts; sourceMapNameIndices.pop(); } ; - function writeCommentRangeWithMap(curentSourceFile, writer, comment, newLine) { + function writeCommentRangeWithMap(currentText, currentLineMap, writer, comment, newLine) { recordSourceMapSpan(comment.pos); - ts.writeCommentRange(currentSourceFile, writer, comment, newLine); + ts.writeCommentRange(currentText, currentLineMap, writer, comment, newLine); recordSourceMapSpan(comment.end); } function serializeSourceMapContents(version, file, sourceRoot, sources, names, mappings, sourcesContent) { @@ -25125,7 +25509,7 @@ var ts; return output; } } - function writeJavaScriptAndSourceMapFile(emitOutput, writeByteOrderMark) { + function writeJavaScriptAndSourceMapFile(emitOutput, jsFilePath, writeByteOrderMark) { encodeLastRecordedSourceMapSpan(); var sourceMapText = serializeSourceMapContents(3, sourceMapData.sourceMapFile, sourceMapData.sourceMapSourceRoot, sourceMapData.sourceMapSources, sourceMapData.sourceMapNames, sourceMapData.sourceMapMappings, sourceMapData.sourceMapSourcesContent); sourceMapDataList.push(sourceMapData); @@ -25138,7 +25522,7 @@ var ts; ts.writeFile(host, diagnostics, sourceMapData.sourceMapFilePath, sourceMapText, false); sourceMapUrl = "//# sourceMappingURL=" + sourceMapData.jsSourceMappingURL; } - writeJavaScriptFile(emitOutput + sourceMapUrl, writeByteOrderMark); + writeJavaScriptFile(emitOutput + sourceMapUrl, jsFilePath, writeByteOrderMark); } var sourceMapJsFile = ts.getBaseFileName(ts.normalizeSlashes(jsFilePath)); sourceMapData = { @@ -25201,7 +25585,7 @@ var ts; scopeEmitEnd = recordScopeNameEnd; writeComment = writeCommentRangeWithMap; } - function writeJavaScriptFile(emitOutput, writeByteOrderMark) { + function writeJavaScriptFile(emitOutput, jsFilePath, writeByteOrderMark) { ts.writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark); } function createTempVariable(flags) { @@ -25371,7 +25755,7 @@ var ts; return getQuotedEscapedLiteralText("\"", node.text, "\""); } if (node.parent) { - return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + return ts.getTextOfNodeFromSourceText(currentText, node); } switch (node.kind) { case 9: @@ -25393,7 +25777,7 @@ var ts; return leftQuote + ts.escapeNonAsciiCharacters(ts.escapeString(text)) + rightQuote; } function emitDownlevelRawTemplateLiteral(node) { - var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + var text = ts.getTextOfNodeFromSourceText(currentText, node); var isLast = node.kind === 11 || node.kind === 14; text = text.substring(1, text.length - (isLast ? 1 : 2)); text = text.replace(/\r\n?/g, "\n"); @@ -25723,7 +26107,7 @@ var ts; write(node.text); } else { - writeTextOfNode(currentSourceFile, node); + writeTextOfNode(currentText, node); } write("\""); } @@ -25819,7 +26203,7 @@ var ts; else if (declaration.kind === 226) { write(getGeneratedNameForNode(declaration.parent.parent.parent)); var name_23 = declaration.propertyName || declaration.name; - var identifier = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, name_23); + var identifier = ts.getTextOfNodeFromSourceText(currentText, name_23); if (languageVersion === 0 && identifier === "default") { write("[\"default\"]"); } @@ -25843,7 +26227,7 @@ var ts; write(node.text); } else { - writeTextOfNode(currentSourceFile, node); + writeTextOfNode(currentText, node); } } function isNameOfNestedRedeclaration(node) { @@ -25880,7 +26264,7 @@ var ts; write(node.text); } else { - writeTextOfNode(currentSourceFile, node); + writeTextOfNode(currentText, node); } } function emitThis(node) { @@ -26247,8 +26631,8 @@ var ts; return container && container.kind !== 248; } function emitShorthandPropertyAssignment(node) { - writeTextOfNode(currentSourceFile, node.name); - if (languageVersion < 2 || isNamespaceExportReference(node.name)) { + writeTextOfNode(currentText, node.name); + if (modulekind !== 5 || isNamespaceExportReference(node.name)) { write(": "); emit(node.name); } @@ -26298,10 +26682,10 @@ var ts; } emit(node.expression); var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); - var shouldEmitSpace; + var shouldEmitSpace = false; if (!indentedBeforeDot) { if (node.expression.kind === 8) { - var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node.expression); + var text = ts.getTextOfNodeFromSourceText(currentText, node.expression); shouldEmitSpace = text.indexOf(ts.tokenToString(21)) < 0; } else { @@ -27307,16 +27691,16 @@ var ts; emitToken(16, node.clauses.end); } function nodeStartPositionsAreOnSameLine(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node1.pos)) === - ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); + return ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node1.pos)) === + ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function nodeEndPositionsAreOnSameLine(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, node1.end) === - ts.getLineOfLocalPosition(currentSourceFile, node2.end); + return ts.getLineOfLocalPositionFromLineMap(currentLineMap, node1.end) === + ts.getLineOfLocalPositionFromLineMap(currentLineMap, node2.end); } function nodeEndIsOnSameLineAsNodeStart(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, node1.end) === - ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); + return ts.getLineOfLocalPositionFromLineMap(currentLineMap, node1.end) === + ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function emitCaseOrDefaultClause(node) { if (node.kind === 241) { @@ -27421,7 +27805,7 @@ var ts; if (node.parent.kind === 248) { ts.Debug.assert(!!(node.flags & 512) || node.kind === 227); if (modulekind === 1 || modulekind === 2 || modulekind === 3) { - if (!currentSourceFile.symbol.exports["___esModule"]) { + if (!isEs6Module) { if (languageVersion === 1) { write("Object.defineProperty(exports, \"__esModule\", { value: true });"); writeLine(); @@ -27584,12 +27968,18 @@ var ts; return node; } function createPropertyAccessForDestructuringProperty(object, propName) { - var syntheticName = ts.createSynthesizedNode(propName.kind); - syntheticName.text = propName.text; - if (syntheticName.kind !== 69) { - return createElementAccessExpression(object, syntheticName); + var index; + var nameIsComputed = propName.kind === 136; + if (nameIsComputed) { + index = ensureIdentifier(propName.expression, false); + } + else { + index = ts.createSynthesizedNode(propName.kind); + index.text = propName.text; } - return createPropertyAccessExpression(object, syntheticName); + return !nameIsComputed && index.kind === 69 + ? createPropertyAccessExpression(object, index) + : createElementAccessExpression(object, index); } function createSliceCall(value, sliceIndex) { var call = ts.createSynthesizedNode(168); @@ -28003,7 +28393,6 @@ var ts; var promiseConstructor = ts.getEntityNameFromTypeNode(node.type); var isArrowFunction = node.kind === 174; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 4096) !== 0; - var args; if (!isArrowFunction) { write(" {"); increaseIndent(); @@ -29177,8 +29566,8 @@ var ts; } } function tryRenameExternalModule(moduleName) { - if (currentSourceFile.renamedDependencies && ts.hasProperty(currentSourceFile.renamedDependencies, moduleName.text)) { - return "\"" + currentSourceFile.renamedDependencies[moduleName.text] + "\""; + if (renamedDependencies && ts.hasProperty(renamedDependencies, moduleName.text)) { + return "\"" + renamedDependencies[moduleName.text] + "\""; } return undefined; } @@ -29318,7 +29707,7 @@ var ts; return; } if (resolver.isReferencedAliasDeclaration(node) || - (!ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { + (!isCurrentFileExternalModule && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { emitLeadingComments(node); emitStart(node); var variableDeclarationIsHoisted = shouldHoistVariable(node, true); @@ -29530,7 +29919,7 @@ var ts; function getLocalNameForExternalImport(node) { var namespaceDeclaration = getNamespaceDeclarationNode(node); if (namespaceDeclaration && !isDefaultImport(node)) { - return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, namespaceDeclaration.name); + return ts.getTextOfNodeFromSourceText(currentText, namespaceDeclaration.name); } if (node.kind === 222 && node.importClause) { return getGeneratedNameForNode(node); @@ -29803,7 +30192,7 @@ var ts; ts.getEnclosingBlockScopeContainer(node).kind === 248; } function isCurrentFileSystemExternalModule() { - return modulekind === 4 && ts.isExternalModule(currentSourceFile); + return modulekind === 4 && isCurrentFileExternalModule; } function emitSystemModuleBody(node, dependencyGroups, startIndex) { emitVariableDeclarationsForImports(); @@ -29916,15 +30305,19 @@ var ts; writeLine(); write("}"); } - function emitSystemModule(node) { + function writeModuleName(node, emitRelativePathAsModuleName) { + var moduleName = node.moduleName; + if (moduleName || (emitRelativePathAsModuleName && (moduleName = getResolvedExternalModuleName(host, node)))) { + write("\"" + moduleName + "\", "); + } + } + function emitSystemModule(node, emitRelativePathAsModuleName) { collectExternalModuleInfo(node); ts.Debug.assert(!exportFunctionForFile); exportFunctionForFile = makeUniqueName("exports"); writeLine(); write("System.register("); - if (node.moduleName) { - write("\"" + node.moduleName + "\", "); - } + writeModuleName(node, emitRelativePathAsModuleName); write("["); var groupIndices = {}; var dependencyGroups = []; @@ -29942,6 +30335,12 @@ var ts; if (i !== 0) { write(", "); } + if (emitRelativePathAsModuleName) { + var name_29 = getExternalModuleNameFromDeclaration(host, resolver, externalImports[i]); + if (name_29) { + text = "\"" + name_29 + "\""; + } + } write(text); } write("], function(" + exportFunctionForFile + ") {"); @@ -29955,7 +30354,7 @@ var ts; writeLine(); write("});"); } - function getAMDDependencyNames(node, includeNonAmdDependencies) { + function getAMDDependencyNames(node, includeNonAmdDependencies, emitRelativePathAsModuleName) { var aliasedModuleNames = []; var unaliasedModuleNames = []; var importAliasNames = []; @@ -29972,6 +30371,12 @@ var ts; for (var _c = 0, externalImports_4 = externalImports; _c < externalImports_4.length; _c++) { var importNode = externalImports_4[_c]; var externalModuleName = getExternalModuleNameText(importNode); + if (emitRelativePathAsModuleName) { + var name_30 = getExternalModuleNameFromDeclaration(host, resolver, importNode); + if (name_30) { + externalModuleName = "\"" + name_30 + "\""; + } + } var importAliasName = getLocalNameForExternalImport(importNode); if (includeNonAmdDependencies && importAliasName) { aliasedModuleNames.push(externalModuleName); @@ -29983,8 +30388,8 @@ var ts; } return { aliasedModuleNames: aliasedModuleNames, unaliasedModuleNames: unaliasedModuleNames, importAliasNames: importAliasNames }; } - function emitAMDDependencies(node, includeNonAmdDependencies) { - var dependencyNames = getAMDDependencyNames(node, includeNonAmdDependencies); + function emitAMDDependencies(node, includeNonAmdDependencies, emitRelativePathAsModuleName) { + var dependencyNames = getAMDDependencyNames(node, includeNonAmdDependencies, emitRelativePathAsModuleName); emitAMDDependencyList(dependencyNames); write(", "); emitAMDFactoryHeader(dependencyNames); @@ -30011,15 +30416,13 @@ var ts; } write(") {"); } - function emitAMDModule(node) { + function emitAMDModule(node, emitRelativePathAsModuleName) { emitEmitHelpers(node); collectExternalModuleInfo(node); writeLine(); write("define("); - if (node.moduleName) { - write("\"" + node.moduleName + "\", "); - } - emitAMDDependencies(node, true); + writeModuleName(node, emitRelativePathAsModuleName); + emitAMDDependencies(node, true, emitRelativePathAsModuleName); increaseIndent(); var startIndex = emitDirectivePrologues(node.statements, true); emitExportStarHelper(); @@ -30225,8 +30628,13 @@ var ts; emitShebang(); emitDetachedCommentsAndUpdateCommentsInfo(node); if (ts.isExternalModule(node) || compilerOptions.isolatedModules) { - var emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[1]; - emitModule(node); + if (root || (!ts.isExternalModule(node) && compilerOptions.isolatedModules)) { + var emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[1]; + emitModule(node); + } + else { + bundleEmitDelegates[modulekind](node, true); + } } else { var startIndex = emitDirectivePrologues(node.statements, false); @@ -30470,7 +30878,7 @@ var ts; return detachedCommentsInfo !== undefined && ts.lastOrUndefined(detachedCommentsInfo).nodePos === pos; } function getLeadingCommentsWithoutDetachedComments() { - var leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, ts.lastOrUndefined(detachedCommentsInfo).detachedCommentEndPos); + var leadingComments = ts.getLeadingCommentRanges(currentText, ts.lastOrUndefined(detachedCommentsInfo).detachedCommentEndPos); if (detachedCommentsInfo.length - 1) { detachedCommentsInfo.pop(); } @@ -30480,10 +30888,10 @@ var ts; return leadingComments; } function isTripleSlashComment(comment) { - if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 47 && + if (currentText.charCodeAt(comment.pos + 1) === 47 && comment.pos + 2 < comment.end && - currentSourceFile.text.charCodeAt(comment.pos + 2) === 47) { - var textSubStr = currentSourceFile.text.substring(comment.pos, comment.end); + currentText.charCodeAt(comment.pos + 2) === 47) { + var textSubStr = currentText.substring(comment.pos, comment.end); return textSubStr.match(ts.fullTripleSlashReferencePathRegEx) || textSubStr.match(ts.fullTripleSlashAMDReferencePathRegEx) ? true : false; @@ -30497,7 +30905,7 @@ var ts; return getLeadingCommentsWithoutDetachedComments(); } else { - return ts.getLeadingCommentRangesOfNode(node, currentSourceFile); + return ts.getLeadingCommentRangesOfNodeFromText(node, currentText); } } } @@ -30505,7 +30913,7 @@ var ts; function getTrailingCommentsToEmit(node) { if (node.parent) { if (node.parent.kind === 248 || node.end !== node.parent.end) { - return ts.getTrailingCommentRanges(currentSourceFile.text, node.end); + return ts.getTrailingCommentRanges(currentText, node.end); } } } @@ -30528,22 +30936,22 @@ var ts; leadingComments = ts.filter(getLeadingCommentsToEmit(node), isTripleSlashComment); } } - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); - ts.emitComments(currentSourceFile, writer, leadingComments, true, newLine, writeComment); + ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, node, leadingComments); + ts.emitComments(currentText, currentLineMap, writer, leadingComments, true, newLine, writeComment); } function emitTrailingComments(node) { if (compilerOptions.removeComments) { return; } var trailingComments = getTrailingCommentsToEmit(node); - ts.emitComments(currentSourceFile, writer, trailingComments, false, newLine, writeComment); + ts.emitComments(currentText, currentLineMap, writer, trailingComments, false, newLine, writeComment); } function emitTrailingCommentsOfPosition(pos) { if (compilerOptions.removeComments) { return; } - var trailingComments = ts.getTrailingCommentRanges(currentSourceFile.text, pos); - ts.emitComments(currentSourceFile, writer, trailingComments, true, newLine, writeComment); + var trailingComments = ts.getTrailingCommentRanges(currentText, pos); + ts.emitComments(currentText, currentLineMap, writer, trailingComments, true, newLine, writeComment); } function emitLeadingCommentsOfPositionWorker(pos) { if (compilerOptions.removeComments) { @@ -30554,13 +30962,13 @@ var ts; leadingComments = getLeadingCommentsWithoutDetachedComments(); } else { - leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, pos); + leadingComments = ts.getLeadingCommentRanges(currentText, pos); } - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, { pos: pos, end: pos }, leadingComments); - ts.emitComments(currentSourceFile, writer, leadingComments, true, newLine, writeComment); + ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, { pos: pos, end: pos }, leadingComments); + ts.emitComments(currentText, currentLineMap, writer, leadingComments, true, newLine, writeComment); } function emitDetachedCommentsAndUpdateCommentsInfo(node) { - var currentDetachedCommentInfo = ts.emitDetachedComments(currentSourceFile, writer, writeComment, node, newLine, compilerOptions.removeComments); + var currentDetachedCommentInfo = ts.emitDetachedComments(currentText, currentLineMap, writer, writeComment, node, newLine, compilerOptions.removeComments); if (currentDetachedCommentInfo) { if (detachedCommentsInfo) { detachedCommentsInfo.push(currentDetachedCommentInfo); @@ -30571,12 +30979,12 @@ var ts; } } function emitShebang() { - var shebang = ts.getShebang(currentSourceFile.text); + var shebang = ts.getShebang(currentText); if (shebang) { write(shebang); } } - var _a; + var _a, _b; } function emitFile(jsFilePath, sourceFile) { emitJavaScript(jsFilePath, sourceFile); @@ -30632,11 +31040,11 @@ var ts; if (ts.getRootLength(moduleName) !== 0 || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { var failedLookupLocations = []; var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName)); - var resolvedFileName = loadNodeModuleFromFile(candidate, failedLookupLocations, host); + var resolvedFileName = loadNodeModuleFromFile(ts.supportedJsExtensions, candidate, failedLookupLocations, host); if (resolvedFileName) { return { resolvedModule: { resolvedFileName: resolvedFileName }, failedLookupLocations: failedLookupLocations }; } - resolvedFileName = loadNodeModuleFromDirectory(candidate, failedLookupLocations, host); + resolvedFileName = loadNodeModuleFromDirectory(ts.supportedJsExtensions, candidate, failedLookupLocations, host); return resolvedFileName ? { resolvedModule: { resolvedFileName: resolvedFileName }, failedLookupLocations: failedLookupLocations } : { resolvedModule: undefined, failedLookupLocations: failedLookupLocations }; @@ -30646,8 +31054,8 @@ var ts; } } ts.nodeModuleNameResolver = nodeModuleNameResolver; - function loadNodeModuleFromFile(candidate, failedLookupLocation, host) { - return ts.forEach(ts.moduleFileExtensions, tryLoad); + function loadNodeModuleFromFile(extensions, candidate, failedLookupLocation, host) { + return ts.forEach(extensions, tryLoad); function tryLoad(ext) { var fileName = ts.fileExtensionIs(candidate, ext) ? candidate : candidate + ext; if (host.fileExists(fileName)) { @@ -30659,7 +31067,7 @@ var ts; } } } - function loadNodeModuleFromDirectory(candidate, failedLookupLocation, host) { + function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocation, host) { var packageJsonPath = ts.combinePaths(candidate, "package.json"); if (host.fileExists(packageJsonPath)) { var jsonContent; @@ -30671,7 +31079,7 @@ var ts; jsonContent = { typings: undefined }; } if (jsonContent.typings) { - var result = loadNodeModuleFromFile(ts.normalizePath(ts.combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host); + var result = loadNodeModuleFromFile(extensions, ts.normalizePath(ts.combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host); if (result) { return result; } @@ -30680,7 +31088,7 @@ var ts; else { failedLookupLocation.push(packageJsonPath); } - return loadNodeModuleFromFile(ts.combinePaths(candidate, "index"), failedLookupLocation, host); + return loadNodeModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocation, host); } function loadModuleFromNodeModules(moduleName, directory, host) { var failedLookupLocations = []; @@ -30690,11 +31098,11 @@ var ts; if (baseName !== "node_modules") { var nodeModulesFolder = ts.combinePaths(directory, "node_modules"); var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName)); - var result = loadNodeModuleFromFile(candidate, failedLookupLocations, host); + var result = loadNodeModuleFromFile(ts.supportedExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations: failedLookupLocations }; } - result = loadNodeModuleFromDirectory(candidate, failedLookupLocations, host); + result = loadNodeModuleFromDirectory(ts.supportedExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations: failedLookupLocations }; } @@ -30719,9 +31127,10 @@ var ts; var searchName; var failedLookupLocations = []; var referencedSourceFile; + var extensions = compilerOptions.allowNonTsExtensions ? ts.supportedJsExtensions : ts.supportedExtensions; while (true) { searchName = ts.normalizePath(ts.combinePaths(searchPath, moduleName)); - referencedSourceFile = ts.forEach(ts.supportedExtensions, function (extension) { + referencedSourceFile = ts.forEach(extensions, function (extension) { if (extension === ".tsx" && !compilerOptions.jsx) { return undefined; } @@ -30749,10 +31158,8 @@ var ts; ts.classicNameResolver = classicNameResolver; ts.defaultInitCompilerOptions = { module: 1, - target: 0, + target: 1, noImplicitAny: false, - outDir: "built", - rootDir: ".", sourceMap: false }; function createCompilerHost(options, setParentNodes) { @@ -31110,35 +31517,47 @@ var ts; if (file.imports) { return; } + var isJavaScriptFile = ts.isSourceFileJavaScript(file); var imports; for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var node = _a[_i]; - collect(node, true); + collect(node, true, false); } file.imports = imports || emptyArray; - function collect(node, allowRelativeModuleNames) { - switch (node.kind) { - case 222: - case 221: - case 228: - var moduleNameExpr = ts.getExternalModuleName(node); - if (!moduleNameExpr || moduleNameExpr.kind !== 9) { + return; + function collect(node, allowRelativeModuleNames, collectOnlyRequireCalls) { + if (!collectOnlyRequireCalls) { + switch (node.kind) { + case 222: + case 221: + case 228: + var moduleNameExpr = ts.getExternalModuleName(node); + if (!moduleNameExpr || moduleNameExpr.kind !== 9) { + break; + } + if (!moduleNameExpr.text) { + break; + } + if (allowRelativeModuleNames || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { + (imports || (imports = [])).push(moduleNameExpr); + } break; - } - if (!moduleNameExpr.text) { + case 218: + if (node.name.kind === 9 && (node.flags & 4 || ts.isDeclarationFile(file))) { + ts.forEachChild(node.body, function (node) { + collect(node, false, collectOnlyRequireCalls); + }); + } break; - } - if (allowRelativeModuleNames || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { - (imports || (imports = [])).push(moduleNameExpr); - } - break; - case 218: - if (node.name.kind === 9 && (node.flags & 4 || ts.isDeclarationFile(file))) { - ts.forEachChild(node.body, function (node) { - collect(node, false); - }); - } - break; + } + } + if (isJavaScriptFile) { + if (ts.isRequireCall(node)) { + (imports || (imports = [])).push(node.arguments[0]); + } + else { + ts.forEachChild(node, function (node) { return collect(node, allowRelativeModuleNames, true); }); + } } } } @@ -31225,7 +31644,6 @@ var ts; } processImportedModules(file, basePath); if (isDefaultLib) { - file.isDefaultLib = true; files.unshift(file); } else { @@ -31298,6 +31716,9 @@ var ts; commonPathComponents.length = sourcePathComponents.length; } }); + if (!commonPathComponents) { + return currentDirectory; + } return ts.getNormalizedPathFromPathComponents(commonPathComponents); } function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) { @@ -31380,10 +31801,12 @@ var ts; if (options.module === 5 && languageVersion < 2) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_compile_modules_into_es2015_when_targeting_ES5_or_lower)); } + if (outFile && options.module && !(options.module === 2 || options.module === 4)) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, options.out ? "out" : "outFile")); + } if (options.outDir || options.sourceRoot || - (options.mapRoot && - (!outFile || firstExternalModuleSourceFile !== undefined))) { + options.mapRoot) { if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) { commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, currentDirectory); } @@ -31862,20 +32285,20 @@ var ts; var exclude = json["exclude"] instanceof Array ? ts.map(json["exclude"], ts.normalizeSlashes) : undefined; var sysFiles = host.readDirectory(basePath, ".ts", exclude).concat(host.readDirectory(basePath, ".tsx", exclude)); for (var i = 0; i < sysFiles.length; i++) { - var name_29 = sysFiles[i]; - if (ts.fileExtensionIs(name_29, ".d.ts")) { - var baseName = name_29.substr(0, name_29.length - ".d.ts".length); + var name_31 = sysFiles[i]; + if (ts.fileExtensionIs(name_31, ".d.ts")) { + var baseName = name_31.substr(0, name_31.length - ".d.ts".length); if (!ts.contains(sysFiles, baseName + ".tsx") && !ts.contains(sysFiles, baseName + ".ts")) { - fileNames.push(name_29); + fileNames.push(name_31); } } - else if (ts.fileExtensionIs(name_29, ".ts")) { - if (!ts.contains(sysFiles, name_29 + "x")) { - fileNames.push(name_29); + else if (ts.fileExtensionIs(name_31, ".ts")) { + if (!ts.contains(sysFiles, name_31 + "x")) { + fileNames.push(name_31); } } else { - fileNames.push(name_29); + fileNames.push(name_31); } } } @@ -31994,14 +32417,15 @@ var ts; var diagnostic = ts.createCompilerDiagnostic.apply(undefined, arguments); return diagnostic.messageText; } + function getRelativeFileName(fileName, host) { + return host ? ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); }) : fileName; + } function reportDiagnosticSimply(diagnostic, host) { var output = ""; if (diagnostic.file) { var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character; - var relativeFileName = host - ? ts.convertToRelativePath(diagnostic.file.fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); }) - : diagnostic.file.fileName; - output += diagnostic.file.fileName + "(" + (line + 1) + "," + (character + 1) + "): "; + var relativeFileName = getRelativeFileName(diagnostic.file.fileName, host); + output += relativeFileName + "(" + (line + 1) + "," + (character + 1) + "): "; } var category = ts.DiagnosticCategory[diagnostic.category].toLowerCase(); output += category + " TS" + diagnostic.code + ": " + ts.flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine) + ts.sys.newLine; @@ -32030,6 +32454,7 @@ var ts; var _a = ts.getLineAndCharacterOfPosition(file, start), firstLine = _a.line, firstLineChar = _a.character; var _b = ts.getLineAndCharacterOfPosition(file, start + length_3), lastLine = _b.line, lastLineChar = _b.character; var lastLineInFile = ts.getLineAndCharacterOfPosition(file, file.text.length).line; + var relativeFileName = getRelativeFileName(file.fileName, host); var hasMoreThanFiveLines = (lastLine - firstLine) >= 4; var gutterWidth = (lastLine + 1 + "").length; if (hasMoreThanFiveLines) { @@ -32065,7 +32490,7 @@ var ts; output += ts.sys.newLine; } output += ts.sys.newLine; - output += file.fileName + "(" + (firstLine + 1) + "," + (firstLineChar + 1) + "): "; + output += relativeFileName + "(" + (firstLine + 1) + "," + (firstLineChar + 1) + "): "; } var categoryColor = categoryFormatMap[diagnostic.category]; var category = ts.DiagnosticCategory[diagnostic.category].toLowerCase(); @@ -32191,8 +32616,19 @@ var ts; return; } } + if (!cachedConfigFileText) { + var error = ts.createCompilerDiagnostic(ts.Diagnostics.File_0_not_found, configFileName); + reportDiagnostics([error], undefined); + ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); + return; + } var result = ts.parseConfigFileTextToJson(configFileName, cachedConfigFileText); var configObject = result.config; + if (!configObject) { + reportDiagnostics([result.error], undefined); + ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); + return; + } var configParseResult = ts.parseJsonConfigFileContent(configObject, ts.sys, ts.getDirectoryPath(configFileName)); if (configParseResult.errors.length > 0) { reportDiagnostics(configParseResult.errors, undefined); @@ -32455,10 +32891,10 @@ var ts; function serializeCompilerOptions(options) { var result = {}; var optionsNameMap = ts.getOptionNameMap().optionNameMap; - for (var name_30 in options) { - if (ts.hasProperty(options, name_30)) { - var value = options[name_30]; - switch (name_30) { + for (var name_32 in options) { + if (ts.hasProperty(options, name_32)) { + var value = options[name_32]; + switch (name_32) { case "init": case "watch": case "version": @@ -32466,17 +32902,17 @@ var ts; case "project": break; default: - var optionDefinition = optionsNameMap[name_30.toLowerCase()]; + var optionDefinition = optionsNameMap[name_32.toLowerCase()]; if (optionDefinition) { if (typeof optionDefinition.type === "string") { - result[name_30] = value; + result[name_32] = value; } else { var typeMap = optionDefinition.type; for (var key in typeMap) { if (ts.hasProperty(typeMap, key)) { if (typeMap[key] === value) - result[name_30] = key; + result[name_32] = key; } } } diff --git a/lib/tsserver.js b/lib/tsserver.js index 2893dab82ef3c..9f0c167408090 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -665,7 +665,7 @@ var ts; } ts.fileExtensionIs = fileExtensionIs; ts.supportedExtensions = [".ts", ".tsx", ".d.ts"]; - ts.moduleFileExtensions = ts.supportedExtensions; + ts.supportedJsExtensions = ts.supportedExtensions.concat(".js", ".jsx"); function isSupportedSourceFileName(fileName) { if (!fileName) { return false; @@ -716,17 +716,16 @@ var ts; } function Signature(checker) { } + function Node(kind, pos, end) { + this.kind = kind; + this.pos = pos; + this.end = end; + this.flags = 0; + this.parent = undefined; + } ts.objectAllocator = { - getNodeConstructor: function (kind) { - function Node(pos, end) { - this.pos = pos; - this.end = end; - this.flags = 0; - this.parent = undefined; - } - Node.prototype = { kind: kind }; - return Node; - }, + getNodeConstructor: function () { return Node; }, + getSourceFileConstructor: function () { return Node; }, getSymbolConstructor: function () { return Symbol; }, getTypeConstructor: function () { return Type; }, getSignatureConstructor: function () { return Signature; } @@ -1003,7 +1002,16 @@ var ts; if (writeByteOrderMark) { data = "\uFEFF" + data; } - _fs.writeFileSync(fileName, data, "utf8"); + var fd; + try { + fd = _fs.openSync(fileName, "w"); + _fs.writeSync(fd, data, undefined, "utf8"); + } + finally { + if (fd !== undefined) { + _fs.closeSync(fd); + } + } } function getCanonicalPath(path) { return useCaseSensitiveFileNames ? path.toLowerCase() : path; @@ -1688,6 +1696,7 @@ var ts; Disallow_inconsistently_cased_references_to_the_same_file: { code: 6078, category: ts.DiagnosticCategory.Message, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", message: "Disallow inconsistently-cased references to the same file." }, Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_or_react_6080", message: "Specify JSX code generation: 'preserve' or 'react'" }, Argument_for_jsx_must_be_preserve_or_react: { code: 6081, category: ts.DiagnosticCategory.Message, key: "Argument_for_jsx_must_be_preserve_or_react_6081", message: "Argument for '--jsx' must be 'preserve' or 'react'." }, + Only_amd_and_system_modules_are_supported_alongside_0: { code: 6082, category: ts.DiagnosticCategory.Error, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", message: "Only 'amd' and 'system' modules are supported alongside --{0}." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_an_1_type_7005", message: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter_0_implicitly_has_an_1_type_7006", message: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member_0_implicitly_has_an_1_type_7008", message: "Member '{0}' implicitly has an '{1}' type." }, @@ -2148,7 +2157,7 @@ var ts; function getCommentRanges(text, pos, trailing) { var result; var collecting = trailing || pos === 0; - while (true) { + while (pos < text.length) { var ch = text.charCodeAt(pos); switch (ch) { case 13: @@ -2217,6 +2226,7 @@ var ts; } return result; } + return result; } function getLeadingCommentRanges(text, pos) { return getCommentRanges(text, pos, false); @@ -2312,7 +2322,7 @@ var ts; error(ts.Diagnostics.Digit_expected); } } - return +(text.substring(start, end)); + return "" + +(text.substring(start, end)); } function scanOctalDigits() { var start = pos; @@ -2704,7 +2714,7 @@ var ts; return pos++, token = 36; case 46: if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = "" + scanNumber(); + tokenValue = scanNumber(); return token = 8; } if (text.charCodeAt(pos + 1) === 46 && text.charCodeAt(pos + 2) === 46) { @@ -2801,7 +2811,7 @@ var ts; case 55: case 56: case 57: - tokenValue = "" + scanNumber(); + tokenValue = scanNumber(); return token = 8; case 58: return pos++, token = 54; @@ -3879,6 +3889,10 @@ var ts; return file.externalModuleIndicator !== undefined; } ts.isExternalModule = isExternalModule; + function isExternalOrCommonJsModule(file) { + return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined; + } + ts.isExternalOrCommonJsModule = isExternalOrCommonJsModule; function isDeclarationFile(file) { return (file.flags & 4096) !== 0; } @@ -3925,18 +3939,26 @@ var ts; return ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos); } ts.getLeadingCommentRangesOfNode = getLeadingCommentRangesOfNode; + function getLeadingCommentRangesOfNodeFromText(node, text) { + return ts.getLeadingCommentRanges(text, node.pos); + } + ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText; function getJsDocComments(node, sourceFileOfNode) { + return getJsDocCommentsFromText(node, sourceFileOfNode.text); + } + ts.getJsDocComments = getJsDocComments; + function getJsDocCommentsFromText(node, text) { var commentRanges = (node.kind === 138 || node.kind === 137) ? - ts.concatenate(ts.getTrailingCommentRanges(sourceFileOfNode.text, node.pos), ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos)) : - getLeadingCommentRangesOfNode(node, sourceFileOfNode); + ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : + getLeadingCommentRangesOfNodeFromText(node, text); return ts.filter(commentRanges, isJsDocComment); function isJsDocComment(comment) { - return sourceFileOfNode.text.charCodeAt(comment.pos + 1) === 42 && - sourceFileOfNode.text.charCodeAt(comment.pos + 2) === 42 && - sourceFileOfNode.text.charCodeAt(comment.pos + 3) !== 47; + return text.charCodeAt(comment.pos + 1) === 42 && + text.charCodeAt(comment.pos + 2) === 42 && + text.charCodeAt(comment.pos + 3) !== 47; } } - ts.getJsDocComments = getJsDocComments; + ts.getJsDocCommentsFromText = getJsDocCommentsFromText; ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isTypeNode(node) { @@ -4465,6 +4487,41 @@ var ts; return node.kind === 221 && node.moduleReference.kind !== 232; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; + function isSourceFileJavaScript(file) { + return isInJavaScriptFile(file); + } + ts.isSourceFileJavaScript = isSourceFileJavaScript; + function isInJavaScriptFile(node) { + return node && !!(node.parserContextFlags & 32); + } + ts.isInJavaScriptFile = isInJavaScriptFile; + function isRequireCall(expression) { + return expression.kind === 168 && + expression.expression.kind === 69 && + expression.expression.text === "require" && + expression.arguments.length === 1 && + expression.arguments[0].kind === 9; + } + ts.isRequireCall = isRequireCall; + function isExportsPropertyAssignment(expression) { + return isInJavaScriptFile(expression) && + (expression.kind === 181) && + (expression.operatorToken.kind === 56) && + (expression.left.kind === 166) && + (expression.left.expression.kind === 69) && + ((expression.left.expression).text === "exports"); + } + ts.isExportsPropertyAssignment = isExportsPropertyAssignment; + function isModuleExportsAssignment(expression) { + return isInJavaScriptFile(expression) && + (expression.kind === 181) && + (expression.operatorToken.kind === 56) && + (expression.left.kind === 166) && + (expression.left.expression.kind === 69) && + ((expression.left.expression).text === "module") && + (expression.left.name.text === "exports"); + } + ts.isModuleExportsAssignment = isModuleExportsAssignment; function getExternalModuleName(node) { if (node.kind === 222) { return node.moduleSpecifier; @@ -4776,8 +4833,8 @@ var ts; function getFileReferenceFromReferencePath(comment, commentRange) { var simpleReferenceRegEx = /^\/\/\/\s*/gim; - if (simpleReferenceRegEx.exec(comment)) { - if (isNoDefaultLibRegEx.exec(comment)) { + if (simpleReferenceRegEx.test(comment)) { + if (isNoDefaultLibRegEx.test(comment)) { return { isNoDefaultLib: true }; @@ -4819,12 +4876,20 @@ var ts; return isFunctionLike(node) && (node.flags & 256) !== 0 && !isAccessor(node); } ts.isAsyncFunctionLike = isAsyncFunctionLike; + function isStringOrNumericLiteral(kind) { + return kind === 9 || kind === 8; + } + ts.isStringOrNumericLiteral = isStringOrNumericLiteral; function hasDynamicName(declaration) { - return declaration.name && - declaration.name.kind === 136 && - !isWellKnownSymbolSyntactically(declaration.name.expression); + return declaration.name && isDynamicName(declaration.name); } ts.hasDynamicName = hasDynamicName; + function isDynamicName(name) { + return name.kind === 136 && + !isStringOrNumericLiteral(name.expression.kind) && + !isWellKnownSymbolSyntactically(name.expression); + } + ts.isDynamicName = isDynamicName; function isWellKnownSymbolSyntactically(node) { return isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression); } @@ -5045,11 +5110,11 @@ var ts; } ts.getIndentSize = getIndentSize; function createTextWriter(newLine) { - var output = ""; - var indent = 0; - var lineStart = true; - var lineCount = 0; - var linePos = 0; + var output; + var indent; + var lineStart; + var lineCount; + var linePos; function write(s) { if (s && s.length) { if (lineStart) { @@ -5059,6 +5124,13 @@ var ts; output += s; } } + function reset() { + output = ""; + indent = 0; + lineStart = true; + lineCount = 0; + linePos = 0; + } function rawWrite(s) { if (s !== undefined) { if (lineStart) { @@ -5085,9 +5157,10 @@ var ts; lineStart = true; } } - function writeTextOfNode(sourceFile, node) { - write(getSourceTextOfNodeFromSourceFile(sourceFile, node)); + function writeTextOfNode(text, node) { + write(getTextOfNodeFromSourceText(text, node)); } + reset(); return { write: write, rawWrite: rawWrite, @@ -5100,10 +5173,17 @@ var ts; getTextPos: function () { return output.length; }, getLine: function () { return lineCount + 1; }, getColumn: function () { return lineStart ? indent * getIndentSize() + 1 : output.length - linePos + 1; }, - getText: function () { return output; } + getText: function () { return output; }, + reset: reset }; } ts.createTextWriter = createTextWriter; + function getExternalModuleNameFromPath(host, fileName) { + var dir = host.getCurrentDirectory(); + var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, fileName, dir, function (f) { return host.getCanonicalFileName(f); }, false); + return ts.removeFileExtension(relativePath); + } + ts.getExternalModuleNameFromPath = getExternalModuleNameFromPath; function getOwnEmitOutputFilePath(sourceFile, host, extension) { var compilerOptions = host.getCompilerOptions(); var emitOutputFilePathWithoutExtension; @@ -5132,6 +5212,10 @@ var ts; return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; } ts.getLineOfLocalPosition = getLineOfLocalPosition; + function getLineOfLocalPositionFromLineMap(lineMap, pos) { + return ts.computeLineAndCharacterOfPosition(lineMap, pos).line; + } + ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { if (member.kind === 144 && nodeIsPresent(member.body)) { @@ -5202,21 +5286,21 @@ var ts; }; } ts.getAllAccessorDeclarations = getAllAccessorDeclarations; - function emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments) { + function emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments) { if (leadingComments && leadingComments.length && node.pos !== leadingComments[0].pos && - getLineOfLocalPosition(currentSourceFile, node.pos) !== getLineOfLocalPosition(currentSourceFile, leadingComments[0].pos)) { + getLineOfLocalPositionFromLineMap(lineMap, node.pos) !== getLineOfLocalPositionFromLineMap(lineMap, leadingComments[0].pos)) { writer.writeLine(); } } ts.emitNewLineBeforeLeadingComments = emitNewLineBeforeLeadingComments; - function emitComments(currentSourceFile, writer, comments, trailingSeparator, newLine, writeComment) { + function emitComments(text, lineMap, writer, comments, trailingSeparator, newLine, writeComment) { var emitLeadingSpace = !trailingSeparator; ts.forEach(comments, function (comment) { if (emitLeadingSpace) { writer.write(" "); emitLeadingSpace = false; } - writeComment(currentSourceFile, writer, comment, newLine); + writeComment(text, lineMap, writer, comment, newLine); if (comment.hasTrailingNewLine) { writer.writeLine(); } @@ -5229,16 +5313,16 @@ var ts; }); } ts.emitComments = emitComments; - function emitDetachedComments(currentSourceFile, writer, writeComment, node, newLine, removeComments) { + function emitDetachedComments(text, lineMap, writer, writeComment, node, newLine, removeComments) { var leadingComments; var currentDetachedCommentInfo; if (removeComments) { if (node.pos === 0) { - leadingComments = ts.filter(ts.getLeadingCommentRanges(currentSourceFile.text, node.pos), isPinnedComment); + leadingComments = ts.filter(ts.getLeadingCommentRanges(text, node.pos), isPinnedComment); } } else { - leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos); + leadingComments = ts.getLeadingCommentRanges(text, node.pos); } if (leadingComments) { var detachedComments = []; @@ -5246,8 +5330,8 @@ var ts; for (var _i = 0, leadingComments_1 = leadingComments; _i < leadingComments_1.length; _i++) { var comment = leadingComments_1[_i]; if (lastComment) { - var lastCommentLine = getLineOfLocalPosition(currentSourceFile, lastComment.end); - var commentLine = getLineOfLocalPosition(currentSourceFile, comment.pos); + var lastCommentLine = getLineOfLocalPositionFromLineMap(lineMap, lastComment.end); + var commentLine = getLineOfLocalPositionFromLineMap(lineMap, comment.pos); if (commentLine >= lastCommentLine + 2) { break; } @@ -5256,37 +5340,37 @@ var ts; lastComment = comment; } if (detachedComments.length) { - var lastCommentLine = getLineOfLocalPosition(currentSourceFile, ts.lastOrUndefined(detachedComments).end); - var nodeLine = getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.pos)); + var lastCommentLine = getLineOfLocalPositionFromLineMap(lineMap, ts.lastOrUndefined(detachedComments).end); + var nodeLine = getLineOfLocalPositionFromLineMap(lineMap, ts.skipTrivia(text, node.pos)); if (nodeLine >= lastCommentLine + 2) { - emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); - emitComments(currentSourceFile, writer, detachedComments, true, newLine, writeComment); + emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments); + emitComments(text, lineMap, writer, detachedComments, true, newLine, writeComment); currentDetachedCommentInfo = { nodePos: node.pos, detachedCommentEndPos: ts.lastOrUndefined(detachedComments).end }; } } } return currentDetachedCommentInfo; function isPinnedComment(comment) { - return currentSourceFile.text.charCodeAt(comment.pos + 1) === 42 && - currentSourceFile.text.charCodeAt(comment.pos + 2) === 33; + return text.charCodeAt(comment.pos + 1) === 42 && + text.charCodeAt(comment.pos + 2) === 33; } } ts.emitDetachedComments = emitDetachedComments; - function writeCommentRange(currentSourceFile, writer, comment, newLine) { - if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42) { - var firstCommentLineAndCharacter = ts.getLineAndCharacterOfPosition(currentSourceFile, comment.pos); - var lineCount = ts.getLineStarts(currentSourceFile).length; + function writeCommentRange(text, lineMap, writer, comment, newLine) { + if (text.charCodeAt(comment.pos + 1) === 42) { + var firstCommentLineAndCharacter = ts.computeLineAndCharacterOfPosition(lineMap, comment.pos); + var lineCount = lineMap.length; var firstCommentLineIndent; for (var pos = comment.pos, currentLine = firstCommentLineAndCharacter.line; pos < comment.end; currentLine++) { var nextLineStart = (currentLine + 1) === lineCount - ? currentSourceFile.text.length + 1 - : getStartPositionOfLine(currentLine + 1, currentSourceFile); + ? text.length + 1 + : lineMap[currentLine + 1]; if (pos !== comment.pos) { if (firstCommentLineIndent === undefined) { - firstCommentLineIndent = calculateIndent(getStartPositionOfLine(firstCommentLineAndCharacter.line, currentSourceFile), comment.pos); + firstCommentLineIndent = calculateIndent(text, lineMap[firstCommentLineAndCharacter.line], comment.pos); } var currentWriterIndentSpacing = writer.getIndent() * getIndentSize(); - var spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(pos, nextLineStart); + var spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(text, pos, nextLineStart); if (spacesToEmit > 0) { var numberOfSingleSpacesToEmit = spacesToEmit % getIndentSize(); var indentSizeSpaceString = getIndentString((spacesToEmit - numberOfSingleSpacesToEmit) / getIndentSize()); @@ -5300,40 +5384,40 @@ var ts; writer.rawWrite(""); } } - writeTrimmedCurrentLine(pos, nextLineStart); + writeTrimmedCurrentLine(text, comment, writer, newLine, pos, nextLineStart); pos = nextLineStart; } } else { - writer.write(currentSourceFile.text.substring(comment.pos, comment.end)); - } - function writeTrimmedCurrentLine(pos, nextLineStart) { - var end = Math.min(comment.end, nextLineStart - 1); - var currentLineText = currentSourceFile.text.substring(pos, end).replace(/^\s+|\s+$/g, ""); - if (currentLineText) { - writer.write(currentLineText); - if (end !== comment.end) { - writer.writeLine(); - } - } - else { - writer.writeLiteral(newLine); + writer.write(text.substring(comment.pos, comment.end)); + } + } + ts.writeCommentRange = writeCommentRange; + function writeTrimmedCurrentLine(text, comment, writer, newLine, pos, nextLineStart) { + var end = Math.min(comment.end, nextLineStart - 1); + var currentLineText = text.substring(pos, end).replace(/^\s+|\s+$/g, ""); + if (currentLineText) { + writer.write(currentLineText); + if (end !== comment.end) { + writer.writeLine(); } } - function calculateIndent(pos, end) { - var currentLineIndent = 0; - for (; pos < end && ts.isWhiteSpace(currentSourceFile.text.charCodeAt(pos)); pos++) { - if (currentSourceFile.text.charCodeAt(pos) === 9) { - currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); - } - else { - currentLineIndent++; - } + else { + writer.writeLiteral(newLine); + } + } + function calculateIndent(text, pos, end) { + var currentLineIndent = 0; + for (; pos < end && ts.isWhiteSpace(text.charCodeAt(pos)); pos++) { + if (text.charCodeAt(pos) === 9) { + currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); + } + else { + currentLineIndent++; } - return currentLineIndent; } + return currentLineIndent; } - ts.writeCommentRange = writeCommentRange; function modifierToFlag(token) { switch (token) { case 113: return 64; @@ -5427,14 +5511,14 @@ var ts; return symbol && symbol.valueDeclaration && (symbol.valueDeclaration.flags & 512) ? symbol.valueDeclaration.localSymbol : undefined; } ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault; - function isJavaScript(fileName) { - return ts.fileExtensionIs(fileName, ".js"); + function hasJavaScriptFileExtension(fileName) { + return ts.fileExtensionIs(fileName, ".js") || ts.fileExtensionIs(fileName, ".jsx"); } - ts.isJavaScript = isJavaScript; - function isTsx(fileName) { - return ts.fileExtensionIs(fileName, ".tsx"); + ts.hasJavaScriptFileExtension = hasJavaScriptFileExtension; + function allowsJsxExpressions(fileName) { + return ts.fileExtensionIs(fileName, ".tsx") || ts.fileExtensionIs(fileName, ".jsx"); } - ts.isTsx = isTsx; + ts.allowsJsxExpressions = allowsJsxExpressions; function getExpandedCharCodes(input) { var output = []; var length = input.length; @@ -5644,14 +5728,16 @@ var ts; })(ts || (ts = {})); var ts; (function (ts) { - var nodeConstructors = new Array(272); ts.parseTime = 0; - function getNodeConstructor(kind) { - return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)); - } - ts.getNodeConstructor = getNodeConstructor; + var NodeConstructor; + var SourceFileConstructor; function createNode(kind, pos, end) { - return new (getNodeConstructor(kind))(pos, end); + if (kind === 248) { + return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); + } + else { + return new (NodeConstructor || (NodeConstructor = ts.objectAllocator.getNodeConstructor()))(kind, pos, end); + } } ts.createNode = createNode; function visitNode(cbNode, node) { @@ -6050,6 +6136,8 @@ var ts; (function (Parser) { var scanner = ts.createScanner(2, true); var disallowInAndDecoratorContext = 1 | 4; + var NodeConstructor; + var SourceFileConstructor; var sourceFile; var parseDiagnostics; var syntaxCursor; @@ -6062,13 +6150,16 @@ var ts; var contextFlags; var parseErrorBeforeNextFinishedNode = false; function parseSourceFile(fileName, _sourceText, languageVersion, _syntaxCursor, setParentNodes) { - initializeState(fileName, _sourceText, languageVersion, _syntaxCursor); + var isJavaScriptFile = ts.hasJavaScriptFileExtension(fileName) || _sourceText.lastIndexOf("// @language=javascript", 0) === 0; + initializeState(fileName, _sourceText, languageVersion, isJavaScriptFile, _syntaxCursor); var result = parseSourceFileWorker(fileName, languageVersion, setParentNodes); clearState(); return result; } Parser.parseSourceFile = parseSourceFile; - function initializeState(fileName, _sourceText, languageVersion, _syntaxCursor) { + function initializeState(fileName, _sourceText, languageVersion, isJavaScriptFile, _syntaxCursor) { + NodeConstructor = ts.objectAllocator.getNodeConstructor(); + SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor(); sourceText = _sourceText; syntaxCursor = _syntaxCursor; parseDiagnostics = []; @@ -6076,12 +6167,12 @@ var ts; identifiers = {}; identifierCount = 0; nodeCount = 0; - contextFlags = ts.isJavaScript(fileName) ? 32 : 0; + contextFlags = isJavaScriptFile ? 32 : 0; parseErrorBeforeNextFinishedNode = false; scanner.setText(sourceText); scanner.setOnError(scanError); scanner.setScriptTarget(languageVersion); - scanner.setLanguageVariant(ts.isTsx(fileName) ? 1 : 0); + scanner.setLanguageVariant(ts.allowsJsxExpressions(fileName) ? 1 : 0); } function clearState() { scanner.setText(""); @@ -6094,6 +6185,9 @@ var ts; } function parseSourceFileWorker(fileName, languageVersion, setParentNodes) { sourceFile = createSourceFile(fileName, languageVersion); + if (contextFlags & 32) { + sourceFile.parserContextFlags = 32; + } token = nextToken(); processReferenceComments(sourceFile); sourceFile.statements = parseList(0, parseStatement); @@ -6107,7 +6201,7 @@ var ts; if (setParentNodes) { fixupParentReferences(sourceFile); } - if (ts.isJavaScript(fileName)) { + if (ts.isSourceFileJavaScript(sourceFile)) { addJSDocComments(); } return sourceFile; @@ -6153,15 +6247,14 @@ var ts; } Parser.fixupParentReferences = fixupParentReferences; function createSourceFile(fileName, languageVersion) { - var sourceFile = createNode(248, 0); - sourceFile.pos = 0; - sourceFile.end = sourceText.length; + var sourceFile = new SourceFileConstructor(248, 0, sourceText.length); + nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; sourceFile.languageVersion = languageVersion; sourceFile.fileName = ts.normalizePath(fileName); sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 4096 : 0; - sourceFile.languageVariant = ts.isTsx(sourceFile.fileName) ? 1 : 0; + sourceFile.languageVariant = ts.allowsJsxExpressions(sourceFile.fileName) ? 1 : 0; return sourceFile; } function setContextFlag(val, flag) { @@ -6383,7 +6476,7 @@ var ts; if (!(pos >= 0)) { pos = scanner.getStartPos(); } - return new (nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)))(pos, pos); + return new NodeConstructor(kind, pos, pos); } function finishNode(node, end) { node.end = end === undefined ? scanner.getStartPos() : end; @@ -6521,7 +6614,7 @@ var ts; case 12: return token === 19 || token === 37 || isLiteralPropertyName(); case 9: - return isLiteralPropertyName(); + return token === 19 || isLiteralPropertyName(); case 7: if (token === 15) { return lookAhead(isValidHeritageClauseObjectLiteral); @@ -7042,9 +7135,7 @@ var ts; } function parseParameterType() { if (parseOptional(54)) { - return token === 9 - ? parseLiteralNode(true) - : parseType(); + return parseType(); } return undefined; } @@ -7301,6 +7392,8 @@ var ts; case 131: var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReferenceOrTypePredicate(); + case 9: + return parseLiteralNode(true); case 103: case 97: return parseTokenNode(); @@ -7330,6 +7423,7 @@ var ts; case 19: case 25: case 92: + case 9: return true; case 17: return lookAhead(isStartOfParenthesizedOrFunctionType); @@ -7843,7 +7937,6 @@ var ts; var unaryOperator = token; var simpleUnaryExpression = parseSimpleUnaryExpression(); if (token === 38) { - var diagnostic; var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); if (simpleUnaryExpression.kind === 171) { parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); @@ -9507,7 +9600,7 @@ var ts; } JSDocParser.isJSDocType = isJSDocType; function parseJSDocTypeExpressionForTests(content, start, length) { - initializeState("file.js", content, 2, undefined); + initializeState("file.js", content, 2, true, undefined); var jsDocTypeExpression = parseJSDocTypeExpression(start, length); var diagnostics = parseDiagnostics; clearState(); @@ -9758,7 +9851,7 @@ var ts; } } function parseIsolatedJSDocComment(content, start, length) { - initializeState("file.js", content, 2, undefined); + initializeState("file.js", content, 2, true, undefined); var jsDocComment = parseJSDocComment(undefined, start, length); var diagnostics = parseDiagnostics; clearState(); @@ -10394,6 +10487,9 @@ var ts; } if (node.name.kind === 136) { var nameExpression = node.name.expression; + if (ts.isStringOrNumericLiteral(nameExpression.kind)) { + return nameExpression.text; + } ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression)); return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text); } @@ -10414,6 +10510,8 @@ var ts; return "__export"; case 227: return node.isExportEquals ? "export=" : "default"; + case 181: + return "export="; case 213: case 214: return node.flags & 512 ? "default" : undefined; @@ -11033,6 +11131,14 @@ var ts; case 69: return checkStrictModeIdentifier(node); case 181: + if (ts.isInJavaScriptFile(node)) { + if (ts.isExportsPropertyAssignment(node)) { + bindExportsPropertyAssignment(node); + } + else if (ts.isModuleExportsAssignment(node)) { + bindModuleExportsAssignment(node); + } + } return checkStrictModeBinaryExpression(node); case 244: return checkStrictModeCatchClause(node); @@ -11092,6 +11198,11 @@ var ts; checkStrictModeFunctionName(node); var bindingName = node.name ? node.name.text : "__function"; return bindAnonymousDeclaration(node, 16, bindingName); + case 168: + if (ts.isInJavaScriptFile(node)) { + bindCallExpression(node); + } + break; case 186: case 214: return bindClassLikeDeclaration(node); @@ -11121,14 +11232,18 @@ var ts; function bindSourceFileIfExternalModule() { setExportContextFlag(file); if (ts.isExternalModule(file)) { - bindAnonymousDeclaration(file, 512, "\"" + ts.removeFileExtension(file.fileName) + "\""); + bindSourceFileAsExternalModule(); } } + function bindSourceFileAsExternalModule() { + bindAnonymousDeclaration(file, 512, "\"" + ts.removeFileExtension(file.fileName) + "\""); + } function bindExportAssignment(node) { + var boundExpression = node.kind === 227 ? node.expression : node.right; if (!container.symbol || !container.symbol.exports) { bindAnonymousDeclaration(node, 8388608, getDeclarationName(node)); } - else if (node.expression.kind === 69) { + else if (boundExpression.kind === 69) { declareSymbol(container.symbol.exports, container.symbol, node, 8388608, 107455 | 8388608); } else { @@ -11148,6 +11263,25 @@ var ts; declareSymbolAndAddToSymbolTable(node, 8388608, 8388608); } } + function setCommonJsModuleIndicator(node) { + if (!file.commonJsModuleIndicator) { + file.commonJsModuleIndicator = node; + bindSourceFileAsExternalModule(); + } + } + function bindExportsPropertyAssignment(node) { + setCommonJsModuleIndicator(node); + declareSymbol(file.symbol.exports, file.symbol, node.left, 4 | 7340032, 0); + } + function bindModuleExportsAssignment(node) { + setCommonJsModuleIndicator(node); + bindExportAssignment(node); + } + function bindCallExpression(node) { + if (!file.commonJsModuleIndicator && ts.isRequireCall(node)) { + setCommonJsModuleIndicator(node); + } + } function bindClassLikeDeclaration(node) { if (node.kind === 214) { bindBlockScopedDeclaration(node, 32, 899519); @@ -11268,7 +11402,7 @@ var ts; function checkUnreachable(node) { switch (currentReachabilityState) { case 4: - var reportError = ts.isStatement(node) || + var reportError = (ts.isStatement(node) && node.kind !== 194) || node.kind === 214 || (node.kind === 218 && shouldReportErrorOnModuleDeclaration(node)) || (node.kind === 217 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); @@ -11364,7 +11498,7 @@ var ts; symbolToString: symbolToString, getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, getRootSymbols: getRootSymbols, - getContextualType: getContextualType, + getContextualType: getApparentTypeOfContextualType, getFullyQualifiedName: getFullyQualifiedName, getResolvedSignature: getResolvedSignature, getConstantValue: getConstantValue, @@ -11620,7 +11754,7 @@ var ts; return ts.getAncestor(node, 248); } function isGlobalSourceFile(node) { - return node.kind === 248 && !ts.isExternalModule(node); + return node.kind === 248 && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -11706,23 +11840,24 @@ var ts; } switch (location.kind) { case 248: - if (!ts.isExternalModule(location)) + if (!ts.isExternalOrCommonJsModule(location)) break; case 218: var moduleExports = getSymbolOfNode(location).exports; if (location.kind === 248 || (location.kind === 218 && location.name.kind === 9)) { + if (result = moduleExports["default"]) { + var localSymbol = ts.getLocalSymbolForExportDefault(result); + if (localSymbol && (result.flags & meaning) && localSymbol.name === name) { + break loop; + } + result = undefined; + } if (ts.hasProperty(moduleExports, name) && moduleExports[name].flags === 8388608 && ts.getDeclarationOfKind(moduleExports[name], 230)) { break; } - result = moduleExports["default"]; - var localSymbol = ts.getLocalSymbolForExportDefault(result); - if (result && localSymbol && (result.flags & meaning) && localSymbol.name === name) { - break loop; - } - result = undefined; } if (result = getSymbol(moduleExports, name, meaning & 8914931)) { break loop; @@ -12080,6 +12215,9 @@ var ts; if (moduleName === undefined) { return; } + if (moduleName.indexOf("!") >= 0) { + moduleName = moduleName.substr(0, moduleName.indexOf("!")); + } var isRelative = ts.isExternalModuleNameRelative(moduleName); if (!isRelative) { var symbol = getSymbol(globals, "\"" + moduleName + "\"", 512); @@ -12250,7 +12388,7 @@ var ts; } switch (location_1.kind) { case 248: - if (!ts.isExternalModule(location_1)) { + if (!ts.isExternalOrCommonJsModule(location_1)) { break; } case 218: @@ -12377,7 +12515,7 @@ var ts; } function hasExternalModuleSymbol(declaration) { return (declaration.kind === 218 && declaration.name.kind === 9) || - (declaration.kind === 248 && ts.isExternalModule(declaration)); + (declaration.kind === 248 && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -12575,7 +12713,7 @@ var ts; writeAnonymousType(type, flags); } else if (type.flags & 256) { - writer.writeStringLiteral(type.text); + writer.writeStringLiteral("\"" + ts.escapeString(type.text) + "\""); } else { writePunctuation(writer, 15); @@ -12939,7 +13077,7 @@ var ts; } } else if (node.kind === 248) { - return ts.isExternalModule(node) ? node : undefined; + return ts.isExternalOrCommonJsModule(node) ? node : undefined; } } ts.Debug.fail("getContainingModule cant reach here"); @@ -13144,6 +13282,23 @@ var ts; var symbol = getSymbolOfNode(node); return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node); } + function getTextOfPropertyName(name) { + switch (name.kind) { + case 69: + return name.text; + case 9: + case 8: + return name.text; + case 136: + if (ts.isStringOrNumericLiteral(name.expression.kind)) { + return name.expression.text; + } + } + return undefined; + } + function isComputedNonLiteralName(name) { + return name.kind === 136 && !ts.isStringOrNumericLiteral(name.expression.kind); + } function getTypeForBindingElement(declaration) { var pattern = declaration.parent; var parentType = getTypeForBindingElementParent(pattern.parent); @@ -13159,8 +13314,12 @@ var ts; var type; if (pattern.kind === 161) { var name_11 = declaration.propertyName || declaration.name; - type = getTypeOfPropertyOfType(parentType, name_11.text) || - isNumericLiteralName(name_11.text) && getIndexTypeOfType(parentType, 1) || + if (isComputedNonLiteralName(name_11)) { + return anyType; + } + var text = getTextOfPropertyName(name_11); + type = getTypeOfPropertyOfType(parentType, text) || + isNumericLiteralName(text) && getIndexTypeOfType(parentType, 1) || getIndexTypeOfType(parentType, 0); if (!type) { error(name_11, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_11)); @@ -13238,10 +13397,16 @@ var ts; } function getTypeFromObjectBindingPattern(pattern, includePatternInType) { var members = {}; + var hasComputedProperties = false; ts.forEach(pattern.elements, function (e) { - var flags = 4 | 67108864 | (e.initializer ? 536870912 : 0); var name = e.propertyName || e.name; - var symbol = createSymbol(flags, name.text); + if (isComputedNonLiteralName(name)) { + hasComputedProperties = true; + return; + } + var text = getTextOfPropertyName(name); + var flags = 4 | 67108864 | (e.initializer ? 536870912 : 0); + var symbol = createSymbol(flags, text); symbol.type = getTypeFromBindingElement(e, includePatternInType); symbol.bindingElement = e; members[symbol.name] = symbol; @@ -13250,6 +13415,9 @@ var ts; if (includePatternInType) { result.pattern = pattern; } + if (hasComputedProperties) { + result.flags |= 67108864; + } return result; } function getTypeFromArrayBindingPattern(pattern, includePatternInType) { @@ -13300,6 +13468,12 @@ var ts; if (declaration.kind === 227) { return links.type = checkExpression(declaration.expression); } + if (declaration.kind === 181) { + return links.type = checkExpression(declaration.right); + } + if (declaration.kind === 166) { + return checkExpressionCached(declaration.parent.right); + } if (!pushTypeResolution(symbol, 0)) { return unknownType; } @@ -13549,17 +13723,19 @@ var ts; } function resolveBaseTypesOfClass(type) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; - var baseContructorType = getBaseConstructorTypeOfClass(type); - if (!(baseContructorType.flags & 80896)) { + var baseConstructorType = getBaseConstructorTypeOfClass(type); + if (!(baseConstructorType.flags & 80896)) { return; } var baseTypeNode = getBaseTypeNodeOfClass(type); var baseType; - if (baseContructorType.symbol && baseContructorType.symbol.flags & 32) { - baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseContructorType.symbol); + var originalBaseType = baseConstructorType && baseConstructorType.symbol ? getDeclaredTypeOfSymbol(baseConstructorType.symbol) : undefined; + if (baseConstructorType.symbol && baseConstructorType.symbol.flags & 32 && + areAllOuterTypeParametersApplied(originalBaseType)) { + baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol); } else { - var constructors = getInstantiatedConstructorsForTypeArguments(baseContructorType, baseTypeNode.typeArguments); + var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments); if (!constructors.length) { error(baseTypeNode.expression, ts.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments); return; @@ -13584,6 +13760,15 @@ var ts; type.resolvedBaseTypes.push(baseType); } } + function areAllOuterTypeParametersApplied(type) { + var outerTypeParameters = type.outerTypeParameters; + if (outerTypeParameters) { + var last = outerTypeParameters.length - 1; + var typeArguments = type.typeArguments; + return outerTypeParameters[last].symbol !== typeArguments[last].symbol; + } + return true; + } function resolveBaseTypesOfInterface(type) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { @@ -13655,7 +13840,7 @@ var ts; type.typeArguments = type.typeParameters; type.thisType = createType(512 | 33554432); type.thisType.symbol = symbol; - type.thisType.constraint = getTypeWithThisArgument(type); + type.thisType.constraint = type; } } return links.declaredType; @@ -14130,14 +14315,19 @@ var ts; type = getApparentType(type); return type.flags & 49152 ? getPropertiesOfUnionOrIntersectionType(type) : getPropertiesOfObjectType(type); } + function getApparentTypeOfTypeParameter(type) { + if (!type.resolvedApparentType) { + var constraintType = getConstraintOfTypeParameter(type); + while (constraintType && constraintType.flags & 512) { + constraintType = getConstraintOfTypeParameter(constraintType); + } + type.resolvedApparentType = getTypeWithThisArgument(constraintType || emptyObjectType, type); + } + return type.resolvedApparentType; + } function getApparentType(type) { if (type.flags & 512) { - do { - type = getConstraintOfTypeParameter(type); - } while (type && type.flags & 512); - if (!type) { - type = emptyObjectType; - } + type = getApparentTypeOfTypeParameter(type); } if (type.flags & 258) { type = globalStringType; @@ -14290,7 +14480,7 @@ var ts; if (node.initializer) { var signatureDeclaration = node.parent; var signature = getSignatureFromDeclaration(signatureDeclaration); - var parameterIndex = signatureDeclaration.parameters.indexOf(node); + var parameterIndex = ts.indexOf(signatureDeclaration.parameters, node); ts.Debug.assert(parameterIndex >= 0); return parameterIndex >= signature.minArgumentCount; } @@ -14385,6 +14575,16 @@ var ts; } return result; } + function resolveExternalModuleTypeByLiteral(name) { + var moduleSym = resolveExternalModuleName(name, name); + if (moduleSym) { + var resolvedModuleSymbol = resolveExternalModuleSymbol(moduleSym); + if (resolvedModuleSymbol) { + return getTypeOfSymbol(resolvedModuleSymbol); + } + } + return anyType; + } function getReturnTypeOfSignature(signature) { if (!signature.resolvedReturnType) { if (!pushTypeResolution(signature, 3)) { @@ -14846,11 +15046,12 @@ var ts; return links.resolvedType; } function getStringLiteralType(node) { - if (ts.hasProperty(stringLiteralTypes, node.text)) { - return stringLiteralTypes[node.text]; + var text = node.text; + if (ts.hasProperty(stringLiteralTypes, text)) { + return stringLiteralTypes[text]; } - var type = stringLiteralTypes[node.text] = createType(256); - type.text = ts.getTextOfNode(node); + var type = stringLiteralTypes[text] = createType(256); + type.text = text; return type; } function getTypeFromStringLiteral(node) { @@ -15319,7 +15520,7 @@ var ts; return false; } function hasExcessProperties(source, target, reportErrors) { - if (someConstituentTypeHasKind(target, 80896)) { + if (!(target.flags & 67108864) && someConstituentTypeHasKind(target, 80896)) { for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) { var prop = _a[_i]; if (!isKnownProperty(target, prop.name)) { @@ -15409,9 +15610,6 @@ var ts; return result; } function typeParameterIdenticalTo(source, target) { - if (source.symbol.name !== target.symbol.name) { - return 0; - } if (source.constraint === target.constraint) { return -1; } @@ -15856,18 +16054,24 @@ var ts; } return compareTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); } + function isMatchingSignature(source, target, partialMatch) { + if (source.parameters.length === target.parameters.length && + source.minArgumentCount === target.minArgumentCount && + source.hasRestParameter === target.hasRestParameter) { + return true; + } + if (partialMatch && source.minArgumentCount <= target.minArgumentCount && (source.hasRestParameter && !target.hasRestParameter || + source.hasRestParameter === target.hasRestParameter && source.parameters.length >= target.parameters.length)) { + return true; + } + return false; + } function compareSignatures(source, target, partialMatch, ignoreReturnTypes, compareTypes) { if (source === target) { return -1; } - if (source.parameters.length !== target.parameters.length || - source.minArgumentCount !== target.minArgumentCount || - source.hasRestParameter !== target.hasRestParameter) { - if (!partialMatch || - source.parameters.length < target.parameters.length && !source.hasRestParameter || - source.minArgumentCount > target.minArgumentCount) { - return 0; - } + if (!(isMatchingSignature(source, target, partialMatch))) { + return 0; } var result = -1; if (source.typeParameters && target.typeParameters) { @@ -15952,6 +16156,9 @@ var ts; function isTupleLikeType(type) { return !!getPropertyOfType(type, "0"); } + function isStringLiteralType(type) { + return type.flags & 256; + } function isTupleType(type) { return !!(type.flags & 8192); } @@ -16543,7 +16750,7 @@ var ts; } } function narrowTypeByInstanceof(type, expr, assumeTrue) { - if (isTypeAny(type) || !assumeTrue || expr.left.kind !== 69 || getResolvedSymbol(expr.left) !== symbol) { + if (isTypeAny(type) || expr.left.kind !== 69 || getResolvedSymbol(expr.left) !== symbol) { return type; } var rightType = checkExpression(expr.right); @@ -16571,6 +16778,12 @@ var ts; } } if (targetType) { + if (!assumeTrue) { + if (type.flags & 16384) { + return getUnionType(ts.filter(type.types, function (t) { return !isTypeSubtypeOf(t, targetType); })); + } + return type; + } return getNarrowedType(type, targetType); } return type; @@ -16982,6 +17195,9 @@ var ts; function getIndexTypeOfContextualType(type, kind) { return applyToContextualType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); }); } + function contextualTypeIsStringLiteralType(type) { + return !!(type.flags & 16384 ? ts.forEach(type.types, isStringLiteralType) : isStringLiteralType(type)); + } function contextualTypeIsTupleLikeType(type) { return !!(type.flags & 16384 ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type)); } @@ -16997,7 +17213,7 @@ var ts; } function getContextualTypeForObjectLiteralElement(element) { var objectLiteral = element.parent; - var type = getContextualType(objectLiteral); + var type = getApparentTypeOfContextualType(objectLiteral); if (type) { if (!ts.hasDynamicName(element)) { var symbolName = getSymbolOfNode(element).name; @@ -17013,7 +17229,7 @@ var ts; } function getContextualTypeForElementExpression(node) { var arrayLiteral = node.parent; - var type = getContextualType(arrayLiteral); + var type = getApparentTypeOfContextualType(arrayLiteral); if (type) { var index = ts.indexOf(arrayLiteral.elements, node); return getTypeOfPropertyOfContextualType(type, "" + index) @@ -17042,11 +17258,11 @@ var ts; } return undefined; } - function getContextualType(node) { - var type = getContextualTypeWorker(node); + function getApparentTypeOfContextualType(node) { + var type = getContextualType(node); return type && getApparentType(type); } - function getContextualTypeWorker(node) { + function getContextualType(node) { if (isInsideWithStatementBody(node)) { return undefined; } @@ -17112,7 +17328,7 @@ var ts; ts.Debug.assert(node.kind !== 143 || ts.isObjectLiteralMethod(node)); var type = ts.isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) - : getContextualType(node); + : getApparentTypeOfContextualType(node); if (!type) { return undefined; } @@ -17195,7 +17411,7 @@ var ts; type.pattern = node; return type; } - var contextualType = getContextualType(node); + var contextualType = getApparentTypeOfContextualType(node); if (contextualType && contextualTypeIsTupleLikeType(contextualType)) { var pattern = contextualType.pattern; if (pattern && (pattern.kind === 162 || pattern.kind === 164)) { @@ -17250,10 +17466,11 @@ var ts; checkGrammarObjectLiteralExpression(node, inDestructuringPattern); var propertiesTable = {}; var propertiesArray = []; - var contextualType = getContextualType(node); + var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 161 || contextualType.pattern.kind === 165); var typeFlags = 0; + var patternWithComputedProperties = false; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var memberDecl = _a[_i]; var member = memberDecl.symbol; @@ -17279,8 +17496,11 @@ var ts; if (isOptional) { prop.flags |= 536870912; } + if (ts.hasDynamicName(memberDecl)) { + patternWithComputedProperties = true; + } } - else if (contextualTypeHasPattern) { + else if (contextualTypeHasPattern && !(contextualType.flags & 67108864)) { var impliedProp = getPropertyOfType(contextualType, member.name); if (impliedProp) { prop.flags |= impliedProp.flags & 536870912; @@ -17323,7 +17543,7 @@ var ts; var numberIndexType = getIndexType(1); var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType); var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576; - result.flags |= 524288 | 4194304 | freshObjectLiteralFlag | (typeFlags & 14680064); + result.flags |= 524288 | 4194304 | freshObjectLiteralFlag | (typeFlags & 14680064) | (patternWithComputedProperties ? 67108864 : 0); if (inDestructuringPattern) { result.pattern = node; } @@ -18538,6 +18758,9 @@ var ts; return anyType; } } + if (ts.isInJavaScriptFile(node) && ts.isRequireCall(node)) { + return resolveExternalModuleTypeByLiteral(node.arguments[0]); + } return getReturnTypeOfSignature(signature); } function checkTaggedTemplateExpression(node) { @@ -18548,7 +18771,9 @@ var ts; var targetType = getTypeFromTypeNode(node.type); if (produceDiagnostics && targetType !== unknownType) { var widenedType = getWidenedType(exprType); - if (!(isTypeAssignableTo(targetType, widenedType))) { + var bothAreStringLike = someConstituentTypeHasKind(targetType, 258) && + someConstituentTypeHasKind(widenedType, 258); + if (!bothAreStringLike && !(isTypeAssignableTo(targetType, widenedType))) { checkTypeAssignableTo(exprType, targetType, node, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); } } @@ -18987,17 +19212,24 @@ var ts; var p = properties_3[_i]; if (p.kind === 245 || p.kind === 246) { var name_14 = p.name; + if (name_14.kind === 136) { + checkComputedPropertyName(name_14); + } + if (isComputedNonLiteralName(name_14)) { + continue; + } + var text = getTextOfPropertyName(name_14); var type = isTypeAny(sourceType) ? sourceType - : getTypeOfPropertyOfType(sourceType, name_14.text) || - isNumericLiteralName(name_14.text) && getIndexTypeOfType(sourceType, 1) || + : getTypeOfPropertyOfType(sourceType, text) || + isNumericLiteralName(text) && getIndexTypeOfType(sourceType, 1) || getIndexTypeOfType(sourceType, 0); if (type) { if (p.kind === 246) { checkDestructuringAssignment(p, type); } else { - checkDestructuringAssignment(p.initializer || name_14, type); + checkDestructuringAssignment(p.initializer, type); } } else { @@ -19175,6 +19407,9 @@ var ts; case 31: case 32: case 33: + if (someConstituentTypeHasKind(leftType, 258) && someConstituentTypeHasKind(rightType, 258)) { + return booleanType; + } if (!isTypeAssignableTo(leftType, rightType) && !isTypeAssignableTo(rightType, leftType)) { reportOperatorError(); } @@ -19282,6 +19517,13 @@ var ts; var type2 = checkExpression(node.whenFalse, contextualMapper); return getUnionType([type1, type2]); } + function checkStringLiteralExpression(node) { + var contextualType = getContextualType(node); + if (contextualType && contextualTypeIsStringLiteralType(contextualType)) { + return getStringLiteralType(node); + } + return stringType; + } function checkTemplateExpression(node) { ts.forEach(node.templateSpans, function (templateSpan) { checkExpression(templateSpan.expression); @@ -19320,7 +19562,7 @@ var ts; if (isInferentialContext(contextualMapper)) { var signature = getSingleCallSignature(type); if (signature && signature.typeParameters) { - var contextualType = getContextualType(node); + var contextualType = getApparentTypeOfContextualType(node); if (contextualType) { var contextualSignature = getSingleCallSignature(contextualType); if (contextualSignature && !contextualSignature.typeParameters) { @@ -19372,6 +19614,7 @@ var ts; case 183: return checkTemplateExpression(node); case 9: + return checkStringLiteralExpression(node); case 11: return stringType; case 10: @@ -20433,7 +20676,7 @@ var ts; return; } var parent = getDeclarationContainer(node); - if (parent.kind === 248 && ts.isExternalModule(parent)) { + if (parent.kind === 248 && ts.isExternalOrCommonJsModule(parent)) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } @@ -20504,6 +20747,11 @@ var ts; checkExpressionCached(node.initializer); } } + if (node.kind === 163) { + if (node.propertyName && node.propertyName.kind === 136) { + checkComputedPropertyName(node.propertyName); + } + } if (ts.isBindingPattern(node.name)) { ts.forEach(node.name.elements, checkSourceElement); } @@ -20862,6 +21110,7 @@ var ts; var firstDefaultClause; var hasDuplicateDefaultClause = false; var expressionType = checkExpression(node.expression); + var expressionTypeIsStringLike = someConstituentTypeHasKind(expressionType, 258); ts.forEach(node.caseBlock.clauses, function (clause) { if (clause.kind === 242 && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { @@ -20878,6 +21127,9 @@ var ts; if (produceDiagnostics && clause.kind === 241) { var caseClause = clause; var caseType = checkExpression(caseClause.expression); + if (expressionTypeIsStringLike && someConstituentTypeHasKind(caseType, 258)) { + return; + } if (!isTypeAssignableTo(expressionType, caseType)) { checkTypeAssignableTo(caseType, expressionType, caseClause.expression, undefined); } @@ -21285,11 +21537,14 @@ var ts; var enumIsConst = ts.isConst(node); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.name.kind === 136) { + if (isComputedNonLiteralName(member.name)) { error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums); } - else if (isNumericLiteralName(member.name.text)) { - error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name); + else { + var text = getTextOfPropertyName(member.name); + if (isNumericLiteralName(text)) { + error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name); + } } var previousEnumMemberIsNonConstant = autoValue === undefined; var initializer = member.initializer; @@ -21987,8 +22242,10 @@ var ts; function checkSourceFileWorker(node) { var links = getNodeLinks(node); if (!(links.flags & 1)) { - if (node.isDefaultLib && compilerOptions.skipDefaultLibCheck) { - return; + if (compilerOptions.skipDefaultLibCheck) { + if (node.hasNoDefaultLib) { + return; + } } checkGrammarSourceFile(node); emitExtends = false; @@ -21997,7 +22254,7 @@ var ts; potentialThisCollisions.length = 0; ts.forEach(node.statements, checkSourceElement); checkFunctionAndClassExpressionBodies(node); - if (ts.isExternalModule(node)) { + if (ts.isExternalOrCommonJsModule(node)) { checkExternalModuleExports(node); } if (potentialThisCollisions.length) { @@ -22075,7 +22332,7 @@ var ts; } switch (location.kind) { case 248: - if (!ts.isExternalModule(location)) { + if (!ts.isExternalOrCommonJsModule(location)) { break; } case 218: @@ -22634,15 +22891,24 @@ var ts; getReferencedValueDeclaration: getReferencedValueDeclaration, getTypeReferenceSerializationKind: getTypeReferenceSerializationKind, isOptionalParameter: isOptionalParameter, - isArgumentsLocalBinding: isArgumentsLocalBinding + isArgumentsLocalBinding: isArgumentsLocalBinding, + getExternalModuleFileFromDeclaration: getExternalModuleFileFromDeclaration }; } + function getExternalModuleFileFromDeclaration(declaration) { + var specifier = ts.getExternalModuleName(declaration); + var moduleSymbol = getSymbolAtLocation(specifier); + if (!moduleSymbol) { + return undefined; + } + return ts.getDeclarationOfKind(moduleSymbol, 248); + } function initializeTypeChecker() { ts.forEach(host.getSourceFiles(), function (file) { ts.bindSourceFile(file, compilerOptions); }); ts.forEach(host.getSourceFiles(), function (file) { - if (!ts.isExternalModule(file)) { + if (!ts.isExternalOrCommonJsModule(file)) { mergeSymbolTable(globals, file.locals); } }); @@ -23319,7 +23585,7 @@ var ts; } } function checkGrammarForNonSymbolComputedProperty(node, message) { - if (node.kind === 136 && !ts.isWellKnownSymbolSyntactically(node.expression)) { + if (ts.isDynamicName(node)) { return grammarErrorOnNode(node, message); } } @@ -23633,11 +23899,15 @@ var ts; var writeTextOfNode; var writer = createAndSetNewTextWriterWithSymbolWriter(); var enclosingDeclaration; - var currentSourceFile; + var currentText; + var currentLineMap; + var currentIdentifiers; + var isCurrentFileExternalModule; var reportedDeclarationError = false; var errorNameNode; var emitJsDocComments = compilerOptions.removeComments ? function (declaration) { } : writeJsDocComments; var emit = compilerOptions.stripInternal ? stripInternal : emitNode; + var noDeclare = !root; var moduleElementDeclarationEmitInfo = []; var asynchronousSubModuleDeclarationEmitInfo; var referencePathsOutput = ""; @@ -23673,21 +23943,53 @@ var ts; } else { var emittedReferencedFiles = []; + var prevModuleElementDeclarationEmitInfo = []; ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (!ts.isExternalModuleOrDeclarationFile(sourceFile)) { + if (!ts.isDeclarationFile(sourceFile)) { if (!compilerOptions.noResolve) { ts.forEach(sourceFile.referencedFiles, function (fileReference) { var referencedFile = ts.tryResolveScriptReference(host, sourceFile, fileReference); - if (referencedFile && (ts.isExternalModuleOrDeclarationFile(referencedFile) && + if (referencedFile && (ts.isDeclarationFile(referencedFile) && !ts.contains(emittedReferencedFiles, referencedFile))) { writeReferencePath(referencedFile); emittedReferencedFiles.push(referencedFile); } }); } + } + if (!ts.isExternalModuleOrDeclarationFile(sourceFile)) { + noDeclare = false; + emitSourceFile(sourceFile); + } + else if (ts.isExternalModule(sourceFile)) { + noDeclare = true; + write("declare module \"" + ts.getResolvedExternalModuleName(host, sourceFile) + "\" {"); + writeLine(); + increaseIndent(); emitSourceFile(sourceFile); + decreaseIndent(); + write("}"); + writeLine(); + if (moduleElementDeclarationEmitInfo.length) { + var oldWriter = writer; + ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { + if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { + ts.Debug.assert(aliasEmitInfo.node.kind === 222); + createAndSetNewTextWriterWithSymbolWriter(); + ts.Debug.assert(aliasEmitInfo.indent === 1); + increaseIndent(); + writeImportDeclaration(aliasEmitInfo.node); + aliasEmitInfo.asynchronousOutput = writer.getText(); + decreaseIndent(); + } + }); + setWriter(oldWriter); + } + prevModuleElementDeclarationEmitInfo = prevModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); + moduleElementDeclarationEmitInfo = []; } }); + moduleElementDeclarationEmitInfo = moduleElementDeclarationEmitInfo.concat(prevModuleElementDeclarationEmitInfo); } return { reportedDeclarationError: reportedDeclarationError, @@ -23696,13 +23998,12 @@ var ts; referencePathsOutput: referencePathsOutput }; function hasInternalAnnotation(range) { - var text = currentSourceFile.text; - var comment = text.substring(range.pos, range.end); + var comment = currentText.substring(range.pos, range.end); return comment.indexOf("@internal") >= 0; } function stripInternal(node) { if (node) { - var leadingCommentRanges = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos); + var leadingCommentRanges = ts.getLeadingCommentRanges(currentText, node.pos); if (ts.forEach(leadingCommentRanges, hasInternalAnnotation)) { return; } @@ -23783,7 +24084,7 @@ var ts; var errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccesibilityResult); if (errorInfo) { if (errorInfo.typeName) { - diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); + diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getTextOfNodeFromSourceText(currentText, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); } else { diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); @@ -23847,9 +24148,9 @@ var ts; } function writeJsDocComments(declaration) { if (declaration) { - var jsDocComments = ts.getJsDocComments(declaration, currentSourceFile); - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, declaration, jsDocComments); - ts.emitComments(currentSourceFile, writer, jsDocComments, true, newLine, ts.writeCommentRange); + var jsDocComments = ts.getJsDocCommentsFromText(declaration, currentText); + ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, declaration, jsDocComments); + ts.emitComments(currentText, currentLineMap, writer, jsDocComments, true, newLine, ts.writeCommentRange); } } function emitTypeWithNewGetSymbolAccessibilityDiagnostic(type, getSymbolAccessibilityDiagnostic) { @@ -23866,7 +24167,7 @@ var ts; case 103: case 97: case 9: - return writeTextOfNode(currentSourceFile, type); + return writeTextOfNode(currentText, type); case 188: return emitExpressionWithTypeArguments(type); case 151: @@ -23897,14 +24198,14 @@ var ts; } function writeEntityName(entityName) { if (entityName.kind === 69) { - writeTextOfNode(currentSourceFile, entityName); + writeTextOfNode(currentText, entityName); } else { var left = entityName.kind === 135 ? entityName.left : entityName.expression; var right = entityName.kind === 135 ? entityName.right : entityName.name; writeEntityName(left); write("."); - writeTextOfNode(currentSourceFile, right); + writeTextOfNode(currentText, right); } } function emitEntityName(entityName) { @@ -23932,7 +24233,7 @@ var ts; } } function emitTypePredicate(type) { - writeTextOfNode(currentSourceFile, type.parameterName); + writeTextOfNode(currentText, type.parameterName); write(" is "); emitType(type.type); } @@ -23972,20 +24273,23 @@ var ts; } } function emitSourceFile(node) { - currentSourceFile = node; + currentText = node.text; + currentLineMap = ts.getLineStarts(node); + currentIdentifiers = node.identifiers; + isCurrentFileExternalModule = ts.isExternalModule(node); enclosingDeclaration = node; - ts.emitDetachedComments(currentSourceFile, writer, ts.writeCommentRange, node, newLine, true); + ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, true); emitLines(node.statements); } function getExportDefaultTempVariableName() { var baseName = "_default"; - if (!ts.hasProperty(currentSourceFile.identifiers, baseName)) { + if (!ts.hasProperty(currentIdentifiers, baseName)) { return baseName; } var count = 0; while (true) { var name_19 = baseName + "_" + (++count); - if (!ts.hasProperty(currentSourceFile.identifiers, name_19)) { + if (!ts.hasProperty(currentIdentifiers, name_19)) { return name_19; } } @@ -23993,7 +24297,7 @@ var ts; function emitExportAssignment(node) { if (node.expression.kind === 69) { write(node.isExportEquals ? "export = " : "export default "); - writeTextOfNode(currentSourceFile, node.expression); + writeTextOfNode(currentText, node.expression); } else { var tempVarName = getExportDefaultTempVariableName(); @@ -24028,7 +24332,7 @@ var ts; writeModuleElement(node); } else if (node.kind === 221 || - (node.parent.kind === 248 && ts.isExternalModule(currentSourceFile))) { + (node.parent.kind === 248 && isCurrentFileExternalModule)) { var isVisible; if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 248) { asynchronousSubModuleDeclarationEmitInfo.push({ @@ -24080,14 +24384,14 @@ var ts; } } function emitModuleElementDeclarationFlags(node) { - if (node.parent === currentSourceFile) { + if (node.parent.kind === 248) { if (node.flags & 2) { write("export "); } if (node.flags & 512) { write("default "); } - else if (node.kind !== 215) { + else if (node.kind !== 215 && !noDeclare) { write("declare "); } } @@ -24112,7 +24416,7 @@ var ts; write("export "); } write("import "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); write(" = "); if (ts.isInternalModuleImportEqualsDeclaration(node)) { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.moduleReference, getImportEntityNameVisibilityError); @@ -24120,7 +24424,7 @@ var ts; } else { write("require("); - writeTextOfNode(currentSourceFile, ts.getExternalModuleImportEqualsDeclarationExpression(node)); + writeTextOfNode(currentText, ts.getExternalModuleImportEqualsDeclarationExpression(node)); write(");"); } writer.writeLine(); @@ -24154,7 +24458,7 @@ var ts; if (node.importClause) { var currentWriterPos = writer.getTextPos(); if (node.importClause.name && resolver.isDeclarationVisible(node.importClause)) { - writeTextOfNode(currentSourceFile, node.importClause.name); + writeTextOfNode(currentText, node.importClause.name); } if (node.importClause.namedBindings && isVisibleNamedBinding(node.importClause.namedBindings)) { if (currentWriterPos !== writer.getTextPos()) { @@ -24162,7 +24466,7 @@ var ts; } if (node.importClause.namedBindings.kind === 224) { write("* as "); - writeTextOfNode(currentSourceFile, node.importClause.namedBindings.name); + writeTextOfNode(currentText, node.importClause.namedBindings.name); } else { write("{ "); @@ -24172,16 +24476,28 @@ var ts; } write(" from "); } - writeTextOfNode(currentSourceFile, node.moduleSpecifier); + emitExternalModuleSpecifier(node.moduleSpecifier); write(";"); writer.writeLine(); } + function emitExternalModuleSpecifier(moduleSpecifier) { + if (moduleSpecifier.kind === 9 && (!root) && (compilerOptions.out || compilerOptions.outFile)) { + var moduleName = ts.getExternalModuleNameFromDeclaration(host, resolver, moduleSpecifier.parent); + if (moduleName) { + write("\""); + write(moduleName); + write("\""); + return; + } + } + writeTextOfNode(currentText, moduleSpecifier); + } function emitImportOrExportSpecifier(node) { if (node.propertyName) { - writeTextOfNode(currentSourceFile, node.propertyName); + writeTextOfNode(currentText, node.propertyName); write(" as "); } - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } function emitExportSpecifier(node) { emitImportOrExportSpecifier(node); @@ -24201,7 +24517,7 @@ var ts; } if (node.moduleSpecifier) { write(" from "); - writeTextOfNode(currentSourceFile, node.moduleSpecifier); + emitExternalModuleSpecifier(node.moduleSpecifier); } write(";"); writer.writeLine(); @@ -24215,11 +24531,11 @@ var ts; else { write("module "); } - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); while (node.body.kind !== 219) { node = node.body; write("."); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; @@ -24238,7 +24554,7 @@ var ts; emitJsDocComments(node); emitModuleElementDeclarationFlags(node); write("type "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); emitTypeParameters(node.typeParameters); write(" = "); emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.type, getTypeAliasDeclarationVisibilityError); @@ -24260,7 +24576,7 @@ var ts; write("const "); } write("enum "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); write(" {"); writeLine(); increaseIndent(); @@ -24271,7 +24587,7 @@ var ts; } function emitEnumMemberDeclaration(node) { emitJsDocComments(node); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); var enumMemberValue = resolver.getConstantValue(node); if (enumMemberValue !== undefined) { write(" = "); @@ -24288,7 +24604,7 @@ var ts; increaseIndent(); emitJsDocComments(node); decreaseIndent(); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); if (node.parent.kind === 152 || @@ -24398,7 +24714,7 @@ var ts; write("abstract "); } write("class "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; emitTypeParameters(node.typeParameters); @@ -24421,7 +24737,7 @@ var ts; emitJsDocComments(node); emitModuleElementDeclarationFlags(node); write("interface "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; emitTypeParameters(node.typeParameters); @@ -24451,7 +24767,7 @@ var ts; emitBindingPattern(node.name); } else { - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); if ((node.kind === 141 || node.kind === 140) && ts.hasQuestionToken(node)) { write("?"); } @@ -24525,7 +24841,7 @@ var ts; emitBindingPattern(bindingElement.name); } else { - writeTextOfNode(currentSourceFile, bindingElement.name); + writeTextOfNode(currentText, bindingElement.name); writeTypeOfDeclaration(bindingElement, undefined, getBindingElementTypeVisibilityError); } } @@ -24566,7 +24882,7 @@ var ts; emitJsDocComments(accessors.getAccessor); emitJsDocComments(accessors.setAccessor); emitClassMemberDeclarationFlags(node); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); if (!(node.flags & 16)) { accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); @@ -24647,13 +24963,13 @@ var ts; } if (node.kind === 213) { write("function "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } else if (node.kind === 144) { write("constructor"); } else { - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); if (ts.hasQuestionToken(node)) { write("?"); } @@ -24766,7 +25082,7 @@ var ts; emitBindingPattern(node.name); } else { - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } if (resolver.isOptionalParameter(node)) { write("?"); @@ -24865,7 +25181,7 @@ var ts; } else if (bindingElement.kind === 163) { if (bindingElement.propertyName) { - writeTextOfNode(currentSourceFile, bindingElement.propertyName); + writeTextOfNode(currentText, bindingElement.propertyName); write(": "); } if (bindingElement.name) { @@ -24877,7 +25193,7 @@ var ts; if (bindingElement.dotDotDotToken) { write("..."); } - writeTextOfNode(currentSourceFile, bindingElement.name); + writeTextOfNode(currentText, bindingElement.name); } } } @@ -24960,6 +25276,18 @@ var ts; return ts.isExternalModule(sourceFile) || ts.isDeclarationFile(sourceFile); } ts.isExternalModuleOrDeclarationFile = isExternalModuleOrDeclarationFile; + function getResolvedExternalModuleName(host, file) { + return file.moduleName || ts.getExternalModuleNameFromPath(host, file.fileName); + } + ts.getResolvedExternalModuleName = getResolvedExternalModuleName; + function getExternalModuleNameFromDeclaration(host, resolver, declaration) { + var file = resolver.getExternalModuleFileFromDeclaration(declaration); + if (!file || ts.isDeclarationFile(file)) { + return undefined; + } + return getResolvedExternalModuleName(host, file); + } + ts.getExternalModuleNameFromDeclaration = getExternalModuleNameFromDeclaration; var entities = { "quot": 0x0022, "amp": 0x0026, @@ -25229,15 +25557,19 @@ var ts; var newLine = host.getNewLine(); var jsxDesugaring = host.getCompilerOptions().jsx !== 1; var shouldEmitJsx = function (s) { return (s.languageVariant === 1 && !jsxDesugaring); }; + var outFile = compilerOptions.outFile || compilerOptions.out; + var emitJavaScript = createFileEmitter(); if (targetSourceFile === undefined) { - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (ts.shouldEmitToOwnFile(sourceFile, compilerOptions)) { - var jsFilePath = ts.getOwnEmitOutputFilePath(sourceFile, host, shouldEmitJsx(sourceFile) ? ".jsx" : ".js"); - emitFile(jsFilePath, sourceFile); - } - }); - if (compilerOptions.outFile || compilerOptions.out) { - emitFile(compilerOptions.outFile || compilerOptions.out); + if (outFile) { + emitFile(outFile); + } + else { + ts.forEach(host.getSourceFiles(), function (sourceFile) { + if (ts.shouldEmitToOwnFile(sourceFile, compilerOptions)) { + var jsFilePath = ts.getOwnEmitOutputFilePath(sourceFile, host, shouldEmitJsx(sourceFile) ? ".jsx" : ".js"); + emitFile(jsFilePath, sourceFile); + } + }); } } else { @@ -25245,8 +25577,8 @@ var ts; var jsFilePath = ts.getOwnEmitOutputFilePath(targetSourceFile, host, shouldEmitJsx(targetSourceFile) ? ".jsx" : ".js"); emitFile(jsFilePath, targetSourceFile); } - else if (!ts.isDeclarationFile(targetSourceFile) && (compilerOptions.outFile || compilerOptions.out)) { - emitFile(compilerOptions.outFile || compilerOptions.out); + else if (!ts.isDeclarationFile(targetSourceFile) && outFile) { + emitFile(outFile); } } diagnostics = ts.sortAndDeduplicateDiagnostics(diagnostics); @@ -25296,20 +25628,26 @@ var ts; } } } - function emitJavaScript(jsFilePath, root) { + function createFileEmitter() { var writer = ts.createTextWriter(newLine); var write = writer.write, writeTextOfNode = writer.writeTextOfNode, writeLine = writer.writeLine, increaseIndent = writer.increaseIndent, decreaseIndent = writer.decreaseIndent; var currentSourceFile; + var currentText; + var currentLineMap; + var currentFileIdentifiers; + var renamedDependencies; + var isEs6Module; + var isCurrentFileExternalModule; var exportFunctionForFile; - var generatedNameSet = {}; - var nodeToGeneratedName = []; + var generatedNameSet; + var nodeToGeneratedName; var computedPropertyNamesToGeneratedNames; var convertedLoopState; - var extendsEmitted = false; - var decorateEmitted = false; - var paramEmitted = false; - var awaiterEmitted = false; - var tempFlags = 0; + var extendsEmitted; + var decorateEmitted; + var paramEmitted; + var awaiterEmitted; + var tempFlags; var tempVariables; var tempParameters; var externalImports; @@ -25326,6 +25664,7 @@ var ts; var scopeEmitStart = function (scopeDeclaration, scopeName) { }; var scopeEmitEnd = function () { }; var sourceMapData; + var root; var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfPositionWorker; var moduleEmitDelegates = (_a = {}, _a[5] = emitES6Module, @@ -25335,30 +25674,75 @@ var ts; _a[1] = emitCommonJSModule, _a ); - if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) { - initializeEmitterWithSourceMaps(); - } - if (root) { - emitSourceFile(root); - } - else { - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (!isExternalModuleOrDeclarationFile(sourceFile)) { - emitSourceFile(sourceFile); + var bundleEmitDelegates = (_b = {}, + _b[5] = function () { }, + _b[2] = emitAMDModule, + _b[4] = emitSystemModule, + _b[3] = function () { }, + _b[1] = function () { }, + _b + ); + return doEmit; + function doEmit(jsFilePath, rootFile) { + writer.reset(); + currentSourceFile = undefined; + currentText = undefined; + currentLineMap = undefined; + exportFunctionForFile = undefined; + generatedNameSet = {}; + nodeToGeneratedName = []; + computedPropertyNamesToGeneratedNames = undefined; + convertedLoopState = undefined; + extendsEmitted = false; + decorateEmitted = false; + paramEmitted = false; + awaiterEmitted = false; + tempFlags = 0; + tempVariables = undefined; + tempParameters = undefined; + externalImports = undefined; + exportSpecifiers = undefined; + exportEquals = undefined; + hasExportStars = undefined; + detachedCommentsInfo = undefined; + sourceMapData = undefined; + isEs6Module = false; + renamedDependencies = undefined; + isCurrentFileExternalModule = false; + root = rootFile; + if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) { + initializeEmitterWithSourceMaps(jsFilePath, root); + } + if (root) { + emitSourceFile(root); + } + else { + if (modulekind) { + ts.forEach(host.getSourceFiles(), emitEmitHelpers); } - }); + ts.forEach(host.getSourceFiles(), function (sourceFile) { + if ((!isExternalModuleOrDeclarationFile(sourceFile)) || (modulekind && ts.isExternalModule(sourceFile))) { + emitSourceFile(sourceFile); + } + }); + } + writeLine(); + writeEmittedFiles(writer.getText(), jsFilePath, compilerOptions.emitBOM); } - writeLine(); - writeEmittedFiles(writer.getText(), compilerOptions.emitBOM); - return; function emitSourceFile(sourceFile) { currentSourceFile = sourceFile; + currentText = sourceFile.text; + currentLineMap = ts.getLineStarts(sourceFile); exportFunctionForFile = undefined; + isEs6Module = sourceFile.symbol && sourceFile.symbol.exports && !!sourceFile.symbol.exports["___esModule"]; + renamedDependencies = sourceFile.renamedDependencies; + currentFileIdentifiers = sourceFile.identifiers; + isCurrentFileExternalModule = ts.isExternalModule(sourceFile); emit(sourceFile); } function isUniqueName(name) { return !resolver.hasGlobalName(name) && - !ts.hasProperty(currentSourceFile.identifiers, name) && + !ts.hasProperty(currentFileIdentifiers, name) && !ts.hasProperty(generatedNameSet, name); } function makeTempVariableName(flags) { @@ -25431,7 +25815,7 @@ var ts; var id = ts.getNodeId(node); return nodeToGeneratedName[id] || (nodeToGeneratedName[id] = ts.unescapeIdentifier(generateNameForNode(node))); } - function initializeEmitterWithSourceMaps() { + function initializeEmitterWithSourceMaps(jsFilePath, root) { var sourceMapDir; var sourceMapSourceIndex = -1; var sourceMapNameIndexMap = {}; @@ -25500,7 +25884,7 @@ var ts; } } function recordSourceMapSpan(pos) { - var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos); + var sourceLinePos = ts.computeLineAndCharacterOfPosition(currentLineMap, pos); sourceLinePos.line++; sourceLinePos.character++; var emittedLine = writer.getLine(); @@ -25528,13 +25912,13 @@ var ts; } } function recordEmitNodeStartSpan(node) { - recordSourceMapSpan(ts.skipTrivia(currentSourceFile.text, node.pos)); + recordSourceMapSpan(ts.skipTrivia(currentText, node.pos)); } function recordEmitNodeEndSpan(node) { recordSourceMapSpan(node.end); } function writeTextWithSpanRecord(tokenKind, startPos, emitFn) { - var tokenStartPos = ts.skipTrivia(currentSourceFile.text, startPos); + var tokenStartPos = ts.skipTrivia(currentText, startPos); recordSourceMapSpan(tokenStartPos); var tokenEndPos = emitTokenText(tokenKind, tokenStartPos, emitFn); recordSourceMapSpan(tokenEndPos); @@ -25604,9 +25988,9 @@ var ts; sourceMapNameIndices.pop(); } ; - function writeCommentRangeWithMap(curentSourceFile, writer, comment, newLine) { + function writeCommentRangeWithMap(currentText, currentLineMap, writer, comment, newLine) { recordSourceMapSpan(comment.pos); - ts.writeCommentRange(currentSourceFile, writer, comment, newLine); + ts.writeCommentRange(currentText, currentLineMap, writer, comment, newLine); recordSourceMapSpan(comment.end); } function serializeSourceMapContents(version, file, sourceRoot, sources, names, mappings, sourcesContent) { @@ -25636,7 +26020,7 @@ var ts; return output; } } - function writeJavaScriptAndSourceMapFile(emitOutput, writeByteOrderMark) { + function writeJavaScriptAndSourceMapFile(emitOutput, jsFilePath, writeByteOrderMark) { encodeLastRecordedSourceMapSpan(); var sourceMapText = serializeSourceMapContents(3, sourceMapData.sourceMapFile, sourceMapData.sourceMapSourceRoot, sourceMapData.sourceMapSources, sourceMapData.sourceMapNames, sourceMapData.sourceMapMappings, sourceMapData.sourceMapSourcesContent); sourceMapDataList.push(sourceMapData); @@ -25649,7 +26033,7 @@ var ts; ts.writeFile(host, diagnostics, sourceMapData.sourceMapFilePath, sourceMapText, false); sourceMapUrl = "//# sourceMappingURL=" + sourceMapData.jsSourceMappingURL; } - writeJavaScriptFile(emitOutput + sourceMapUrl, writeByteOrderMark); + writeJavaScriptFile(emitOutput + sourceMapUrl, jsFilePath, writeByteOrderMark); } var sourceMapJsFile = ts.getBaseFileName(ts.normalizeSlashes(jsFilePath)); sourceMapData = { @@ -25712,7 +26096,7 @@ var ts; scopeEmitEnd = recordScopeNameEnd; writeComment = writeCommentRangeWithMap; } - function writeJavaScriptFile(emitOutput, writeByteOrderMark) { + function writeJavaScriptFile(emitOutput, jsFilePath, writeByteOrderMark) { ts.writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark); } function createTempVariable(flags) { @@ -25882,7 +26266,7 @@ var ts; return getQuotedEscapedLiteralText("\"", node.text, "\""); } if (node.parent) { - return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + return ts.getTextOfNodeFromSourceText(currentText, node); } switch (node.kind) { case 9: @@ -25904,7 +26288,7 @@ var ts; return leftQuote + ts.escapeNonAsciiCharacters(ts.escapeString(text)) + rightQuote; } function emitDownlevelRawTemplateLiteral(node) { - var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + var text = ts.getTextOfNodeFromSourceText(currentText, node); var isLast = node.kind === 11 || node.kind === 14; text = text.substring(1, text.length - (isLast ? 1 : 2)); text = text.replace(/\r\n?/g, "\n"); @@ -26234,7 +26618,7 @@ var ts; write(node.text); } else { - writeTextOfNode(currentSourceFile, node); + writeTextOfNode(currentText, node); } write("\""); } @@ -26330,7 +26714,7 @@ var ts; else if (declaration.kind === 226) { write(getGeneratedNameForNode(declaration.parent.parent.parent)); var name_24 = declaration.propertyName || declaration.name; - var identifier = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, name_24); + var identifier = ts.getTextOfNodeFromSourceText(currentText, name_24); if (languageVersion === 0 && identifier === "default") { write("[\"default\"]"); } @@ -26354,7 +26738,7 @@ var ts; write(node.text); } else { - writeTextOfNode(currentSourceFile, node); + writeTextOfNode(currentText, node); } } function isNameOfNestedRedeclaration(node) { @@ -26391,7 +26775,7 @@ var ts; write(node.text); } else { - writeTextOfNode(currentSourceFile, node); + writeTextOfNode(currentText, node); } } function emitThis(node) { @@ -26758,8 +27142,8 @@ var ts; return container && container.kind !== 248; } function emitShorthandPropertyAssignment(node) { - writeTextOfNode(currentSourceFile, node.name); - if (languageVersion < 2 || isNamespaceExportReference(node.name)) { + writeTextOfNode(currentText, node.name); + if (modulekind !== 5 || isNamespaceExportReference(node.name)) { write(": "); emit(node.name); } @@ -26809,10 +27193,10 @@ var ts; } emit(node.expression); var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); - var shouldEmitSpace; + var shouldEmitSpace = false; if (!indentedBeforeDot) { if (node.expression.kind === 8) { - var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node.expression); + var text = ts.getTextOfNodeFromSourceText(currentText, node.expression); shouldEmitSpace = text.indexOf(ts.tokenToString(21)) < 0; } else { @@ -27818,16 +28202,16 @@ var ts; emitToken(16, node.clauses.end); } function nodeStartPositionsAreOnSameLine(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node1.pos)) === - ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); + return ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node1.pos)) === + ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function nodeEndPositionsAreOnSameLine(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, node1.end) === - ts.getLineOfLocalPosition(currentSourceFile, node2.end); + return ts.getLineOfLocalPositionFromLineMap(currentLineMap, node1.end) === + ts.getLineOfLocalPositionFromLineMap(currentLineMap, node2.end); } function nodeEndIsOnSameLineAsNodeStart(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, node1.end) === - ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); + return ts.getLineOfLocalPositionFromLineMap(currentLineMap, node1.end) === + ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function emitCaseOrDefaultClause(node) { if (node.kind === 241) { @@ -27932,7 +28316,7 @@ var ts; if (node.parent.kind === 248) { ts.Debug.assert(!!(node.flags & 512) || node.kind === 227); if (modulekind === 1 || modulekind === 2 || modulekind === 3) { - if (!currentSourceFile.symbol.exports["___esModule"]) { + if (!isEs6Module) { if (languageVersion === 1) { write("Object.defineProperty(exports, \"__esModule\", { value: true });"); writeLine(); @@ -28095,12 +28479,18 @@ var ts; return node; } function createPropertyAccessForDestructuringProperty(object, propName) { - var syntheticName = ts.createSynthesizedNode(propName.kind); - syntheticName.text = propName.text; - if (syntheticName.kind !== 69) { - return createElementAccessExpression(object, syntheticName); + var index; + var nameIsComputed = propName.kind === 136; + if (nameIsComputed) { + index = ensureIdentifier(propName.expression, false); } - return createPropertyAccessExpression(object, syntheticName); + else { + index = ts.createSynthesizedNode(propName.kind); + index.text = propName.text; + } + return !nameIsComputed && index.kind === 69 + ? createPropertyAccessExpression(object, index) + : createElementAccessExpression(object, index); } function createSliceCall(value, sliceIndex) { var call = ts.createSynthesizedNode(168); @@ -28514,7 +28904,6 @@ var ts; var promiseConstructor = ts.getEntityNameFromTypeNode(node.type); var isArrowFunction = node.kind === 174; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 4096) !== 0; - var args; if (!isArrowFunction) { write(" {"); increaseIndent(); @@ -29688,8 +30077,8 @@ var ts; } } function tryRenameExternalModule(moduleName) { - if (currentSourceFile.renamedDependencies && ts.hasProperty(currentSourceFile.renamedDependencies, moduleName.text)) { - return "\"" + currentSourceFile.renamedDependencies[moduleName.text] + "\""; + if (renamedDependencies && ts.hasProperty(renamedDependencies, moduleName.text)) { + return "\"" + renamedDependencies[moduleName.text] + "\""; } return undefined; } @@ -29829,7 +30218,7 @@ var ts; return; } if (resolver.isReferencedAliasDeclaration(node) || - (!ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { + (!isCurrentFileExternalModule && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { emitLeadingComments(node); emitStart(node); var variableDeclarationIsHoisted = shouldHoistVariable(node, true); @@ -30041,7 +30430,7 @@ var ts; function getLocalNameForExternalImport(node) { var namespaceDeclaration = getNamespaceDeclarationNode(node); if (namespaceDeclaration && !isDefaultImport(node)) { - return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, namespaceDeclaration.name); + return ts.getTextOfNodeFromSourceText(currentText, namespaceDeclaration.name); } if (node.kind === 222 && node.importClause) { return getGeneratedNameForNode(node); @@ -30314,7 +30703,7 @@ var ts; ts.getEnclosingBlockScopeContainer(node).kind === 248; } function isCurrentFileSystemExternalModule() { - return modulekind === 4 && ts.isExternalModule(currentSourceFile); + return modulekind === 4 && isCurrentFileExternalModule; } function emitSystemModuleBody(node, dependencyGroups, startIndex) { emitVariableDeclarationsForImports(); @@ -30427,15 +30816,19 @@ var ts; writeLine(); write("}"); } - function emitSystemModule(node) { + function writeModuleName(node, emitRelativePathAsModuleName) { + var moduleName = node.moduleName; + if (moduleName || (emitRelativePathAsModuleName && (moduleName = getResolvedExternalModuleName(host, node)))) { + write("\"" + moduleName + "\", "); + } + } + function emitSystemModule(node, emitRelativePathAsModuleName) { collectExternalModuleInfo(node); ts.Debug.assert(!exportFunctionForFile); exportFunctionForFile = makeUniqueName("exports"); writeLine(); write("System.register("); - if (node.moduleName) { - write("\"" + node.moduleName + "\", "); - } + writeModuleName(node, emitRelativePathAsModuleName); write("["); var groupIndices = {}; var dependencyGroups = []; @@ -30453,6 +30846,12 @@ var ts; if (i !== 0) { write(", "); } + if (emitRelativePathAsModuleName) { + var name_30 = getExternalModuleNameFromDeclaration(host, resolver, externalImports[i]); + if (name_30) { + text = "\"" + name_30 + "\""; + } + } write(text); } write("], function(" + exportFunctionForFile + ") {"); @@ -30466,7 +30865,7 @@ var ts; writeLine(); write("});"); } - function getAMDDependencyNames(node, includeNonAmdDependencies) { + function getAMDDependencyNames(node, includeNonAmdDependencies, emitRelativePathAsModuleName) { var aliasedModuleNames = []; var unaliasedModuleNames = []; var importAliasNames = []; @@ -30483,6 +30882,12 @@ var ts; for (var _c = 0, externalImports_4 = externalImports; _c < externalImports_4.length; _c++) { var importNode = externalImports_4[_c]; var externalModuleName = getExternalModuleNameText(importNode); + if (emitRelativePathAsModuleName) { + var name_31 = getExternalModuleNameFromDeclaration(host, resolver, importNode); + if (name_31) { + externalModuleName = "\"" + name_31 + "\""; + } + } var importAliasName = getLocalNameForExternalImport(importNode); if (includeNonAmdDependencies && importAliasName) { aliasedModuleNames.push(externalModuleName); @@ -30494,8 +30899,8 @@ var ts; } return { aliasedModuleNames: aliasedModuleNames, unaliasedModuleNames: unaliasedModuleNames, importAliasNames: importAliasNames }; } - function emitAMDDependencies(node, includeNonAmdDependencies) { - var dependencyNames = getAMDDependencyNames(node, includeNonAmdDependencies); + function emitAMDDependencies(node, includeNonAmdDependencies, emitRelativePathAsModuleName) { + var dependencyNames = getAMDDependencyNames(node, includeNonAmdDependencies, emitRelativePathAsModuleName); emitAMDDependencyList(dependencyNames); write(", "); emitAMDFactoryHeader(dependencyNames); @@ -30522,15 +30927,13 @@ var ts; } write(") {"); } - function emitAMDModule(node) { + function emitAMDModule(node, emitRelativePathAsModuleName) { emitEmitHelpers(node); collectExternalModuleInfo(node); writeLine(); write("define("); - if (node.moduleName) { - write("\"" + node.moduleName + "\", "); - } - emitAMDDependencies(node, true); + writeModuleName(node, emitRelativePathAsModuleName); + emitAMDDependencies(node, true, emitRelativePathAsModuleName); increaseIndent(); var startIndex = emitDirectivePrologues(node.statements, true); emitExportStarHelper(); @@ -30736,8 +31139,13 @@ var ts; emitShebang(); emitDetachedCommentsAndUpdateCommentsInfo(node); if (ts.isExternalModule(node) || compilerOptions.isolatedModules) { - var emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[1]; - emitModule(node); + if (root || (!ts.isExternalModule(node) && compilerOptions.isolatedModules)) { + var emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[1]; + emitModule(node); + } + else { + bundleEmitDelegates[modulekind](node, true); + } } else { var startIndex = emitDirectivePrologues(node.statements, false); @@ -30981,7 +31389,7 @@ var ts; return detachedCommentsInfo !== undefined && ts.lastOrUndefined(detachedCommentsInfo).nodePos === pos; } function getLeadingCommentsWithoutDetachedComments() { - var leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, ts.lastOrUndefined(detachedCommentsInfo).detachedCommentEndPos); + var leadingComments = ts.getLeadingCommentRanges(currentText, ts.lastOrUndefined(detachedCommentsInfo).detachedCommentEndPos); if (detachedCommentsInfo.length - 1) { detachedCommentsInfo.pop(); } @@ -30991,10 +31399,10 @@ var ts; return leadingComments; } function isTripleSlashComment(comment) { - if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 47 && + if (currentText.charCodeAt(comment.pos + 1) === 47 && comment.pos + 2 < comment.end && - currentSourceFile.text.charCodeAt(comment.pos + 2) === 47) { - var textSubStr = currentSourceFile.text.substring(comment.pos, comment.end); + currentText.charCodeAt(comment.pos + 2) === 47) { + var textSubStr = currentText.substring(comment.pos, comment.end); return textSubStr.match(ts.fullTripleSlashReferencePathRegEx) || textSubStr.match(ts.fullTripleSlashAMDReferencePathRegEx) ? true : false; @@ -31008,7 +31416,7 @@ var ts; return getLeadingCommentsWithoutDetachedComments(); } else { - return ts.getLeadingCommentRangesOfNode(node, currentSourceFile); + return ts.getLeadingCommentRangesOfNodeFromText(node, currentText); } } } @@ -31016,7 +31424,7 @@ var ts; function getTrailingCommentsToEmit(node) { if (node.parent) { if (node.parent.kind === 248 || node.end !== node.parent.end) { - return ts.getTrailingCommentRanges(currentSourceFile.text, node.end); + return ts.getTrailingCommentRanges(currentText, node.end); } } } @@ -31039,22 +31447,22 @@ var ts; leadingComments = ts.filter(getLeadingCommentsToEmit(node), isTripleSlashComment); } } - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); - ts.emitComments(currentSourceFile, writer, leadingComments, true, newLine, writeComment); + ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, node, leadingComments); + ts.emitComments(currentText, currentLineMap, writer, leadingComments, true, newLine, writeComment); } function emitTrailingComments(node) { if (compilerOptions.removeComments) { return; } var trailingComments = getTrailingCommentsToEmit(node); - ts.emitComments(currentSourceFile, writer, trailingComments, false, newLine, writeComment); + ts.emitComments(currentText, currentLineMap, writer, trailingComments, false, newLine, writeComment); } function emitTrailingCommentsOfPosition(pos) { if (compilerOptions.removeComments) { return; } - var trailingComments = ts.getTrailingCommentRanges(currentSourceFile.text, pos); - ts.emitComments(currentSourceFile, writer, trailingComments, true, newLine, writeComment); + var trailingComments = ts.getTrailingCommentRanges(currentText, pos); + ts.emitComments(currentText, currentLineMap, writer, trailingComments, true, newLine, writeComment); } function emitLeadingCommentsOfPositionWorker(pos) { if (compilerOptions.removeComments) { @@ -31065,13 +31473,13 @@ var ts; leadingComments = getLeadingCommentsWithoutDetachedComments(); } else { - leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, pos); + leadingComments = ts.getLeadingCommentRanges(currentText, pos); } - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, { pos: pos, end: pos }, leadingComments); - ts.emitComments(currentSourceFile, writer, leadingComments, true, newLine, writeComment); + ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, { pos: pos, end: pos }, leadingComments); + ts.emitComments(currentText, currentLineMap, writer, leadingComments, true, newLine, writeComment); } function emitDetachedCommentsAndUpdateCommentsInfo(node) { - var currentDetachedCommentInfo = ts.emitDetachedComments(currentSourceFile, writer, writeComment, node, newLine, compilerOptions.removeComments); + var currentDetachedCommentInfo = ts.emitDetachedComments(currentText, currentLineMap, writer, writeComment, node, newLine, compilerOptions.removeComments); if (currentDetachedCommentInfo) { if (detachedCommentsInfo) { detachedCommentsInfo.push(currentDetachedCommentInfo); @@ -31082,12 +31490,12 @@ var ts; } } function emitShebang() { - var shebang = ts.getShebang(currentSourceFile.text); + var shebang = ts.getShebang(currentText); if (shebang) { write(shebang); } } - var _a; + var _a, _b; } function emitFile(jsFilePath, sourceFile) { emitJavaScript(jsFilePath, sourceFile); @@ -31143,11 +31551,11 @@ var ts; if (ts.getRootLength(moduleName) !== 0 || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { var failedLookupLocations = []; var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName)); - var resolvedFileName = loadNodeModuleFromFile(candidate, failedLookupLocations, host); + var resolvedFileName = loadNodeModuleFromFile(ts.supportedJsExtensions, candidate, failedLookupLocations, host); if (resolvedFileName) { return { resolvedModule: { resolvedFileName: resolvedFileName }, failedLookupLocations: failedLookupLocations }; } - resolvedFileName = loadNodeModuleFromDirectory(candidate, failedLookupLocations, host); + resolvedFileName = loadNodeModuleFromDirectory(ts.supportedJsExtensions, candidate, failedLookupLocations, host); return resolvedFileName ? { resolvedModule: { resolvedFileName: resolvedFileName }, failedLookupLocations: failedLookupLocations } : { resolvedModule: undefined, failedLookupLocations: failedLookupLocations }; @@ -31157,8 +31565,8 @@ var ts; } } ts.nodeModuleNameResolver = nodeModuleNameResolver; - function loadNodeModuleFromFile(candidate, failedLookupLocation, host) { - return ts.forEach(ts.moduleFileExtensions, tryLoad); + function loadNodeModuleFromFile(extensions, candidate, failedLookupLocation, host) { + return ts.forEach(extensions, tryLoad); function tryLoad(ext) { var fileName = ts.fileExtensionIs(candidate, ext) ? candidate : candidate + ext; if (host.fileExists(fileName)) { @@ -31170,7 +31578,7 @@ var ts; } } } - function loadNodeModuleFromDirectory(candidate, failedLookupLocation, host) { + function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocation, host) { var packageJsonPath = ts.combinePaths(candidate, "package.json"); if (host.fileExists(packageJsonPath)) { var jsonContent; @@ -31182,7 +31590,7 @@ var ts; jsonContent = { typings: undefined }; } if (jsonContent.typings) { - var result = loadNodeModuleFromFile(ts.normalizePath(ts.combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host); + var result = loadNodeModuleFromFile(extensions, ts.normalizePath(ts.combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host); if (result) { return result; } @@ -31191,7 +31599,7 @@ var ts; else { failedLookupLocation.push(packageJsonPath); } - return loadNodeModuleFromFile(ts.combinePaths(candidate, "index"), failedLookupLocation, host); + return loadNodeModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocation, host); } function loadModuleFromNodeModules(moduleName, directory, host) { var failedLookupLocations = []; @@ -31201,11 +31609,11 @@ var ts; if (baseName !== "node_modules") { var nodeModulesFolder = ts.combinePaths(directory, "node_modules"); var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName)); - var result = loadNodeModuleFromFile(candidate, failedLookupLocations, host); + var result = loadNodeModuleFromFile(ts.supportedExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations: failedLookupLocations }; } - result = loadNodeModuleFromDirectory(candidate, failedLookupLocations, host); + result = loadNodeModuleFromDirectory(ts.supportedExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations: failedLookupLocations }; } @@ -31230,9 +31638,10 @@ var ts; var searchName; var failedLookupLocations = []; var referencedSourceFile; + var extensions = compilerOptions.allowNonTsExtensions ? ts.supportedJsExtensions : ts.supportedExtensions; while (true) { searchName = ts.normalizePath(ts.combinePaths(searchPath, moduleName)); - referencedSourceFile = ts.forEach(ts.supportedExtensions, function (extension) { + referencedSourceFile = ts.forEach(extensions, function (extension) { if (extension === ".tsx" && !compilerOptions.jsx) { return undefined; } @@ -31260,10 +31669,8 @@ var ts; ts.classicNameResolver = classicNameResolver; ts.defaultInitCompilerOptions = { module: 1, - target: 0, + target: 1, noImplicitAny: false, - outDir: "built", - rootDir: ".", sourceMap: false }; function createCompilerHost(options, setParentNodes) { @@ -31621,35 +32028,47 @@ var ts; if (file.imports) { return; } + var isJavaScriptFile = ts.isSourceFileJavaScript(file); var imports; for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var node = _a[_i]; - collect(node, true); + collect(node, true, false); } file.imports = imports || emptyArray; - function collect(node, allowRelativeModuleNames) { - switch (node.kind) { - case 222: - case 221: - case 228: - var moduleNameExpr = ts.getExternalModuleName(node); - if (!moduleNameExpr || moduleNameExpr.kind !== 9) { + return; + function collect(node, allowRelativeModuleNames, collectOnlyRequireCalls) { + if (!collectOnlyRequireCalls) { + switch (node.kind) { + case 222: + case 221: + case 228: + var moduleNameExpr = ts.getExternalModuleName(node); + if (!moduleNameExpr || moduleNameExpr.kind !== 9) { + break; + } + if (!moduleNameExpr.text) { + break; + } + if (allowRelativeModuleNames || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { + (imports || (imports = [])).push(moduleNameExpr); + } break; - } - if (!moduleNameExpr.text) { + case 218: + if (node.name.kind === 9 && (node.flags & 4 || ts.isDeclarationFile(file))) { + ts.forEachChild(node.body, function (node) { + collect(node, false, collectOnlyRequireCalls); + }); + } break; - } - if (allowRelativeModuleNames || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { - (imports || (imports = [])).push(moduleNameExpr); - } - break; - case 218: - if (node.name.kind === 9 && (node.flags & 4 || ts.isDeclarationFile(file))) { - ts.forEachChild(node.body, function (node) { - collect(node, false); - }); - } - break; + } + } + if (isJavaScriptFile) { + if (ts.isRequireCall(node)) { + (imports || (imports = [])).push(node.arguments[0]); + } + else { + ts.forEachChild(node, function (node) { return collect(node, allowRelativeModuleNames, true); }); + } } } } @@ -31736,7 +32155,6 @@ var ts; } processImportedModules(file, basePath); if (isDefaultLib) { - file.isDefaultLib = true; files.unshift(file); } else { @@ -31809,6 +32227,9 @@ var ts; commonPathComponents.length = sourcePathComponents.length; } }); + if (!commonPathComponents) { + return currentDirectory; + } return ts.getNormalizedPathFromPathComponents(commonPathComponents); } function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) { @@ -31891,10 +32312,12 @@ var ts; if (options.module === 5 && languageVersion < 2) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_compile_modules_into_es2015_when_targeting_ES5_or_lower)); } + if (outFile && options.module && !(options.module === 2 || options.module === 4)) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, options.out ? "out" : "outFile")); + } if (options.outDir || options.sourceRoot || - (options.mapRoot && - (!outFile || firstExternalModuleSourceFile !== undefined))) { + options.mapRoot) { if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) { commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, currentDirectory); } @@ -32448,10 +32871,10 @@ var ts; ts.forEach(program.getSourceFiles(), function (sourceFile) { cancellationToken.throwIfCancellationRequested(); var nameToDeclarations = sourceFile.getNamedDeclarations(); - for (var name_30 in nameToDeclarations) { - var declarations = ts.getProperty(nameToDeclarations, name_30); + for (var name_32 in nameToDeclarations) { + var declarations = ts.getProperty(nameToDeclarations, name_32); if (declarations) { - var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_30); + var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_32); if (!matches) { continue; } @@ -32462,14 +32885,14 @@ var ts; if (!containers) { return undefined; } - matches = patternMatcher.getMatches(containers, name_30); + matches = patternMatcher.getMatches(containers, name_32); if (!matches) { continue; } } var fileName = sourceFile.fileName; var matchKind = bestMatchKind(matches); - rawItems.push({ name: name_30, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); + rawItems.push({ name: name_32, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); } } } @@ -32797,9 +33220,9 @@ var ts; case 211: case 163: var variableDeclarationNode; - var name_31; + var name_33; if (node.kind === 163) { - name_31 = node.name; + name_33 = node.name; variableDeclarationNode = node; while (variableDeclarationNode && variableDeclarationNode.kind !== 211) { variableDeclarationNode = variableDeclarationNode.parent; @@ -32809,16 +33232,16 @@ var ts; else { ts.Debug.assert(!ts.isBindingPattern(node.name)); variableDeclarationNode = node; - name_31 = node.name; + name_33 = node.name; } if (ts.isConst(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_31), ts.ScriptElementKind.constElement); + return createItem(node, getTextOfNode(name_33), ts.ScriptElementKind.constElement); } else if (ts.isLet(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_31), ts.ScriptElementKind.letElement); + return createItem(node, getTextOfNode(name_33), ts.ScriptElementKind.letElement); } else { - return createItem(node, getTextOfNode(name_31), ts.ScriptElementKind.variableElement); + return createItem(node, getTextOfNode(name_33), ts.ScriptElementKind.variableElement); } case 144: return createItem(node, "constructor", ts.ScriptElementKind.constructorImplementationElement); @@ -33425,7 +33848,7 @@ var ts; var resolvedSignature = typeChecker.getResolvedSignature(call, candidates); cancellationToken.throwIfCancellationRequested(); if (!candidates.length) { - if (ts.isJavaScript(sourceFile.fileName)) { + if (ts.isSourceFileJavaScript(sourceFile)) { return createJavaScriptSignatureHelpItems(argumentInfo); } return undefined; @@ -34941,9 +35364,9 @@ var ts; } Rules.prototype.getRuleName = function (rule) { var o = this; - for (var name_32 in o) { - if (o[name_32] === rule) { - return name_32; + for (var name_34 in o) { + if (o[name_34] === rule) { + return name_34; } } throw new Error("Unknown rule"); @@ -35318,7 +35741,7 @@ var ts; function TokenRangeAccess(from, to, except) { this.tokens = []; for (var token = from; token <= to; token++) { - if (except.indexOf(token) < 0) { + if (ts.indexOf(except, token) < 0) { this.tokens.push(token); } } @@ -36706,13 +37129,18 @@ var ts; ]; var jsDocCompletionEntries; function createNode(kind, pos, end, flags, parent) { - var node = new (ts.getNodeConstructor(kind))(pos, end); + var node = new NodeObject(kind, pos, end); node.flags = flags; node.parent = parent; return node; } var NodeObject = (function () { - function NodeObject() { + function NodeObject(kind, pos, end) { + this.kind = kind; + this.pos = pos; + this.end = end; + this.flags = 0; + this.parent = undefined; } NodeObject.prototype.getSourceFile = function () { return ts.getSourceFileOfNode(this); @@ -37151,8 +37579,8 @@ var ts; })(); var SourceFileObject = (function (_super) { __extends(SourceFileObject, _super); - function SourceFileObject() { - _super.apply(this, arguments); + function SourceFileObject(kind, pos, end) { + _super.call(this, kind, pos, end); } SourceFileObject.prototype.update = function (newText, textChangeRange) { return ts.updateSourceFile(this, newText, textChangeRange); @@ -37421,6 +37849,9 @@ var ts; ClassificationTypeNames.typeAliasName = "type alias name"; ClassificationTypeNames.parameterName = "parameter name"; ClassificationTypeNames.docCommentTagName = "doc comment tag name"; + ClassificationTypeNames.jsxOpenTagName = "jsx open tag name"; + ClassificationTypeNames.jsxCloseTagName = "jsx close tag name"; + ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name"; return ClassificationTypeNames; })(); ts.ClassificationTypeNames = ClassificationTypeNames; @@ -37740,8 +38171,9 @@ var ts; }; } ts.createDocumentRegistry = createDocumentRegistry; - function preProcessFile(sourceText, readImportFiles) { + function preProcessFile(sourceText, readImportFiles, detectJavaScriptImports) { if (readImportFiles === void 0) { readImportFiles = true; } + if (detectJavaScriptImports === void 0) { detectJavaScriptImports = false; } var referencedFiles = []; var importedFiles = []; var ambientExternalModules; @@ -37775,62 +38207,70 @@ var ts; end: pos + importPath.length }); } - function processImport() { - scanner.setText(sourceText); - var token = scanner.scan(); - while (token !== 1) { - if (token === 122) { + function tryConsumeDeclare() { + var token = scanner.getToken(); + if (token === 122) { + token = scanner.scan(); + if (token === 125) { token = scanner.scan(); - if (token === 125) { - token = scanner.scan(); - if (token === 9) { - recordAmbientExternalModule(); - continue; - } + if (token === 9) { + recordAmbientExternalModule(); } } - else if (token === 89) { - token = scanner.scan(); - if (token === 9) { - recordModuleName(); - continue; + return true; + } + return false; + } + function tryConsumeImport() { + var token = scanner.getToken(); + if (token === 89) { + token = scanner.scan(); + if (token === 9) { + recordModuleName(); + return true; + } + else { + if (token === 69 || ts.isKeyword(token)) { + token = scanner.scan(); + if (token === 133) { + token = scanner.scan(); + if (token === 9) { + recordModuleName(); + return true; + } + } + else if (token === 56) { + if (tryConsumeRequireCall(true)) { + return true; + } + } + else if (token === 24) { + token = scanner.scan(); + } + else { + return true; + } } - else { - if (token === 69 || ts.isKeyword(token)) { + if (token === 15) { + token = scanner.scan(); + while (token !== 16 && token !== 1) { + token = scanner.scan(); + } + if (token === 16) { token = scanner.scan(); if (token === 133) { token = scanner.scan(); if (token === 9) { recordModuleName(); - continue; } } - else if (token === 56) { - token = scanner.scan(); - if (token === 127) { - token = scanner.scan(); - if (token === 17) { - token = scanner.scan(); - if (token === 9) { - recordModuleName(); - continue; - } - } - } - } - else if (token === 24) { - token = scanner.scan(); - } - else { - continue; - } } - if (token === 15) { + } + else if (token === 37) { + token = scanner.scan(); + if (token === 116) { token = scanner.scan(); - while (token !== 16) { - token = scanner.scan(); - } - if (token === 16) { + if (token === 69 || ts.isKeyword(token)) { token = scanner.scan(); if (token === 133) { token = scanner.scan(); @@ -37840,41 +38280,22 @@ var ts; } } } - else if (token === 37) { - token = scanner.scan(); - if (token === 116) { - token = scanner.scan(); - if (token === 69 || ts.isKeyword(token)) { - token = scanner.scan(); - if (token === 133) { - token = scanner.scan(); - if (token === 9) { - recordModuleName(); - } - } - } - } - } } } - else if (token === 82) { + return true; + } + return false; + } + function tryConsumeExport() { + var token = scanner.getToken(); + if (token === 82) { + token = scanner.scan(); + if (token === 15) { token = scanner.scan(); - if (token === 15) { + while (token !== 16 && token !== 1) { token = scanner.scan(); - while (token !== 16) { - token = scanner.scan(); - } - if (token === 16) { - token = scanner.scan(); - if (token === 133) { - token = scanner.scan(); - if (token === 9) { - recordModuleName(); - } - } - } } - else if (token === 37) { + if (token === 16) { token = scanner.scan(); if (token === 133) { token = scanner.scan(); @@ -37883,31 +38304,99 @@ var ts; } } } - else if (token === 89) { + } + else if (token === 37) { + token = scanner.scan(); + if (token === 133) { token = scanner.scan(); - if (token === 69 || ts.isKeyword(token)) { - token = scanner.scan(); - if (token === 56) { - token = scanner.scan(); - if (token === 127) { - token = scanner.scan(); - if (token === 17) { - token = scanner.scan(); - if (token === 9) { - recordModuleName(); - } - } - } + if (token === 9) { + recordModuleName(); + } + } + } + else if (token === 89) { + token = scanner.scan(); + if (token === 69 || ts.isKeyword(token)) { + token = scanner.scan(); + if (token === 56) { + if (tryConsumeRequireCall(true)) { + return true; } } } } + return true; + } + return false; + } + function tryConsumeRequireCall(skipCurrentToken) { + var token = skipCurrentToken ? scanner.scan() : scanner.getToken(); + if (token === 127) { + token = scanner.scan(); + if (token === 17) { + token = scanner.scan(); + if (token === 9) { + recordModuleName(); + } + } + return true; + } + return false; + } + function tryConsumeDefine() { + var token = scanner.getToken(); + if (token === 69 && scanner.getTokenValue() === "define") { + token = scanner.scan(); + if (token !== 17) { + return true; + } + token = scanner.scan(); + if (token === 9) { + token = scanner.scan(); + if (token === 24) { + token = scanner.scan(); + } + else { + return true; + } + } + if (token !== 19) { + return true; + } token = scanner.scan(); + var i = 0; + while (token !== 20 && token !== 1) { + if (token === 9) { + recordModuleName(); + i++; + } + token = scanner.scan(); + } + return true; + } + return false; + } + function processImports() { + scanner.setText(sourceText); + scanner.scan(); + while (true) { + if (scanner.getToken() === 1) { + break; + } + if (tryConsumeDeclare() || + tryConsumeImport() || + tryConsumeExport() || + (detectJavaScriptImports && (tryConsumeRequireCall(false) || tryConsumeDefine()))) { + continue; + } + else { + scanner.scan(); + } } scanner.setText(undefined); } if (readImportFiles) { - processImport(); + processImports(); } processTripleSlashDirectives(); return { referencedFiles: referencedFiles, importedFiles: importedFiles, isLibFile: isNoDefaultLib, ambientExternalModules: ambientExternalModules }; @@ -38250,7 +38739,7 @@ var ts; function getSemanticDiagnostics(fileName) { synchronizeHostData(); var targetSourceFile = getValidSourceFile(fileName); - if (ts.isJavaScript(fileName)) { + if (ts.isSourceFileJavaScript(targetSourceFile)) { return getJavaScriptSemanticDiagnostics(targetSourceFile); } var semanticDiagnostics = program.getSemanticDiagnostics(targetSourceFile, cancellationToken); @@ -38442,7 +38931,7 @@ var ts; var typeChecker = program.getTypeChecker(); var syntacticStart = new Date().getTime(); var sourceFile = getValidSourceFile(fileName); - var isJavaScriptFile = ts.isJavaScript(fileName); + var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile); var isJsDocTagName = false; var start = new Date().getTime(); var currentToken = ts.getTokenAtPosition(sourceFile, position); @@ -38953,8 +39442,8 @@ var ts; if (element.getStart() <= position && position <= element.getEnd()) { continue; } - var name_33 = element.propertyName || element.name; - exisingImportsOrExports[name_33.text] = true; + var name_35 = element.propertyName || element.name; + exisingImportsOrExports[name_35.text] = true; } if (ts.isEmpty(exisingImportsOrExports)) { return exportsOfModule; @@ -38978,7 +39467,9 @@ var ts; } var existingName = void 0; if (m.kind === 163 && m.propertyName) { - existingName = m.propertyName.text; + if (m.propertyName.kind === 69) { + existingName = m.propertyName.text; + } } else { existingName = m.name.text; @@ -39008,44 +39499,41 @@ var ts; return undefined; } var symbols = completionData.symbols, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, isRightOfDot = completionData.isRightOfDot, isJsDocTagName = completionData.isJsDocTagName; - var entries; if (isJsDocTagName) { return { isMemberCompletion: false, isNewIdentifierLocation: false, entries: getAllJsDocCompletionEntries() }; } - if (isRightOfDot && ts.isJavaScript(fileName)) { - entries = getCompletionEntriesFromSymbols(symbols); - ts.addRange(entries, getJavaScriptCompletionEntries()); + var sourceFile = getValidSourceFile(fileName); + var entries = []; + if (isRightOfDot && ts.isSourceFileJavaScript(sourceFile)) { + var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries); + ts.addRange(entries, getJavaScriptCompletionEntries(sourceFile, uniqueNames)); } else { if (!symbols || symbols.length === 0) { return undefined; } - entries = getCompletionEntriesFromSymbols(symbols); + getCompletionEntriesFromSymbols(symbols, entries); } if (!isMemberCompletion && !isJsDocTagName) { ts.addRange(entries, keywordCompletions); } return { isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries }; - function getJavaScriptCompletionEntries() { + function getJavaScriptCompletionEntries(sourceFile, uniqueNames) { var entries = []; - var allNames = {}; var target = program.getCompilerOptions().target; - for (var _i = 0, _a = program.getSourceFiles(); _i < _a.length; _i++) { - var sourceFile = _a[_i]; - var nameTable = getNameTable(sourceFile); - for (var name_34 in nameTable) { - if (!allNames[name_34]) { - allNames[name_34] = name_34; - var displayName = getCompletionEntryDisplayName(name_34, target, true); - if (displayName) { - var entry = { - name: displayName, - kind: ScriptElementKind.warning, - kindModifiers: "", - sortText: "1" - }; - entries.push(entry); - } + var nameTable = getNameTable(sourceFile); + for (var name_36 in nameTable) { + if (!uniqueNames[name_36]) { + uniqueNames[name_36] = name_36; + var displayName = getCompletionEntryDisplayName(name_36, target, true); + if (displayName) { + var entry = { + name: displayName, + kind: ScriptElementKind.warning, + kindModifiers: "", + sortText: "1" + }; + entries.push(entry); } } } @@ -39073,25 +39561,24 @@ var ts; sortText: "0" }; } - function getCompletionEntriesFromSymbols(symbols) { + function getCompletionEntriesFromSymbols(symbols, entries) { var start = new Date().getTime(); - var entries = []; + var uniqueNames = {}; if (symbols) { - var nameToSymbol = {}; for (var _i = 0, symbols_3 = symbols; _i < symbols_3.length; _i++) { var symbol = symbols_3[_i]; var entry = createCompletionEntry(symbol, location); if (entry) { var id = ts.escapeIdentifier(entry.name); - if (!ts.lookUp(nameToSymbol, id)) { + if (!ts.lookUp(uniqueNames, id)) { entries.push(entry); - nameToSymbol[id] = symbol; + uniqueNames[id] = id; } } } } log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - start)); - return entries; + return uniqueNames; } } function getCompletionEntryDetails(fileName, position, entryName) { @@ -39272,16 +39759,16 @@ var ts; case ScriptElementKind.letElement: case ScriptElementKind.parameterElement: case ScriptElementKind.localVariableElement: - displayParts.push(ts.punctuationPart(54)); + displayParts.push(ts.punctuationPart(ts.SyntaxKind.ColonToken)); displayParts.push(ts.spacePart()); if (useConstructSignatures) { - displayParts.push(ts.keywordPart(92)); + displayParts.push(ts.keywordPart(ts.SyntaxKind.NewKeyword)); displayParts.push(ts.spacePart()); } - if (!(type.flags & 65536)) { - ts.addRange(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, undefined, 1)); + if (!(type.flags & ts.TypeFlags.Anonymous)) { + ts.addRange(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, undefined, ts.SymbolFormatFlags.WriteTypeParametersOrArguments)); } - addSignatureDisplayParts(signature, allSignatures, 8); + addSignatureDisplayParts(signature, allSignatures, ts.TypeFormatFlags.WriteArrowStyleSignature); break; default: addSignatureDisplayParts(signature, allSignatures); @@ -40728,17 +41215,17 @@ var ts; if (isNameOfPropertyAssignment(node)) { var objectLiteral = node.parent.parent; var contextualType = typeChecker.getContextualType(objectLiteral); - var name_35 = node.text; + var name_37 = node.text; if (contextualType) { if (contextualType.flags & 16384) { - var unionProperty = contextualType.getProperty(name_35); + var unionProperty = contextualType.getProperty(name_37); if (unionProperty) { return [unionProperty]; } else { var result_4 = []; ts.forEach(contextualType.types, function (t) { - var symbol = t.getProperty(name_35); + var symbol = t.getProperty(name_37); if (symbol) { result_4.push(symbol); } @@ -40747,7 +41234,7 @@ var ts; } } else { - var symbol_1 = contextualType.getProperty(name_35); + var symbol_1 = contextualType.getProperty(name_37); if (symbol_1) { return [symbol_1]; } @@ -41105,6 +41592,9 @@ var ts; case 16: return ClassificationTypeNames.typeAliasName; case 17: return ClassificationTypeNames.parameterName; case 18: return ClassificationTypeNames.docCommentTagName; + case 19: return ClassificationTypeNames.jsxOpenTagName; + case 20: return ClassificationTypeNames.jsxCloseTagName; + case 21: return ClassificationTypeNames.jsxSelfClosingTagName; } } function convertClassifications(classifications) { @@ -41344,6 +41834,21 @@ var ts; return 17; } return; + case 235: + if (token.parent.tagName === token) { + return 19; + } + return; + case 237: + if (token.parent.tagName === token) { + return 20; + } + return; + case 234: + if (token.parent.tagName === token) { + return 21; + } + return; } } return 2; @@ -42053,18 +42558,8 @@ var ts; ts.getDefaultLibFilePath = getDefaultLibFilePath; function initializeServices() { ts.objectAllocator = { - getNodeConstructor: function (kind) { - function Node(pos, end) { - this.pos = pos; - this.end = end; - this.flags = 0; - this.parent = undefined; - } - var proto = kind === 248 ? new SourceFileObject() : new NodeObject(); - proto.kind = kind; - Node.prototype = proto; - return Node; - }, + getNodeConstructor: function () { return NodeObject; }, + getSourceFileConstructor: function () { return SourceFileObject; }, getSymbolConstructor: function () { return SymbolObject; }, getTypeConstructor: function () { return TypeObject; }, getSignatureConstructor: function () { return SignatureObject; } @@ -42959,8 +43454,8 @@ var ts; }; Session.prototype.getDiagnosticsForProject = function (delay, fileName) { var _this = this; - var _a = this.getProjectInfo(fileName, true), configFileName = _a.configFileName, fileNamesInProject = _a.fileNames; - fileNamesInProject = fileNamesInProject.filter(function (value, index, array) { return value.indexOf("lib.d.ts") < 0; }); + var _a = this.getProjectInfo(fileName, true), configFileName = _a.configFileName, fileNames = _a.fileNames; + var fileNamesInProject = fileNames.filter(function (value, index, array) { return value.indexOf("lib.d.ts") < 0; }); var highPriorityFiles = []; var mediumPriorityFiles = []; var lowPriorityFiles = []; @@ -43329,6 +43824,9 @@ var ts; this.filenameToSourceFile = {}; this.updateGraphSeq = 0; this.openRefCount = 0; + if (projectOptions && projectOptions.files) { + projectOptions.compilerOptions.allowNonTsExtensions = true; + } this.compilerService = new CompilerService(this, projectOptions && projectOptions.compilerOptions); } Project.prototype.addOpenRef = function () { @@ -43399,6 +43897,7 @@ var ts; Project.prototype.setProjectOptions = function (projectOptions) { this.projectOptions = projectOptions; if (projectOptions.compilerOptions) { + projectOptions.compilerOptions.allowNonTsExtensions = true; this.compilerService.setCompilerOptions(projectOptions.compilerOptions); } }; @@ -43824,7 +44323,6 @@ var ts; } } if (content !== undefined) { - var indentSize; info = new ScriptInfo(this.host, fileName, content, openedByClient); info.setFormatOptions(this.getFormatCodeOptions()); this.filenameToScriptInfo[fileName] = info; @@ -44081,7 +44579,9 @@ var ts; this.setCompilerOptions(opt); } else { - this.setCompilerOptions(ts.getDefaultCompilerOptions()); + var defaultOpts = ts.getDefaultCompilerOptions(); + defaultOpts.allowNonTsExtensions = true; + this.setCompilerOptions(defaultOpts); } this.languageService = ts.createLanguageService(this.host, this.documentRegistry); this.classifier = ts.createClassifier(); @@ -45635,7 +46135,7 @@ var ts; }; CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) { return this.forwardJSONCall("getPreProcessedFileInfo('" + fileName + "')", function () { - var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength())); + var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()), true, true); var convertResult = { referencedFiles: [], importedFiles: [], @@ -45696,7 +46196,7 @@ var ts; TypeScriptServicesFactory.prototype.createLanguageServiceShim = function (host) { try { if (this.documentRegistry === undefined) { - this.documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames()); + this.documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); } var hostAdapter = new LanguageServiceShimHostAdapter(host); var languageService = ts.createLanguageService(hostAdapter, this.documentRegistry); @@ -45728,7 +46228,7 @@ var ts; }; TypeScriptServicesFactory.prototype.close = function () { this._shims = []; - this.documentRegistry = ts.createDocumentRegistry(); + this.documentRegistry = undefined; }; TypeScriptServicesFactory.prototype.registerShim = function (shim) { this._shims.push(shim); diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts index 972ebfa472dbd..32a6dee462385 100644 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts @@ -387,6 +387,7 @@ declare namespace ts { right: Identifier; } type EntityName = Identifier | QualifiedName; + type PropertyName = Identifier | LiteralExpression | ComputedPropertyName; type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; interface Declaration extends Node { _declarationBrand: any; @@ -425,7 +426,7 @@ declare namespace ts { initializer?: Expression; } interface BindingElement extends Declaration { - propertyName?: Identifier; + propertyName?: PropertyName; dotDotDotToken?: Node; name: Identifier | BindingPattern; initializer?: Expression; @@ -452,7 +453,7 @@ declare namespace ts { objectAssignmentInitializer?: Expression; } interface VariableLikeDeclaration extends Declaration { - propertyName?: Identifier; + propertyName?: PropertyName; dotDotDotToken?: Node; name: DeclarationName; questionToken?: Node; @@ -581,7 +582,7 @@ declare namespace ts { asteriskToken?: Node; expression?: Expression; } - interface BinaryExpression extends Expression { + interface BinaryExpression extends Expression, Declaration { left: Expression; operatorToken: Node; right: Expression; @@ -625,7 +626,7 @@ declare namespace ts { interface ObjectLiteralExpression extends PrimaryExpression, Declaration { properties: NodeArray; } - interface PropertyAccessExpression extends MemberExpression { + interface PropertyAccessExpression extends MemberExpression, Declaration { expression: LeftHandSideExpression; dotToken: Node; name: Identifier; @@ -1220,6 +1221,7 @@ declare namespace ts { ObjectLiteral = 524288, ESSymbol = 16777216, ThisType = 33554432, + ObjectLiteralPatternWithComputedProperties = 67108864, StringLike = 258, NumberLike = 132, ObjectType = 80896, @@ -1537,7 +1539,6 @@ declare namespace ts { function getTypeParameterOwner(d: Declaration): Declaration; } declare namespace ts { - function getNodeConstructor(kind: SyntaxKind): new (pos?: number, end?: number) => Node; function createNode(kind: SyntaxKind, pos?: number, end?: number): Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; @@ -2126,6 +2127,9 @@ declare namespace ts { static typeAliasName: string; static parameterName: string; static docCommentTagName: string; + static jsxOpenTagName: string; + static jsxCloseTagName: string; + static jsxSelfClosingTagName: string; } enum ClassificationType { comment = 1, @@ -2146,6 +2150,9 @@ declare namespace ts { typeAliasName = 16, parameterName = 17, docCommentTagName = 18, + jsxOpenTagName = 19, + jsxCloseTagName = 20, + jsxSelfClosingTagName = 21, } interface DisplayPartsSymbolWriter extends SymbolWriter { displayParts(): SymbolDisplayPart[]; @@ -2171,7 +2178,7 @@ declare namespace ts { function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function createGetCanonicalFileName(useCaseSensitivefileNames: boolean): (fileName: string) => string; function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry; - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; + function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo; function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; function createClassifier(): Classifier; /** diff --git a/lib/typescript.js b/lib/typescript.js index 8b0ef04f96e45..498ddc3786075 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -622,6 +622,7 @@ var ts; TypeFlags[TypeFlags["ContainsAnyFunctionType"] = 8388608] = "ContainsAnyFunctionType"; TypeFlags[TypeFlags["ESSymbol"] = 16777216] = "ESSymbol"; TypeFlags[TypeFlags["ThisType"] = 33554432] = "ThisType"; + TypeFlags[TypeFlags["ObjectLiteralPatternWithComputedProperties"] = 67108864] = "ObjectLiteralPatternWithComputedProperties"; /* @internal */ TypeFlags[TypeFlags["Intrinsic"] = 16777343] = "Intrinsic"; /* @internal */ @@ -1530,12 +1531,7 @@ var ts; * List of supported extensions in order of file resolution precedence. */ ts.supportedExtensions = [".ts", ".tsx", ".d.ts"]; - /** - * List of extensions that will be used to look for external modules. - * This list is kept separate from supportedExtensions to for cases when we'll allow to include .js files in compilation, - * but still would like to load only TypeScript files as modules - */ - ts.moduleFileExtensions = ts.supportedExtensions; + ts.supportedJsExtensions = ts.supportedExtensions.concat(".js", ".jsx"); function isSupportedSourceFileName(fileName) { if (!fileName) { return false; @@ -1586,17 +1582,16 @@ var ts; } function Signature(checker) { } + function Node(kind, pos, end) { + this.kind = kind; + this.pos = pos; + this.end = end; + this.flags = 0 /* None */; + this.parent = undefined; + } ts.objectAllocator = { - getNodeConstructor: function (kind) { - function Node(pos, end) { - this.pos = pos; - this.end = end; - this.flags = 0 /* None */; - this.parent = undefined; - } - Node.prototype = { kind: kind }; - return Node; - }, + getNodeConstructor: function () { return Node; }, + getSourceFileConstructor: function () { return Node; }, getSymbolConstructor: function () { return Symbol; }, getTypeConstructor: function () { return Type; }, getSignatureConstructor: function () { return Signature; } @@ -1913,7 +1908,16 @@ var ts; if (writeByteOrderMark) { data = "\uFEFF" + data; } - _fs.writeFileSync(fileName, data, "utf8"); + var fd; + try { + fd = _fs.openSync(fileName, "w"); + _fs.writeSync(fd, data, undefined, "utf8"); + } + finally { + if (fd !== undefined) { + _fs.closeSync(fd); + } + } } function getCanonicalPath(path) { return useCaseSensitiveFileNames ? path.toLowerCase() : path; @@ -2614,6 +2618,7 @@ var ts; Disallow_inconsistently_cased_references_to_the_same_file: { code: 6078, category: ts.DiagnosticCategory.Message, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", message: "Disallow inconsistently-cased references to the same file." }, Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_or_react_6080", message: "Specify JSX code generation: 'preserve' or 'react'" }, Argument_for_jsx_must_be_preserve_or_react: { code: 6081, category: ts.DiagnosticCategory.Message, key: "Argument_for_jsx_must_be_preserve_or_react_6081", message: "Argument for '--jsx' must be 'preserve' or 'react'." }, + Only_amd_and_system_modules_are_supported_alongside_0: { code: 6082, category: ts.DiagnosticCategory.Error, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", message: "Only 'amd' and 'system' modules are supported alongside --{0}." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_an_1_type_7005", message: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter_0_implicitly_has_an_1_type_7006", message: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member_0_implicitly_has_an_1_type_7008", message: "Member '{0}' implicitly has an '{1}' type." }, @@ -3173,7 +3178,7 @@ var ts; function getCommentRanges(text, pos, trailing) { var result; var collecting = trailing || pos === 0; - while (true) { + while (pos < text.length) { var ch = text.charCodeAt(pos); switch (ch) { case 13 /* carriageReturn */: @@ -3242,6 +3247,7 @@ var ts; } return result; } + return result; } function getLeadingCommentRanges(text, pos) { return getCommentRanges(text, pos, /*trailing*/ false); @@ -3343,7 +3349,7 @@ var ts; error(ts.Diagnostics.Digit_expected); } } - return +(text.substring(start, end)); + return "" + +(text.substring(start, end)); } function scanOctalDigits() { var start = pos; @@ -3770,7 +3776,7 @@ var ts; return pos++, token = 36 /* MinusToken */; case 46 /* dot */: if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = "" + scanNumber(); + tokenValue = scanNumber(); return token = 8 /* NumericLiteral */; } if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { @@ -3873,7 +3879,7 @@ var ts; case 55 /* _7 */: case 56 /* _8 */: case 57 /* _9 */: - tokenValue = "" + scanNumber(); + tokenValue = scanNumber(); return token = 8 /* NumericLiteral */; case 58 /* colon */: return pos++, token = 54 /* ColonToken */; @@ -4177,1558 +4183,243 @@ var ts; } ts.createScanner = createScanner; })(ts || (ts = {})); -/// +/// /* @internal */ var ts; (function (ts) { - ts.bindTime = 0; - (function (ModuleInstanceState) { - ModuleInstanceState[ModuleInstanceState["NonInstantiated"] = 0] = "NonInstantiated"; - ModuleInstanceState[ModuleInstanceState["Instantiated"] = 1] = "Instantiated"; - ModuleInstanceState[ModuleInstanceState["ConstEnumOnly"] = 2] = "ConstEnumOnly"; - })(ts.ModuleInstanceState || (ts.ModuleInstanceState = {})); - var ModuleInstanceState = ts.ModuleInstanceState; - var Reachability; - (function (Reachability) { - Reachability[Reachability["Unintialized"] = 1] = "Unintialized"; - Reachability[Reachability["Reachable"] = 2] = "Reachable"; - Reachability[Reachability["Unreachable"] = 4] = "Unreachable"; - Reachability[Reachability["ReportedUnreachable"] = 8] = "ReportedUnreachable"; - })(Reachability || (Reachability = {})); - function or(state1, state2) { - return (state1 | state2) & 2 /* Reachable */ - ? 2 /* Reachable */ - : (state1 & state2) & 8 /* ReportedUnreachable */ - ? 8 /* ReportedUnreachable */ - : 4 /* Unreachable */; - } - function getModuleInstanceState(node) { - // A module is uninstantiated if it contains only - // 1. interface declarations, type alias declarations - if (node.kind === 215 /* InterfaceDeclaration */ || node.kind === 216 /* TypeAliasDeclaration */) { - return 0 /* NonInstantiated */; + function getDeclarationOfKind(symbol, kind) { + var declarations = symbol.declarations; + if (declarations) { + for (var _i = 0, declarations_1 = declarations; _i < declarations_1.length; _i++) { + var declaration = declarations_1[_i]; + if (declaration.kind === kind) { + return declaration; + } + } } - else if (ts.isConstEnumDeclaration(node)) { - return 2 /* ConstEnumOnly */; + return undefined; + } + ts.getDeclarationOfKind = getDeclarationOfKind; + // Pool writers to avoid needing to allocate them for every symbol we write. + var stringWriters = []; + function getSingleLineStringWriter() { + if (stringWriters.length === 0) { + var str = ""; + var writeText = function (text) { return str += text; }; + return { + string: function () { return str; }, + writeKeyword: writeText, + writeOperator: writeText, + writePunctuation: writeText, + writeSpace: writeText, + writeStringLiteral: writeText, + writeParameter: writeText, + writeSymbol: writeText, + // Completely ignore indentation for string writers. And map newlines to + // a single space. + writeLine: function () { return str += " "; }, + increaseIndent: function () { }, + decreaseIndent: function () { }, + clear: function () { return str = ""; }, + trackSymbol: function () { }, + reportInaccessibleThisError: function () { } + }; } - else if ((node.kind === 222 /* ImportDeclaration */ || node.kind === 221 /* ImportEqualsDeclaration */) && !(node.flags & 2 /* Export */)) { - return 0 /* NonInstantiated */; + return stringWriters.pop(); + } + ts.getSingleLineStringWriter = getSingleLineStringWriter; + function releaseStringWriter(writer) { + writer.clear(); + stringWriters.push(writer); + } + ts.releaseStringWriter = releaseStringWriter; + function getFullWidth(node) { + return node.end - node.pos; + } + ts.getFullWidth = getFullWidth; + function arrayIsEqualTo(array1, array2, equaler) { + if (!array1 || !array2) { + return array1 === array2; } - else if (node.kind === 219 /* ModuleBlock */) { - var state = 0 /* NonInstantiated */; - ts.forEachChild(node, function (n) { - switch (getModuleInstanceState(n)) { - case 0 /* NonInstantiated */: - // child is non-instantiated - continue searching - return false; - case 2 /* ConstEnumOnly */: - // child is const enum only - record state and continue searching - state = 2 /* ConstEnumOnly */; - return false; - case 1 /* Instantiated */: - // child is instantiated - record state and stop - state = 1 /* Instantiated */; - return true; - } - }); - return state; + if (array1.length !== array2.length) { + return false; } - else if (node.kind === 218 /* ModuleDeclaration */) { - return getModuleInstanceState(node.body); + for (var i = 0; i < array1.length; ++i) { + var equals = equaler ? equaler(array1[i], array2[i]) : array1[i] === array2[i]; + if (!equals) { + return false; + } } - else { - return 1 /* Instantiated */; + return true; + } + ts.arrayIsEqualTo = arrayIsEqualTo; + function hasResolvedModule(sourceFile, moduleNameText) { + return sourceFile.resolvedModules && ts.hasProperty(sourceFile.resolvedModules, moduleNameText); + } + ts.hasResolvedModule = hasResolvedModule; + function getResolvedModule(sourceFile, moduleNameText) { + return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules[moduleNameText] : undefined; + } + ts.getResolvedModule = getResolvedModule; + function setResolvedModule(sourceFile, moduleNameText, resolvedModule) { + if (!sourceFile.resolvedModules) { + sourceFile.resolvedModules = {}; } + sourceFile.resolvedModules[moduleNameText] = resolvedModule; } - ts.getModuleInstanceState = getModuleInstanceState; - var ContainerFlags; - (function (ContainerFlags) { - // The current node is not a container, and no container manipulation should happen before - // recursing into it. - ContainerFlags[ContainerFlags["None"] = 0] = "None"; - // The current node is a container. It should be set as the current container (and block- - // container) before recursing into it. The current node does not have locals. Examples: - // - // Classes, ObjectLiterals, TypeLiterals, Interfaces... - ContainerFlags[ContainerFlags["IsContainer"] = 1] = "IsContainer"; - // The current node is a block-scoped-container. It should be set as the current block- - // container before recursing into it. Examples: - // - // Blocks (when not parented by functions), Catch clauses, For/For-in/For-of statements... - ContainerFlags[ContainerFlags["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer"; - ContainerFlags[ContainerFlags["HasLocals"] = 4] = "HasLocals"; - // If the current node is a container that also container that also contains locals. Examples: - // - // Functions, Methods, Modules, Source-files. - ContainerFlags[ContainerFlags["IsContainerWithLocals"] = 5] = "IsContainerWithLocals"; - })(ContainerFlags || (ContainerFlags = {})); - var binder = createBinder(); - function bindSourceFile(file, options) { - var start = new Date().getTime(); - binder(file, options); - ts.bindTime += new Date().getTime() - start; + ts.setResolvedModule = setResolvedModule; + // Returns true if this node contains a parse error anywhere underneath it. + function containsParseError(node) { + aggregateChildData(node); + return (node.parserContextFlags & 64 /* ThisNodeOrAnySubNodesHasError */) !== 0; } - ts.bindSourceFile = bindSourceFile; - function createBinder() { - var file; - var options; - var parent; - var container; - var blockScopeContainer; - var lastContainer; - var seenThisKeyword; - // state used by reachability checks - var hasExplicitReturn; - var currentReachabilityState; - var labelStack; - var labelIndexMap; - var implicitLabels; - // If this file is an external module, then it is automatically in strict-mode according to - // ES6. If it is not an external module, then we'll determine if it is in strict mode or - // not depending on if we see "use strict" in certain places (or if we hit a class/namespace). - var inStrictMode; - var symbolCount = 0; - var Symbol; - var classifiableNames; - function bindSourceFile(f, opts) { - file = f; - options = opts; - inStrictMode = !!file.externalModuleIndicator; - classifiableNames = {}; - Symbol = ts.objectAllocator.getSymbolConstructor(); - if (!file.locals) { - bind(file); - file.symbolCount = symbolCount; - file.classifiableNames = classifiableNames; + ts.containsParseError = containsParseError; + function aggregateChildData(node) { + if (!(node.parserContextFlags & 128 /* HasAggregatedChildData */)) { + // A node is considered to contain a parse error if: + // a) the parser explicitly marked that it had an error + // b) any of it's children reported that it had an error. + var thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & 16 /* ThisNodeHasError */) !== 0) || + ts.forEachChild(node, containsParseError); + // If so, mark ourselves accordingly. + if (thisNodeOrAnySubNodesHasError) { + node.parserContextFlags |= 64 /* ThisNodeOrAnySubNodesHasError */; } - parent = undefined; - container = undefined; - blockScopeContainer = undefined; - lastContainer = undefined; - seenThisKeyword = false; - hasExplicitReturn = false; - labelStack = undefined; - labelIndexMap = undefined; - implicitLabels = undefined; + // Also mark that we've propogated the child information to this node. This way we can + // always consult the bit directly on this node without needing to check its children + // again. + node.parserContextFlags |= 128 /* HasAggregatedChildData */; } - return bindSourceFile; - function createSymbol(flags, name) { - symbolCount++; - return new Symbol(flags, name); + } + function getSourceFileOfNode(node) { + while (node && node.kind !== 248 /* SourceFile */) { + node = node.parent; } - function addDeclarationToSymbol(symbol, node, symbolFlags) { - symbol.flags |= symbolFlags; - node.symbol = symbol; - if (!symbol.declarations) { - symbol.declarations = []; - } - symbol.declarations.push(node); - if (symbolFlags & 1952 /* HasExports */ && !symbol.exports) { - symbol.exports = {}; - } - if (symbolFlags & 6240 /* HasMembers */ && !symbol.members) { - symbol.members = {}; - } - if (symbolFlags & 107455 /* Value */ && !symbol.valueDeclaration) { - symbol.valueDeclaration = node; - } + return node; + } + ts.getSourceFileOfNode = getSourceFileOfNode; + function getStartPositionOfLine(line, sourceFile) { + ts.Debug.assert(line >= 0); + return ts.getLineStarts(sourceFile)[line]; + } + ts.getStartPositionOfLine = getStartPositionOfLine; + // This is a useful function for debugging purposes. + function nodePosToString(node) { + var file = getSourceFileOfNode(node); + var loc = ts.getLineAndCharacterOfPosition(file, node.pos); + return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")"; + } + ts.nodePosToString = nodePosToString; + function getStartPosOfNode(node) { + return node.pos; + } + ts.getStartPosOfNode = getStartPosOfNode; + // Returns true if this node is missing from the actual source code. A 'missing' node is different + // from 'undefined/defined'. When a node is undefined (which can happen for optional nodes + // in the tree), it is definitely missing. However, a node may be defined, but still be + // missing. This happens whenever the parser knows it needs to parse something, but can't + // get anything in the source code that it expects at that location. For example: + // + // let a: ; + // + // Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source + // code). So the parser will attempt to parse out a type, and will create an actual node. + // However, this node will be 'missing' in the sense that no actual source-code/tokens are + // contained within it. + function nodeIsMissing(node) { + if (!node) { + return true; } - // Should not be called on a declaration with a computed property name, - // unless it is a well known Symbol. - function getDeclarationName(node) { - if (node.name) { - if (node.kind === 218 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { - return "\"" + node.name.text + "\""; - } - if (node.name.kind === 136 /* ComputedPropertyName */) { - var nameExpression = node.name.expression; - ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression)); - return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text); - } - return node.name.text; - } - switch (node.kind) { - case 144 /* Constructor */: - return "__constructor"; - case 152 /* FunctionType */: - case 147 /* CallSignature */: - return "__call"; - case 153 /* ConstructorType */: - case 148 /* ConstructSignature */: - return "__new"; - case 149 /* IndexSignature */: - return "__index"; - case 228 /* ExportDeclaration */: - return "__export"; - case 227 /* ExportAssignment */: - return node.isExportEquals ? "export=" : "default"; - case 213 /* FunctionDeclaration */: - case 214 /* ClassDeclaration */: - return node.flags & 512 /* Default */ ? "default" : undefined; - } + return node.pos === node.end && node.pos >= 0 && node.kind !== 1 /* EndOfFileToken */; + } + ts.nodeIsMissing = nodeIsMissing; + function nodeIsPresent(node) { + return !nodeIsMissing(node); + } + ts.nodeIsPresent = nodeIsPresent; + function getTokenPosOfNode(node, sourceFile) { + // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* + // want to skip trivia because this will launch us forward to the next token. + if (nodeIsMissing(node)) { + return node.pos; } - function getDisplayName(node) { - return node.name ? ts.declarationNameToString(node.name) : getDeclarationName(node); + return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); + } + ts.getTokenPosOfNode = getTokenPosOfNode; + function getNonDecoratorTokenPosOfNode(node, sourceFile) { + if (nodeIsMissing(node) || !node.decorators) { + return getTokenPosOfNode(node, sourceFile); } - /** - * Declares a Symbol for the node and adds it to symbols. Reports errors for conflicting identifier names. - * @param symbolTable - The symbol table which node will be added to. - * @param parent - node's parent declaration. - * @param node - The declaration to be added to the symbol table - * @param includes - The SymbolFlags that node has in addition to its declaration type (eg: export, ambient, etc.) - * @param excludes - The flags which node cannot be declared alongside in a symbol table. Used to report forbidden declarations. - */ - function declareSymbol(symbolTable, parent, node, includes, excludes) { - ts.Debug.assert(!ts.hasDynamicName(node)); - var isDefaultExport = node.flags & 512 /* Default */; - // The exported symbol for an export default function/class node is always named "default" - var name = isDefaultExport && parent ? "default" : getDeclarationName(node); - var symbol; - if (name !== undefined) { - // Check and see if the symbol table already has a symbol with this name. If not, - // create a new symbol with this name and add it to the table. Note that we don't - // give the new symbol any flags *yet*. This ensures that it will not conflict - // with the 'excludes' flags we pass in. - // - // If we do get an existing symbol, see if it conflicts with the new symbol we're - // creating. For example, a 'var' symbol and a 'class' symbol will conflict within - // the same symbol table. If we have a conflict, report the issue on each - // declaration we have for this symbol, and then create a new symbol for this - // declaration. - // - // If we created a new symbol, either because we didn't have a symbol with this name - // in the symbol table, or we conflicted with an existing symbol, then just add this - // node as the sole declaration of the new symbol. - // - // Otherwise, we'll be merging into a compatible existing symbol (for example when - // you have multiple 'vars' with the same name in the same container). In this case - // just add this node into the declarations list of the symbol. - symbol = ts.hasProperty(symbolTable, name) - ? symbolTable[name] - : (symbolTable[name] = createSymbol(0 /* None */, name)); - if (name && (includes & 788448 /* Classifiable */)) { - classifiableNames[name] = name; - } - if (symbol.flags & excludes) { - if (node.name) { - node.name.parent = node; - } - // Report errors every position with duplicate declaration - // Report errors on previous encountered declarations - var message = symbol.flags & 2 /* BlockScopedVariable */ - ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 - : ts.Diagnostics.Duplicate_identifier_0; - ts.forEach(symbol.declarations, function (declaration) { - if (declaration.flags & 512 /* Default */) { - message = ts.Diagnostics.A_module_cannot_have_multiple_default_exports; - } - }); - ts.forEach(symbol.declarations, function (declaration) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration))); - }); - file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message, getDisplayName(node))); - symbol = createSymbol(0 /* None */, name); - } - } - else { - symbol = createSymbol(0 /* None */, "__missing"); - } - addDeclarationToSymbol(symbol, node, includes); - symbol.parent = parent; - return symbol; + return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.decorators.end); + } + ts.getNonDecoratorTokenPosOfNode = getNonDecoratorTokenPosOfNode; + function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia) { + if (includeTrivia === void 0) { includeTrivia = false; } + if (nodeIsMissing(node)) { + return ""; } - function declareModuleMember(node, symbolFlags, symbolExcludes) { - var hasExportModifier = ts.getCombinedNodeFlags(node) & 2 /* Export */; - if (symbolFlags & 8388608 /* Alias */) { - if (node.kind === 230 /* ExportSpecifier */ || (node.kind === 221 /* ImportEqualsDeclaration */ && hasExportModifier)) { - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - } - else { - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } + var text = sourceFile.text; + return text.substring(includeTrivia ? node.pos : ts.skipTrivia(text, node.pos), node.end); + } + ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; + function getTextOfNodeFromSourceText(sourceText, node) { + if (nodeIsMissing(node)) { + return ""; + } + return sourceText.substring(ts.skipTrivia(sourceText, node.pos), node.end); + } + ts.getTextOfNodeFromSourceText = getTextOfNodeFromSourceText; + function getTextOfNode(node, includeTrivia) { + if (includeTrivia === void 0) { includeTrivia = false; } + return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia); + } + ts.getTextOfNode = getTextOfNode; + // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' + function escapeIdentifier(identifier) { + return identifier.length >= 2 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ ? "_" + identifier : identifier; + } + ts.escapeIdentifier = escapeIdentifier; + // Remove extra underscore from escaped identifier + function unescapeIdentifier(identifier) { + return identifier.length >= 3 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ && identifier.charCodeAt(2) === 95 /* _ */ ? identifier.substr(1) : identifier; + } + ts.unescapeIdentifier = unescapeIdentifier; + // Make an identifier from an external module name by extracting the string after the last "/" and replacing + // all non-alphanumeric characters with underscores + function makeIdentifierFromModuleName(moduleName) { + return ts.getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); + } + ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; + function isBlockOrCatchScoped(declaration) { + return (getCombinedNodeFlags(declaration) & 24576 /* BlockScoped */) !== 0 || + isCatchClauseVariableDeclaration(declaration); + } + ts.isBlockOrCatchScoped = isBlockOrCatchScoped; + // Gets the nearest enclosing block scope container that has the provided node + // as a descendant, that is not the provided node. + function getEnclosingBlockScopeContainer(node) { + var current = node.parent; + while (current) { + if (isFunctionLike(current)) { + return current; } - else { - // Exported module members are given 2 symbols: A local symbol that is classified with an ExportValue, - // ExportType, or ExportContainer flag, and an associated export symbol with all the correct flags set - // on it. There are 2 main reasons: - // - // 1. We treat locals and exports of the same name as mutually exclusive within a container. - // That means the binder will issue a Duplicate Identifier error if you mix locals and exports - // with the same name in the same container. - // TODO: Make this a more specific error and decouple it from the exclusion logic. - // 2. When we checkIdentifier in the checker, we set its resolved symbol to the local symbol, - // but return the export symbol (by calling getExportSymbolOfValueSymbolIfExported). That way - // when the emitter comes back to it, it knows not to qualify the name if it was found in a containing scope. - if (hasExportModifier || container.flags & 131072 /* ExportContext */) { - var exportKind = (symbolFlags & 107455 /* Value */ ? 1048576 /* ExportValue */ : 0) | - (symbolFlags & 793056 /* Type */ ? 2097152 /* ExportType */ : 0) | - (symbolFlags & 1536 /* Namespace */ ? 4194304 /* ExportNamespace */ : 0); - var local = declareSymbol(container.locals, undefined, node, exportKind, symbolExcludes); - local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - node.localSymbol = local; - return local; - } - else { - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } + switch (current.kind) { + case 248 /* SourceFile */: + case 220 /* CaseBlock */: + case 244 /* CatchClause */: + case 218 /* ModuleDeclaration */: + case 199 /* ForStatement */: + case 200 /* ForInStatement */: + case 201 /* ForOfStatement */: + return current; + case 192 /* Block */: + // function block is not considered block-scope container + // see comment in binder.ts: bind(...), case for SyntaxKind.Block + if (!isFunctionLike(current.parent)) { + return current; + } } - } - // All container nodes are kept on a linked list in declaration order. This list is used by - // the getLocalNameOfContainer function in the type checker to validate that the local name - // used for a container is unique. - function bindChildren(node) { - // Before we recurse into a node's chilren, we first save the existing parent, container - // and block-container. Then after we pop out of processing the children, we restore - // these saved values. - var saveParent = parent; - var saveContainer = container; - var savedBlockScopeContainer = blockScopeContainer; - // This node will now be set as the parent of all of its children as we recurse into them. - parent = node; - // Depending on what kind of node this is, we may have to adjust the current container - // and block-container. If the current node is a container, then it is automatically - // considered the current block-container as well. Also, for containers that we know - // may contain locals, we proactively initialize the .locals field. We do this because - // it's highly likely that the .locals will be needed to place some child in (for example, - // a parameter, or variable declaration). - // - // However, we do not proactively create the .locals for block-containers because it's - // totally normal and common for block-containers to never actually have a block-scoped - // variable in them. We don't want to end up allocating an object for every 'block' we - // run into when most of them won't be necessary. - // - // Finally, if this is a block-container, then we clear out any existing .locals object - // it may contain within it. This happens in incremental scenarios. Because we can be - // reusing a node from a previous compilation, that node may have had 'locals' created - // for it. We must clear this so we don't accidently move any stale data forward from - // a previous compilation. - var containerFlags = getContainerFlags(node); - if (containerFlags & 1 /* IsContainer */) { - container = blockScopeContainer = node; - if (containerFlags & 4 /* HasLocals */) { - container.locals = {}; - } - addToContainerChain(container); - } - else if (containerFlags & 2 /* IsBlockScopedContainer */) { - blockScopeContainer = node; - blockScopeContainer.locals = undefined; - } - var savedReachabilityState; - var savedLabelStack; - var savedLabels; - var savedImplicitLabels; - var savedHasExplicitReturn; - var kind = node.kind; - var flags = node.flags; - // reset all reachability check related flags on node (for incremental scenarios) - flags &= ~1572864 /* ReachabilityCheckFlags */; - if (kind === 215 /* InterfaceDeclaration */) { - seenThisKeyword = false; - } - var saveState = kind === 248 /* SourceFile */ || kind === 219 /* ModuleBlock */ || ts.isFunctionLikeKind(kind); - if (saveState) { - savedReachabilityState = currentReachabilityState; - savedLabelStack = labelStack; - savedLabels = labelIndexMap; - savedImplicitLabels = implicitLabels; - savedHasExplicitReturn = hasExplicitReturn; - currentReachabilityState = 2 /* Reachable */; - hasExplicitReturn = false; - labelStack = labelIndexMap = implicitLabels = undefined; - } - bindReachableStatement(node); - if (currentReachabilityState === 2 /* Reachable */ && ts.isFunctionLikeKind(kind) && ts.nodeIsPresent(node.body)) { - flags |= 524288 /* HasImplicitReturn */; - if (hasExplicitReturn) { - flags |= 1048576 /* HasExplicitReturn */; - } - } - if (kind === 215 /* InterfaceDeclaration */) { - flags = seenThisKeyword ? flags | 262144 /* ContainsThis */ : flags & ~262144 /* ContainsThis */; - } - node.flags = flags; - if (saveState) { - hasExplicitReturn = savedHasExplicitReturn; - currentReachabilityState = savedReachabilityState; - labelStack = savedLabelStack; - labelIndexMap = savedLabels; - implicitLabels = savedImplicitLabels; - } - container = saveContainer; - parent = saveParent; - blockScopeContainer = savedBlockScopeContainer; - } - /** - * Returns true if node and its subnodes were successfully traversed. - * Returning false means that node was not examined and caller needs to dive into the node himself. - */ - function bindReachableStatement(node) { - if (checkUnreachable(node)) { - ts.forEachChild(node, bind); - return; - } - switch (node.kind) { - case 198 /* WhileStatement */: - bindWhileStatement(node); - break; - case 197 /* DoStatement */: - bindDoStatement(node); - break; - case 199 /* ForStatement */: - bindForStatement(node); - break; - case 200 /* ForInStatement */: - case 201 /* ForOfStatement */: - bindForInOrForOfStatement(node); - break; - case 196 /* IfStatement */: - bindIfStatement(node); - break; - case 204 /* ReturnStatement */: - case 208 /* ThrowStatement */: - bindReturnOrThrow(node); - break; - case 203 /* BreakStatement */: - case 202 /* ContinueStatement */: - bindBreakOrContinueStatement(node); - break; - case 209 /* TryStatement */: - bindTryStatement(node); - break; - case 206 /* SwitchStatement */: - bindSwitchStatement(node); - break; - case 220 /* CaseBlock */: - bindCaseBlock(node); - break; - case 207 /* LabeledStatement */: - bindLabeledStatement(node); - break; - default: - ts.forEachChild(node, bind); - break; - } - } - function bindWhileStatement(n) { - var preWhileState = n.expression.kind === 84 /* FalseKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; - var postWhileState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; - // bind expressions (don't affect reachability) - bind(n.expression); - currentReachabilityState = preWhileState; - var postWhileLabel = pushImplicitLabel(); - bind(n.statement); - popImplicitLabel(postWhileLabel, postWhileState); - } - function bindDoStatement(n) { - var preDoState = currentReachabilityState; - var postDoLabel = pushImplicitLabel(); - bind(n.statement); - var postDoState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : preDoState; - popImplicitLabel(postDoLabel, postDoState); - // bind expressions (don't affect reachability) - bind(n.expression); - } - function bindForStatement(n) { - var preForState = currentReachabilityState; - var postForLabel = pushImplicitLabel(); - // bind expressions (don't affect reachability) - bind(n.initializer); - bind(n.condition); - bind(n.incrementor); - bind(n.statement); - // for statement is considered infinite when it condition is either omitted or is true keyword - // - for(..;;..) - // - for(..;true;..) - var isInfiniteLoop = (!n.condition || n.condition.kind === 99 /* TrueKeyword */); - var postForState = isInfiniteLoop ? 4 /* Unreachable */ : preForState; - popImplicitLabel(postForLabel, postForState); - } - function bindForInOrForOfStatement(n) { - var preStatementState = currentReachabilityState; - var postStatementLabel = pushImplicitLabel(); - // bind expressions (don't affect reachability) - bind(n.initializer); - bind(n.expression); - bind(n.statement); - popImplicitLabel(postStatementLabel, preStatementState); - } - function bindIfStatement(n) { - // denotes reachability state when entering 'thenStatement' part of the if statement: - // i.e. if condition is false then thenStatement is unreachable - var ifTrueState = n.expression.kind === 84 /* FalseKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; - // denotes reachability state when entering 'elseStatement': - // i.e. if condition is true then elseStatement is unreachable - var ifFalseState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; - currentReachabilityState = ifTrueState; - // bind expression (don't affect reachability) - bind(n.expression); - bind(n.thenStatement); - if (n.elseStatement) { - var preElseState = currentReachabilityState; - currentReachabilityState = ifFalseState; - bind(n.elseStatement); - currentReachabilityState = or(currentReachabilityState, preElseState); - } - else { - currentReachabilityState = or(currentReachabilityState, ifFalseState); - } - } - function bindReturnOrThrow(n) { - // bind expression (don't affect reachability) - bind(n.expression); - if (n.kind === 204 /* ReturnStatement */) { - hasExplicitReturn = true; - } - currentReachabilityState = 4 /* Unreachable */; - } - function bindBreakOrContinueStatement(n) { - // call bind on label (don't affect reachability) - bind(n.label); - // for continue case touch label so it will be marked a used - var isValidJump = jumpToLabel(n.label, n.kind === 203 /* BreakStatement */ ? currentReachabilityState : 4 /* Unreachable */); - if (isValidJump) { - currentReachabilityState = 4 /* Unreachable */; - } - } - function bindTryStatement(n) { - // catch\finally blocks has the same reachability as try block - var preTryState = currentReachabilityState; - bind(n.tryBlock); - var postTryState = currentReachabilityState; - currentReachabilityState = preTryState; - bind(n.catchClause); - var postCatchState = currentReachabilityState; - currentReachabilityState = preTryState; - bind(n.finallyBlock); - // post catch/finally state is reachable if - // - post try state is reachable - control flow can fall out of try block - // - post catch state is reachable - control flow can fall out of catch block - currentReachabilityState = or(postTryState, postCatchState); - } - function bindSwitchStatement(n) { - var preSwitchState = currentReachabilityState; - var postSwitchLabel = pushImplicitLabel(); - // bind expression (don't affect reachability) - bind(n.expression); - bind(n.caseBlock); - var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 242 /* DefaultClause */; }); - // post switch state is unreachable if switch is exaustive (has a default case ) and does not have fallthrough from the last case - var postSwitchState = hasDefault && currentReachabilityState !== 2 /* Reachable */ ? 4 /* Unreachable */ : preSwitchState; - popImplicitLabel(postSwitchLabel, postSwitchState); - } - function bindCaseBlock(n) { - var startState = currentReachabilityState; - for (var _i = 0, _a = n.clauses; _i < _a.length; _i++) { - var clause = _a[_i]; - currentReachabilityState = startState; - bind(clause); - if (clause.statements.length && currentReachabilityState === 2 /* Reachable */ && options.noFallthroughCasesInSwitch) { - errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); - } - } - } - function bindLabeledStatement(n) { - // call bind on label (don't affect reachability) - bind(n.label); - var ok = pushNamedLabel(n.label); - bind(n.statement); - if (ok) { - popNamedLabel(n.label, currentReachabilityState); - } - } - function getContainerFlags(node) { - switch (node.kind) { - case 186 /* ClassExpression */: - case 214 /* ClassDeclaration */: - case 215 /* InterfaceDeclaration */: - case 217 /* EnumDeclaration */: - case 155 /* TypeLiteral */: - case 165 /* ObjectLiteralExpression */: - return 1 /* IsContainer */; - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 213 /* FunctionDeclaration */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 173 /* FunctionExpression */: - case 174 /* ArrowFunction */: - case 218 /* ModuleDeclaration */: - case 248 /* SourceFile */: - case 216 /* TypeAliasDeclaration */: - return 5 /* IsContainerWithLocals */; - case 244 /* CatchClause */: - case 199 /* ForStatement */: - case 200 /* ForInStatement */: - case 201 /* ForOfStatement */: - case 220 /* CaseBlock */: - return 2 /* IsBlockScopedContainer */; - case 192 /* Block */: - // do not treat blocks directly inside a function as a block-scoped-container. - // Locals that reside in this block should go to the function locals. Othewise 'x' - // would not appear to be a redeclaration of a block scoped local in the following - // example: - // - // function foo() { - // var x; - // let x; - // } - // - // If we placed 'var x' into the function locals and 'let x' into the locals of - // the block, then there would be no collision. - // - // By not creating a new block-scoped-container here, we ensure that both 'var x' - // and 'let x' go into the Function-container's locals, and we do get a collision - // conflict. - return ts.isFunctionLike(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; - } - return 0 /* None */; - } - function addToContainerChain(next) { - if (lastContainer) { - lastContainer.nextContainer = next; - } - lastContainer = next; - } - function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { - // Just call this directly so that the return type of this function stays "void". - declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes); - } - function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { - switch (container.kind) { - // Modules, source files, and classes need specialized handling for how their - // members are declared (for example, a member of a class will go into a specific - // symbol table depending on if it is static or not). We defer to specialized - // handlers to take care of declaring these child members. - case 218 /* ModuleDeclaration */: - return declareModuleMember(node, symbolFlags, symbolExcludes); - case 248 /* SourceFile */: - return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 186 /* ClassExpression */: - case 214 /* ClassDeclaration */: - return declareClassMember(node, symbolFlags, symbolExcludes); - case 217 /* EnumDeclaration */: - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 155 /* TypeLiteral */: - case 165 /* ObjectLiteralExpression */: - case 215 /* InterfaceDeclaration */: - // Interface/Object-types always have their children added to the 'members' of - // their container. They are only accessible through an instance of their - // container, and are never in scope otherwise (even inside the body of the - // object / type / interface declaring them). An exception is type parameters, - // which are in scope without qualification (similar to 'locals'). - return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 213 /* FunctionDeclaration */: - case 173 /* FunctionExpression */: - case 174 /* ArrowFunction */: - case 216 /* TypeAliasDeclaration */: - // All the children of these container types are never visible through another - // symbol (i.e. through another symbol's 'exports' or 'members'). Instead, - // they're only accessed 'lexically' (i.e. from code that exists underneath - // their container in the tree. To accomplish this, we simply add their declared - // symbol to the 'locals' of the container. These symbols can then be found as - // the type checker walks up the containers, checking them for matching names. - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - function declareClassMember(node, symbolFlags, symbolExcludes) { - return node.flags & 64 /* Static */ - ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes) - : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - } - function declareSourceFileMember(node, symbolFlags, symbolExcludes) { - return ts.isExternalModule(file) - ? declareModuleMember(node, symbolFlags, symbolExcludes) - : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); - } - function hasExportDeclarations(node) { - var body = node.kind === 248 /* SourceFile */ ? node : node.body; - if (body.kind === 248 /* SourceFile */ || body.kind === 219 /* ModuleBlock */) { - for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { - var stat = _a[_i]; - if (stat.kind === 228 /* ExportDeclaration */ || stat.kind === 227 /* ExportAssignment */) { - return true; - } - } - } - return false; - } - function setExportContextFlag(node) { - // A declaration source file or ambient module declaration that contains no export declarations (but possibly regular - // declarations with export modifiers) is an export context in which declarations are implicitly exported. - if (ts.isInAmbientContext(node) && !hasExportDeclarations(node)) { - node.flags |= 131072 /* ExportContext */; - } - else { - node.flags &= ~131072 /* ExportContext */; - } - } - function bindModuleDeclaration(node) { - setExportContextFlag(node); - if (node.name.kind === 9 /* StringLiteral */) { - declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); - } - else { - var state = getModuleInstanceState(node); - if (state === 0 /* NonInstantiated */) { - declareSymbolAndAddToSymbolTable(node, 1024 /* NamespaceModule */, 0 /* NamespaceModuleExcludes */); - } - else { - declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); - if (node.symbol.flags & (16 /* Function */ | 32 /* Class */ | 256 /* RegularEnum */)) { - // if module was already merged with some function, class or non-const enum - // treat is a non-const-enum-only - node.symbol.constEnumOnlyModule = false; - } - else { - var currentModuleIsConstEnumOnly = state === 2 /* ConstEnumOnly */; - if (node.symbol.constEnumOnlyModule === undefined) { - // non-merged case - use the current state - node.symbol.constEnumOnlyModule = currentModuleIsConstEnumOnly; - } - else { - // merged case: module is const enum only if all its pieces are non-instantiated or const enum - node.symbol.constEnumOnlyModule = node.symbol.constEnumOnlyModule && currentModuleIsConstEnumOnly; - } - } - } - } - } - function bindFunctionOrConstructorType(node) { - // For a given function symbol "<...>(...) => T" we want to generate a symbol identical - // to the one we would get for: { <...>(...): T } - // - // We do that by making an anonymous type literal symbol, and then setting the function - // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable - // from an actual type literal symbol you would have gotten had you used the long form. - var symbol = createSymbol(131072 /* Signature */, getDeclarationName(node)); - addDeclarationToSymbol(symbol, node, 131072 /* Signature */); - var typeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type"); - addDeclarationToSymbol(typeLiteralSymbol, node, 2048 /* TypeLiteral */); - typeLiteralSymbol.members = (_a = {}, _a[symbol.name] = symbol, _a); - var _a; - } - function bindObjectLiteralExpression(node) { - var ElementKind; - (function (ElementKind) { - ElementKind[ElementKind["Property"] = 1] = "Property"; - ElementKind[ElementKind["Accessor"] = 2] = "Accessor"; - })(ElementKind || (ElementKind = {})); - if (inStrictMode) { - var seen = {}; - for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { - var prop = _a[_i]; - if (prop.name.kind !== 69 /* Identifier */) { - continue; - } - var identifier = prop.name; - // ECMA-262 11.1.5 Object Initialiser - // If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - // a.This production is contained in strict code and IsDataDescriptor(previous) is true and - // IsDataDescriptor(propId.descriptor) is true. - // b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true. - // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. - // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true - // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields - var currentKind = prop.kind === 245 /* PropertyAssignment */ || prop.kind === 246 /* ShorthandPropertyAssignment */ || prop.kind === 143 /* MethodDeclaration */ - ? 1 /* Property */ - : 2 /* Accessor */; - var existingKind = seen[identifier.text]; - if (!existingKind) { - seen[identifier.text] = currentKind; - continue; - } - if (currentKind === 1 /* Property */ && existingKind === 1 /* Property */) { - var span = ts.getErrorSpanForNode(file, identifier); - file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode)); - } - } - } - return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, "__object"); - } - function bindAnonymousDeclaration(node, symbolFlags, name) { - var symbol = createSymbol(symbolFlags, name); - addDeclarationToSymbol(symbol, node, symbolFlags); - } - function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { - switch (blockScopeContainer.kind) { - case 218 /* ModuleDeclaration */: - declareModuleMember(node, symbolFlags, symbolExcludes); - break; - case 248 /* SourceFile */: - if (ts.isExternalModule(container)) { - declareModuleMember(node, symbolFlags, symbolExcludes); - break; - } - // fall through. - default: - if (!blockScopeContainer.locals) { - blockScopeContainer.locals = {}; - addToContainerChain(blockScopeContainer); - } - declareSymbol(blockScopeContainer.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - function bindBlockScopedVariableDeclaration(node) { - bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 107455 /* BlockScopedVariableExcludes */); - } - // The binder visits every node in the syntax tree so it is a convenient place to perform a single localized - // check for reserved words used as identifiers in strict mode code. - function checkStrictModeIdentifier(node) { - if (inStrictMode && - node.originalKeywordKind >= 106 /* FirstFutureReservedWord */ && - node.originalKeywordKind <= 114 /* LastFutureReservedWord */ && - !ts.isIdentifierName(node)) { - // Report error only if there are no parse errors in file - if (!file.parseDiagnostics.length) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(node, getStrictModeIdentifierMessage(node), ts.declarationNameToString(node))); - } - } - } - function getStrictModeIdentifierMessage(node) { - // Provide specialized messages to help the user understand why we think they're in - // strict mode. - if (ts.getContainingClass(node)) { - return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode; - } - if (file.externalModuleIndicator) { - return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode; - } - return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode; - } - function checkStrictModeBinaryExpression(node) { - if (inStrictMode && ts.isLeftHandSideExpression(node.left) && ts.isAssignmentOperator(node.operatorToken.kind)) { - // ECMA 262 (Annex C) The identifier eval or arguments may not appear as the LeftHandSideExpression of an - // Assignment operator(11.13) or of a PostfixExpression(11.3) - checkStrictModeEvalOrArguments(node, node.left); - } - } - function checkStrictModeCatchClause(node) { - // It is a SyntaxError if a TryStatement with a Catch occurs within strict code and the Identifier of the - // Catch production is eval or arguments - if (inStrictMode && node.variableDeclaration) { - checkStrictModeEvalOrArguments(node, node.variableDeclaration.name); - } - } - function checkStrictModeDeleteExpression(node) { - // Grammar checking - if (inStrictMode && node.expression.kind === 69 /* Identifier */) { - // When a delete operator occurs within strict mode code, a SyntaxError is thrown if its - // UnaryExpression is a direct reference to a variable, function argument, or function name - var span = ts.getErrorSpanForNode(file, node.expression); - file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode)); - } - } - function isEvalOrArgumentsIdentifier(node) { - return node.kind === 69 /* Identifier */ && - (node.text === "eval" || node.text === "arguments"); - } - function checkStrictModeEvalOrArguments(contextNode, name) { - if (name && name.kind === 69 /* Identifier */) { - var identifier = name; - if (isEvalOrArgumentsIdentifier(identifier)) { - // We check first if the name is inside class declaration or class expression; if so give explicit message - // otherwise report generic error message. - var span = ts.getErrorSpanForNode(file, name); - file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, getStrictModeEvalOrArgumentsMessage(contextNode), identifier.text)); - } - } - } - function getStrictModeEvalOrArgumentsMessage(node) { - // Provide specialized messages to help the user understand why we think they're in - // strict mode. - if (ts.getContainingClass(node)) { - return ts.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode; - } - if (file.externalModuleIndicator) { - return ts.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode; - } - return ts.Diagnostics.Invalid_use_of_0_in_strict_mode; - } - function checkStrictModeFunctionName(node) { - if (inStrictMode) { - // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a strict mode FunctionDeclaration or FunctionExpression (13.1)) - checkStrictModeEvalOrArguments(node, node.name); - } - } - function checkStrictModeNumericLiteral(node) { - if (inStrictMode && node.flags & 32768 /* OctalLiteral */) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode)); - } - } - function checkStrictModePostfixUnaryExpression(node) { - // Grammar checking - // The identifier eval or arguments may not appear as the LeftHandSideExpression of an - // Assignment operator(11.13) or of a PostfixExpression(11.3) or as the UnaryExpression - // operated upon by a Prefix Increment(11.4.4) or a Prefix Decrement(11.4.5) operator. - if (inStrictMode) { - checkStrictModeEvalOrArguments(node, node.operand); - } - } - function checkStrictModePrefixUnaryExpression(node) { - // Grammar checking - if (inStrictMode) { - if (node.operator === 41 /* PlusPlusToken */ || node.operator === 42 /* MinusMinusToken */) { - checkStrictModeEvalOrArguments(node, node.operand); - } - } - } - function checkStrictModeWithStatement(node) { - // Grammar checking for withStatement - if (inStrictMode) { - errorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_strict_mode); - } - } - function errorOnFirstToken(node, message, arg0, arg1, arg2) { - var span = ts.getSpanOfTokenAtPosition(file, node.pos); - file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, message, arg0, arg1, arg2)); - } - function getDestructuringParameterName(node) { - return "__" + ts.indexOf(node.parent.parameters, node); - } - function bind(node) { - if (!node) { - return; - } - node.parent = parent; - var savedInStrictMode = inStrictMode; - if (!savedInStrictMode) { - updateStrictMode(node); - } - // First we bind declaration nodes to a symbol if possible. We'll both create a symbol - // and then potentially add the symbol to an appropriate symbol table. Possible - // destination symbol tables are: - // - // 1) The 'exports' table of the current container's symbol. - // 2) The 'members' table of the current container's symbol. - // 3) The 'locals' table of the current container. - // - // However, not all symbols will end up in any of these tables. 'Anonymous' symbols - // (like TypeLiterals for example) will not be put in any table. - bindWorker(node); - // Then we recurse into the children of the node to bind them as well. For certain - // symbols we do specialized work when we recurse. For example, we'll keep track of - // the current 'container' node when it changes. This helps us know which symbol table - // a local should go into for example. - bindChildren(node); - inStrictMode = savedInStrictMode; - } - function updateStrictMode(node) { - switch (node.kind) { - case 248 /* SourceFile */: - case 219 /* ModuleBlock */: - updateStrictModeStatementList(node.statements); - return; - case 192 /* Block */: - if (ts.isFunctionLike(node.parent)) { - updateStrictModeStatementList(node.statements); - } - return; - case 214 /* ClassDeclaration */: - case 186 /* ClassExpression */: - // All classes are automatically in strict mode in ES6. - inStrictMode = true; - return; - } - } - function updateStrictModeStatementList(statements) { - for (var _i = 0, statements_1 = statements; _i < statements_1.length; _i++) { - var statement = statements_1[_i]; - if (!ts.isPrologueDirective(statement)) { - return; - } - if (isUseStrictPrologueDirective(statement)) { - inStrictMode = true; - return; - } - } - } - /// Should be called only on prologue directives (isPrologueDirective(node) should be true) - function isUseStrictPrologueDirective(node) { - var nodeText = ts.getTextOfNodeFromSourceText(file.text, node.expression); - // Note: the node text must be exactly "use strict" or 'use strict'. It is not ok for the - // string to contain unicode escapes (as per ES5). - return nodeText === "\"use strict\"" || nodeText === "'use strict'"; - } - function bindWorker(node) { - switch (node.kind) { - case 69 /* Identifier */: - return checkStrictModeIdentifier(node); - case 181 /* BinaryExpression */: - return checkStrictModeBinaryExpression(node); - case 244 /* CatchClause */: - return checkStrictModeCatchClause(node); - case 175 /* DeleteExpression */: - return checkStrictModeDeleteExpression(node); - case 8 /* NumericLiteral */: - return checkStrictModeNumericLiteral(node); - case 180 /* PostfixUnaryExpression */: - return checkStrictModePostfixUnaryExpression(node); - case 179 /* PrefixUnaryExpression */: - return checkStrictModePrefixUnaryExpression(node); - case 205 /* WithStatement */: - return checkStrictModeWithStatement(node); - case 97 /* ThisKeyword */: - seenThisKeyword = true; - return; - case 137 /* TypeParameter */: - return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530912 /* TypeParameterExcludes */); - case 138 /* Parameter */: - return bindParameter(node); - case 211 /* VariableDeclaration */: - case 163 /* BindingElement */: - return bindVariableDeclarationOrBindingElement(node); - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 107455 /* PropertyExcludes */); - case 245 /* PropertyAssignment */: - case 246 /* ShorthandPropertyAssignment */: - return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 107455 /* PropertyExcludes */); - case 247 /* EnumMember */: - return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 107455 /* EnumMemberExcludes */); - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - // If this is an ObjectLiteralExpression method, then it sits in the same space - // as other properties in the object literal. So we use SymbolFlags.PropertyExcludes - // so that it will conflict with any other object literal members with the same - // name. - return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 107455 /* PropertyExcludes */ : 99263 /* MethodExcludes */); - case 213 /* FunctionDeclaration */: - checkStrictModeFunctionName(node); - return declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 106927 /* FunctionExcludes */); - case 144 /* Constructor */: - return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */); - case 145 /* GetAccessor */: - return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */); - case 146 /* SetAccessor */: - return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - return bindFunctionOrConstructorType(node); - case 155 /* TypeLiteral */: - return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type"); - case 165 /* ObjectLiteralExpression */: - return bindObjectLiteralExpression(node); - case 173 /* FunctionExpression */: - case 174 /* ArrowFunction */: - checkStrictModeFunctionName(node); - var bindingName = node.name ? node.name.text : "__function"; - return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); - case 186 /* ClassExpression */: - case 214 /* ClassDeclaration */: - return bindClassLikeDeclaration(node); - case 215 /* InterfaceDeclaration */: - return bindBlockScopedDeclaration(node, 64 /* Interface */, 792960 /* InterfaceExcludes */); - case 216 /* TypeAliasDeclaration */: - return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793056 /* TypeAliasExcludes */); - case 217 /* EnumDeclaration */: - return bindEnumDeclaration(node); - case 218 /* ModuleDeclaration */: - return bindModuleDeclaration(node); - case 221 /* ImportEqualsDeclaration */: - case 224 /* NamespaceImport */: - case 226 /* ImportSpecifier */: - case 230 /* ExportSpecifier */: - return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - case 223 /* ImportClause */: - return bindImportClause(node); - case 228 /* ExportDeclaration */: - return bindExportDeclaration(node); - case 227 /* ExportAssignment */: - return bindExportAssignment(node); - case 248 /* SourceFile */: - return bindSourceFileIfExternalModule(); - } - } - function bindSourceFileIfExternalModule() { - setExportContextFlag(file); - if (ts.isExternalModule(file)) { - bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"" + ts.removeFileExtension(file.fileName) + "\""); - } - } - function bindExportAssignment(node) { - if (!container.symbol || !container.symbol.exports) { - // Export assignment in some sort of block construct - bindAnonymousDeclaration(node, 8388608 /* Alias */, getDeclarationName(node)); - } - else if (node.expression.kind === 69 /* Identifier */) { - // An export default clause with an identifier exports all meanings of that identifier - declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* Alias */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); - } - else { - // An export default clause with an expression exports a value - declareSymbol(container.symbol.exports, container.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); - } - } - function bindExportDeclaration(node) { - if (!container.symbol || !container.symbol.exports) { - // Export * in some sort of block construct - bindAnonymousDeclaration(node, 1073741824 /* ExportStar */, getDeclarationName(node)); - } - else if (!node.exportClause) { - // All export * declarations are collected in an __export symbol - declareSymbol(container.symbol.exports, container.symbol, node, 1073741824 /* ExportStar */, 0 /* None */); - } - } - function bindImportClause(node) { - if (node.name) { - declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - } - } - function bindClassLikeDeclaration(node) { - if (node.kind === 214 /* ClassDeclaration */) { - bindBlockScopedDeclaration(node, 32 /* Class */, 899519 /* ClassExcludes */); - } - else { - var bindingName = node.name ? node.name.text : "__class"; - bindAnonymousDeclaration(node, 32 /* Class */, bindingName); - // Add name of class expression into the map for semantic classifier - if (node.name) { - classifiableNames[node.name.text] = node.name.text; - } - } - var symbol = node.symbol; - // TypeScript 1.0 spec (April 2014): 8.4 - // Every class automatically contains a static property member named 'prototype', the - // type of which is an instantiation of the class type with type Any supplied as a type - // argument for each type parameter. It is an error to explicitly declare a static - // property member with the name 'prototype'. - // - // Note: we check for this here because this class may be merging into a module. The - // module might have an exported variable called 'prototype'. We can't allow that as - // that would clash with the built-in 'prototype' for the class. - var prototypeSymbol = createSymbol(4 /* Property */ | 134217728 /* Prototype */, "prototype"); - if (ts.hasProperty(symbol.exports, prototypeSymbol.name)) { - if (node.name) { - node.name.parent = node; - } - file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name)); - } - symbol.exports[prototypeSymbol.name] = prototypeSymbol; - prototypeSymbol.parent = symbol; - } - function bindEnumDeclaration(node) { - return ts.isConst(node) - ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) - : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); - } - function bindVariableDeclarationOrBindingElement(node) { - if (inStrictMode) { - checkStrictModeEvalOrArguments(node, node.name); - } - if (!ts.isBindingPattern(node.name)) { - if (ts.isBlockOrCatchScoped(node)) { - bindBlockScopedVariableDeclaration(node); - } - else if (ts.isParameterDeclaration(node)) { - // It is safe to walk up parent chain to find whether the node is a destructing parameter declaration - // because its parent chain has already been set up, since parents are set before descending into children. - // - // If node is a binding element in parameter declaration, we need to use ParameterExcludes. - // Using ParameterExcludes flag allows the compiler to report an error on duplicate identifiers in Parameter Declaration - // For example: - // function foo([a,a]) {} // Duplicate Identifier error - // function bar(a,a) {} // Duplicate Identifier error, parameter declaration in this case is handled in bindParameter - // // which correctly set excluded symbols - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); - } - else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107454 /* FunctionScopedVariableExcludes */); - } - } - } - function bindParameter(node) { - if (inStrictMode) { - // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a - // strict mode FunctionLikeDeclaration or FunctionExpression(13.1) - checkStrictModeEvalOrArguments(node, node.name); - } - if (ts.isBindingPattern(node.name)) { - bindAnonymousDeclaration(node, 1 /* FunctionScopedVariable */, getDestructuringParameterName(node)); - } - else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); - } - // If this is a property-parameter, then also declare the property symbol into the - // containing class. - if (node.flags & 56 /* AccessibilityModifier */ && - node.parent.kind === 144 /* Constructor */ && - ts.isClassLike(node.parent.parent)) { - var classDeclaration = node.parent.parent; - declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */); - } - } - function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { - return ts.hasDynamicName(node) - ? bindAnonymousDeclaration(node, symbolFlags, "__computed") - : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); - } - // reachability checks - function pushNamedLabel(name) { - initializeReachabilityStateIfNecessary(); - if (ts.hasProperty(labelIndexMap, name.text)) { - return false; - } - labelIndexMap[name.text] = labelStack.push(1 /* Unintialized */) - 1; - return true; - } - function pushImplicitLabel() { - initializeReachabilityStateIfNecessary(); - var index = labelStack.push(1 /* Unintialized */) - 1; - implicitLabels.push(index); - return index; - } - function popNamedLabel(label, outerState) { - var index = labelIndexMap[label.text]; - ts.Debug.assert(index !== undefined); - ts.Debug.assert(labelStack.length == index + 1); - labelIndexMap[label.text] = undefined; - setCurrentStateAtLabel(labelStack.pop(), outerState, label); - } - function popImplicitLabel(implicitLabelIndex, outerState) { - if (labelStack.length !== implicitLabelIndex + 1) { - ts.Debug.assert(false, "Label stack: " + labelStack.length + ", index:" + implicitLabelIndex); - } - var i = implicitLabels.pop(); - if (implicitLabelIndex !== i) { - ts.Debug.assert(false, "i: " + i + ", index: " + implicitLabelIndex); - } - setCurrentStateAtLabel(labelStack.pop(), outerState, /*name*/ undefined); - } - function setCurrentStateAtLabel(innerMergedState, outerState, label) { - if (innerMergedState === 1 /* Unintialized */) { - if (label && !options.allowUnusedLabels) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(label, ts.Diagnostics.Unused_label)); - } - currentReachabilityState = outerState; - } - else { - currentReachabilityState = or(innerMergedState, outerState); - } - } - function jumpToLabel(label, outerState) { - initializeReachabilityStateIfNecessary(); - var index = label ? labelIndexMap[label.text] : ts.lastOrUndefined(implicitLabels); - if (index === undefined) { - // reference to unknown label or - // break/continue used outside of loops - return false; - } - var stateAtLabel = labelStack[index]; - labelStack[index] = stateAtLabel === 1 /* Unintialized */ ? outerState : or(stateAtLabel, outerState); - return true; - } - function checkUnreachable(node) { - switch (currentReachabilityState) { - case 4 /* Unreachable */: - var reportError = - // report error on all statements - ts.isStatement(node) || - // report error on class declarations - node.kind === 214 /* ClassDeclaration */ || - // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - (node.kind === 218 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || - // report error on regular enums and const enums if preserveConstEnums is set - (node.kind === 217 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); - if (reportError) { - currentReachabilityState = 8 /* ReportedUnreachable */; - // unreachable code is reported if - // - user has explicitly asked about it AND - // - statement is in not ambient context (statements in ambient context is already an error - // so we should not report extras) AND - // - node is not variable statement OR - // - node is block scoped variable statement OR - // - node is not block scoped variable statement and at least one variable declaration has initializer - // Rationale: we don't want to report errors on non-initialized var's since they are hoisted - // On the other side we do want to report errors on non-initialized 'lets' because of TDZ - var reportUnreachableCode = !options.allowUnreachableCode && - !ts.isInAmbientContext(node) && - (node.kind !== 193 /* VariableStatement */ || - ts.getCombinedNodeFlags(node.declarationList) & 24576 /* BlockScoped */ || - ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); - if (reportUnreachableCode) { - errorOnFirstToken(node, ts.Diagnostics.Unreachable_code_detected); - } - } - case 8 /* ReportedUnreachable */: - return true; - default: - return false; - } - function shouldReportErrorOnModuleDeclaration(node) { - var instanceState = getModuleInstanceState(node); - return instanceState === 1 /* Instantiated */ || (instanceState === 2 /* ConstEnumOnly */ && options.preserveConstEnums); - } - } - function initializeReachabilityStateIfNecessary() { - if (labelIndexMap) { - return; - } - currentReachabilityState = 2 /* Reachable */; - labelIndexMap = {}; - labelStack = []; - implicitLabels = []; - } - } -})(ts || (ts = {})); -/// -/// -/* @internal */ -var ts; -(function (ts) { - function getDeclarationOfKind(symbol, kind) { - var declarations = symbol.declarations; - if (declarations) { - for (var _i = 0, declarations_1 = declarations; _i < declarations_1.length; _i++) { - var declaration = declarations_1[_i]; - if (declaration.kind === kind) { - return declaration; - } - } - } - return undefined; - } - ts.getDeclarationOfKind = getDeclarationOfKind; - // Pool writers to avoid needing to allocate them for every symbol we write. - var stringWriters = []; - function getSingleLineStringWriter() { - if (stringWriters.length === 0) { - var str = ""; - var writeText = function (text) { return str += text; }; - return { - string: function () { return str; }, - writeKeyword: writeText, - writeOperator: writeText, - writePunctuation: writeText, - writeSpace: writeText, - writeStringLiteral: writeText, - writeParameter: writeText, - writeSymbol: writeText, - // Completely ignore indentation for string writers. And map newlines to - // a single space. - writeLine: function () { return str += " "; }, - increaseIndent: function () { }, - decreaseIndent: function () { }, - clear: function () { return str = ""; }, - trackSymbol: function () { }, - reportInaccessibleThisError: function () { } - }; - } - return stringWriters.pop(); - } - ts.getSingleLineStringWriter = getSingleLineStringWriter; - function releaseStringWriter(writer) { - writer.clear(); - stringWriters.push(writer); - } - ts.releaseStringWriter = releaseStringWriter; - function getFullWidth(node) { - return node.end - node.pos; - } - ts.getFullWidth = getFullWidth; - function arrayIsEqualTo(array1, array2, equaler) { - if (!array1 || !array2) { - return array1 === array2; - } - if (array1.length !== array2.length) { - return false; - } - for (var i = 0; i < array1.length; ++i) { - var equals = equaler ? equaler(array1[i], array2[i]) : array1[i] === array2[i]; - if (!equals) { - return false; - } - } - return true; - } - ts.arrayIsEqualTo = arrayIsEqualTo; - function hasResolvedModule(sourceFile, moduleNameText) { - return sourceFile.resolvedModules && ts.hasProperty(sourceFile.resolvedModules, moduleNameText); - } - ts.hasResolvedModule = hasResolvedModule; - function getResolvedModule(sourceFile, moduleNameText) { - return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules[moduleNameText] : undefined; - } - ts.getResolvedModule = getResolvedModule; - function setResolvedModule(sourceFile, moduleNameText, resolvedModule) { - if (!sourceFile.resolvedModules) { - sourceFile.resolvedModules = {}; - } - sourceFile.resolvedModules[moduleNameText] = resolvedModule; - } - ts.setResolvedModule = setResolvedModule; - // Returns true if this node contains a parse error anywhere underneath it. - function containsParseError(node) { - aggregateChildData(node); - return (node.parserContextFlags & 64 /* ThisNodeOrAnySubNodesHasError */) !== 0; - } - ts.containsParseError = containsParseError; - function aggregateChildData(node) { - if (!(node.parserContextFlags & 128 /* HasAggregatedChildData */)) { - // A node is considered to contain a parse error if: - // a) the parser explicitly marked that it had an error - // b) any of it's children reported that it had an error. - var thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & 16 /* ThisNodeHasError */) !== 0) || - ts.forEachChild(node, containsParseError); - // If so, mark ourselves accordingly. - if (thisNodeOrAnySubNodesHasError) { - node.parserContextFlags |= 64 /* ThisNodeOrAnySubNodesHasError */; - } - // Also mark that we've propogated the child information to this node. This way we can - // always consult the bit directly on this node without needing to check its children - // again. - node.parserContextFlags |= 128 /* HasAggregatedChildData */; - } - } - function getSourceFileOfNode(node) { - while (node && node.kind !== 248 /* SourceFile */) { - node = node.parent; - } - return node; - } - ts.getSourceFileOfNode = getSourceFileOfNode; - function getStartPositionOfLine(line, sourceFile) { - ts.Debug.assert(line >= 0); - return ts.getLineStarts(sourceFile)[line]; - } - ts.getStartPositionOfLine = getStartPositionOfLine; - // This is a useful function for debugging purposes. - function nodePosToString(node) { - var file = getSourceFileOfNode(node); - var loc = ts.getLineAndCharacterOfPosition(file, node.pos); - return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")"; - } - ts.nodePosToString = nodePosToString; - function getStartPosOfNode(node) { - return node.pos; - } - ts.getStartPosOfNode = getStartPosOfNode; - // Returns true if this node is missing from the actual source code. A 'missing' node is different - // from 'undefined/defined'. When a node is undefined (which can happen for optional nodes - // in the tree), it is definitely missing. However, a node may be defined, but still be - // missing. This happens whenever the parser knows it needs to parse something, but can't - // get anything in the source code that it expects at that location. For example: - // - // let a: ; - // - // Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source - // code). So the parser will attempt to parse out a type, and will create an actual node. - // However, this node will be 'missing' in the sense that no actual source-code/tokens are - // contained within it. - function nodeIsMissing(node) { - if (!node) { - return true; - } - return node.pos === node.end && node.pos >= 0 && node.kind !== 1 /* EndOfFileToken */; - } - ts.nodeIsMissing = nodeIsMissing; - function nodeIsPresent(node) { - return !nodeIsMissing(node); - } - ts.nodeIsPresent = nodeIsPresent; - function getTokenPosOfNode(node, sourceFile) { - // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* - // want to skip trivia because this will launch us forward to the next token. - if (nodeIsMissing(node)) { - return node.pos; - } - return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); - } - ts.getTokenPosOfNode = getTokenPosOfNode; - function getNonDecoratorTokenPosOfNode(node, sourceFile) { - if (nodeIsMissing(node) || !node.decorators) { - return getTokenPosOfNode(node, sourceFile); - } - return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.decorators.end); - } - ts.getNonDecoratorTokenPosOfNode = getNonDecoratorTokenPosOfNode; - function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia) { - if (includeTrivia === void 0) { includeTrivia = false; } - if (nodeIsMissing(node)) { - return ""; - } - var text = sourceFile.text; - return text.substring(includeTrivia ? node.pos : ts.skipTrivia(text, node.pos), node.end); - } - ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; - function getTextOfNodeFromSourceText(sourceText, node) { - if (nodeIsMissing(node)) { - return ""; - } - return sourceText.substring(ts.skipTrivia(sourceText, node.pos), node.end); - } - ts.getTextOfNodeFromSourceText = getTextOfNodeFromSourceText; - function getTextOfNode(node, includeTrivia) { - if (includeTrivia === void 0) { includeTrivia = false; } - return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia); - } - ts.getTextOfNode = getTextOfNode; - // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' - function escapeIdentifier(identifier) { - return identifier.length >= 2 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ ? "_" + identifier : identifier; - } - ts.escapeIdentifier = escapeIdentifier; - // Remove extra underscore from escaped identifier - function unescapeIdentifier(identifier) { - return identifier.length >= 3 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ && identifier.charCodeAt(2) === 95 /* _ */ ? identifier.substr(1) : identifier; - } - ts.unescapeIdentifier = unescapeIdentifier; - // Make an identifier from an external module name by extracting the string after the last "/" and replacing - // all non-alphanumeric characters with underscores - function makeIdentifierFromModuleName(moduleName) { - return ts.getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); - } - ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; - function isBlockOrCatchScoped(declaration) { - return (getCombinedNodeFlags(declaration) & 24576 /* BlockScoped */) !== 0 || - isCatchClauseVariableDeclaration(declaration); - } - ts.isBlockOrCatchScoped = isBlockOrCatchScoped; - // Gets the nearest enclosing block scope container that has the provided node - // as a descendant, that is not the provided node. - function getEnclosingBlockScopeContainer(node) { - var current = node.parent; - while (current) { - if (isFunctionLike(current)) { - return current; - } - switch (current.kind) { - case 248 /* SourceFile */: - case 220 /* CaseBlock */: - case 244 /* CatchClause */: - case 218 /* ModuleDeclaration */: - case 199 /* ForStatement */: - case 200 /* ForInStatement */: - case 201 /* ForOfStatement */: - return current; - case 192 /* Block */: - // function block is not considered block-scope container - // see comment in binder.ts: bind(...), case for SyntaxKind.Block - if (!isFunctionLike(current.parent)) { - return current; - } - } - current = current.parent; + current = current.parent; } } ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; @@ -5812,6 +4503,10 @@ var ts; return file.externalModuleIndicator !== undefined; } ts.isExternalModule = isExternalModule; + function isExternalOrCommonJsModule(file) { + return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined; + } + ts.isExternalOrCommonJsModule = isExternalOrCommonJsModule; function isDeclarationFile(file) { return (file.flags & 4096 /* DeclarationFile */) !== 0; } @@ -5865,19 +4560,27 @@ var ts; return ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos); } ts.getLeadingCommentRangesOfNode = getLeadingCommentRangesOfNode; + function getLeadingCommentRangesOfNodeFromText(node, text) { + return ts.getLeadingCommentRanges(text, node.pos); + } + ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText; function getJsDocComments(node, sourceFileOfNode) { + return getJsDocCommentsFromText(node, sourceFileOfNode.text); + } + ts.getJsDocComments = getJsDocComments; + function getJsDocCommentsFromText(node, text) { var commentRanges = (node.kind === 138 /* Parameter */ || node.kind === 137 /* TypeParameter */) ? - ts.concatenate(ts.getTrailingCommentRanges(sourceFileOfNode.text, node.pos), ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos)) : - getLeadingCommentRangesOfNode(node, sourceFileOfNode); + ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : + getLeadingCommentRangesOfNodeFromText(node, text); return ts.filter(commentRanges, isJsDocComment); function isJsDocComment(comment) { // True if the comment starts with '/**' but not if it is '/**/' - return sourceFileOfNode.text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && - sourceFileOfNode.text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && - sourceFileOfNode.text.charCodeAt(comment.pos + 3) !== 47 /* slash */; + return text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && + text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && + text.charCodeAt(comment.pos + 3) !== 47 /* slash */; } } - ts.getJsDocComments = getJsDocComments; + ts.getJsDocCommentsFromText = getJsDocCommentsFromText; ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isTypeNode(node) { @@ -6464,6 +5167,57 @@ var ts; return node.kind === 221 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 232 /* ExternalModuleReference */; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; + function isSourceFileJavaScript(file) { + return isInJavaScriptFile(file); + } + ts.isSourceFileJavaScript = isSourceFileJavaScript; + function isInJavaScriptFile(node) { + return node && !!(node.parserContextFlags & 32 /* JavaScriptFile */); + } + ts.isInJavaScriptFile = isInJavaScriptFile; + /** + * Returns true if the node is a CallExpression to the identifier 'require' with + * exactly one string literal argument. + * This function does not test if the node is in a JavaScript file or not. + */ + function isRequireCall(expression) { + // of the form 'require("name")' + return expression.kind === 168 /* CallExpression */ && + expression.expression.kind === 69 /* Identifier */ && + expression.expression.text === "require" && + expression.arguments.length === 1 && + expression.arguments[0].kind === 9 /* StringLiteral */; + } + ts.isRequireCall = isRequireCall; + /** + * Returns true if the node is an assignment to a property on the identifier 'exports'. + * This function does not test if the node is in a JavaScript file or not. + */ + function isExportsPropertyAssignment(expression) { + // of the form 'exports.name = expr' where 'name' and 'expr' are arbitrary + return isInJavaScriptFile(expression) && + (expression.kind === 181 /* BinaryExpression */) && + (expression.operatorToken.kind === 56 /* EqualsToken */) && + (expression.left.kind === 166 /* PropertyAccessExpression */) && + (expression.left.expression.kind === 69 /* Identifier */) && + ((expression.left.expression).text === "exports"); + } + ts.isExportsPropertyAssignment = isExportsPropertyAssignment; + /** + * Returns true if the node is an assignment to the property access expression 'module.exports'. + * This function does not test if the node is in a JavaScript file or not. + */ + function isModuleExportsAssignment(expression) { + // of the form 'module.exports = expr' where 'expr' is arbitrary + return isInJavaScriptFile(expression) && + (expression.kind === 181 /* BinaryExpression */) && + (expression.operatorToken.kind === 56 /* EqualsToken */) && + (expression.left.kind === 166 /* PropertyAccessExpression */) && + (expression.left.expression.kind === 69 /* Identifier */) && + ((expression.left.expression).text === "module") && + (expression.left.name.text === "exports"); + } + ts.isModuleExportsAssignment = isModuleExportsAssignment; function getExternalModuleName(node) { if (node.kind === 222 /* ImportDeclaration */) { return node.moduleSpecifier; @@ -6791,8 +5545,8 @@ var ts; function getFileReferenceFromReferencePath(comment, commentRange) { var simpleReferenceRegEx = /^\/\/\/\s*/gim; - if (simpleReferenceRegEx.exec(comment)) { - if (isNoDefaultLibRegEx.exec(comment)) { + if (simpleReferenceRegEx.test(comment)) { + if (isNoDefaultLibRegEx.test(comment)) { return { isNoDefaultLib: true }; @@ -6834,6 +5588,10 @@ var ts; return isFunctionLike(node) && (node.flags & 256 /* Async */) !== 0 && !isAccessor(node); } ts.isAsyncFunctionLike = isAsyncFunctionLike; + function isStringOrNumericLiteral(kind) { + return kind === 9 /* StringLiteral */ || kind === 8 /* NumericLiteral */; + } + ts.isStringOrNumericLiteral = isStringOrNumericLiteral; /** * A declaration has a dynamic name if both of the following are true: * 1. The declaration has a computed property name @@ -6842,11 +5600,15 @@ var ts; * Symbol. */ function hasDynamicName(declaration) { - return declaration.name && - declaration.name.kind === 136 /* ComputedPropertyName */ && - !isWellKnownSymbolSyntactically(declaration.name.expression); + return declaration.name && isDynamicName(declaration.name); } ts.hasDynamicName = hasDynamicName; + function isDynamicName(name) { + return name.kind === 136 /* ComputedPropertyName */ && + !isStringOrNumericLiteral(name.expression.kind) && + !isWellKnownSymbolSyntactically(name.expression); + } + ts.isDynamicName = isDynamicName; /** * Checks if the expression is of the form: * Symbol.name @@ -7087,11 +5849,11 @@ var ts; } ts.getIndentSize = getIndentSize; function createTextWriter(newLine) { - var output = ""; - var indent = 0; - var lineStart = true; - var lineCount = 0; - var linePos = 0; + var output; + var indent; + var lineStart; + var lineCount; + var linePos; function write(s) { if (s && s.length) { if (lineStart) { @@ -7101,6 +5863,13 @@ var ts; output += s; } } + function reset() { + output = ""; + indent = 0; + lineStart = true; + lineCount = 0; + linePos = 0; + } function rawWrite(s) { if (s !== undefined) { if (lineStart) { @@ -7127,9 +5896,10 @@ var ts; lineStart = true; } } - function writeTextOfNode(sourceFile, node) { - write(getSourceTextOfNodeFromSourceFile(sourceFile, node)); + function writeTextOfNode(text, node) { + write(getTextOfNodeFromSourceText(text, node)); } + reset(); return { write: write, rawWrite: rawWrite, @@ -7142,10 +5912,20 @@ var ts; getTextPos: function () { return output.length; }, getLine: function () { return lineCount + 1; }, getColumn: function () { return lineStart ? indent * getIndentSize() + 1 : output.length - linePos + 1; }, - getText: function () { return output; } + getText: function () { return output; }, + reset: reset }; } ts.createTextWriter = createTextWriter; + /** + * Resolves a local path to a path which is absolute to the base of the emit + */ + function getExternalModuleNameFromPath(host, fileName) { + var dir = host.getCurrentDirectory(); + var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, fileName, dir, function (f) { return host.getCanonicalFileName(f); }, /*isAbsolutePathAnUrl*/ false); + return ts.removeFileExtension(relativePath); + } + ts.getExternalModuleNameFromPath = getExternalModuleNameFromPath; function getOwnEmitOutputFilePath(sourceFile, host, extension) { var compilerOptions = host.getCompilerOptions(); var emitOutputFilePathWithoutExtension; @@ -7174,6 +5954,10 @@ var ts; return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; } ts.getLineOfLocalPosition = getLineOfLocalPosition; + function getLineOfLocalPositionFromLineMap(lineMap, pos) { + return ts.computeLineAndCharacterOfPosition(lineMap, pos).line; + } + ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { if (member.kind === 144 /* Constructor */ && nodeIsPresent(member.body)) { @@ -7246,22 +6030,22 @@ var ts; }; } ts.getAllAccessorDeclarations = getAllAccessorDeclarations; - function emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments) { + function emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments) { // If the leading comments start on different line than the start of node, write new line if (leadingComments && leadingComments.length && node.pos !== leadingComments[0].pos && - getLineOfLocalPosition(currentSourceFile, node.pos) !== getLineOfLocalPosition(currentSourceFile, leadingComments[0].pos)) { + getLineOfLocalPositionFromLineMap(lineMap, node.pos) !== getLineOfLocalPositionFromLineMap(lineMap, leadingComments[0].pos)) { writer.writeLine(); } } ts.emitNewLineBeforeLeadingComments = emitNewLineBeforeLeadingComments; - function emitComments(currentSourceFile, writer, comments, trailingSeparator, newLine, writeComment) { + function emitComments(text, lineMap, writer, comments, trailingSeparator, newLine, writeComment) { var emitLeadingSpace = !trailingSeparator; ts.forEach(comments, function (comment) { if (emitLeadingSpace) { writer.write(" "); emitLeadingSpace = false; } - writeComment(currentSourceFile, writer, comment, newLine); + writeComment(text, lineMap, writer, comment, newLine); if (comment.hasTrailingNewLine) { writer.writeLine(); } @@ -7279,7 +6063,7 @@ var ts; * Detached comment is a comment at the top of file or function body that is separated from * the next statement by space. */ - function emitDetachedComments(currentSourceFile, writer, writeComment, node, newLine, removeComments) { + function emitDetachedComments(text, lineMap, writer, writeComment, node, newLine, removeComments) { var leadingComments; var currentDetachedCommentInfo; if (removeComments) { @@ -7289,12 +6073,12 @@ var ts; // // var x = 10; if (node.pos === 0) { - leadingComments = ts.filter(ts.getLeadingCommentRanges(currentSourceFile.text, node.pos), isPinnedComment); + leadingComments = ts.filter(ts.getLeadingCommentRanges(text, node.pos), isPinnedComment); } } else { // removeComments is false, just get detached as normal and bypass the process to filter comment - leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos); + leadingComments = ts.getLeadingCommentRanges(text, node.pos); } if (leadingComments) { var detachedComments = []; @@ -7302,8 +6086,8 @@ var ts; for (var _i = 0, leadingComments_1 = leadingComments; _i < leadingComments_1.length; _i++) { var comment = leadingComments_1[_i]; if (lastComment) { - var lastCommentLine = getLineOfLocalPosition(currentSourceFile, lastComment.end); - var commentLine = getLineOfLocalPosition(currentSourceFile, comment.pos); + var lastCommentLine = getLineOfLocalPositionFromLineMap(lineMap, lastComment.end); + var commentLine = getLineOfLocalPositionFromLineMap(lineMap, comment.pos); if (commentLine >= lastCommentLine + 2) { // There was a blank line between the last comment and this comment. This // comment is not part of the copyright comments. Return what we have so @@ -7318,36 +6102,36 @@ var ts; // All comments look like they could have been part of the copyright header. Make // sure there is at least one blank line between it and the node. If not, it's not // a copyright header. - var lastCommentLine = getLineOfLocalPosition(currentSourceFile, ts.lastOrUndefined(detachedComments).end); - var nodeLine = getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.pos)); + var lastCommentLine = getLineOfLocalPositionFromLineMap(lineMap, ts.lastOrUndefined(detachedComments).end); + var nodeLine = getLineOfLocalPositionFromLineMap(lineMap, ts.skipTrivia(text, node.pos)); if (nodeLine >= lastCommentLine + 2) { // Valid detachedComments - emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); - emitComments(currentSourceFile, writer, detachedComments, /*trailingSeparator*/ true, newLine, writeComment); + emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments); + emitComments(text, lineMap, writer, detachedComments, /*trailingSeparator*/ true, newLine, writeComment); currentDetachedCommentInfo = { nodePos: node.pos, detachedCommentEndPos: ts.lastOrUndefined(detachedComments).end }; } } } return currentDetachedCommentInfo; function isPinnedComment(comment) { - return currentSourceFile.text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && - currentSourceFile.text.charCodeAt(comment.pos + 2) === 33 /* exclamation */; + return text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && + text.charCodeAt(comment.pos + 2) === 33 /* exclamation */; } } ts.emitDetachedComments = emitDetachedComments; - function writeCommentRange(currentSourceFile, writer, comment, newLine) { - if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42 /* asterisk */) { - var firstCommentLineAndCharacter = ts.getLineAndCharacterOfPosition(currentSourceFile, comment.pos); - var lineCount = ts.getLineStarts(currentSourceFile).length; + function writeCommentRange(text, lineMap, writer, comment, newLine) { + if (text.charCodeAt(comment.pos + 1) === 42 /* asterisk */) { + var firstCommentLineAndCharacter = ts.computeLineAndCharacterOfPosition(lineMap, comment.pos); + var lineCount = lineMap.length; var firstCommentLineIndent; for (var pos = comment.pos, currentLine = firstCommentLineAndCharacter.line; pos < comment.end; currentLine++) { var nextLineStart = (currentLine + 1) === lineCount - ? currentSourceFile.text.length + 1 - : getStartPositionOfLine(currentLine + 1, currentSourceFile); + ? text.length + 1 + : lineMap[currentLine + 1]; if (pos !== comment.pos) { // If we are not emitting first line, we need to write the spaces to adjust the alignment if (firstCommentLineIndent === undefined) { - firstCommentLineIndent = calculateIndent(getStartPositionOfLine(firstCommentLineAndCharacter.line, currentSourceFile), comment.pos); + firstCommentLineIndent = calculateIndent(text, lineMap[firstCommentLineAndCharacter.line], comment.pos); } // These are number of spaces writer is going to write at current indent var currentWriterIndentSpacing = writer.getIndent() * getIndentSize(); @@ -7365,7 +6149,7 @@ var ts; // More right indented comment */ --4 = 8 - 4 + 11 // class c { } // } - var spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(pos, nextLineStart); + var spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(text, pos, nextLineStart); if (spacesToEmit > 0) { var numberOfSingleSpacesToEmit = spacesToEmit % getIndentSize(); var indentSizeSpaceString = getIndentString((spacesToEmit - numberOfSingleSpacesToEmit) / getIndentSize()); @@ -7383,45 +6167,45 @@ var ts; } } // Write the comment line text - writeTrimmedCurrentLine(pos, nextLineStart); + writeTrimmedCurrentLine(text, comment, writer, newLine, pos, nextLineStart); pos = nextLineStart; } } else { // Single line comment of style //.... - writer.write(currentSourceFile.text.substring(comment.pos, comment.end)); - } - function writeTrimmedCurrentLine(pos, nextLineStart) { - var end = Math.min(comment.end, nextLineStart - 1); - var currentLineText = currentSourceFile.text.substring(pos, end).replace(/^\s+|\s+$/g, ""); - if (currentLineText) { - // trimmed forward and ending spaces text - writer.write(currentLineText); - if (end !== comment.end) { - writer.writeLine(); - } - } - else { - // Empty string - make sure we write empty line - writer.writeLiteral(newLine); + writer.write(text.substring(comment.pos, comment.end)); + } + } + ts.writeCommentRange = writeCommentRange; + function writeTrimmedCurrentLine(text, comment, writer, newLine, pos, nextLineStart) { + var end = Math.min(comment.end, nextLineStart - 1); + var currentLineText = text.substring(pos, end).replace(/^\s+|\s+$/g, ""); + if (currentLineText) { + // trimmed forward and ending spaces text + writer.write(currentLineText); + if (end !== comment.end) { + writer.writeLine(); } } - function calculateIndent(pos, end) { - var currentLineIndent = 0; - for (; pos < end && ts.isWhiteSpace(currentSourceFile.text.charCodeAt(pos)); pos++) { - if (currentSourceFile.text.charCodeAt(pos) === 9 /* tab */) { - // Tabs = TabSize = indent size and go to next tabStop - currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); - } - else { - // Single space - currentLineIndent++; - } + else { + // Empty string - make sure we write empty line + writer.writeLiteral(newLine); + } + } + function calculateIndent(text, pos, end) { + var currentLineIndent = 0; + for (; pos < end && ts.isWhiteSpace(text.charCodeAt(pos)); pos++) { + if (text.charCodeAt(pos) === 9 /* tab */) { + // Tabs = TabSize = indent size and go to next tabStop + currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); + } + else { + // Single space + currentLineIndent++; } - return currentLineIndent; } + return currentLineIndent; } - ts.writeCommentRange = writeCommentRange; function modifierToFlag(token) { switch (token) { case 113 /* StaticKeyword */: return 64 /* Static */; @@ -7517,14 +6301,14 @@ var ts; return symbol && symbol.valueDeclaration && (symbol.valueDeclaration.flags & 512 /* Default */) ? symbol.valueDeclaration.localSymbol : undefined; } ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault; - function isJavaScript(fileName) { - return ts.fileExtensionIs(fileName, ".js"); + function hasJavaScriptFileExtension(fileName) { + return ts.fileExtensionIs(fileName, ".js") || ts.fileExtensionIs(fileName, ".jsx"); } - ts.isJavaScript = isJavaScript; - function isTsx(fileName) { - return ts.fileExtensionIs(fileName, ".tsx"); + ts.hasJavaScriptFileExtension = hasJavaScriptFileExtension; + function allowsJsxExpressions(fileName) { + return ts.fileExtensionIs(fileName, ".tsx") || ts.fileExtensionIs(fileName, ".jsx"); } - ts.isTsx = isTsx; + ts.allowsJsxExpressions = allowsJsxExpressions; /** * Replace each instance of non-ascii characters by one, two, three, or four escape sequences * representing the UTF-8 encoding of the character, and return the expanded char code list. @@ -7835,18 +6619,20 @@ var ts; } ts.getTypeParameterOwner = getTypeParameterOwner; })(ts || (ts = {})); -/// /// +/// var ts; (function (ts) { - var nodeConstructors = new Array(272 /* Count */); /* @internal */ ts.parseTime = 0; - function getNodeConstructor(kind) { - return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)); - } - ts.getNodeConstructor = getNodeConstructor; + var NodeConstructor; + var SourceFileConstructor; function createNode(kind, pos, end) { - return new (getNodeConstructor(kind))(pos, end); + if (kind === 248 /* SourceFile */) { + return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); + } + else { + return new (NodeConstructor || (NodeConstructor = ts.objectAllocator.getNodeConstructor()))(kind, pos, end); + } } ts.createNode = createNode; function visitNode(cbNode, node) { @@ -8269,6 +7055,9 @@ var ts; // up by avoiding the cost of creating/compiling scanners over and over again. var scanner = ts.createScanner(2 /* Latest */, /*skipTrivia*/ true); var disallowInAndDecoratorContext = 1 /* DisallowIn */ | 4 /* Decorator */; + // capture constructors in 'initializeState' to avoid null checks + var NodeConstructor; + var SourceFileConstructor; var sourceFile; var parseDiagnostics; var syntaxCursor; @@ -8354,13 +7143,16 @@ var ts; // attached to the EOF token. var parseErrorBeforeNextFinishedNode = false; function parseSourceFile(fileName, _sourceText, languageVersion, _syntaxCursor, setParentNodes) { - initializeState(fileName, _sourceText, languageVersion, _syntaxCursor); + var isJavaScriptFile = ts.hasJavaScriptFileExtension(fileName) || _sourceText.lastIndexOf("// @language=javascript", 0) === 0; + initializeState(fileName, _sourceText, languageVersion, isJavaScriptFile, _syntaxCursor); var result = parseSourceFileWorker(fileName, languageVersion, setParentNodes); clearState(); return result; } Parser.parseSourceFile = parseSourceFile; - function initializeState(fileName, _sourceText, languageVersion, _syntaxCursor) { + function initializeState(fileName, _sourceText, languageVersion, isJavaScriptFile, _syntaxCursor) { + NodeConstructor = ts.objectAllocator.getNodeConstructor(); + SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor(); sourceText = _sourceText; syntaxCursor = _syntaxCursor; parseDiagnostics = []; @@ -8368,13 +7160,13 @@ var ts; identifiers = {}; identifierCount = 0; nodeCount = 0; - contextFlags = ts.isJavaScript(fileName) ? 32 /* JavaScriptFile */ : 0 /* None */; + contextFlags = isJavaScriptFile ? 32 /* JavaScriptFile */ : 0 /* None */; parseErrorBeforeNextFinishedNode = false; // Initialize and prime the scanner before parsing the source elements. scanner.setText(sourceText); scanner.setOnError(scanError); scanner.setScriptTarget(languageVersion); - scanner.setLanguageVariant(ts.isTsx(fileName) ? 1 /* JSX */ : 0 /* Standard */); + scanner.setLanguageVariant(ts.allowsJsxExpressions(fileName) ? 1 /* JSX */ : 0 /* Standard */); } function clearState() { // Clear out the text the scanner is pointing at, so it doesn't keep anything alive unnecessarily. @@ -8389,6 +7181,9 @@ var ts; } function parseSourceFileWorker(fileName, languageVersion, setParentNodes) { sourceFile = createSourceFile(fileName, languageVersion); + if (contextFlags & 32 /* JavaScriptFile */) { + sourceFile.parserContextFlags = 32 /* JavaScriptFile */; + } // Prime the scanner. token = nextToken(); processReferenceComments(sourceFile); @@ -8406,7 +7201,7 @@ var ts; // If this is a javascript file, proactively see if we can get JSDoc comments for // relevant nodes in the file. We'll use these to provide typing informaion if they're // available. - if (ts.isJavaScript(fileName)) { + if (ts.isSourceFileJavaScript(sourceFile)) { addJSDocComments(); } return sourceFile; @@ -8461,15 +7256,16 @@ var ts; } Parser.fixupParentReferences = fixupParentReferences; function createSourceFile(fileName, languageVersion) { - var sourceFile = createNode(248 /* SourceFile */, /*pos*/ 0); - sourceFile.pos = 0; - sourceFile.end = sourceText.length; + // code from createNode is inlined here so createNode won't have to deal with special case of creating source files + // this is quite rare comparing to other nodes and createNode should be as fast as possible + var sourceFile = new SourceFileConstructor(248 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length); + nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; sourceFile.languageVersion = languageVersion; sourceFile.fileName = ts.normalizePath(fileName); sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 4096 /* DeclarationFile */ : 0; - sourceFile.languageVariant = ts.isTsx(sourceFile.fileName) ? 1 /* JSX */ : 0 /* Standard */; + sourceFile.languageVariant = ts.allowsJsxExpressions(sourceFile.fileName) ? 1 /* JSX */ : 0 /* Standard */; return sourceFile; } function setContextFlag(val, flag) { @@ -8734,12 +7530,13 @@ var ts; return parseExpected(23 /* SemicolonToken */); } } + // note: this function creates only node function createNode(kind, pos) { nodeCount++; if (!(pos >= 0)) { pos = scanner.getStartPos(); } - return new (nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)))(pos, pos); + return new NodeConstructor(kind, pos, pos); } function finishNode(node, end) { node.end = end === undefined ? scanner.getStartPos() : end; @@ -8904,7 +7701,7 @@ var ts; case 12 /* ObjectLiteralMembers */: return token === 19 /* OpenBracketToken */ || token === 37 /* AsteriskToken */ || isLiteralPropertyName(); case 9 /* ObjectBindingElements */: - return isLiteralPropertyName(); + return token === 19 /* OpenBracketToken */ || isLiteralPropertyName(); case 7 /* HeritageClauseElement */: // If we see { } then only consume it as an expression if it is followed by , or { // That way we won't consume the body of a class in its heritage clause. @@ -9584,9 +8381,7 @@ var ts; } function parseParameterType() { if (parseOptional(54 /* ColonToken */)) { - return token === 9 /* StringLiteral */ - ? parseLiteralNode(/*internName*/ true) - : parseType(); + return parseType(); } return undefined; } @@ -9917,6 +8712,8 @@ var ts; // If these are followed by a dot, then parse these out as a dotted type reference instead. var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReferenceOrTypePredicate(); + case 9 /* StringLiteral */: + return parseLiteralNode(/*internName*/ true); case 103 /* VoidKeyword */: case 97 /* ThisKeyword */: return parseTokenNode(); @@ -9946,6 +8743,7 @@ var ts; case 19 /* OpenBracketToken */: case 25 /* LessThanToken */: case 92 /* NewKeyword */: + case 9 /* StringLiteral */: return true; case 17 /* OpenParenToken */: // Only consider '(' the start of a type if followed by ')', '...', an identifier, a modifier, @@ -10362,7 +9160,7 @@ var ts; return 1 /* True */; } // This *could* be a parenthesized arrow function. - // Return Unknown to let the caller know. + // Return Unknown to const the caller know. return 2 /* Unknown */; } else { @@ -10448,7 +9246,7 @@ var ts; // user meant to supply a block. For example, if the user wrote: // // a => - // let v = 0; + // const v = 0; // } // // they may be missing an open brace. Check to see if that's the case so we can @@ -10485,3202 +9283,4567 @@ var ts; function isInOrOfKeyword(t) { return t === 90 /* InKeyword */ || t === 134 /* OfKeyword */; } - function parseBinaryExpressionRest(precedence, leftOperand) { + function parseBinaryExpressionRest(precedence, leftOperand) { + while (true) { + // We either have a binary operator here, or we're finished. We call + // reScanGreaterToken so that we merge token sequences like > and = into >= + reScanGreaterToken(); + var newPrecedence = getBinaryOperatorPrecedence(); + // Check the precedence to see if we should "take" this operator + // - For left associative operator (all operator but **), consume the operator, + // recursively call the function below, and parse binaryExpression as a rightOperand + // of the caller if the new precendence of the operator is greater then or equal to the current precendence. + // For example: + // a - b - c; + // ^token; leftOperand = b. Return b to the caller as a rightOperand + // a * b - c + // ^token; leftOperand = b. Return b to the caller as a rightOperand + // a - b * c; + // ^token; leftOperand = b. Return b * c to the caller as a rightOperand + // - For right associative operator (**), consume the operator, recursively call the function + // and parse binaryExpression as a rightOperand of the caller if the new precendence of + // the operator is strictly grater than the current precendence + // For example: + // a ** b ** c; + // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand + // a - b ** c; + // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand + // a ** b - c + // ^token; leftOperand = b. Return b to the caller as a rightOperand + var consumeCurrentOperator = token === 38 /* AsteriskAsteriskToken */ ? + newPrecedence >= precedence : + newPrecedence > precedence; + if (!consumeCurrentOperator) { + break; + } + if (token === 90 /* InKeyword */ && inDisallowInContext()) { + break; + } + if (token === 116 /* AsKeyword */) { + // Make sure we *do* perform ASI for constructs like this: + // var x = foo + // as (Bar) + // This should be parsed as an initialized variable, followed + // by a function call to 'as' with the argument 'Bar' + if (scanner.hasPrecedingLineBreak()) { + break; + } + else { + nextToken(); + leftOperand = makeAsExpression(leftOperand, parseType()); + } + } + else { + leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence)); + } + } + return leftOperand; + } + function isBinaryOperator() { + if (inDisallowInContext() && token === 90 /* InKeyword */) { + return false; + } + return getBinaryOperatorPrecedence() > 0; + } + function getBinaryOperatorPrecedence() { + switch (token) { + case 52 /* BarBarToken */: + return 1; + case 51 /* AmpersandAmpersandToken */: + return 2; + case 47 /* BarToken */: + return 3; + case 48 /* CaretToken */: + return 4; + case 46 /* AmpersandToken */: + return 5; + case 30 /* EqualsEqualsToken */: + case 31 /* ExclamationEqualsToken */: + case 32 /* EqualsEqualsEqualsToken */: + case 33 /* ExclamationEqualsEqualsToken */: + return 6; + case 25 /* LessThanToken */: + case 27 /* GreaterThanToken */: + case 28 /* LessThanEqualsToken */: + case 29 /* GreaterThanEqualsToken */: + case 91 /* InstanceOfKeyword */: + case 90 /* InKeyword */: + case 116 /* AsKeyword */: + return 7; + case 43 /* LessThanLessThanToken */: + case 44 /* GreaterThanGreaterThanToken */: + case 45 /* GreaterThanGreaterThanGreaterThanToken */: + return 8; + case 35 /* PlusToken */: + case 36 /* MinusToken */: + return 9; + case 37 /* AsteriskToken */: + case 39 /* SlashToken */: + case 40 /* PercentToken */: + return 10; + case 38 /* AsteriskAsteriskToken */: + return 11; + } + // -1 is lower than all other precedences. Returning it will cause binary expression + // parsing to stop. + return -1; + } + function makeBinaryExpression(left, operatorToken, right) { + var node = createNode(181 /* BinaryExpression */, left.pos); + node.left = left; + node.operatorToken = operatorToken; + node.right = right; + return finishNode(node); + } + function makeAsExpression(left, right) { + var node = createNode(189 /* AsExpression */, left.pos); + node.expression = left; + node.type = right; + return finishNode(node); + } + function parsePrefixUnaryExpression() { + var node = createNode(179 /* PrefixUnaryExpression */); + node.operator = token; + nextToken(); + node.operand = parseSimpleUnaryExpression(); + return finishNode(node); + } + function parseDeleteExpression() { + var node = createNode(175 /* DeleteExpression */); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); + } + function parseTypeOfExpression() { + var node = createNode(176 /* TypeOfExpression */); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); + } + function parseVoidExpression() { + var node = createNode(177 /* VoidExpression */); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); + } + function isAwaitExpression() { + if (token === 119 /* AwaitKeyword */) { + if (inAwaitContext()) { + return true; + } + // here we are using similar heuristics as 'isYieldExpression' + return lookAhead(nextTokenIsIdentifierOnSameLine); + } + return false; + } + function parseAwaitExpression() { + var node = createNode(178 /* AwaitExpression */); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); + } + /** + * Parse ES7 unary expression and await expression + * + * ES7 UnaryExpression: + * 1) SimpleUnaryExpression[?yield] + * 2) IncrementExpression[?yield] ** UnaryExpression[?yield] + */ + function parseUnaryExpressionOrHigher() { + if (isAwaitExpression()) { + return parseAwaitExpression(); + } + if (isIncrementExpression()) { + var incrementExpression = parseIncrementExpression(); + return token === 38 /* AsteriskAsteriskToken */ ? + parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : + incrementExpression; + } + var unaryOperator = token; + var simpleUnaryExpression = parseSimpleUnaryExpression(); + if (token === 38 /* AsteriskAsteriskToken */) { + var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); + if (simpleUnaryExpression.kind === 171 /* TypeAssertionExpression */) { + parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); + } + else { + parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, ts.tokenToString(unaryOperator)); + } + } + return simpleUnaryExpression; + } + /** + * Parse ES7 simple-unary expression or higher: + * + * ES7 SimpleUnaryExpression: + * 1) IncrementExpression[?yield] + * 2) delete UnaryExpression[?yield] + * 3) void UnaryExpression[?yield] + * 4) typeof UnaryExpression[?yield] + * 5) + UnaryExpression[?yield] + * 6) - UnaryExpression[?yield] + * 7) ~ UnaryExpression[?yield] + * 8) ! UnaryExpression[?yield] + */ + function parseSimpleUnaryExpression() { + switch (token) { + case 35 /* PlusToken */: + case 36 /* MinusToken */: + case 50 /* TildeToken */: + case 49 /* ExclamationToken */: + return parsePrefixUnaryExpression(); + case 78 /* DeleteKeyword */: + return parseDeleteExpression(); + case 101 /* TypeOfKeyword */: + return parseTypeOfExpression(); + case 103 /* VoidKeyword */: + return parseVoidExpression(); + case 25 /* LessThanToken */: + // This is modified UnaryExpression grammar in TypeScript + // UnaryExpression (modified): + // < type > UnaryExpression + return parseTypeAssertion(); + default: + return parseIncrementExpression(); + } + } + /** + * Check if the current token can possibly be an ES7 increment expression. + * + * ES7 IncrementExpression: + * LeftHandSideExpression[?Yield] + * LeftHandSideExpression[?Yield][no LineTerminator here]++ + * LeftHandSideExpression[?Yield][no LineTerminator here]-- + * ++LeftHandSideExpression[?Yield] + * --LeftHandSideExpression[?Yield] + */ + function isIncrementExpression() { + // This function is called inside parseUnaryExpression to decide + // whether to call parseSimpleUnaryExpression or call parseIncrmentExpression directly + switch (token) { + case 35 /* PlusToken */: + case 36 /* MinusToken */: + case 50 /* TildeToken */: + case 49 /* ExclamationToken */: + case 78 /* DeleteKeyword */: + case 101 /* TypeOfKeyword */: + case 103 /* VoidKeyword */: + return false; + case 25 /* LessThanToken */: + // If we are not in JSX context, we are parsing TypeAssertion which is an UnaryExpression + if (sourceFile.languageVariant !== 1 /* JSX */) { + return false; + } + // We are in JSX context and the token is part of JSXElement. + // Fall through + default: + return true; + } + } + /** + * Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. + * + * ES7 IncrementExpression[yield]: + * 1) LeftHandSideExpression[?yield] + * 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ + * 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- + * 4) ++LeftHandSideExpression[?yield] + * 5) --LeftHandSideExpression[?yield] + * In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression + */ + function parseIncrementExpression() { + if (token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) { + var node = createNode(179 /* PrefixUnaryExpression */); + node.operator = token; + nextToken(); + node.operand = parseLeftHandSideExpressionOrHigher(); + return finishNode(node); + } + else if (sourceFile.languageVariant === 1 /* JSX */ && token === 25 /* LessThanToken */ && lookAhead(nextTokenIsIdentifierOrKeyword)) { + // JSXElement is part of primaryExpression + return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); + } + var expression = parseLeftHandSideExpressionOrHigher(); + ts.Debug.assert(ts.isLeftHandSideExpression(expression)); + if ((token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { + var node = createNode(180 /* PostfixUnaryExpression */, expression.pos); + node.operand = expression; + node.operator = token; + nextToken(); + return finishNode(node); + } + return expression; + } + function parseLeftHandSideExpressionOrHigher() { + // Original Ecma: + // LeftHandSideExpression: See 11.2 + // NewExpression + // CallExpression + // + // Our simplification: + // + // LeftHandSideExpression: See 11.2 + // MemberExpression + // CallExpression + // + // See comment in parseMemberExpressionOrHigher on how we replaced NewExpression with + // MemberExpression to make our lives easier. + // + // to best understand the below code, it's important to see how CallExpression expands + // out into its own productions: + // + // CallExpression: + // MemberExpression Arguments + // CallExpression Arguments + // CallExpression[Expression] + // CallExpression.IdentifierName + // super ( ArgumentListopt ) + // super.IdentifierName + // + // Because of the recursion in these calls, we need to bottom out first. There are two + // bottom out states we can run into. Either we see 'super' which must start either of + // the last two CallExpression productions. Or we have a MemberExpression which either + // completes the LeftHandSideExpression, or starts the beginning of the first four + // CallExpression productions. + var expression = token === 95 /* SuperKeyword */ + ? parseSuperExpression() + : parseMemberExpressionOrHigher(); + // Now, we *may* be complete. However, we might have consumed the start of a + // CallExpression. As such, we need to consume the rest of it here to be complete. + return parseCallExpressionRest(expression); + } + function parseMemberExpressionOrHigher() { + // Note: to make our lives simpler, we decompose the the NewExpression productions and + // place ObjectCreationExpression and FunctionExpression into PrimaryExpression. + // like so: + // + // PrimaryExpression : See 11.1 + // this + // Identifier + // Literal + // ArrayLiteral + // ObjectLiteral + // (Expression) + // FunctionExpression + // new MemberExpression Arguments? + // + // MemberExpression : See 11.2 + // PrimaryExpression + // MemberExpression[Expression] + // MemberExpression.IdentifierName + // + // CallExpression : See 11.2 + // MemberExpression + // CallExpression Arguments + // CallExpression[Expression] + // CallExpression.IdentifierName + // + // Technically this is ambiguous. i.e. CallExpression defines: + // + // CallExpression: + // CallExpression Arguments + // + // If you see: "new Foo()" + // + // Then that could be treated as a single ObjectCreationExpression, or it could be + // treated as the invocation of "new Foo". We disambiguate that in code (to match + // the original grammar) by making sure that if we see an ObjectCreationExpression + // we always consume arguments if they are there. So we treat "new Foo()" as an + // object creation only, and not at all as an invocation) Another way to think + // about this is that for every "new" that we see, we will consume an argument list if + // it is there as part of the *associated* object creation node. Any additional + // argument lists we see, will become invocation expressions. + // + // Because there are no other places in the grammar now that refer to FunctionExpression + // or ObjectCreationExpression, it is safe to push down into the PrimaryExpression + // production. + // + // Because CallExpression and MemberExpression are left recursive, we need to bottom out + // of the recursion immediately. So we parse out a primary expression to start with. + var expression = parsePrimaryExpression(); + return parseMemberExpressionRest(expression); + } + function parseSuperExpression() { + var expression = parseTokenNode(); + if (token === 17 /* OpenParenToken */ || token === 21 /* DotToken */ || token === 19 /* OpenBracketToken */) { + return expression; + } + // If we have seen "super" it must be followed by '(' or '.'. + // If it wasn't then just try to parse out a '.' and report an error. + var node = createNode(166 /* PropertyAccessExpression */, expression.pos); + node.expression = expression; + node.dotToken = parseExpectedToken(21 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + node.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); + return finishNode(node); + } + function parseJsxElementOrSelfClosingElement(inExpressionContext) { + var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); + var result; + if (opening.kind === 235 /* JsxOpeningElement */) { + var node = createNode(233 /* JsxElement */, opening.pos); + node.openingElement = opening; + node.children = parseJsxChildren(node.openingElement.tagName); + node.closingElement = parseJsxClosingElement(inExpressionContext); + result = finishNode(node); + } + else { + ts.Debug.assert(opening.kind === 234 /* JsxSelfClosingElement */); + // Nothing else to do for self-closing elements + result = opening; + } + // If the user writes the invalid code '
' in an expression context (i.e. not wrapped in + // an enclosing tag), we'll naively try to parse ^ this as a 'less than' operator and the remainder of the tag + // as garbage, which will cause the formatter to badly mangle the JSX. Perform a speculative parse of a JSX + // element if we see a < token so that we can wrap it in a synthetic binary expression so the formatter + // does less damage and we can report a better error. + // Since JSX elements are invalid < operands anyway, this lookahead parse will only occur in error scenarios + // of one sort or another. + if (inExpressionContext && token === 25 /* LessThanToken */) { + var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); }); + if (invalidElement) { + parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); + var badNode = createNode(181 /* BinaryExpression */, result.pos); + badNode.end = invalidElement.end; + badNode.left = result; + badNode.right = invalidElement; + badNode.operatorToken = createMissingNode(24 /* CommaToken */, /*reportAtCurrentPosition*/ false, /*diagnosticMessage*/ undefined); + badNode.operatorToken.pos = badNode.operatorToken.end = badNode.right.pos; + return badNode; + } + } + return result; + } + function parseJsxText() { + var node = createNode(236 /* JsxText */, scanner.getStartPos()); + token = scanner.scanJsxToken(); + return finishNode(node); + } + function parseJsxChild() { + switch (token) { + case 236 /* JsxText */: + return parseJsxText(); + case 15 /* OpenBraceToken */: + return parseJsxExpression(/*inExpressionContext*/ false); + case 25 /* LessThanToken */: + return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ false); + } + ts.Debug.fail("Unknown JSX child kind " + token); + } + function parseJsxChildren(openingTagName) { + var result = []; + result.pos = scanner.getStartPos(); + var saveParsingContext = parsingContext; + parsingContext |= 1 << 14 /* JsxChildren */; while (true) { - // We either have a binary operator here, or we're finished. We call - // reScanGreaterToken so that we merge token sequences like > and = into >= - reScanGreaterToken(); - var newPrecedence = getBinaryOperatorPrecedence(); - // Check the precedence to see if we should "take" this operator - // - For left associative operator (all operator but **), consume the operator, - // recursively call the function below, and parse binaryExpression as a rightOperand - // of the caller if the new precendence of the operator is greater then or equal to the current precendence. - // For example: - // a - b - c; - // ^token; leftOperand = b. Return b to the caller as a rightOperand - // a * b - c - // ^token; leftOperand = b. Return b to the caller as a rightOperand - // a - b * c; - // ^token; leftOperand = b. Return b * c to the caller as a rightOperand - // - For right associative operator (**), consume the operator, recursively call the function - // and parse binaryExpression as a rightOperand of the caller if the new precendence of - // the operator is strictly grater than the current precendence - // For example: - // a ** b ** c; - // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand - // a - b ** c; - // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand - // a ** b - c - // ^token; leftOperand = b. Return b to the caller as a rightOperand - var consumeCurrentOperator = token === 38 /* AsteriskAsteriskToken */ ? - newPrecedence >= precedence : - newPrecedence > precedence; - if (!consumeCurrentOperator) { + token = scanner.reScanJsxToken(); + if (token === 26 /* LessThanSlashToken */) { break; } - if (token === 90 /* InKeyword */ && inDisallowInContext()) { + else if (token === 1 /* EndOfFileToken */) { + parseErrorAtCurrentToken(ts.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, ts.getTextOfNodeFromSourceText(sourceText, openingTagName)); break; } - if (token === 116 /* AsKeyword */) { - // Make sure we *do* perform ASI for constructs like this: - // var x = foo - // as (Bar) - // This should be parsed as an initialized variable, followed - // by a function call to 'as' with the argument 'Bar' - if (scanner.hasPrecedingLineBreak()) { - break; - } - else { - nextToken(); - leftOperand = makeAsExpression(leftOperand, parseType()); - } + result.push(parseJsxChild()); + } + result.end = scanner.getTokenPos(); + parsingContext = saveParsingContext; + return result; + } + function parseJsxOpeningOrSelfClosingElement(inExpressionContext) { + var fullStart = scanner.getStartPos(); + parseExpected(25 /* LessThanToken */); + var tagName = parseJsxElementName(); + var attributes = parseList(13 /* JsxAttributes */, parseJsxAttribute); + var node; + if (token === 27 /* GreaterThanToken */) { + // Closing tag, so scan the immediately-following text with the JSX scanning instead + // of regular scanning to avoid treating illegal characters (e.g. '#') as immediate + // scanning errors + node = createNode(235 /* JsxOpeningElement */, fullStart); + scanJsxText(); + } + else { + parseExpected(39 /* SlashToken */); + if (inExpressionContext) { + parseExpected(27 /* GreaterThanToken */); } else { - leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence)); + parseExpected(27 /* GreaterThanToken */, /*diagnostic*/ undefined, /*advance*/ false); + scanJsxText(); } + node = createNode(234 /* JsxSelfClosingElement */, fullStart); } - return leftOperand; + node.tagName = tagName; + node.attributes = attributes; + return finishNode(node); } - function isBinaryOperator() { - if (inDisallowInContext() && token === 90 /* InKeyword */) { - return false; + function parseJsxElementName() { + scanJsxIdentifier(); + var elementName = parseIdentifierName(); + while (parseOptional(21 /* DotToken */)) { + scanJsxIdentifier(); + var node = createNode(135 /* QualifiedName */, elementName.pos); + node.left = elementName; + node.right = parseIdentifierName(); + elementName = finishNode(node); } - return getBinaryOperatorPrecedence() > 0; + return elementName; } - function getBinaryOperatorPrecedence() { - switch (token) { - case 52 /* BarBarToken */: - return 1; - case 51 /* AmpersandAmpersandToken */: - return 2; - case 47 /* BarToken */: - return 3; - case 48 /* CaretToken */: - return 4; - case 46 /* AmpersandToken */: - return 5; - case 30 /* EqualsEqualsToken */: - case 31 /* ExclamationEqualsToken */: - case 32 /* EqualsEqualsEqualsToken */: - case 33 /* ExclamationEqualsEqualsToken */: - return 6; - case 25 /* LessThanToken */: - case 27 /* GreaterThanToken */: - case 28 /* LessThanEqualsToken */: - case 29 /* GreaterThanEqualsToken */: - case 91 /* InstanceOfKeyword */: - case 90 /* InKeyword */: - case 116 /* AsKeyword */: - return 7; - case 43 /* LessThanLessThanToken */: - case 44 /* GreaterThanGreaterThanToken */: - case 45 /* GreaterThanGreaterThanGreaterThanToken */: - return 8; - case 35 /* PlusToken */: - case 36 /* MinusToken */: - return 9; - case 37 /* AsteriskToken */: - case 39 /* SlashToken */: - case 40 /* PercentToken */: - return 10; - case 38 /* AsteriskAsteriskToken */: - return 11; + function parseJsxExpression(inExpressionContext) { + var node = createNode(240 /* JsxExpression */); + parseExpected(15 /* OpenBraceToken */); + if (token !== 16 /* CloseBraceToken */) { + node.expression = parseExpression(); + } + if (inExpressionContext) { + parseExpected(16 /* CloseBraceToken */); + } + else { + parseExpected(16 /* CloseBraceToken */, /*message*/ undefined, /*advance*/ false); + scanJsxText(); } - // -1 is lower than all other precedences. Returning it will cause binary expression - // parsing to stop. - return -1; - } - function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(181 /* BinaryExpression */, left.pos); - node.left = left; - node.operatorToken = operatorToken; - node.right = right; return finishNode(node); } - function makeAsExpression(left, right) { - var node = createNode(189 /* AsExpression */, left.pos); - node.expression = left; - node.type = right; + function parseJsxAttribute() { + if (token === 15 /* OpenBraceToken */) { + return parseJsxSpreadAttribute(); + } + scanJsxIdentifier(); + var node = createNode(238 /* JsxAttribute */); + node.name = parseIdentifierName(); + if (parseOptional(56 /* EqualsToken */)) { + switch (token) { + case 9 /* StringLiteral */: + node.initializer = parseLiteralNode(); + break; + default: + node.initializer = parseJsxExpression(/*inExpressionContext*/ true); + break; + } + } return finishNode(node); } - function parsePrefixUnaryExpression() { - var node = createNode(179 /* PrefixUnaryExpression */); - node.operator = token; - nextToken(); - node.operand = parseSimpleUnaryExpression(); + function parseJsxSpreadAttribute() { + var node = createNode(239 /* JsxSpreadAttribute */); + parseExpected(15 /* OpenBraceToken */); + parseExpected(22 /* DotDotDotToken */); + node.expression = parseExpression(); + parseExpected(16 /* CloseBraceToken */); return finishNode(node); } - function parseDeleteExpression() { - var node = createNode(175 /* DeleteExpression */); - nextToken(); - node.expression = parseSimpleUnaryExpression(); + function parseJsxClosingElement(inExpressionContext) { + var node = createNode(237 /* JsxClosingElement */); + parseExpected(26 /* LessThanSlashToken */); + node.tagName = parseJsxElementName(); + if (inExpressionContext) { + parseExpected(27 /* GreaterThanToken */); + } + else { + parseExpected(27 /* GreaterThanToken */, /*diagnostic*/ undefined, /*advance*/ false); + scanJsxText(); + } return finishNode(node); } - function parseTypeOfExpression() { - var node = createNode(176 /* TypeOfExpression */); - nextToken(); + function parseTypeAssertion() { + var node = createNode(171 /* TypeAssertionExpression */); + parseExpected(25 /* LessThanToken */); + node.type = parseType(); + parseExpected(27 /* GreaterThanToken */); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } - function parseVoidExpression() { - var node = createNode(177 /* VoidExpression */); - nextToken(); - node.expression = parseSimpleUnaryExpression(); - return finishNode(node); + function parseMemberExpressionRest(expression) { + while (true) { + var dotToken = parseOptionalToken(21 /* DotToken */); + if (dotToken) { + var propertyAccess = createNode(166 /* PropertyAccessExpression */, expression.pos); + propertyAccess.expression = expression; + propertyAccess.dotToken = dotToken; + propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); + expression = finishNode(propertyAccess); + continue; + } + // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName + if (!inDecoratorContext() && parseOptional(19 /* OpenBracketToken */)) { + var indexedAccess = createNode(167 /* ElementAccessExpression */, expression.pos); + indexedAccess.expression = expression; + // It's not uncommon for a user to write: "new Type[]". + // Check for that common pattern and report a better error message. + if (token !== 20 /* CloseBracketToken */) { + indexedAccess.argumentExpression = allowInAnd(parseExpression); + if (indexedAccess.argumentExpression.kind === 9 /* StringLiteral */ || indexedAccess.argumentExpression.kind === 8 /* NumericLiteral */) { + var literal = indexedAccess.argumentExpression; + literal.text = internIdentifier(literal.text); + } + } + parseExpected(20 /* CloseBracketToken */); + expression = finishNode(indexedAccess); + continue; + } + if (token === 11 /* NoSubstitutionTemplateLiteral */ || token === 12 /* TemplateHead */) { + var tagExpression = createNode(170 /* TaggedTemplateExpression */, expression.pos); + tagExpression.tag = expression; + tagExpression.template = token === 11 /* NoSubstitutionTemplateLiteral */ + ? parseLiteralNode() + : parseTemplateExpression(); + expression = finishNode(tagExpression); + continue; + } + return expression; + } } - function isAwaitExpression() { - if (token === 119 /* AwaitKeyword */) { - if (inAwaitContext()) { - return true; + function parseCallExpressionRest(expression) { + while (true) { + expression = parseMemberExpressionRest(expression); + if (token === 25 /* LessThanToken */) { + // See if this is the start of a generic invocation. If so, consume it and + // keep checking for postfix expressions. Otherwise, it's just a '<' that's + // part of an arithmetic expression. Break out so we consume it higher in the + // stack. + var typeArguments = tryParse(parseTypeArgumentsInExpression); + if (!typeArguments) { + return expression; + } + var callExpr = createNode(168 /* CallExpression */, expression.pos); + callExpr.expression = expression; + callExpr.typeArguments = typeArguments; + callExpr.arguments = parseArgumentList(); + expression = finishNode(callExpr); + continue; } - // here we are using similar heuristics as 'isYieldExpression' - return lookAhead(nextTokenIsIdentifierOnSameLine); + else if (token === 17 /* OpenParenToken */) { + var callExpr = createNode(168 /* CallExpression */, expression.pos); + callExpr.expression = expression; + callExpr.arguments = parseArgumentList(); + expression = finishNode(callExpr); + continue; + } + return expression; } - return false; } - function parseAwaitExpression() { - var node = createNode(178 /* AwaitExpression */); - nextToken(); - node.expression = parseSimpleUnaryExpression(); - return finishNode(node); + function parseArgumentList() { + parseExpected(17 /* OpenParenToken */); + var result = parseDelimitedList(11 /* ArgumentExpressions */, parseArgumentExpression); + parseExpected(18 /* CloseParenToken */); + return result; } - /** - * Parse ES7 unary expression and await expression - * - * ES7 UnaryExpression: - * 1) SimpleUnaryExpression[?yield] - * 2) IncrementExpression[?yield] ** UnaryExpression[?yield] - */ - function parseUnaryExpressionOrHigher() { - if (isAwaitExpression()) { - return parseAwaitExpression(); - } - if (isIncrementExpression()) { - var incrementExpression = parseIncrementExpression(); - return token === 38 /* AsteriskAsteriskToken */ ? - parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : - incrementExpression; + function parseTypeArgumentsInExpression() { + if (!parseOptional(25 /* LessThanToken */)) { + return undefined; } - var unaryOperator = token; - var simpleUnaryExpression = parseSimpleUnaryExpression(); - if (token === 38 /* AsteriskAsteriskToken */) { - var diagnostic; - var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 171 /* TypeAssertionExpression */) { - parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); - } - else { - parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, ts.tokenToString(unaryOperator)); - } + var typeArguments = parseDelimitedList(18 /* TypeArguments */, parseType); + if (!parseExpected(27 /* GreaterThanToken */)) { + // If it doesn't have the closing > then it's definitely not an type argument list. + return undefined; } - return simpleUnaryExpression; + // If we have a '<', then only parse this as a arugment list if the type arguments + // are complete and we have an open paren. if we don't, rewind and return nothing. + return typeArguments && canFollowTypeArgumentsInExpression() + ? typeArguments + : undefined; } - /** - * Parse ES7 simple-unary expression or higher: - * - * ES7 SimpleUnaryExpression: - * 1) IncrementExpression[?yield] - * 2) delete UnaryExpression[?yield] - * 3) void UnaryExpression[?yield] - * 4) typeof UnaryExpression[?yield] - * 5) + UnaryExpression[?yield] - * 6) - UnaryExpression[?yield] - * 7) ~ UnaryExpression[?yield] - * 8) ! UnaryExpression[?yield] - */ - function parseSimpleUnaryExpression() { + function canFollowTypeArgumentsInExpression() { switch (token) { - case 35 /* PlusToken */: - case 36 /* MinusToken */: - case 50 /* TildeToken */: - case 49 /* ExclamationToken */: - return parsePrefixUnaryExpression(); - case 78 /* DeleteKeyword */: - return parseDeleteExpression(); - case 101 /* TypeOfKeyword */: - return parseTypeOfExpression(); - case 103 /* VoidKeyword */: - return parseVoidExpression(); - case 25 /* LessThanToken */: - // This is modified UnaryExpression grammar in TypeScript - // UnaryExpression (modified): - // < type > UnaryExpression - return parseTypeAssertion(); + case 17 /* OpenParenToken */: // foo( + // this case are the only case where this token can legally follow a type argument + // list. So we definitely want to treat this as a type arg list. + case 21 /* DotToken */: // foo. + case 18 /* CloseParenToken */: // foo) + case 20 /* CloseBracketToken */: // foo] + case 54 /* ColonToken */: // foo: + case 23 /* SemicolonToken */: // foo; + case 53 /* QuestionToken */: // foo? + case 30 /* EqualsEqualsToken */: // foo == + case 32 /* EqualsEqualsEqualsToken */: // foo === + case 31 /* ExclamationEqualsToken */: // foo != + case 33 /* ExclamationEqualsEqualsToken */: // foo !== + case 51 /* AmpersandAmpersandToken */: // foo && + case 52 /* BarBarToken */: // foo || + case 48 /* CaretToken */: // foo ^ + case 46 /* AmpersandToken */: // foo & + case 47 /* BarToken */: // foo | + case 16 /* CloseBraceToken */: // foo } + case 1 /* EndOfFileToken */: + // these cases can't legally follow a type arg list. However, they're not legal + // expressions either. The user is probably in the middle of a generic type. So + // treat it as such. + return true; + case 24 /* CommaToken */: // foo, + case 15 /* OpenBraceToken */: // foo { + // We don't want to treat these as type arguments. Otherwise we'll parse this + // as an invocation expression. Instead, we want to parse out the expression + // in isolation from the type arguments. default: - return parseIncrementExpression(); + // Anything else treat as an expression. + return false; } } - /** - * Check if the current token can possibly be an ES7 increment expression. - * - * ES7 IncrementExpression: - * LeftHandSideExpression[?Yield] - * LeftHandSideExpression[?Yield][no LineTerminator here]++ - * LeftHandSideExpression[?Yield][no LineTerminator here]-- - * ++LeftHandSideExpression[?Yield] - * --LeftHandSideExpression[?Yield] - */ - function isIncrementExpression() { - // This function is called inside parseUnaryExpression to decide - // whether to call parseSimpleUnaryExpression or call parseIncrmentExpression directly + function parsePrimaryExpression() { switch (token) { - case 35 /* PlusToken */: - case 36 /* MinusToken */: - case 50 /* TildeToken */: - case 49 /* ExclamationToken */: - case 78 /* DeleteKeyword */: - case 101 /* TypeOfKeyword */: - case 103 /* VoidKeyword */: - return false; - case 25 /* LessThanToken */: - // If we are not in JSX context, we are parsing TypeAssertion which is an UnaryExpression - if (sourceFile.languageVariant !== 1 /* JSX */) { - return false; + case 8 /* NumericLiteral */: + case 9 /* StringLiteral */: + case 11 /* NoSubstitutionTemplateLiteral */: + return parseLiteralNode(); + case 97 /* ThisKeyword */: + case 95 /* SuperKeyword */: + case 93 /* NullKeyword */: + case 99 /* TrueKeyword */: + case 84 /* FalseKeyword */: + return parseTokenNode(); + case 17 /* OpenParenToken */: + return parseParenthesizedExpression(); + case 19 /* OpenBracketToken */: + return parseArrayLiteralExpression(); + case 15 /* OpenBraceToken */: + return parseObjectLiteralExpression(); + case 118 /* AsyncKeyword */: + // Async arrow functions are parsed earlier in parseAssignmentExpressionOrHigher. + // If we encounter `async [no LineTerminator here] function` then this is an async + // function; otherwise, its an identifier. + if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { + break; } - // We are in JSX context and the token is part of JSXElement. - // Fall through - default: - return true; + return parseFunctionExpression(); + case 73 /* ClassKeyword */: + return parseClassExpression(); + case 87 /* FunctionKeyword */: + return parseFunctionExpression(); + case 92 /* NewKeyword */: + return parseNewExpression(); + case 39 /* SlashToken */: + case 61 /* SlashEqualsToken */: + if (reScanSlashToken() === 10 /* RegularExpressionLiteral */) { + return parseLiteralNode(); + } + break; + case 12 /* TemplateHead */: + return parseTemplateExpression(); + } + return parseIdentifier(ts.Diagnostics.Expression_expected); + } + function parseParenthesizedExpression() { + var node = createNode(172 /* ParenthesizedExpression */); + parseExpected(17 /* OpenParenToken */); + node.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + return finishNode(node); + } + function parseSpreadElement() { + var node = createNode(185 /* SpreadElementExpression */); + parseExpected(22 /* DotDotDotToken */); + node.expression = parseAssignmentExpressionOrHigher(); + return finishNode(node); + } + function parseArgumentOrArrayLiteralElement() { + return token === 22 /* DotDotDotToken */ ? parseSpreadElement() : + token === 24 /* CommaToken */ ? createNode(187 /* OmittedExpression */) : + parseAssignmentExpressionOrHigher(); + } + function parseArgumentExpression() { + return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); + } + function parseArrayLiteralExpression() { + var node = createNode(164 /* ArrayLiteralExpression */); + parseExpected(19 /* OpenBracketToken */); + if (scanner.hasPrecedingLineBreak()) + node.flags |= 1024 /* MultiLine */; + node.elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); + parseExpected(20 /* CloseBracketToken */); + return finishNode(node); + } + function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { + if (parseContextualModifier(123 /* GetKeyword */)) { + return parseAccessorDeclaration(145 /* GetAccessor */, fullStart, decorators, modifiers); + } + else if (parseContextualModifier(129 /* SetKeyword */)) { + return parseAccessorDeclaration(146 /* SetAccessor */, fullStart, decorators, modifiers); } + return undefined; } - /** - * Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. - * - * ES7 IncrementExpression[yield]: - * 1) LeftHandSideExpression[?yield] - * 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ - * 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- - * 4) ++LeftHandSideExpression[?yield] - * 5) --LeftHandSideExpression[?yield] - * In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression - */ - function parseIncrementExpression() { - if (token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) { - var node = createNode(179 /* PrefixUnaryExpression */); - node.operator = token; - nextToken(); - node.operand = parseLeftHandSideExpressionOrHigher(); - return finishNode(node); + function parseObjectLiteralElement() { + var fullStart = scanner.getStartPos(); + var decorators = parseDecorators(); + var modifiers = parseModifiers(); + var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); + if (accessor) { + return accessor; } - else if (sourceFile.languageVariant === 1 /* JSX */ && token === 25 /* LessThanToken */ && lookAhead(nextTokenIsIdentifierOrKeyword)) { - // JSXElement is part of primaryExpression - return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); + var asteriskToken = parseOptionalToken(37 /* AsteriskToken */); + var tokenIsIdentifier = isIdentifier(); + var nameToken = token; + var propertyName = parsePropertyName(); + // Disallowing of optional property assignments happens in the grammar checker. + var questionToken = parseOptionalToken(53 /* QuestionToken */); + if (asteriskToken || token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { + return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); } - var expression = parseLeftHandSideExpressionOrHigher(); - ts.Debug.assert(ts.isLeftHandSideExpression(expression)); - if ((token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(180 /* PostfixUnaryExpression */, expression.pos); - node.operand = expression; - node.operator = token; - nextToken(); - return finishNode(node); + // check if it is short-hand property assignment or normal property assignment + // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production + // CoverInitializedName[Yield] : + // IdentifierReference[?Yield] Initializer[In, ?Yield] + // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern + var isShorthandPropertyAssignment = tokenIsIdentifier && (token === 24 /* CommaToken */ || token === 16 /* CloseBraceToken */ || token === 56 /* EqualsToken */); + if (isShorthandPropertyAssignment) { + var shorthandDeclaration = createNode(246 /* ShorthandPropertyAssignment */, fullStart); + shorthandDeclaration.name = propertyName; + shorthandDeclaration.questionToken = questionToken; + var equalsToken = parseOptionalToken(56 /* EqualsToken */); + if (equalsToken) { + shorthandDeclaration.equalsToken = equalsToken; + shorthandDeclaration.objectAssignmentInitializer = allowInAnd(parseAssignmentExpressionOrHigher); + } + return finishNode(shorthandDeclaration); + } + else { + var propertyAssignment = createNode(245 /* PropertyAssignment */, fullStart); + propertyAssignment.name = propertyName; + propertyAssignment.questionToken = questionToken; + parseExpected(54 /* ColonToken */); + propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); + return finishNode(propertyAssignment); } - return expression; } - function parseLeftHandSideExpressionOrHigher() { - // Original Ecma: - // LeftHandSideExpression: See 11.2 - // NewExpression - // CallExpression - // - // Our simplification: - // - // LeftHandSideExpression: See 11.2 - // MemberExpression - // CallExpression - // - // See comment in parseMemberExpressionOrHigher on how we replaced NewExpression with - // MemberExpression to make our lives easier. - // - // to best understand the below code, it's important to see how CallExpression expands - // out into its own productions: - // - // CallExpression: - // MemberExpression Arguments - // CallExpression Arguments - // CallExpression[Expression] - // CallExpression.IdentifierName - // super ( ArgumentListopt ) - // super.IdentifierName - // - // Because of the recursion in these calls, we need to bottom out first. There are two - // bottom out states we can run into. Either we see 'super' which must start either of - // the last two CallExpression productions. Or we have a MemberExpression which either - // completes the LeftHandSideExpression, or starts the beginning of the first four - // CallExpression productions. - var expression = token === 95 /* SuperKeyword */ - ? parseSuperExpression() - : parseMemberExpressionOrHigher(); - // Now, we *may* be complete. However, we might have consumed the start of a - // CallExpression. As such, we need to consume the rest of it here to be complete. - return parseCallExpressionRest(expression); + function parseObjectLiteralExpression() { + var node = createNode(165 /* ObjectLiteralExpression */); + parseExpected(15 /* OpenBraceToken */); + if (scanner.hasPrecedingLineBreak()) { + node.flags |= 1024 /* MultiLine */; + } + node.properties = parseDelimitedList(12 /* ObjectLiteralMembers */, parseObjectLiteralElement, /*considerSemicolonAsDelimeter*/ true); + parseExpected(16 /* CloseBraceToken */); + return finishNode(node); } - function parseMemberExpressionOrHigher() { - // Note: to make our lives simpler, we decompose the the NewExpression productions and - // place ObjectCreationExpression and FunctionExpression into PrimaryExpression. - // like so: - // - // PrimaryExpression : See 11.1 - // this - // Identifier - // Literal - // ArrayLiteral - // ObjectLiteral - // (Expression) - // FunctionExpression - // new MemberExpression Arguments? - // - // MemberExpression : See 11.2 - // PrimaryExpression - // MemberExpression[Expression] - // MemberExpression.IdentifierName - // - // CallExpression : See 11.2 - // MemberExpression - // CallExpression Arguments - // CallExpression[Expression] - // CallExpression.IdentifierName - // - // Technically this is ambiguous. i.e. CallExpression defines: - // - // CallExpression: - // CallExpression Arguments - // - // If you see: "new Foo()" - // - // Then that could be treated as a single ObjectCreationExpression, or it could be - // treated as the invocation of "new Foo". We disambiguate that in code (to match - // the original grammar) by making sure that if we see an ObjectCreationExpression - // we always consume arguments if they are there. So we treat "new Foo()" as an - // object creation only, and not at all as an invocation) Another way to think - // about this is that for every "new" that we see, we will consume an argument list if - // it is there as part of the *associated* object creation node. Any additional - // argument lists we see, will become invocation expressions. - // - // Because there are no other places in the grammar now that refer to FunctionExpression - // or ObjectCreationExpression, it is safe to push down into the PrimaryExpression - // production. + function parseFunctionExpression() { + // GeneratorExpression: + // function* BindingIdentifier [Yield][opt](FormalParameters[Yield]){ GeneratorBody } // - // Because CallExpression and MemberExpression are left recursive, we need to bottom out - // of the recursion immediately. So we parse out a primary expression to start with. - var expression = parsePrimaryExpression(); - return parseMemberExpressionRest(expression); + // FunctionExpression: + // function BindingIdentifier[opt](FormalParameters){ FunctionBody } + var saveDecoratorContext = inDecoratorContext(); + if (saveDecoratorContext) { + setDecoratorContext(false); + } + var node = createNode(173 /* FunctionExpression */); + setModifiers(node, parseModifiers()); + parseExpected(87 /* FunctionKeyword */); + node.asteriskToken = parseOptionalToken(37 /* AsteriskToken */); + var isGenerator = !!node.asteriskToken; + var isAsync = !!(node.flags & 256 /* Async */); + node.name = + isGenerator && isAsync ? doInYieldAndAwaitContext(parseOptionalIdentifier) : + isGenerator ? doInYieldContext(parseOptionalIdentifier) : + isAsync ? doInAwaitContext(parseOptionalIdentifier) : + parseOptionalIdentifier(); + fillSignature(54 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); + node.body = parseFunctionBlock(/*allowYield*/ isGenerator, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); + if (saveDecoratorContext) { + setDecoratorContext(true); + } + return finishNode(node); } - function parseSuperExpression() { - var expression = parseTokenNode(); - if (token === 17 /* OpenParenToken */ || token === 21 /* DotToken */ || token === 19 /* OpenBracketToken */) { - return expression; + function parseOptionalIdentifier() { + return isIdentifier() ? parseIdentifier() : undefined; + } + function parseNewExpression() { + var node = createNode(169 /* NewExpression */); + parseExpected(92 /* NewKeyword */); + node.expression = parseMemberExpressionOrHigher(); + node.typeArguments = tryParse(parseTypeArgumentsInExpression); + if (node.typeArguments || token === 17 /* OpenParenToken */) { + node.arguments = parseArgumentList(); } - // If we have seen "super" it must be followed by '(' or '.'. - // If it wasn't then just try to parse out a '.' and report an error. - var node = createNode(166 /* PropertyAccessExpression */, expression.pos); - node.expression = expression; - node.dotToken = parseExpectedToken(21 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); - node.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); return finishNode(node); } - function parseJsxElementOrSelfClosingElement(inExpressionContext) { - var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); - var result; - if (opening.kind === 235 /* JsxOpeningElement */) { - var node = createNode(233 /* JsxElement */, opening.pos); - node.openingElement = opening; - node.children = parseJsxChildren(node.openingElement.tagName); - node.closingElement = parseJsxClosingElement(inExpressionContext); - result = finishNode(node); + // STATEMENTS + function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { + var node = createNode(192 /* Block */); + if (parseExpected(15 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { + node.statements = parseList(1 /* BlockStatements */, parseStatement); + parseExpected(16 /* CloseBraceToken */); } else { - ts.Debug.assert(opening.kind === 234 /* JsxSelfClosingElement */); - // Nothing else to do for self-closing elements - result = opening; + node.statements = createMissingList(); } - // If the user writes the invalid code '
' in an expression context (i.e. not wrapped in - // an enclosing tag), we'll naively try to parse ^ this as a 'less than' operator and the remainder of the tag - // as garbage, which will cause the formatter to badly mangle the JSX. Perform a speculative parse of a JSX - // element if we see a < token so that we can wrap it in a synthetic binary expression so the formatter - // does less damage and we can report a better error. - // Since JSX elements are invalid < operands anyway, this lookahead parse will only occur in error scenarios - // of one sort or another. - if (inExpressionContext && token === 25 /* LessThanToken */) { - var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); }); - if (invalidElement) { - parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(181 /* BinaryExpression */, result.pos); - badNode.end = invalidElement.end; - badNode.left = result; - badNode.right = invalidElement; - badNode.operatorToken = createMissingNode(24 /* CommaToken */, /*reportAtCurrentPosition*/ false, /*diagnosticMessage*/ undefined); - badNode.operatorToken.pos = badNode.operatorToken.end = badNode.right.pos; - return badNode; - } + return finishNode(node); + } + function parseFunctionBlock(allowYield, allowAwait, ignoreMissingOpenBrace, diagnosticMessage) { + var savedYieldContext = inYieldContext(); + setYieldContext(allowYield); + var savedAwaitContext = inAwaitContext(); + setAwaitContext(allowAwait); + // We may be in a [Decorator] context when parsing a function expression or + // arrow function. The body of the function is not in [Decorator] context. + var saveDecoratorContext = inDecoratorContext(); + if (saveDecoratorContext) { + setDecoratorContext(false); } - return result; + var block = parseBlock(ignoreMissingOpenBrace, diagnosticMessage); + if (saveDecoratorContext) { + setDecoratorContext(true); + } + setYieldContext(savedYieldContext); + setAwaitContext(savedAwaitContext); + return block; } - function parseJsxText() { - var node = createNode(236 /* JsxText */, scanner.getStartPos()); - token = scanner.scanJsxToken(); + function parseEmptyStatement() { + var node = createNode(194 /* EmptyStatement */); + parseExpected(23 /* SemicolonToken */); return finishNode(node); } - function parseJsxChild() { - switch (token) { - case 236 /* JsxText */: - return parseJsxText(); - case 15 /* OpenBraceToken */: - return parseJsxExpression(/*inExpressionContext*/ false); - case 25 /* LessThanToken */: - return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ false); - } - ts.Debug.fail("Unknown JSX child kind " + token); + function parseIfStatement() { + var node = createNode(196 /* IfStatement */); + parseExpected(88 /* IfKeyword */); + parseExpected(17 /* OpenParenToken */); + node.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + node.thenStatement = parseStatement(); + node.elseStatement = parseOptional(80 /* ElseKeyword */) ? parseStatement() : undefined; + return finishNode(node); } - function parseJsxChildren(openingTagName) { - var result = []; - result.pos = scanner.getStartPos(); - var saveParsingContext = parsingContext; - parsingContext |= 1 << 14 /* JsxChildren */; - while (true) { - token = scanner.reScanJsxToken(); - if (token === 26 /* LessThanSlashToken */) { - break; + function parseDoStatement() { + var node = createNode(197 /* DoStatement */); + parseExpected(79 /* DoKeyword */); + node.statement = parseStatement(); + parseExpected(104 /* WhileKeyword */); + parseExpected(17 /* OpenParenToken */); + node.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + // From: https://mail.mozilla.org/pipermail/es-discuss/2011-August/016188.html + // 157 min --- All allen at wirfs-brock.com CONF --- "do{;}while(false)false" prohibited in + // spec but allowed in consensus reality. Approved -- this is the de-facto standard whereby + // do;while(0)x will have a semicolon inserted before x. + parseOptional(23 /* SemicolonToken */); + return finishNode(node); + } + function parseWhileStatement() { + var node = createNode(198 /* WhileStatement */); + parseExpected(104 /* WhileKeyword */); + parseExpected(17 /* OpenParenToken */); + node.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + node.statement = parseStatement(); + return finishNode(node); + } + function parseForOrForInOrForOfStatement() { + var pos = getNodePos(); + parseExpected(86 /* ForKeyword */); + parseExpected(17 /* OpenParenToken */); + var initializer = undefined; + if (token !== 23 /* SemicolonToken */) { + if (token === 102 /* VarKeyword */ || token === 108 /* LetKeyword */ || token === 74 /* ConstKeyword */) { + initializer = parseVariableDeclarationList(/*inForStatementInitializer*/ true); } - else if (token === 1 /* EndOfFileToken */) { - parseErrorAtCurrentToken(ts.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, ts.getTextOfNodeFromSourceText(sourceText, openingTagName)); - break; + else { + initializer = disallowInAnd(parseExpression); } - result.push(parseJsxChild()); } - result.end = scanner.getTokenPos(); - parsingContext = saveParsingContext; - return result; - } - function parseJsxOpeningOrSelfClosingElement(inExpressionContext) { - var fullStart = scanner.getStartPos(); - parseExpected(25 /* LessThanToken */); - var tagName = parseJsxElementName(); - var attributes = parseList(13 /* JsxAttributes */, parseJsxAttribute); - var node; - if (token === 27 /* GreaterThanToken */) { - // Closing tag, so scan the immediately-following text with the JSX scanning instead - // of regular scanning to avoid treating illegal characters (e.g. '#') as immediate - // scanning errors - node = createNode(235 /* JsxOpeningElement */, fullStart); - scanJsxText(); + var forOrForInOrForOfStatement; + if (parseOptional(90 /* InKeyword */)) { + var forInStatement = createNode(200 /* ForInStatement */, pos); + forInStatement.initializer = initializer; + forInStatement.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + forOrForInOrForOfStatement = forInStatement; + } + else if (parseOptional(134 /* OfKeyword */)) { + var forOfStatement = createNode(201 /* ForOfStatement */, pos); + forOfStatement.initializer = initializer; + forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); + parseExpected(18 /* CloseParenToken */); + forOrForInOrForOfStatement = forOfStatement; } else { - parseExpected(39 /* SlashToken */); - if (inExpressionContext) { - parseExpected(27 /* GreaterThanToken */); + var forStatement = createNode(199 /* ForStatement */, pos); + forStatement.initializer = initializer; + parseExpected(23 /* SemicolonToken */); + if (token !== 23 /* SemicolonToken */ && token !== 18 /* CloseParenToken */) { + forStatement.condition = allowInAnd(parseExpression); } - else { - parseExpected(27 /* GreaterThanToken */, /*diagnostic*/ undefined, /*advance*/ false); - scanJsxText(); + parseExpected(23 /* SemicolonToken */); + if (token !== 18 /* CloseParenToken */) { + forStatement.incrementor = allowInAnd(parseExpression); } - node = createNode(234 /* JsxSelfClosingElement */, fullStart); + parseExpected(18 /* CloseParenToken */); + forOrForInOrForOfStatement = forStatement; } - node.tagName = tagName; - node.attributes = attributes; + forOrForInOrForOfStatement.statement = parseStatement(); + return finishNode(forOrForInOrForOfStatement); + } + function parseBreakOrContinueStatement(kind) { + var node = createNode(kind); + parseExpected(kind === 203 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */); + if (!canParseSemicolon()) { + node.label = parseIdentifier(); + } + parseSemicolon(); return finishNode(node); } - function parseJsxElementName() { - scanJsxIdentifier(); - var elementName = parseIdentifierName(); - while (parseOptional(21 /* DotToken */)) { - scanJsxIdentifier(); - var node = createNode(135 /* QualifiedName */, elementName.pos); - node.left = elementName; - node.right = parseIdentifierName(); - elementName = finishNode(node); + function parseReturnStatement() { + var node = createNode(204 /* ReturnStatement */); + parseExpected(94 /* ReturnKeyword */); + if (!canParseSemicolon()) { + node.expression = allowInAnd(parseExpression); } - return elementName; + parseSemicolon(); + return finishNode(node); } - function parseJsxExpression(inExpressionContext) { - var node = createNode(240 /* JsxExpression */); + function parseWithStatement() { + var node = createNode(205 /* WithStatement */); + parseExpected(105 /* WithKeyword */); + parseExpected(17 /* OpenParenToken */); + node.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + node.statement = parseStatement(); + return finishNode(node); + } + function parseCaseClause() { + var node = createNode(241 /* CaseClause */); + parseExpected(71 /* CaseKeyword */); + node.expression = allowInAnd(parseExpression); + parseExpected(54 /* ColonToken */); + node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); + return finishNode(node); + } + function parseDefaultClause() { + var node = createNode(242 /* DefaultClause */); + parseExpected(77 /* DefaultKeyword */); + parseExpected(54 /* ColonToken */); + node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); + return finishNode(node); + } + function parseCaseOrDefaultClause() { + return token === 71 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); + } + function parseSwitchStatement() { + var node = createNode(206 /* SwitchStatement */); + parseExpected(96 /* SwitchKeyword */); + parseExpected(17 /* OpenParenToken */); + node.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + var caseBlock = createNode(220 /* CaseBlock */, scanner.getStartPos()); parseExpected(15 /* OpenBraceToken */); - if (token !== 16 /* CloseBraceToken */) { - node.expression = parseExpression(); - } - if (inExpressionContext) { - parseExpected(16 /* CloseBraceToken */); - } - else { - parseExpected(16 /* CloseBraceToken */, /*message*/ undefined, /*advance*/ false); - scanJsxText(); - } + caseBlock.clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause); + parseExpected(16 /* CloseBraceToken */); + node.caseBlock = finishNode(caseBlock); return finishNode(node); } - function parseJsxAttribute() { - if (token === 15 /* OpenBraceToken */) { - return parseJsxSpreadAttribute(); - } - scanJsxIdentifier(); - var node = createNode(238 /* JsxAttribute */); - node.name = parseIdentifierName(); - if (parseOptional(56 /* EqualsToken */)) { - switch (token) { - case 9 /* StringLiteral */: - node.initializer = parseLiteralNode(); - break; - default: - node.initializer = parseJsxExpression(/*inExpressionContext*/ true); - break; - } + function parseThrowStatement() { + // ThrowStatement[Yield] : + // throw [no LineTerminator here]Expression[In, ?Yield]; + // Because of automatic semicolon insertion, we need to report error if this + // throw could be terminated with a semicolon. Note: we can't call 'parseExpression' + // directly as that might consume an expression on the following line. + // We just return 'undefined' in that case. The actual error will be reported in the + // grammar walker. + var node = createNode(208 /* ThrowStatement */); + parseExpected(98 /* ThrowKeyword */); + node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); + parseSemicolon(); + return finishNode(node); + } + // TODO: Review for error recovery + function parseTryStatement() { + var node = createNode(209 /* TryStatement */); + parseExpected(100 /* TryKeyword */); + node.tryBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); + node.catchClause = token === 72 /* CatchKeyword */ ? parseCatchClause() : undefined; + // If we don't have a catch clause, then we must have a finally clause. Try to parse + // one out no matter what. + if (!node.catchClause || token === 85 /* FinallyKeyword */) { + parseExpected(85 /* FinallyKeyword */); + node.finallyBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); } return finishNode(node); } - function parseJsxSpreadAttribute() { - var node = createNode(239 /* JsxSpreadAttribute */); - parseExpected(15 /* OpenBraceToken */); - parseExpected(22 /* DotDotDotToken */); - node.expression = parseExpression(); - parseExpected(16 /* CloseBraceToken */); + function parseCatchClause() { + var result = createNode(244 /* CatchClause */); + parseExpected(72 /* CatchKeyword */); + if (parseExpected(17 /* OpenParenToken */)) { + result.variableDeclaration = parseVariableDeclaration(); + } + parseExpected(18 /* CloseParenToken */); + result.block = parseBlock(/*ignoreMissingOpenBrace*/ false); + return finishNode(result); + } + function parseDebuggerStatement() { + var node = createNode(210 /* DebuggerStatement */); + parseExpected(76 /* DebuggerKeyword */); + parseSemicolon(); return finishNode(node); } - function parseJsxClosingElement(inExpressionContext) { - var node = createNode(237 /* JsxClosingElement */); - parseExpected(26 /* LessThanSlashToken */); - node.tagName = parseJsxElementName(); - if (inExpressionContext) { - parseExpected(27 /* GreaterThanToken */); + function parseExpressionOrLabeledStatement() { + // Avoiding having to do the lookahead for a labeled statement by just trying to parse + // out an expression, seeing if it is identifier and then seeing if it is followed by + // a colon. + var fullStart = scanner.getStartPos(); + var expression = allowInAnd(parseExpression); + if (expression.kind === 69 /* Identifier */ && parseOptional(54 /* ColonToken */)) { + var labeledStatement = createNode(207 /* LabeledStatement */, fullStart); + labeledStatement.label = expression; + labeledStatement.statement = parseStatement(); + return finishNode(labeledStatement); } else { - parseExpected(27 /* GreaterThanToken */, /*diagnostic*/ undefined, /*advance*/ false); - scanJsxText(); + var expressionStatement = createNode(195 /* ExpressionStatement */, fullStart); + expressionStatement.expression = expression; + parseSemicolon(); + return finishNode(expressionStatement); } - return finishNode(node); } - function parseTypeAssertion() { - var node = createNode(171 /* TypeAssertionExpression */); - parseExpected(25 /* LessThanToken */); - node.type = parseType(); - parseExpected(27 /* GreaterThanToken */); - node.expression = parseSimpleUnaryExpression(); - return finishNode(node); + function nextTokenIsIdentifierOrKeywordOnSameLine() { + nextToken(); + return ts.tokenIsIdentifierOrKeyword(token) && !scanner.hasPrecedingLineBreak(); } - function parseMemberExpressionRest(expression) { - while (true) { - var dotToken = parseOptionalToken(21 /* DotToken */); - if (dotToken) { - var propertyAccess = createNode(166 /* PropertyAccessExpression */, expression.pos); - propertyAccess.expression = expression; - propertyAccess.dotToken = dotToken; - propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); - expression = finishNode(propertyAccess); - continue; - } - // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName - if (!inDecoratorContext() && parseOptional(19 /* OpenBracketToken */)) { - var indexedAccess = createNode(167 /* ElementAccessExpression */, expression.pos); - indexedAccess.expression = expression; - // It's not uncommon for a user to write: "new Type[]". - // Check for that common pattern and report a better error message. - if (token !== 20 /* CloseBracketToken */) { - indexedAccess.argumentExpression = allowInAnd(parseExpression); - if (indexedAccess.argumentExpression.kind === 9 /* StringLiteral */ || indexedAccess.argumentExpression.kind === 8 /* NumericLiteral */) { - var literal = indexedAccess.argumentExpression; - literal.text = internIdentifier(literal.text); - } - } - parseExpected(20 /* CloseBracketToken */); - expression = finishNode(indexedAccess); - continue; - } - if (token === 11 /* NoSubstitutionTemplateLiteral */ || token === 12 /* TemplateHead */) { - var tagExpression = createNode(170 /* TaggedTemplateExpression */, expression.pos); - tagExpression.tag = expression; - tagExpression.template = token === 11 /* NoSubstitutionTemplateLiteral */ - ? parseLiteralNode() - : parseTemplateExpression(); - expression = finishNode(tagExpression); - continue; - } - return expression; - } + function nextTokenIsFunctionKeywordOnSameLine() { + nextToken(); + return token === 87 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); } - function parseCallExpressionRest(expression) { + function nextTokenIsIdentifierOrKeywordOrNumberOnSameLine() { + nextToken(); + return (ts.tokenIsIdentifierOrKeyword(token) || token === 8 /* NumericLiteral */) && !scanner.hasPrecedingLineBreak(); + } + function isDeclaration() { while (true) { - expression = parseMemberExpressionRest(expression); - if (token === 25 /* LessThanToken */) { - // See if this is the start of a generic invocation. If so, consume it and - // keep checking for postfix expressions. Otherwise, it's just a '<' that's - // part of an arithmetic expression. Break out so we consume it higher in the - // stack. - var typeArguments = tryParse(parseTypeArgumentsInExpression); - if (!typeArguments) { - return expression; - } - var callExpr = createNode(168 /* CallExpression */, expression.pos); - callExpr.expression = expression; - callExpr.typeArguments = typeArguments; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); - continue; - } - else if (token === 17 /* OpenParenToken */) { - var callExpr = createNode(168 /* CallExpression */, expression.pos); - callExpr.expression = expression; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); - continue; + switch (token) { + case 102 /* VarKeyword */: + case 108 /* LetKeyword */: + case 74 /* ConstKeyword */: + case 87 /* FunctionKeyword */: + case 73 /* ClassKeyword */: + case 81 /* EnumKeyword */: + return true; + // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; + // however, an identifier cannot be followed by another identifier on the same line. This is what we + // count on to parse out the respective declarations. For instance, we exploit this to say that + // + // namespace n + // + // can be none other than the beginning of a namespace declaration, but need to respect that JavaScript sees + // + // namespace + // n + // + // as the identifier 'namespace' on one line followed by the identifier 'n' on another. + // We need to look one token ahead to see if it permissible to try parsing a declaration. + // + // *Note*: 'interface' is actually a strict mode reserved word. So while + // + // "use strict" + // interface + // I {} + // + // could be legal, it would add complexity for very little gain. + case 107 /* InterfaceKeyword */: + case 132 /* TypeKeyword */: + return nextTokenIsIdentifierOnSameLine(); + case 125 /* ModuleKeyword */: + case 126 /* NamespaceKeyword */: + return nextTokenIsIdentifierOrStringLiteralOnSameLine(); + case 115 /* AbstractKeyword */: + case 118 /* AsyncKeyword */: + case 122 /* DeclareKeyword */: + case 110 /* PrivateKeyword */: + case 111 /* ProtectedKeyword */: + case 112 /* PublicKeyword */: + nextToken(); + // ASI takes effect for this modifier. + if (scanner.hasPrecedingLineBreak()) { + return false; + } + continue; + case 89 /* ImportKeyword */: + nextToken(); + return token === 9 /* StringLiteral */ || token === 37 /* AsteriskToken */ || + token === 15 /* OpenBraceToken */ || ts.tokenIsIdentifierOrKeyword(token); + case 82 /* ExportKeyword */: + nextToken(); + if (token === 56 /* EqualsToken */ || token === 37 /* AsteriskToken */ || + token === 15 /* OpenBraceToken */ || token === 77 /* DefaultKeyword */) { + return true; + } + continue; + case 113 /* StaticKeyword */: + nextToken(); + continue; + default: + return false; } - return expression; } } - function parseArgumentList() { - parseExpected(17 /* OpenParenToken */); - var result = parseDelimitedList(11 /* ArgumentExpressions */, parseArgumentExpression); - parseExpected(18 /* CloseParenToken */); - return result; - } - function parseTypeArgumentsInExpression() { - if (!parseOptional(25 /* LessThanToken */)) { - return undefined; - } - var typeArguments = parseDelimitedList(18 /* TypeArguments */, parseType); - if (!parseExpected(27 /* GreaterThanToken */)) { - // If it doesn't have the closing > then it's definitely not an type argument list. - return undefined; - } - // If we have a '<', then only parse this as a arugment list if the type arguments - // are complete and we have an open paren. if we don't, rewind and return nothing. - return typeArguments && canFollowTypeArgumentsInExpression() - ? typeArguments - : undefined; + function isStartOfDeclaration() { + return lookAhead(isDeclaration); } - function canFollowTypeArgumentsInExpression() { + function isStartOfStatement() { switch (token) { - case 17 /* OpenParenToken */: // foo( - // this case are the only case where this token can legally follow a type argument - // list. So we definitely want to treat this as a type arg list. - case 21 /* DotToken */: // foo. - case 18 /* CloseParenToken */: // foo) - case 20 /* CloseBracketToken */: // foo] - case 54 /* ColonToken */: // foo: - case 23 /* SemicolonToken */: // foo; - case 53 /* QuestionToken */: // foo? - case 30 /* EqualsEqualsToken */: // foo == - case 32 /* EqualsEqualsEqualsToken */: // foo === - case 31 /* ExclamationEqualsToken */: // foo != - case 33 /* ExclamationEqualsEqualsToken */: // foo !== - case 51 /* AmpersandAmpersandToken */: // foo && - case 52 /* BarBarToken */: // foo || - case 48 /* CaretToken */: // foo ^ - case 46 /* AmpersandToken */: // foo & - case 47 /* BarToken */: // foo | - case 16 /* CloseBraceToken */: // foo } - case 1 /* EndOfFileToken */: - // these cases can't legally follow a type arg list. However, they're not legal - // expressions either. The user is probably in the middle of a generic type. So - // treat it as such. + case 55 /* AtToken */: + case 23 /* SemicolonToken */: + case 15 /* OpenBraceToken */: + case 102 /* VarKeyword */: + case 108 /* LetKeyword */: + case 87 /* FunctionKeyword */: + case 73 /* ClassKeyword */: + case 81 /* EnumKeyword */: + case 88 /* IfKeyword */: + case 79 /* DoKeyword */: + case 104 /* WhileKeyword */: + case 86 /* ForKeyword */: + case 75 /* ContinueKeyword */: + case 70 /* BreakKeyword */: + case 94 /* ReturnKeyword */: + case 105 /* WithKeyword */: + case 96 /* SwitchKeyword */: + case 98 /* ThrowKeyword */: + case 100 /* TryKeyword */: + case 76 /* DebuggerKeyword */: + // 'catch' and 'finally' do not actually indicate that the code is part of a statement, + // however, we say they are here so that we may gracefully parse them and error later. + case 72 /* CatchKeyword */: + case 85 /* FinallyKeyword */: return true; - case 24 /* CommaToken */: // foo, - case 15 /* OpenBraceToken */: // foo { - // We don't want to treat these as type arguments. Otherwise we'll parse this - // as an invocation expression. Instead, we want to parse out the expression - // in isolation from the type arguments. + case 74 /* ConstKeyword */: + case 82 /* ExportKeyword */: + case 89 /* ImportKeyword */: + return isStartOfDeclaration(); + case 118 /* AsyncKeyword */: + case 122 /* DeclareKeyword */: + case 107 /* InterfaceKeyword */: + case 125 /* ModuleKeyword */: + case 126 /* NamespaceKeyword */: + case 132 /* TypeKeyword */: + // When these don't start a declaration, they're an identifier in an expression statement + return true; + case 112 /* PublicKeyword */: + case 110 /* PrivateKeyword */: + case 111 /* ProtectedKeyword */: + case 113 /* StaticKeyword */: + // When these don't start a declaration, they may be the start of a class member if an identifier + // immediately follows. Otherwise they're an identifier in an expression statement. + return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); default: - // Anything else treat as an expression. - return false; + return isStartOfExpression(); } } - function parsePrimaryExpression() { + function nextTokenIsIdentifierOrStartOfDestructuring() { + nextToken(); + return isIdentifier() || token === 15 /* OpenBraceToken */ || token === 19 /* OpenBracketToken */; + } + function isLetDeclaration() { + // In ES6 'let' always starts a lexical declaration if followed by an identifier or { + // or [. + return lookAhead(nextTokenIsIdentifierOrStartOfDestructuring); + } + function parseStatement() { switch (token) { - case 8 /* NumericLiteral */: - case 9 /* StringLiteral */: - case 11 /* NoSubstitutionTemplateLiteral */: - return parseLiteralNode(); - case 97 /* ThisKeyword */: - case 95 /* SuperKeyword */: - case 93 /* NullKeyword */: - case 99 /* TrueKeyword */: - case 84 /* FalseKeyword */: - return parseTokenNode(); - case 17 /* OpenParenToken */: - return parseParenthesizedExpression(); - case 19 /* OpenBracketToken */: - return parseArrayLiteralExpression(); + case 23 /* SemicolonToken */: + return parseEmptyStatement(); case 15 /* OpenBraceToken */: - return parseObjectLiteralExpression(); - case 118 /* AsyncKeyword */: - // Async arrow functions are parsed earlier in parseAssignmentExpressionOrHigher. - // If we encounter `async [no LineTerminator here] function` then this is an async - // function; otherwise, its an identifier. - if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { - break; + return parseBlock(/*ignoreMissingOpenBrace*/ false); + case 102 /* VarKeyword */: + return parseVariableStatement(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); + case 108 /* LetKeyword */: + if (isLetDeclaration()) { + return parseVariableStatement(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); } - return parseFunctionExpression(); - case 73 /* ClassKeyword */: - return parseClassExpression(); + break; case 87 /* FunctionKeyword */: - return parseFunctionExpression(); - case 92 /* NewKeyword */: - return parseNewExpression(); - case 39 /* SlashToken */: - case 61 /* SlashEqualsToken */: - if (reScanSlashToken() === 10 /* RegularExpressionLiteral */) { - return parseLiteralNode(); + return parseFunctionDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); + case 73 /* ClassKeyword */: + return parseClassDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); + case 88 /* IfKeyword */: + return parseIfStatement(); + case 79 /* DoKeyword */: + return parseDoStatement(); + case 104 /* WhileKeyword */: + return parseWhileStatement(); + case 86 /* ForKeyword */: + return parseForOrForInOrForOfStatement(); + case 75 /* ContinueKeyword */: + return parseBreakOrContinueStatement(202 /* ContinueStatement */); + case 70 /* BreakKeyword */: + return parseBreakOrContinueStatement(203 /* BreakStatement */); + case 94 /* ReturnKeyword */: + return parseReturnStatement(); + case 105 /* WithKeyword */: + return parseWithStatement(); + case 96 /* SwitchKeyword */: + return parseSwitchStatement(); + case 98 /* ThrowKeyword */: + return parseThrowStatement(); + case 100 /* TryKeyword */: + // Include 'catch' and 'finally' for error recovery. + case 72 /* CatchKeyword */: + case 85 /* FinallyKeyword */: + return parseTryStatement(); + case 76 /* DebuggerKeyword */: + return parseDebuggerStatement(); + case 55 /* AtToken */: + return parseDeclaration(); + case 118 /* AsyncKeyword */: + case 107 /* InterfaceKeyword */: + case 132 /* TypeKeyword */: + case 125 /* ModuleKeyword */: + case 126 /* NamespaceKeyword */: + case 122 /* DeclareKeyword */: + case 74 /* ConstKeyword */: + case 81 /* EnumKeyword */: + case 82 /* ExportKeyword */: + case 89 /* ImportKeyword */: + case 110 /* PrivateKeyword */: + case 111 /* ProtectedKeyword */: + case 112 /* PublicKeyword */: + case 115 /* AbstractKeyword */: + case 113 /* StaticKeyword */: + if (isStartOfDeclaration()) { + return parseDeclaration(); } break; - case 12 /* TemplateHead */: - return parseTemplateExpression(); } - return parseIdentifier(ts.Diagnostics.Expression_expected); - } - function parseParenthesizedExpression() { - var node = createNode(172 /* ParenthesizedExpression */); - parseExpected(17 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - return finishNode(node); - } - function parseSpreadElement() { - var node = createNode(185 /* SpreadElementExpression */); - parseExpected(22 /* DotDotDotToken */); - node.expression = parseAssignmentExpressionOrHigher(); - return finishNode(node); - } - function parseArgumentOrArrayLiteralElement() { - return token === 22 /* DotDotDotToken */ ? parseSpreadElement() : - token === 24 /* CommaToken */ ? createNode(187 /* OmittedExpression */) : - parseAssignmentExpressionOrHigher(); + return parseExpressionOrLabeledStatement(); } - function parseArgumentExpression() { - return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); + function parseDeclaration() { + var fullStart = getNodePos(); + var decorators = parseDecorators(); + var modifiers = parseModifiers(); + switch (token) { + case 102 /* VarKeyword */: + case 108 /* LetKeyword */: + case 74 /* ConstKeyword */: + return parseVariableStatement(fullStart, decorators, modifiers); + case 87 /* FunctionKeyword */: + return parseFunctionDeclaration(fullStart, decorators, modifiers); + case 73 /* ClassKeyword */: + return parseClassDeclaration(fullStart, decorators, modifiers); + case 107 /* InterfaceKeyword */: + return parseInterfaceDeclaration(fullStart, decorators, modifiers); + case 132 /* TypeKeyword */: + return parseTypeAliasDeclaration(fullStart, decorators, modifiers); + case 81 /* EnumKeyword */: + return parseEnumDeclaration(fullStart, decorators, modifiers); + case 125 /* ModuleKeyword */: + case 126 /* NamespaceKeyword */: + return parseModuleDeclaration(fullStart, decorators, modifiers); + case 89 /* ImportKeyword */: + return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); + case 82 /* ExportKeyword */: + nextToken(); + return token === 77 /* DefaultKeyword */ || token === 56 /* EqualsToken */ ? + parseExportAssignment(fullStart, decorators, modifiers) : + parseExportDeclaration(fullStart, decorators, modifiers); + default: + if (decorators || modifiers) { + // We reached this point because we encountered decorators and/or modifiers and assumed a declaration + // would follow. For recovery and error reporting purposes, return an incomplete declaration. + var node = createMissingNode(231 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); + node.pos = fullStart; + node.decorators = decorators; + setModifiers(node, modifiers); + return finishNode(node); + } + } } - function parseArrayLiteralExpression() { - var node = createNode(164 /* ArrayLiteralExpression */); - parseExpected(19 /* OpenBracketToken */); - if (scanner.hasPrecedingLineBreak()) - node.flags |= 1024 /* MultiLine */; - node.elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); - parseExpected(20 /* CloseBracketToken */); - return finishNode(node); + function nextTokenIsIdentifierOrStringLiteralOnSameLine() { + nextToken(); + return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token === 9 /* StringLiteral */); } - function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { - if (parseContextualModifier(123 /* GetKeyword */)) { - return parseAccessorDeclaration(145 /* GetAccessor */, fullStart, decorators, modifiers); - } - else if (parseContextualModifier(129 /* SetKeyword */)) { - return parseAccessorDeclaration(146 /* SetAccessor */, fullStart, decorators, modifiers); + function parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage) { + if (token !== 15 /* OpenBraceToken */ && canParseSemicolon()) { + parseSemicolon(); + return; } - return undefined; + return parseFunctionBlock(isGenerator, isAsync, /*ignoreMissingOpenBrace*/ false, diagnosticMessage); } - function parseObjectLiteralElement() { - var fullStart = scanner.getStartPos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); - if (accessor) { - return accessor; - } - var asteriskToken = parseOptionalToken(37 /* AsteriskToken */); - var tokenIsIdentifier = isIdentifier(); - var nameToken = token; - var propertyName = parsePropertyName(); - // Disallowing of optional property assignments happens in the grammar checker. - var questionToken = parseOptionalToken(53 /* QuestionToken */); - if (asteriskToken || token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { - return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); + // DECLARATIONS + function parseArrayBindingElement() { + if (token === 24 /* CommaToken */) { + return createNode(187 /* OmittedExpression */); } - // check if it is short-hand property assignment or normal property assignment - // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production - // CoverInitializedName[Yield] : - // IdentifierReference[?Yield] Initializer[In, ?Yield] - // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern - var isShorthandPropertyAssignment = tokenIsIdentifier && (token === 24 /* CommaToken */ || token === 16 /* CloseBraceToken */ || token === 56 /* EqualsToken */); - if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(246 /* ShorthandPropertyAssignment */, fullStart); - shorthandDeclaration.name = propertyName; - shorthandDeclaration.questionToken = questionToken; - var equalsToken = parseOptionalToken(56 /* EqualsToken */); - if (equalsToken) { - shorthandDeclaration.equalsToken = equalsToken; - shorthandDeclaration.objectAssignmentInitializer = allowInAnd(parseAssignmentExpressionOrHigher); - } - return finishNode(shorthandDeclaration); + var node = createNode(163 /* BindingElement */); + node.dotDotDotToken = parseOptionalToken(22 /* DotDotDotToken */); + node.name = parseIdentifierOrPattern(); + node.initializer = parseBindingElementInitializer(/*inParameter*/ false); + return finishNode(node); + } + function parseObjectBindingElement() { + var node = createNode(163 /* BindingElement */); + var tokenIsIdentifier = isIdentifier(); + var propertyName = parsePropertyName(); + if (tokenIsIdentifier && token !== 54 /* ColonToken */) { + node.name = propertyName; } else { - var propertyAssignment = createNode(245 /* PropertyAssignment */, fullStart); - propertyAssignment.name = propertyName; - propertyAssignment.questionToken = questionToken; parseExpected(54 /* ColonToken */); - propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); - return finishNode(propertyAssignment); + node.propertyName = propertyName; + node.name = parseIdentifierOrPattern(); } + node.initializer = parseBindingElementInitializer(/*inParameter*/ false); + return finishNode(node); } - function parseObjectLiteralExpression() { - var node = createNode(165 /* ObjectLiteralExpression */); + function parseObjectBindingPattern() { + var node = createNode(161 /* ObjectBindingPattern */); parseExpected(15 /* OpenBraceToken */); - if (scanner.hasPrecedingLineBreak()) { - node.flags |= 1024 /* MultiLine */; - } - node.properties = parseDelimitedList(12 /* ObjectLiteralMembers */, parseObjectLiteralElement, /*considerSemicolonAsDelimeter*/ true); + node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); parseExpected(16 /* CloseBraceToken */); return finishNode(node); } - function parseFunctionExpression() { - // GeneratorExpression: - // function* BindingIdentifier [Yield][opt](FormalParameters[Yield]){ GeneratorBody } - // - // FunctionExpression: - // function BindingIdentifier[opt](FormalParameters){ FunctionBody } - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var node = createNode(173 /* FunctionExpression */); - setModifiers(node, parseModifiers()); - parseExpected(87 /* FunctionKeyword */); - node.asteriskToken = parseOptionalToken(37 /* AsteriskToken */); - var isGenerator = !!node.asteriskToken; - var isAsync = !!(node.flags & 256 /* Async */); - node.name = - isGenerator && isAsync ? doInYieldAndAwaitContext(parseOptionalIdentifier) : - isGenerator ? doInYieldContext(parseOptionalIdentifier) : - isAsync ? doInAwaitContext(parseOptionalIdentifier) : - parseOptionalIdentifier(); - fillSignature(54 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); - node.body = parseFunctionBlock(/*allowYield*/ isGenerator, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); - if (saveDecoratorContext) { - setDecoratorContext(true); - } + function parseArrayBindingPattern() { + var node = createNode(162 /* ArrayBindingPattern */); + parseExpected(19 /* OpenBracketToken */); + node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); + parseExpected(20 /* CloseBracketToken */); return finishNode(node); } - function parseOptionalIdentifier() { - return isIdentifier() ? parseIdentifier() : undefined; + function isIdentifierOrPattern() { + return token === 15 /* OpenBraceToken */ || token === 19 /* OpenBracketToken */ || isIdentifier(); } - function parseNewExpression() { - var node = createNode(169 /* NewExpression */); - parseExpected(92 /* NewKeyword */); - node.expression = parseMemberExpressionOrHigher(); - node.typeArguments = tryParse(parseTypeArgumentsInExpression); - if (node.typeArguments || token === 17 /* OpenParenToken */) { - node.arguments = parseArgumentList(); + function parseIdentifierOrPattern() { + if (token === 19 /* OpenBracketToken */) { + return parseArrayBindingPattern(); + } + if (token === 15 /* OpenBraceToken */) { + return parseObjectBindingPattern(); + } + return parseIdentifier(); + } + function parseVariableDeclaration() { + var node = createNode(211 /* VariableDeclaration */); + node.name = parseIdentifierOrPattern(); + node.type = parseTypeAnnotation(); + if (!isInOrOfKeyword(token)) { + node.initializer = parseInitializer(/*inParameter*/ false); } return finishNode(node); } - // STATEMENTS - function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(192 /* Block */); - if (parseExpected(15 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { - node.statements = parseList(1 /* BlockStatements */, parseStatement); - parseExpected(16 /* CloseBraceToken */); + function parseVariableDeclarationList(inForStatementInitializer) { + var node = createNode(212 /* VariableDeclarationList */); + switch (token) { + case 102 /* VarKeyword */: + break; + case 108 /* LetKeyword */: + node.flags |= 8192 /* Let */; + break; + case 74 /* ConstKeyword */: + node.flags |= 16384 /* Const */; + break; + default: + ts.Debug.fail(); + } + nextToken(); + // The user may have written the following: + // + // for (let of X) { } + // + // In this case, we want to parse an empty declaration list, and then parse 'of' + // as a keyword. The reason this is not automatic is that 'of' is a valid identifier. + // So we need to look ahead to determine if 'of' should be treated as a keyword in + // this context. + // The checker will then give an error that there is an empty declaration list. + if (token === 134 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + node.declarations = createMissingList(); } else { - node.statements = createMissingList(); + var savedDisallowIn = inDisallowInContext(); + setDisallowInContext(inForStatementInitializer); + node.declarations = parseDelimitedList(8 /* VariableDeclarations */, parseVariableDeclaration); + setDisallowInContext(savedDisallowIn); } return finishNode(node); } - function parseFunctionBlock(allowYield, allowAwait, ignoreMissingOpenBrace, diagnosticMessage) { - var savedYieldContext = inYieldContext(); - setYieldContext(allowYield); - var savedAwaitContext = inAwaitContext(); - setAwaitContext(allowAwait); - // We may be in a [Decorator] context when parsing a function expression or - // arrow function. The body of the function is not in [Decorator] context. - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var block = parseBlock(ignoreMissingOpenBrace, diagnosticMessage); - if (saveDecoratorContext) { - setDecoratorContext(true); - } - setYieldContext(savedYieldContext); - setAwaitContext(savedAwaitContext); - return block; + function canFollowContextualOfKeyword() { + return nextTokenIsIdentifier() && nextToken() === 18 /* CloseParenToken */; } - function parseEmptyStatement() { - var node = createNode(194 /* EmptyStatement */); - parseExpected(23 /* SemicolonToken */); + function parseVariableStatement(fullStart, decorators, modifiers) { + var node = createNode(193 /* VariableStatement */, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false); + parseSemicolon(); return finishNode(node); } - function parseIfStatement() { - var node = createNode(196 /* IfStatement */); - parseExpected(88 /* IfKeyword */); - parseExpected(17 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - node.thenStatement = parseStatement(); - node.elseStatement = parseOptional(80 /* ElseKeyword */) ? parseStatement() : undefined; + function parseFunctionDeclaration(fullStart, decorators, modifiers) { + var node = createNode(213 /* FunctionDeclaration */, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(87 /* FunctionKeyword */); + node.asteriskToken = parseOptionalToken(37 /* AsteriskToken */); + node.name = node.flags & 512 /* Default */ ? parseOptionalIdentifier() : parseIdentifier(); + var isGenerator = !!node.asteriskToken; + var isAsync = !!(node.flags & 256 /* Async */); + fillSignature(54 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); + node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, ts.Diagnostics.or_expected); return finishNode(node); } - function parseDoStatement() { - var node = createNode(197 /* DoStatement */); - parseExpected(79 /* DoKeyword */); - node.statement = parseStatement(); - parseExpected(104 /* WhileKeyword */); - parseExpected(17 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - // From: https://mail.mozilla.org/pipermail/es-discuss/2011-August/016188.html - // 157 min --- All allen at wirfs-brock.com CONF --- "do{;}while(false)false" prohibited in - // spec but allowed in consensus reality. Approved -- this is the de-facto standard whereby - // do;while(0)x will have a semicolon inserted before x. - parseOptional(23 /* SemicolonToken */); + function parseConstructorDeclaration(pos, decorators, modifiers) { + var node = createNode(144 /* Constructor */, pos); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(121 /* ConstructorKeyword */); + fillSignature(54 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); + node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false, ts.Diagnostics.or_expected); return finishNode(node); } - function parseWhileStatement() { - var node = createNode(198 /* WhileStatement */); - parseExpected(104 /* WhileKeyword */); - parseExpected(17 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - node.statement = parseStatement(); + function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { + var method = createNode(143 /* MethodDeclaration */, fullStart); + method.decorators = decorators; + setModifiers(method, modifiers); + method.asteriskToken = asteriskToken; + method.name = name; + method.questionToken = questionToken; + var isGenerator = !!asteriskToken; + var isAsync = !!(method.flags & 256 /* Async */); + fillSignature(54 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, method); + method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); + return finishNode(method); + } + function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { + var property = createNode(141 /* PropertyDeclaration */, fullStart); + property.decorators = decorators; + setModifiers(property, modifiers); + property.name = name; + property.questionToken = questionToken; + property.type = parseTypeAnnotation(); + // For instance properties specifically, since they are evaluated inside the constructor, + // we do *not * want to parse yield expressions, so we specifically turn the yield context + // off. The grammar would look something like this: + // + // MemberVariableDeclaration[Yield]: + // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initialiser_opt[In]; + // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initialiser_opt[In, ?Yield]; + // + // The checker may still error in the static case to explicitly disallow the yield expression. + property.initializer = modifiers && modifiers.flags & 64 /* Static */ + ? allowInAnd(parseNonParameterInitializer) + : doOutsideOfContext(2 /* Yield */ | 1 /* DisallowIn */, parseNonParameterInitializer); + parseSemicolon(); + return finishNode(property); + } + function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) { + var asteriskToken = parseOptionalToken(37 /* AsteriskToken */); + var name = parsePropertyName(); + // Note: this is not legal as per the grammar. But we allow it in the parser and + // report an error in the grammar checker. + var questionToken = parseOptionalToken(53 /* QuestionToken */); + if (asteriskToken || token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { + return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); + } + else { + return parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken); + } + } + function parseNonParameterInitializer() { + return parseInitializer(/*inParameter*/ false); + } + function parseAccessorDeclaration(kind, fullStart, decorators, modifiers) { + var node = createNode(kind, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + node.name = parsePropertyName(); + fillSignature(54 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); + node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false); return finishNode(node); } - function parseForOrForInOrForOfStatement() { - var pos = getNodePos(); - parseExpected(86 /* ForKeyword */); - parseExpected(17 /* OpenParenToken */); - var initializer = undefined; - if (token !== 23 /* SemicolonToken */) { - if (token === 102 /* VarKeyword */ || token === 108 /* LetKeyword */ || token === 74 /* ConstKeyword */) { - initializer = parseVariableDeclarationList(/*inForStatementInitializer*/ true); + function isClassMemberModifier(idToken) { + switch (idToken) { + case 112 /* PublicKeyword */: + case 110 /* PrivateKeyword */: + case 111 /* ProtectedKeyword */: + case 113 /* StaticKeyword */: + return true; + default: + return false; + } + } + function isClassMemberStart() { + var idToken; + if (token === 55 /* AtToken */) { + return true; + } + // Eat up all modifiers, but hold on to the last one in case it is actually an identifier. + while (ts.isModifier(token)) { + idToken = token; + // If the idToken is a class modifier (protected, private, public, and static), it is + // certain that we are starting to parse class member. This allows better error recovery + // Example: + // public foo() ... // true + // public @dec blah ... // true; we will then report an error later + // export public ... // true; we will then report an error later + if (isClassMemberModifier(idToken)) { + return true; } - else { - initializer = disallowInAnd(parseExpression); + nextToken(); + } + if (token === 37 /* AsteriskToken */) { + return true; + } + // Try to get the first property-like token following all modifiers. + // This can either be an identifier or the 'get' or 'set' keywords. + if (isLiteralPropertyName()) { + idToken = token; + nextToken(); + } + // Index signatures and computed properties are class members; we can parse. + if (token === 19 /* OpenBracketToken */) { + return true; + } + // If we were able to get any potential identifier... + if (idToken !== undefined) { + // If we have a non-keyword identifier, or if we have an accessor, then it's safe to parse. + if (!ts.isKeyword(idToken) || idToken === 129 /* SetKeyword */ || idToken === 123 /* GetKeyword */) { + return true; + } + // If it *is* a keyword, but not an accessor, check a little farther along + // to see if it should actually be parsed as a class member. + switch (token) { + case 17 /* OpenParenToken */: // Method declaration + case 25 /* LessThanToken */: // Generic Method declaration + case 54 /* ColonToken */: // Type Annotation for declaration + case 56 /* EqualsToken */: // Initializer for declaration + case 53 /* QuestionToken */: + return true; + default: + // Covers + // - Semicolons (declaration termination) + // - Closing braces (end-of-class, must be declaration) + // - End-of-files (not valid, but permitted so that it gets caught later on) + // - Line-breaks (enabling *automatic semicolon insertion*) + return canParseSemicolon(); } } - var forOrForInOrForOfStatement; - if (parseOptional(90 /* InKeyword */)) { - var forInStatement = createNode(200 /* ForInStatement */, pos); - forInStatement.initializer = initializer; - forInStatement.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - forOrForInOrForOfStatement = forInStatement; + return false; + } + function parseDecorators() { + var decorators; + while (true) { + var decoratorStart = getNodePos(); + if (!parseOptional(55 /* AtToken */)) { + break; + } + if (!decorators) { + decorators = []; + decorators.pos = scanner.getStartPos(); + } + var decorator = createNode(139 /* Decorator */, decoratorStart); + decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); + decorators.push(finishNode(decorator)); } - else if (parseOptional(134 /* OfKeyword */)) { - var forOfStatement = createNode(201 /* ForOfStatement */, pos); - forOfStatement.initializer = initializer; - forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(18 /* CloseParenToken */); - forOrForInOrForOfStatement = forOfStatement; + if (decorators) { + decorators.end = getNodeEnd(); } - else { - var forStatement = createNode(199 /* ForStatement */, pos); - forStatement.initializer = initializer; - parseExpected(23 /* SemicolonToken */); - if (token !== 23 /* SemicolonToken */ && token !== 18 /* CloseParenToken */) { - forStatement.condition = allowInAnd(parseExpression); + return decorators; + } + function parseModifiers() { + var flags = 0; + var modifiers; + while (true) { + var modifierStart = scanner.getStartPos(); + var modifierKind = token; + if (!parseAnyContextualModifier()) { + break; } - parseExpected(23 /* SemicolonToken */); - if (token !== 18 /* CloseParenToken */) { - forStatement.incrementor = allowInAnd(parseExpression); + if (!modifiers) { + modifiers = []; + modifiers.pos = modifierStart; } - parseExpected(18 /* CloseParenToken */); - forOrForInOrForOfStatement = forStatement; + flags |= ts.modifierToFlag(modifierKind); + modifiers.push(finishNode(createNode(modifierKind, modifierStart))); } - forOrForInOrForOfStatement.statement = parseStatement(); - return finishNode(forOrForInOrForOfStatement); + if (modifiers) { + modifiers.flags = flags; + modifiers.end = scanner.getStartPos(); + } + return modifiers; } - function parseBreakOrContinueStatement(kind) { - var node = createNode(kind); - parseExpected(kind === 203 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */); - if (!canParseSemicolon()) { - node.label = parseIdentifier(); + function parseModifiersForArrowFunction() { + var flags = 0; + var modifiers; + if (token === 118 /* AsyncKeyword */) { + var modifierStart = scanner.getStartPos(); + var modifierKind = token; + nextToken(); + modifiers = []; + modifiers.pos = modifierStart; + flags |= ts.modifierToFlag(modifierKind); + modifiers.push(finishNode(createNode(modifierKind, modifierStart))); + modifiers.flags = flags; + modifiers.end = scanner.getStartPos(); } - parseSemicolon(); - return finishNode(node); + return modifiers; } - function parseReturnStatement() { - var node = createNode(204 /* ReturnStatement */); - parseExpected(94 /* ReturnKeyword */); - if (!canParseSemicolon()) { - node.expression = allowInAnd(parseExpression); + function parseClassElement() { + if (token === 23 /* SemicolonToken */) { + var result = createNode(191 /* SemicolonClassElement */); + nextToken(); + return finishNode(result); } - parseSemicolon(); - return finishNode(node); + var fullStart = getNodePos(); + var decorators = parseDecorators(); + var modifiers = parseModifiers(); + var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); + if (accessor) { + return accessor; + } + if (token === 121 /* ConstructorKeyword */) { + return parseConstructorDeclaration(fullStart, decorators, modifiers); + } + if (isIndexSignature()) { + return parseIndexSignatureDeclaration(fullStart, decorators, modifiers); + } + // It is very important that we check this *after* checking indexers because + // the [ token can start an index signature or a computed property name + if (ts.tokenIsIdentifierOrKeyword(token) || + token === 9 /* StringLiteral */ || + token === 8 /* NumericLiteral */ || + token === 37 /* AsteriskToken */ || + token === 19 /* OpenBracketToken */) { + return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); + } + if (decorators || modifiers) { + // treat this as a property declaration with a missing name. + var name_7 = createMissingNode(69 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); + return parsePropertyDeclaration(fullStart, decorators, modifiers, name_7, /*questionToken*/ undefined); + } + // 'isClassMemberStart' should have hinted not to attempt parsing. + ts.Debug.fail("Should not have attempted to parse class member declaration."); } - function parseWithStatement() { - var node = createNode(205 /* WithStatement */); - parseExpected(105 /* WithKeyword */); - parseExpected(17 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - node.statement = parseStatement(); + function parseClassExpression() { + return parseClassDeclarationOrExpression( + /*fullStart*/ scanner.getStartPos(), + /*decorators*/ undefined, + /*modifiers*/ undefined, 186 /* ClassExpression */); + } + function parseClassDeclaration(fullStart, decorators, modifiers) { + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 214 /* ClassDeclaration */); + } + function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { + var node = createNode(kind, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(73 /* ClassKeyword */); + node.name = parseNameOfClassDeclarationOrExpression(); + node.typeParameters = parseTypeParameters(); + node.heritageClauses = parseHeritageClauses(/*isClassHeritageClause*/ true); + if (parseExpected(15 /* OpenBraceToken */)) { + // ClassTail[Yield,Await] : (Modified) See 14.5 + // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } + node.members = parseClassMembers(); + parseExpected(16 /* CloseBraceToken */); + } + else { + node.members = createMissingList(); + } return finishNode(node); } - function parseCaseClause() { - var node = createNode(241 /* CaseClause */); - parseExpected(71 /* CaseKeyword */); - node.expression = allowInAnd(parseExpression); - parseExpected(54 /* ColonToken */); - node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); - return finishNode(node); + function parseNameOfClassDeclarationOrExpression() { + // implements is a future reserved word so + // 'class implements' might mean either + // - class expression with omitted name, 'implements' starts heritage clause + // - class with name 'implements' + // 'isImplementsClause' helps to disambiguate between these two cases + return isIdentifier() && !isImplementsClause() + ? parseIdentifier() + : undefined; + } + function isImplementsClause() { + return token === 106 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); + } + function parseHeritageClauses(isClassHeritageClause) { + // ClassTail[Yield,Await] : (Modified) See 14.5 + // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } + if (isHeritageClause()) { + return parseList(20 /* HeritageClauses */, parseHeritageClause); + } + return undefined; + } + function parseHeritageClausesWorker() { + return parseList(20 /* HeritageClauses */, parseHeritageClause); + } + function parseHeritageClause() { + if (token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */) { + var node = createNode(243 /* HeritageClause */); + node.token = token; + nextToken(); + node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); + return finishNode(node); + } + return undefined; } - function parseDefaultClause() { - var node = createNode(242 /* DefaultClause */); - parseExpected(77 /* DefaultKeyword */); - parseExpected(54 /* ColonToken */); - node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); + function parseExpressionWithTypeArguments() { + var node = createNode(188 /* ExpressionWithTypeArguments */); + node.expression = parseLeftHandSideExpressionOrHigher(); + if (token === 25 /* LessThanToken */) { + node.typeArguments = parseBracketedList(18 /* TypeArguments */, parseType, 25 /* LessThanToken */, 27 /* GreaterThanToken */); + } return finishNode(node); } - function parseCaseOrDefaultClause() { - return token === 71 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); + function isHeritageClause() { + return token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */; } - function parseSwitchStatement() { - var node = createNode(206 /* SwitchStatement */); - parseExpected(96 /* SwitchKeyword */); - parseExpected(17 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - var caseBlock = createNode(220 /* CaseBlock */, scanner.getStartPos()); - parseExpected(15 /* OpenBraceToken */); - caseBlock.clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause); - parseExpected(16 /* CloseBraceToken */); - node.caseBlock = finishNode(caseBlock); + function parseClassMembers() { + return parseList(5 /* ClassMembers */, parseClassElement); + } + function parseInterfaceDeclaration(fullStart, decorators, modifiers) { + var node = createNode(215 /* InterfaceDeclaration */, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(107 /* InterfaceKeyword */); + node.name = parseIdentifier(); + node.typeParameters = parseTypeParameters(); + node.heritageClauses = parseHeritageClauses(/*isClassHeritageClause*/ false); + node.members = parseObjectTypeMembers(); return finishNode(node); } - function parseThrowStatement() { - // ThrowStatement[Yield] : - // throw [no LineTerminator here]Expression[In, ?Yield]; - // Because of automatic semicolon insertion, we need to report error if this - // throw could be terminated with a semicolon. Note: we can't call 'parseExpression' - // directly as that might consume an expression on the following line. - // We just return 'undefined' in that case. The actual error will be reported in the - // grammar walker. - var node = createNode(208 /* ThrowStatement */); - parseExpected(98 /* ThrowKeyword */); - node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); + function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { + var node = createNode(216 /* TypeAliasDeclaration */, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(132 /* TypeKeyword */); + node.name = parseIdentifier(); + node.typeParameters = parseTypeParameters(); + parseExpected(56 /* EqualsToken */); + node.type = parseType(); parseSemicolon(); return finishNode(node); } - // TODO: Review for error recovery - function parseTryStatement() { - var node = createNode(209 /* TryStatement */); - parseExpected(100 /* TryKeyword */); - node.tryBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); - node.catchClause = token === 72 /* CatchKeyword */ ? parseCatchClause() : undefined; - // If we don't have a catch clause, then we must have a finally clause. Try to parse - // one out no matter what. - if (!node.catchClause || token === 85 /* FinallyKeyword */) { - parseExpected(85 /* FinallyKeyword */); - node.finallyBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); - } + // In an ambient declaration, the grammar only allows integer literals as initializers. + // 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 parseEnumMember() { + var node = createNode(247 /* EnumMember */, scanner.getStartPos()); + node.name = parsePropertyName(); + node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); } - function parseCatchClause() { - var result = createNode(244 /* CatchClause */); - parseExpected(72 /* CatchKeyword */); - if (parseExpected(17 /* OpenParenToken */)) { - result.variableDeclaration = parseVariableDeclaration(); + function parseEnumDeclaration(fullStart, decorators, modifiers) { + var node = createNode(217 /* EnumDeclaration */, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(81 /* EnumKeyword */); + node.name = parseIdentifier(); + if (parseExpected(15 /* OpenBraceToken */)) { + node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); + parseExpected(16 /* CloseBraceToken */); + } + else { + node.members = createMissingList(); } - parseExpected(18 /* CloseParenToken */); - result.block = parseBlock(/*ignoreMissingOpenBrace*/ false); - return finishNode(result); - } - function parseDebuggerStatement() { - var node = createNode(210 /* DebuggerStatement */); - parseExpected(76 /* DebuggerKeyword */); - parseSemicolon(); return finishNode(node); } - function parseExpressionOrLabeledStatement() { - // Avoiding having to do the lookahead for a labeled statement by just trying to parse - // out an expression, seeing if it is identifier and then seeing if it is followed by - // a colon. - var fullStart = scanner.getStartPos(); - var expression = allowInAnd(parseExpression); - if (expression.kind === 69 /* Identifier */ && parseOptional(54 /* ColonToken */)) { - var labeledStatement = createNode(207 /* LabeledStatement */, fullStart); - labeledStatement.label = expression; - labeledStatement.statement = parseStatement(); - return finishNode(labeledStatement); + function parseModuleBlock() { + var node = createNode(219 /* ModuleBlock */, scanner.getStartPos()); + if (parseExpected(15 /* OpenBraceToken */)) { + node.statements = parseList(1 /* BlockStatements */, parseStatement); + parseExpected(16 /* CloseBraceToken */); } else { - var expressionStatement = createNode(195 /* ExpressionStatement */, fullStart); - expressionStatement.expression = expression; - parseSemicolon(); - return finishNode(expressionStatement); + node.statements = createMissingList(); } + return finishNode(node); } - function nextTokenIsIdentifierOrKeywordOnSameLine() { - nextToken(); - return ts.tokenIsIdentifierOrKeyword(token) && !scanner.hasPrecedingLineBreak(); - } - function nextTokenIsFunctionKeywordOnSameLine() { - nextToken(); - return token === 87 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); + function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { + var node = createNode(218 /* ModuleDeclaration */, fullStart); + // If we are parsing a dotted namespace name, we want to + // propagate the 'Namespace' flag across the names if set. + var namespaceFlag = flags & 65536 /* Namespace */; + node.decorators = decorators; + setModifiers(node, modifiers); + node.flags |= flags; + node.name = parseIdentifier(); + node.body = parseOptional(21 /* DotToken */) + ? parseModuleOrNamespaceDeclaration(getNodePos(), /*decorators*/ undefined, /*modifiers*/ undefined, 2 /* Export */ | namespaceFlag) + : parseModuleBlock(); + return finishNode(node); } - function nextTokenIsIdentifierOrKeywordOrNumberOnSameLine() { - nextToken(); - return (ts.tokenIsIdentifierOrKeyword(token) || token === 8 /* NumericLiteral */) && !scanner.hasPrecedingLineBreak(); + function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { + var node = createNode(218 /* ModuleDeclaration */, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + node.name = parseLiteralNode(/*internName*/ true); + node.body = parseModuleBlock(); + return finishNode(node); } - function isDeclaration() { - while (true) { - switch (token) { - case 102 /* VarKeyword */: - case 108 /* LetKeyword */: - case 74 /* ConstKeyword */: - case 87 /* FunctionKeyword */: - case 73 /* ClassKeyword */: - case 81 /* EnumKeyword */: - return true; - // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; - // however, an identifier cannot be followed by another identifier on the same line. This is what we - // count on to parse out the respective declarations. For instance, we exploit this to say that - // - // namespace n - // - // can be none other than the beginning of a namespace declaration, but need to respect that JavaScript sees - // - // namespace - // n - // - // as the identifier 'namespace' on one line followed by the identifier 'n' on another. - // We need to look one token ahead to see if it permissible to try parsing a declaration. - // - // *Note*: 'interface' is actually a strict mode reserved word. So while - // - // "use strict" - // interface - // I {} - // - // could be legal, it would add complexity for very little gain. - case 107 /* InterfaceKeyword */: - case 132 /* TypeKeyword */: - return nextTokenIsIdentifierOnSameLine(); - case 125 /* ModuleKeyword */: - case 126 /* NamespaceKeyword */: - return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 115 /* AbstractKeyword */: - case 118 /* AsyncKeyword */: - case 122 /* DeclareKeyword */: - case 110 /* PrivateKeyword */: - case 111 /* ProtectedKeyword */: - case 112 /* PublicKeyword */: - nextToken(); - // ASI takes effect for this modifier. - if (scanner.hasPrecedingLineBreak()) { - return false; - } - continue; - case 89 /* ImportKeyword */: - nextToken(); - return token === 9 /* StringLiteral */ || token === 37 /* AsteriskToken */ || - token === 15 /* OpenBraceToken */ || ts.tokenIsIdentifierOrKeyword(token); - case 82 /* ExportKeyword */: - nextToken(); - if (token === 56 /* EqualsToken */ || token === 37 /* AsteriskToken */ || - token === 15 /* OpenBraceToken */ || token === 77 /* DefaultKeyword */) { - return true; - } - continue; - case 113 /* StaticKeyword */: - nextToken(); - continue; - default: - return false; - } + function parseModuleDeclaration(fullStart, decorators, modifiers) { + var flags = modifiers ? modifiers.flags : 0; + if (parseOptional(126 /* NamespaceKeyword */)) { + flags |= 65536 /* Namespace */; } - } - function isStartOfDeclaration() { - return lookAhead(isDeclaration); - } - function isStartOfStatement() { - switch (token) { - case 55 /* AtToken */: - case 23 /* SemicolonToken */: - case 15 /* OpenBraceToken */: - case 102 /* VarKeyword */: - case 108 /* LetKeyword */: - case 87 /* FunctionKeyword */: - case 73 /* ClassKeyword */: - case 81 /* EnumKeyword */: - case 88 /* IfKeyword */: - case 79 /* DoKeyword */: - case 104 /* WhileKeyword */: - case 86 /* ForKeyword */: - case 75 /* ContinueKeyword */: - case 70 /* BreakKeyword */: - case 94 /* ReturnKeyword */: - case 105 /* WithKeyword */: - case 96 /* SwitchKeyword */: - case 98 /* ThrowKeyword */: - case 100 /* TryKeyword */: - case 76 /* DebuggerKeyword */: - // 'catch' and 'finally' do not actually indicate that the code is part of a statement, - // however, we say they are here so that we may gracefully parse them and error later. - case 72 /* CatchKeyword */: - case 85 /* FinallyKeyword */: - return true; - case 74 /* ConstKeyword */: - case 82 /* ExportKeyword */: - case 89 /* ImportKeyword */: - return isStartOfDeclaration(); - case 118 /* AsyncKeyword */: - case 122 /* DeclareKeyword */: - case 107 /* InterfaceKeyword */: - case 125 /* ModuleKeyword */: - case 126 /* NamespaceKeyword */: - case 132 /* TypeKeyword */: - // When these don't start a declaration, they're an identifier in an expression statement - return true; - case 112 /* PublicKeyword */: - case 110 /* PrivateKeyword */: - case 111 /* ProtectedKeyword */: - case 113 /* StaticKeyword */: - // When these don't start a declaration, they may be the start of a class member if an identifier - // immediately follows. Otherwise they're an identifier in an expression statement. - return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); - default: - return isStartOfExpression(); + else { + parseExpected(125 /* ModuleKeyword */); + if (token === 9 /* StringLiteral */) { + return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); + } } + return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); } - function nextTokenIsIdentifierOrStartOfDestructuring() { - nextToken(); - return isIdentifier() || token === 15 /* OpenBraceToken */ || token === 19 /* OpenBracketToken */; - } - function isLetDeclaration() { - // In ES6 'let' always starts a lexical declaration if followed by an identifier or { - // or [. - return lookAhead(nextTokenIsIdentifierOrStartOfDestructuring); + function isExternalModuleReference() { + return token === 127 /* RequireKeyword */ && + lookAhead(nextTokenIsOpenParen); } - function parseStatement() { - switch (token) { - case 23 /* SemicolonToken */: - return parseEmptyStatement(); - case 15 /* OpenBraceToken */: - return parseBlock(/*ignoreMissingOpenBrace*/ false); - case 102 /* VarKeyword */: - return parseVariableStatement(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - case 108 /* LetKeyword */: - if (isLetDeclaration()) { - return parseVariableStatement(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - } - break; - case 87 /* FunctionKeyword */: - return parseFunctionDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - case 73 /* ClassKeyword */: - return parseClassDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - case 88 /* IfKeyword */: - return parseIfStatement(); - case 79 /* DoKeyword */: - return parseDoStatement(); - case 104 /* WhileKeyword */: - return parseWhileStatement(); - case 86 /* ForKeyword */: - return parseForOrForInOrForOfStatement(); - case 75 /* ContinueKeyword */: - return parseBreakOrContinueStatement(202 /* ContinueStatement */); - case 70 /* BreakKeyword */: - return parseBreakOrContinueStatement(203 /* BreakStatement */); - case 94 /* ReturnKeyword */: - return parseReturnStatement(); - case 105 /* WithKeyword */: - return parseWithStatement(); - case 96 /* SwitchKeyword */: - return parseSwitchStatement(); - case 98 /* ThrowKeyword */: - return parseThrowStatement(); - case 100 /* TryKeyword */: - // Include 'catch' and 'finally' for error recovery. - case 72 /* CatchKeyword */: - case 85 /* FinallyKeyword */: - return parseTryStatement(); - case 76 /* DebuggerKeyword */: - return parseDebuggerStatement(); - case 55 /* AtToken */: - return parseDeclaration(); - case 118 /* AsyncKeyword */: - case 107 /* InterfaceKeyword */: - case 132 /* TypeKeyword */: - case 125 /* ModuleKeyword */: - case 126 /* NamespaceKeyword */: - case 122 /* DeclareKeyword */: - case 74 /* ConstKeyword */: - case 81 /* EnumKeyword */: - case 82 /* ExportKeyword */: - case 89 /* ImportKeyword */: - case 110 /* PrivateKeyword */: - case 111 /* ProtectedKeyword */: - case 112 /* PublicKeyword */: - case 115 /* AbstractKeyword */: - case 113 /* StaticKeyword */: - if (isStartOfDeclaration()) { - return parseDeclaration(); - } - break; - } - return parseExpressionOrLabeledStatement(); + function nextTokenIsOpenParen() { + return nextToken() === 17 /* OpenParenToken */; } - function parseDeclaration() { - var fullStart = getNodePos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - switch (token) { - case 102 /* VarKeyword */: - case 108 /* LetKeyword */: - case 74 /* ConstKeyword */: - return parseVariableStatement(fullStart, decorators, modifiers); - case 87 /* FunctionKeyword */: - return parseFunctionDeclaration(fullStart, decorators, modifiers); - case 73 /* ClassKeyword */: - return parseClassDeclaration(fullStart, decorators, modifiers); - case 107 /* InterfaceKeyword */: - return parseInterfaceDeclaration(fullStart, decorators, modifiers); - case 132 /* TypeKeyword */: - return parseTypeAliasDeclaration(fullStart, decorators, modifiers); - case 81 /* EnumKeyword */: - return parseEnumDeclaration(fullStart, decorators, modifiers); - case 125 /* ModuleKeyword */: - case 126 /* NamespaceKeyword */: - return parseModuleDeclaration(fullStart, decorators, modifiers); - case 89 /* ImportKeyword */: - return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); - case 82 /* ExportKeyword */: - nextToken(); - return token === 77 /* DefaultKeyword */ || token === 56 /* EqualsToken */ ? - parseExportAssignment(fullStart, decorators, modifiers) : - parseExportDeclaration(fullStart, decorators, modifiers); - default: - if (decorators || modifiers) { - // We reached this point because we encountered decorators and/or modifiers and assumed a declaration - // would follow. For recovery and error reporting purposes, return an incomplete declaration. - var node = createMissingNode(231 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); - node.pos = fullStart; - node.decorators = decorators; - setModifiers(node, modifiers); - return finishNode(node); - } - } + function nextTokenIsSlash() { + return nextToken() === 39 /* SlashToken */; } - function nextTokenIsIdentifierOrStringLiteralOnSameLine() { + function nextTokenIsCommaOrFromKeyword() { nextToken(); - return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token === 9 /* StringLiteral */); + return token === 24 /* CommaToken */ || + token === 133 /* FromKeyword */; } - function parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage) { - if (token !== 15 /* OpenBraceToken */ && canParseSemicolon()) { - parseSemicolon(); - return; + function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { + parseExpected(89 /* ImportKeyword */); + var afterImportPos = scanner.getStartPos(); + var identifier; + if (isIdentifier()) { + identifier = parseIdentifier(); + if (token !== 24 /* CommaToken */ && token !== 133 /* FromKeyword */) { + // ImportEquals declaration of type: + // import x = require("mod"); or + // import x = M.x; + var importEqualsDeclaration = createNode(221 /* ImportEqualsDeclaration */, fullStart); + importEqualsDeclaration.decorators = decorators; + setModifiers(importEqualsDeclaration, modifiers); + importEqualsDeclaration.name = identifier; + parseExpected(56 /* EqualsToken */); + importEqualsDeclaration.moduleReference = parseModuleReference(); + parseSemicolon(); + return finishNode(importEqualsDeclaration); + } } - return parseFunctionBlock(isGenerator, isAsync, /*ignoreMissingOpenBrace*/ false, diagnosticMessage); - } - // DECLARATIONS - function parseArrayBindingElement() { - if (token === 24 /* CommaToken */) { - return createNode(187 /* OmittedExpression */); + // Import statement + var importDeclaration = createNode(222 /* ImportDeclaration */, fullStart); + importDeclaration.decorators = decorators; + setModifiers(importDeclaration, modifiers); + // ImportDeclaration: + // import ImportClause from ModuleSpecifier ; + // import ModuleSpecifier; + if (identifier || + token === 37 /* AsteriskToken */ || + token === 15 /* OpenBraceToken */) { + importDeclaration.importClause = parseImportClause(identifier, afterImportPos); + parseExpected(133 /* FromKeyword */); } - var node = createNode(163 /* BindingElement */); - node.dotDotDotToken = parseOptionalToken(22 /* DotDotDotToken */); - node.name = parseIdentifierOrPattern(); - node.initializer = parseBindingElementInitializer(/*inParameter*/ false); - return finishNode(node); + importDeclaration.moduleSpecifier = parseModuleSpecifier(); + parseSemicolon(); + return finishNode(importDeclaration); } - function parseObjectBindingElement() { - var node = createNode(163 /* BindingElement */); - // TODO(andersh): Handle computed properties - var tokenIsIdentifier = isIdentifier(); - var propertyName = parsePropertyName(); - if (tokenIsIdentifier && token !== 54 /* ColonToken */) { - node.name = propertyName; + function parseImportClause(identifier, fullStart) { + // ImportClause: + // ImportedDefaultBinding + // NameSpaceImport + // NamedImports + // ImportedDefaultBinding, NameSpaceImport + // ImportedDefaultBinding, NamedImports + var importClause = createNode(223 /* ImportClause */, fullStart); + if (identifier) { + // ImportedDefaultBinding: + // ImportedBinding + importClause.name = identifier; } - else { - parseExpected(54 /* ColonToken */); - node.propertyName = propertyName; - node.name = parseIdentifierOrPattern(); + // If there was no default import or if there is comma token after default import + // parse namespace or named imports + if (!importClause.name || + parseOptional(24 /* CommaToken */)) { + importClause.namedBindings = token === 37 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(225 /* NamedImports */); } - node.initializer = parseBindingElementInitializer(/*inParameter*/ false); - return finishNode(node); - } - function parseObjectBindingPattern() { - var node = createNode(161 /* ObjectBindingPattern */); - parseExpected(15 /* OpenBraceToken */); - node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); - parseExpected(16 /* CloseBraceToken */); - return finishNode(node); + return finishNode(importClause); } - function parseArrayBindingPattern() { - var node = createNode(162 /* ArrayBindingPattern */); - parseExpected(19 /* OpenBracketToken */); - node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); - parseExpected(20 /* CloseBracketToken */); - return finishNode(node); + function parseModuleReference() { + return isExternalModuleReference() + ? parseExternalModuleReference() + : parseEntityName(/*allowReservedWords*/ false); } - function isIdentifierOrPattern() { - return token === 15 /* OpenBraceToken */ || token === 19 /* OpenBracketToken */ || isIdentifier(); + function parseExternalModuleReference() { + var node = createNode(232 /* ExternalModuleReference */); + parseExpected(127 /* RequireKeyword */); + parseExpected(17 /* OpenParenToken */); + node.expression = parseModuleSpecifier(); + parseExpected(18 /* CloseParenToken */); + return finishNode(node); } - function parseIdentifierOrPattern() { - if (token === 19 /* OpenBracketToken */) { - return parseArrayBindingPattern(); - } - if (token === 15 /* OpenBraceToken */) { - return parseObjectBindingPattern(); + function parseModuleSpecifier() { + // We allow arbitrary expressions here, even though the grammar only allows string + // literals. We check to ensure that it is only a string literal later in the grammar + // walker. + var result = parseExpression(); + // Ensure the string being required is in our 'identifier' table. This will ensure + // that features like 'find refs' will look inside this file when search for its name. + if (result.kind === 9 /* StringLiteral */) { + internIdentifier(result.text); } - return parseIdentifier(); + return result; } - function parseVariableDeclaration() { - var node = createNode(211 /* VariableDeclaration */); - node.name = parseIdentifierOrPattern(); - node.type = parseTypeAnnotation(); - if (!isInOrOfKeyword(token)) { - node.initializer = parseInitializer(/*inParameter*/ false); - } + function parseNamespaceImport() { + // NameSpaceImport: + // * as ImportedBinding + var namespaceImport = createNode(224 /* NamespaceImport */); + parseExpected(37 /* AsteriskToken */); + parseExpected(116 /* AsKeyword */); + namespaceImport.name = parseIdentifier(); + return finishNode(namespaceImport); + } + function parseNamedImportsOrExports(kind) { + var node = createNode(kind); + // NamedImports: + // { } + // { ImportsList } + // { ImportsList, } + // ImportsList: + // ImportSpecifier + // ImportsList, ImportSpecifier + node.elements = parseBracketedList(21 /* ImportOrExportSpecifiers */, kind === 225 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 15 /* OpenBraceToken */, 16 /* CloseBraceToken */); return finishNode(node); } - function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(212 /* VariableDeclarationList */); - switch (token) { - case 102 /* VarKeyword */: - break; - case 108 /* LetKeyword */: - node.flags |= 8192 /* Let */; - break; - case 74 /* ConstKeyword */: - node.flags |= 16384 /* Const */; - break; - default: - ts.Debug.fail(); - } - nextToken(); - // The user may have written the following: - // - // for (let of X) { } - // - // In this case, we want to parse an empty declaration list, and then parse 'of' - // as a keyword. The reason this is not automatic is that 'of' is a valid identifier. - // So we need to look ahead to determine if 'of' should be treated as a keyword in - // this context. - // The checker will then give an error that there is an empty declaration list. - if (token === 134 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { - node.declarations = createMissingList(); + function parseExportSpecifier() { + return parseImportOrExportSpecifier(230 /* ExportSpecifier */); + } + function parseImportSpecifier() { + return parseImportOrExportSpecifier(226 /* ImportSpecifier */); + } + function parseImportOrExportSpecifier(kind) { + var node = createNode(kind); + // ImportSpecifier: + // BindingIdentifier + // IdentifierName as BindingIdentifier + // ExportSpecififer: + // IdentifierName + // IdentifierName as IdentifierName + var checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); + var checkIdentifierStart = scanner.getTokenPos(); + var checkIdentifierEnd = scanner.getTextPos(); + var identifierName = parseIdentifierName(); + if (token === 116 /* AsKeyword */) { + node.propertyName = identifierName; + parseExpected(116 /* AsKeyword */); + checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); + checkIdentifierStart = scanner.getTokenPos(); + checkIdentifierEnd = scanner.getTextPos(); + node.name = parseIdentifierName(); } else { - var savedDisallowIn = inDisallowInContext(); - setDisallowInContext(inForStatementInitializer); - node.declarations = parseDelimitedList(8 /* VariableDeclarations */, parseVariableDeclaration); - setDisallowInContext(savedDisallowIn); + node.name = identifierName; + } + if (kind === 226 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + // Report error identifier expected + parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } return finishNode(node); } - function canFollowContextualOfKeyword() { - return nextTokenIsIdentifier() && nextToken() === 18 /* CloseParenToken */; - } - function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(193 /* VariableStatement */, fullStart); + function parseExportDeclaration(fullStart, decorators, modifiers) { + var node = createNode(228 /* ExportDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); - node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false); + if (parseOptional(37 /* AsteriskToken */)) { + parseExpected(133 /* FromKeyword */); + node.moduleSpecifier = parseModuleSpecifier(); + } + else { + node.exportClause = parseNamedImportsOrExports(229 /* NamedExports */); + // It is not uncommon to accidentally omit the 'from' keyword. Additionally, in editing scenarios, + // the 'from' keyword can be parsed as a named export when the export clause is unterminated (i.e. `export { from "moduleName";`) + // If we don't have a 'from' keyword, see if we have a string literal such that ASI won't take effect. + if (token === 133 /* FromKeyword */ || (token === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) { + parseExpected(133 /* FromKeyword */); + node.moduleSpecifier = parseModuleSpecifier(); + } + } parseSemicolon(); return finishNode(node); } - function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(213 /* FunctionDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(87 /* FunctionKeyword */); - node.asteriskToken = parseOptionalToken(37 /* AsteriskToken */); - node.name = node.flags & 512 /* Default */ ? parseOptionalIdentifier() : parseIdentifier(); - var isGenerator = !!node.asteriskToken; - var isAsync = !!(node.flags & 256 /* Async */); - fillSignature(54 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); - node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, ts.Diagnostics.or_expected); - return finishNode(node); - } - function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(144 /* Constructor */, pos); + function parseExportAssignment(fullStart, decorators, modifiers) { + var node = createNode(227 /* ExportAssignment */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); - parseExpected(121 /* ConstructorKeyword */); - fillSignature(54 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); - node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false, ts.Diagnostics.or_expected); - return finishNode(node); - } - function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(143 /* MethodDeclaration */, fullStart); - method.decorators = decorators; - setModifiers(method, modifiers); - method.asteriskToken = asteriskToken; - method.name = name; - method.questionToken = questionToken; - var isGenerator = !!asteriskToken; - var isAsync = !!(method.flags & 256 /* Async */); - fillSignature(54 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, method); - method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); - return finishNode(method); - } - function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(141 /* PropertyDeclaration */, fullStart); - property.decorators = decorators; - setModifiers(property, modifiers); - property.name = name; - property.questionToken = questionToken; - property.type = parseTypeAnnotation(); - // For instance properties specifically, since they are evaluated inside the constructor, - // we do *not * want to parse yield expressions, so we specifically turn the yield context - // off. The grammar would look something like this: - // - // MemberVariableDeclaration[Yield]: - // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initialiser_opt[In]; - // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initialiser_opt[In, ?Yield]; - // - // The checker may still error in the static case to explicitly disallow the yield expression. - property.initializer = modifiers && modifiers.flags & 64 /* Static */ - ? allowInAnd(parseNonParameterInitializer) - : doOutsideOfContext(2 /* Yield */ | 1 /* DisallowIn */, parseNonParameterInitializer); - parseSemicolon(); - return finishNode(property); - } - function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) { - var asteriskToken = parseOptionalToken(37 /* AsteriskToken */); - var name = parsePropertyName(); - // Note: this is not legal as per the grammar. But we allow it in the parser and - // report an error in the grammar checker. - var questionToken = parseOptionalToken(53 /* QuestionToken */); - if (asteriskToken || token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { - return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); + if (parseOptional(56 /* EqualsToken */)) { + node.isExportEquals = true; } else { - return parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken); + parseExpected(77 /* DefaultKeyword */); } - } - function parseNonParameterInitializer() { - return parseInitializer(/*inParameter*/ false); - } - function parseAccessorDeclaration(kind, fullStart, decorators, modifiers) { - var node = createNode(kind, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.name = parsePropertyName(); - fillSignature(54 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); - node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false); + node.expression = parseAssignmentExpressionOrHigher(); + parseSemicolon(); return finishNode(node); } - function isClassMemberModifier(idToken) { - switch (idToken) { - case 112 /* PublicKeyword */: - case 110 /* PrivateKeyword */: - case 111 /* ProtectedKeyword */: - case 113 /* StaticKeyword */: - return true; - default: - return false; + function processReferenceComments(sourceFile) { + var triviaScanner = ts.createScanner(sourceFile.languageVersion, /*skipTrivia*/ false, 0 /* Standard */, sourceText); + var referencedFiles = []; + var amdDependencies = []; + var amdModuleName; + // Keep scanning all the leading trivia in the file until we get to something that + // isn't trivia. Any single line comment will be analyzed to see if it is a + // reference comment. + while (true) { + var kind = triviaScanner.scan(); + if (kind === 5 /* WhitespaceTrivia */ || kind === 4 /* NewLineTrivia */ || kind === 3 /* MultiLineCommentTrivia */) { + continue; + } + if (kind !== 2 /* SingleLineCommentTrivia */) { + break; + } + var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() }; + var comment = sourceText.substring(range.pos, range.end); + var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range); + if (referencePathMatchResult) { + var fileReference = referencePathMatchResult.fileReference; + sourceFile.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib; + var diagnosticMessage = referencePathMatchResult.diagnosticMessage; + if (fileReference) { + referencedFiles.push(fileReference); + } + if (diagnosticMessage) { + parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, diagnosticMessage)); + } + } + else { + var amdModuleNameRegEx = /^\/\/\/\s*".length; + return parseErrorAtPosition(start, end - start, ts.Diagnostics.Type_argument_list_cannot_be_empty); } + } + function parseQualifiedName(left) { + var result = createNode(135 /* QualifiedName */, left.pos); + result.left = left; + result.right = parseIdentifierName(); + return finishNode(result); + } + function parseJSDocRecordType() { + var result = createNode(257 /* JSDocRecordType */); nextToken(); + result.members = parseDelimitedList(24 /* JSDocRecordMembers */, parseJSDocRecordMember); + checkForTrailingComma(result.members); + parseExpected(16 /* CloseBraceToken */); + return finishNode(result); } - if (token === 37 /* AsteriskToken */) { - return true; + function parseJSDocRecordMember() { + var result = createNode(258 /* JSDocRecordMember */); + result.name = parseSimplePropertyName(); + if (token === 54 /* ColonToken */) { + nextToken(); + result.type = parseJSDocType(); + } + return finishNode(result); } - // Try to get the first property-like token following all modifiers. - // This can either be an identifier or the 'get' or 'set' keywords. - if (isLiteralPropertyName()) { - idToken = token; + function parseJSDocNonNullableType() { + var result = createNode(256 /* JSDocNonNullableType */); nextToken(); + result.type = parseJSDocType(); + return finishNode(result); } - // Index signatures and computed properties are class members; we can parse. - if (token === 19 /* OpenBracketToken */) { - return true; + function parseJSDocTupleType() { + var result = createNode(254 /* JSDocTupleType */); + nextToken(); + result.types = parseDelimitedList(25 /* JSDocTupleTypes */, parseJSDocType); + checkForTrailingComma(result.types); + parseExpected(20 /* CloseBracketToken */); + return finishNode(result); } - // If we were able to get any potential identifier... - if (idToken !== undefined) { - // If we have a non-keyword identifier, or if we have an accessor, then it's safe to parse. - if (!ts.isKeyword(idToken) || idToken === 129 /* SetKeyword */ || idToken === 123 /* GetKeyword */) { - return true; - } - // If it *is* a keyword, but not an accessor, check a little farther along - // to see if it should actually be parsed as a class member. - switch (token) { - case 17 /* OpenParenToken */: // Method declaration - case 25 /* LessThanToken */: // Generic Method declaration - case 54 /* ColonToken */: // Type Annotation for declaration - case 56 /* EqualsToken */: // Initializer for declaration - case 53 /* QuestionToken */: - return true; - default: - // Covers - // - Semicolons (declaration termination) - // - Closing braces (end-of-class, must be declaration) - // - End-of-files (not valid, but permitted so that it gets caught later on) - // - Line-breaks (enabling *automatic semicolon insertion*) - return canParseSemicolon(); + function checkForTrailingComma(list) { + if (parseDiagnostics.length === 0 && list.hasTrailingComma) { + var start = list.end - ",".length; + parseErrorAtPosition(start, ",".length, ts.Diagnostics.Trailing_comma_not_allowed); } } - return false; - } - function parseDecorators() { - var decorators; - while (true) { - var decoratorStart = getNodePos(); - if (!parseOptional(55 /* AtToken */)) { - break; - } - if (!decorators) { - decorators = []; - decorators.pos = scanner.getStartPos(); + function parseJSDocUnionType() { + var result = createNode(253 /* JSDocUnionType */); + nextToken(); + result.types = parseJSDocTypeList(parseJSDocType()); + parseExpected(18 /* CloseParenToken */); + return finishNode(result); + } + function parseJSDocTypeList(firstType) { + ts.Debug.assert(!!firstType); + var types = []; + types.pos = firstType.pos; + types.push(firstType); + while (parseOptional(47 /* BarToken */)) { + types.push(parseJSDocType()); } - var decorator = createNode(139 /* Decorator */, decoratorStart); - decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); - decorators.push(finishNode(decorator)); + types.end = scanner.getStartPos(); + return types; } - if (decorators) { - decorators.end = getNodeEnd(); + function parseJSDocAllType() { + var result = createNode(250 /* JSDocAllType */); + nextToken(); + return finishNode(result); } - return decorators; - } - function parseModifiers() { - var flags = 0; - var modifiers; - while (true) { - var modifierStart = scanner.getStartPos(); - var modifierKind = token; - if (!parseAnyContextualModifier()) { - break; + function parseJSDocUnknownOrNullableType() { + var pos = scanner.getStartPos(); + // skip the ? + nextToken(); + // Need to lookahead to decide if this is a nullable or unknown type. + // Here are cases where we'll pick the unknown type: + // + // Foo(?, + // { a: ? } + // Foo(?) + // Foo + // Foo(?= + // (?| + if (token === 24 /* CommaToken */ || + token === 16 /* CloseBraceToken */ || + token === 18 /* CloseParenToken */ || + token === 27 /* GreaterThanToken */ || + token === 56 /* EqualsToken */ || + token === 47 /* BarToken */) { + var result = createNode(251 /* JSDocUnknownType */, pos); + return finishNode(result); } - if (!modifiers) { - modifiers = []; - modifiers.pos = modifierStart; + else { + var result = createNode(255 /* JSDocNullableType */, pos); + result.type = parseJSDocType(); + return finishNode(result); } - flags |= ts.modifierToFlag(modifierKind); - modifiers.push(finishNode(createNode(modifierKind, modifierStart))); } - if (modifiers) { - modifiers.flags = flags; - modifiers.end = scanner.getStartPos(); + function parseIsolatedJSDocComment(content, start, length) { + initializeState("file.js", content, 2 /* Latest */, /*isJavaScriptFile*/ true, /*_syntaxCursor:*/ undefined); + var jsDocComment = parseJSDocComment(/*parent:*/ undefined, start, length); + var diagnostics = parseDiagnostics; + clearState(); + return jsDocComment ? { jsDocComment: jsDocComment, diagnostics: diagnostics } : undefined; } - return modifiers; - } - function parseModifiersForArrowFunction() { - var flags = 0; - var modifiers; - if (token === 118 /* AsyncKeyword */) { - var modifierStart = scanner.getStartPos(); - var modifierKind = token; - nextToken(); - modifiers = []; - modifiers.pos = modifierStart; - flags |= ts.modifierToFlag(modifierKind); - modifiers.push(finishNode(createNode(modifierKind, modifierStart))); - modifiers.flags = flags; - modifiers.end = scanner.getStartPos(); + JSDocParser.parseIsolatedJSDocComment = parseIsolatedJSDocComment; + function parseJSDocComment(parent, start, length) { + var comment = parseJSDocCommentWorker(start, length); + if (comment) { + fixupParentReferences(comment); + comment.parent = parent; + } + return comment; } - return modifiers; - } - function parseClassElement() { - if (token === 23 /* SemicolonToken */) { - var result = createNode(191 /* SemicolonClassElement */); - nextToken(); - return finishNode(result); + JSDocParser.parseJSDocComment = parseJSDocComment; + function parseJSDocCommentWorker(start, length) { + var content = sourceText; + start = start || 0; + var end = length === undefined ? content.length : start + length; + length = end - start; + ts.Debug.assert(start >= 0); + ts.Debug.assert(start <= end); + ts.Debug.assert(end <= content.length); + var tags; + var pos; + // NOTE(cyrusn): This is essentially a handwritten scanner for JSDocComments. I + // considered using an actual Scanner, but this would complicate things. The + // scanner would need to know it was in a Doc Comment. Otherwise, it would then + // produce comments *inside* the doc comment. In the end it was just easier to + // write a simple scanner rather than go that route. + if (length >= "/** */".length) { + if (content.charCodeAt(start) === 47 /* slash */ && + content.charCodeAt(start + 1) === 42 /* asterisk */ && + content.charCodeAt(start + 2) === 42 /* asterisk */ && + content.charCodeAt(start + 3) !== 42 /* asterisk */) { + // Initially we can parse out a tag. We also have seen a starting asterisk. + // This is so that /** * @type */ doesn't parse. + var canParseTag = true; + var seenAsterisk = true; + for (pos = start + "/**".length; pos < end;) { + var ch = content.charCodeAt(pos); + pos++; + if (ch === 64 /* at */ && canParseTag) { + parseTag(); + // Once we parse out a tag, we cannot keep parsing out tags on this line. + canParseTag = false; + continue; + } + if (ts.isLineBreak(ch)) { + // After a line break, we can parse a tag, and we haven't seen as asterisk + // on the next line yet. + canParseTag = true; + seenAsterisk = false; + continue; + } + if (ts.isWhiteSpace(ch)) { + // Whitespace doesn't affect any of our parsing. + continue; + } + // Ignore the first asterisk on a line. + if (ch === 42 /* asterisk */) { + if (seenAsterisk) { + // If we've already seen an asterisk, then we can no longer parse a tag + // on this line. + canParseTag = false; + } + seenAsterisk = true; + continue; + } + // Anything else is doc comment text. We can't do anything with it. Because it + // wasn't a tag, we can no longer parse a tag on this line until we hit the next + // line break. + canParseTag = false; + } + } + } + return createJSDocComment(); + function createJSDocComment() { + if (!tags) { + return undefined; + } + var result = createNode(265 /* JSDocComment */, start); + result.tags = tags; + return finishNode(result, end); + } + function skipWhitespace() { + while (pos < end && ts.isWhiteSpace(content.charCodeAt(pos))) { + pos++; + } + } + function parseTag() { + ts.Debug.assert(content.charCodeAt(pos - 1) === 64 /* at */); + var atToken = createNode(55 /* AtToken */, pos - 1); + atToken.end = pos; + var tagName = scanIdentifier(); + if (!tagName) { + return; + } + var tag = handleTag(atToken, tagName) || handleUnknownTag(atToken, tagName); + addTag(tag); + } + function handleTag(atToken, tagName) { + if (tagName) { + switch (tagName.text) { + case "param": + return handleParamTag(atToken, tagName); + case "return": + case "returns": + return handleReturnTag(atToken, tagName); + case "template": + return handleTemplateTag(atToken, tagName); + case "type": + return handleTypeTag(atToken, tagName); + } + } + return undefined; + } + function handleUnknownTag(atToken, tagName) { + var result = createNode(266 /* JSDocTag */, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + return finishNode(result, pos); + } + function addTag(tag) { + if (tag) { + if (!tags) { + tags = []; + tags.pos = tag.pos; + } + tags.push(tag); + tags.end = tag.end; + } + } + function tryParseTypeExpression() { + skipWhitespace(); + if (content.charCodeAt(pos) !== 123 /* openBrace */) { + return undefined; + } + var typeExpression = parseJSDocTypeExpression(pos, end - pos); + pos = typeExpression.end; + return typeExpression; + } + function handleParamTag(atToken, tagName) { + var typeExpression = tryParseTypeExpression(); + skipWhitespace(); + var name; + var isBracketed; + if (content.charCodeAt(pos) === 91 /* openBracket */) { + pos++; + skipWhitespace(); + name = scanIdentifier(); + isBracketed = true; + } + else { + name = scanIdentifier(); + } + if (!name) { + parseErrorAtPosition(pos, 0, ts.Diagnostics.Identifier_expected); + } + var preName, postName; + if (typeExpression) { + postName = name; + } + else { + preName = name; + } + if (!typeExpression) { + typeExpression = tryParseTypeExpression(); + } + var result = createNode(267 /* JSDocParameterTag */, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.preParameterName = preName; + result.typeExpression = typeExpression; + result.postParameterName = postName; + result.isBracketed = isBracketed; + return finishNode(result, pos); + } + function handleReturnTag(atToken, tagName) { + if (ts.forEach(tags, function (t) { return t.kind === 268 /* JSDocReturnTag */; })) { + parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } + var result = createNode(268 /* JSDocReturnTag */, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.typeExpression = tryParseTypeExpression(); + return finishNode(result, pos); + } + function handleTypeTag(atToken, tagName) { + if (ts.forEach(tags, function (t) { return t.kind === 269 /* JSDocTypeTag */; })) { + parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } + var result = createNode(269 /* JSDocTypeTag */, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.typeExpression = tryParseTypeExpression(); + return finishNode(result, pos); + } + function handleTemplateTag(atToken, tagName) { + if (ts.forEach(tags, function (t) { return t.kind === 270 /* JSDocTemplateTag */; })) { + parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } + var typeParameters = []; + typeParameters.pos = pos; + while (true) { + skipWhitespace(); + var startPos = pos; + var name_8 = scanIdentifier(); + if (!name_8) { + parseErrorAtPosition(startPos, 0, ts.Diagnostics.Identifier_expected); + return undefined; + } + var typeParameter = createNode(137 /* TypeParameter */, name_8.pos); + typeParameter.name = name_8; + finishNode(typeParameter, pos); + typeParameters.push(typeParameter); + skipWhitespace(); + if (content.charCodeAt(pos) !== 44 /* comma */) { + break; + } + pos++; + } + typeParameters.end = pos; + var result = createNode(270 /* JSDocTemplateTag */, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.typeParameters = typeParameters; + return finishNode(result, pos); + } + function scanIdentifier() { + var startPos = pos; + for (; pos < end; pos++) { + var ch = content.charCodeAt(pos); + if (pos === startPos && ts.isIdentifierStart(ch, 2 /* Latest */)) { + continue; + } + else if (pos > startPos && ts.isIdentifierPart(ch, 2 /* Latest */)) { + continue; + } + break; + } + if (startPos === pos) { + return undefined; + } + var result = createNode(69 /* Identifier */, startPos); + result.text = content.substring(startPos, pos); + return finishNode(result, pos); + } } - var fullStart = getNodePos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); - if (accessor) { - return accessor; + JSDocParser.parseJSDocCommentWorker = parseJSDocCommentWorker; + })(JSDocParser = Parser.JSDocParser || (Parser.JSDocParser = {})); + })(Parser || (Parser = {})); + var IncrementalParser; + (function (IncrementalParser) { + function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) { + aggressiveChecks = aggressiveChecks || ts.Debug.shouldAssert(2 /* Aggressive */); + checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks); + if (ts.textChangeRangeIsUnchanged(textChangeRange)) { + // if the text didn't change, then we can just return our current source file as-is. + return sourceFile; } - if (token === 121 /* ConstructorKeyword */) { - return parseConstructorDeclaration(fullStart, decorators, modifiers); + if (sourceFile.statements.length === 0) { + // If we don't have any statements in the current source file, then there's no real + // way to incrementally parse. So just do a full parse instead. + return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, /*syntaxCursor*/ undefined, /*setNodeParents*/ true); + } + // Make sure we're not trying to incrementally update a source file more than once. Once + // we do an update the original source file is considered unusbale from that point onwards. + // + // This is because we do incremental parsing in-place. i.e. we take nodes from the old + // tree and give them new positions and parents. From that point on, trusting the old + // tree at all is not possible as far too much of it may violate invariants. + var incrementalSourceFile = sourceFile; + ts.Debug.assert(!incrementalSourceFile.hasBeenIncrementallyParsed); + incrementalSourceFile.hasBeenIncrementallyParsed = true; + var oldText = sourceFile.text; + var syntaxCursor = createSyntaxCursor(sourceFile); + // Make the actual change larger so that we know to reparse anything whose lookahead + // might have intersected the change. + var changeRange = extendToAffectedRange(sourceFile, textChangeRange); + checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks); + // Ensure that extending the affected range only moved the start of the change range + // earlier in the file. + ts.Debug.assert(changeRange.span.start <= textChangeRange.span.start); + ts.Debug.assert(ts.textSpanEnd(changeRange.span) === ts.textSpanEnd(textChangeRange.span)); + ts.Debug.assert(ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)) === ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange))); + // The is the amount the nodes after the edit range need to be adjusted. It can be + // positive (if the edit added characters), negative (if the edit deleted characters) + // or zero (if this was a pure overwrite with nothing added/removed). + var delta = ts.textChangeRangeNewSpan(changeRange).length - changeRange.span.length; + // If we added or removed characters during the edit, then we need to go and adjust all + // the nodes after the edit. Those nodes may move forward (if we inserted chars) or they + // may move backward (if we deleted chars). + // + // Doing this helps us out in two ways. First, it means that any nodes/tokens we want + // to reuse are already at the appropriate position in the new text. That way when we + // reuse them, we don't have to figure out if they need to be adjusted. Second, it makes + // it very easy to determine if we can reuse a node. If the node's position is at where + // we are in the text, then we can reuse it. Otherwise we can't. If the node's position + // is ahead of us, then we'll need to rescan tokens. If the node's position is behind + // us, then we'll need to skip it or crumble it as appropriate + // + // We will also adjust the positions of nodes that intersect the change range as well. + // By doing this, we ensure that all the positions in the old tree are consistent, not + // just the positions of nodes entirely before/after the change range. By being + // consistent, we can then easily map from positions to nodes in the old tree easily. + // + // Also, mark any syntax elements that intersect the changed span. We know, up front, + // that we cannot reuse these elements. + updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, ts.textSpanEnd(changeRange.span), ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); + // Now that we've set up our internal incremental state just proceed and parse the + // source file in the normal fashion. When possible the parser will retrieve and + // reuse nodes from the old tree. + // + // Note: passing in 'true' for setNodeParents is very important. When incrementally + // parsing, we will be reusing nodes from the old tree, and placing it into new + // parents. If we don't set the parents now, we'll end up with an observably + // inconsistent tree. Setting the parents on the new tree should be very fast. We + // will immediately bail out of walking any subtrees when we can see that their parents + // are already correct. + var result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, /* setParentNode */ true); + return result; + } + IncrementalParser.updateSourceFile = updateSourceFile; + function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) { + if (isArray) { + visitArray(element); } - if (isIndexSignature()) { - return parseIndexSignatureDeclaration(fullStart, decorators, modifiers); + else { + visitNode(element); } - // It is very important that we check this *after* checking indexers because - // the [ token can start an index signature or a computed property name - if (ts.tokenIsIdentifierOrKeyword(token) || - token === 9 /* StringLiteral */ || - token === 8 /* NumericLiteral */ || - token === 37 /* AsteriskToken */ || - token === 19 /* OpenBracketToken */) { - return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); + return; + function visitNode(node) { + var text = ""; + if (aggressiveChecks && shouldCheckNode(node)) { + text = oldText.substring(node.pos, node.end); + } + // Ditch any existing LS children we may have created. This way we can avoid + // moving them forward. + if (node._children) { + node._children = undefined; + } + if (node.jsDocComment) { + node.jsDocComment = undefined; + } + node.pos += delta; + node.end += delta; + if (aggressiveChecks && shouldCheckNode(node)) { + ts.Debug.assert(text === newText.substring(node.pos, node.end)); + } + forEachChild(node, visitNode, visitArray); + checkNodePositions(node, aggressiveChecks); } - if (decorators || modifiers) { - // treat this as a property declaration with a missing name. - var name_7 = createMissingNode(69 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); - return parsePropertyDeclaration(fullStart, decorators, modifiers, name_7, /*questionToken*/ undefined); + function visitArray(array) { + array._children = undefined; + array.pos += delta; + array.end += delta; + for (var _i = 0, array_7 = array; _i < array_7.length; _i++) { + var node = array_7[_i]; + visitNode(node); + } } - // 'isClassMemberStart' should have hinted not to attempt parsing. - ts.Debug.fail("Should not have attempted to parse class member declaration."); - } - function parseClassExpression() { - return parseClassDeclarationOrExpression( - /*fullStart*/ scanner.getStartPos(), - /*decorators*/ undefined, - /*modifiers*/ undefined, 186 /* ClassExpression */); } - function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 214 /* ClassDeclaration */); + function shouldCheckNode(node) { + switch (node.kind) { + case 9 /* StringLiteral */: + case 8 /* NumericLiteral */: + case 69 /* Identifier */: + return true; + } + return false; } - function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { - var node = createNode(kind, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(73 /* ClassKeyword */); - node.name = parseNameOfClassDeclarationOrExpression(); - node.typeParameters = parseTypeParameters(); - node.heritageClauses = parseHeritageClauses(/*isClassHeritageClause*/ true); - if (parseExpected(15 /* OpenBraceToken */)) { - // ClassTail[Yield,Await] : (Modified) See 14.5 - // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } - node.members = parseClassMembers(); - parseExpected(16 /* CloseBraceToken */); + function adjustIntersectingElement(element, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta) { + ts.Debug.assert(element.end >= changeStart, "Adjusting an element that was entirely before the change range"); + ts.Debug.assert(element.pos <= changeRangeOldEnd, "Adjusting an element that was entirely after the change range"); + ts.Debug.assert(element.pos <= element.end); + // We have an element that intersects the change range in some way. It may have its + // start, or its end (or both) in the changed range. We want to adjust any part + // that intersects such that the final tree is in a consistent state. i.e. all + // chlidren have spans within the span of their parent, and all siblings are ordered + // properly. + // We may need to update both the 'pos' and the 'end' of the element. + // If the 'pos' is before the start of the change, then we don't need to touch it. + // If it isn't, then the 'pos' must be inside the change. How we update it will + // depend if delta is positive or negative. If delta is positive then we have + // something like: + // + // -------------------AAA----------------- + // -------------------BBBCCCCCCC----------------- + // + // In this case, we consider any node that started in the change range to still be + // starting at the same position. + // + // however, if the delta is negative, then we instead have something like this: + // + // -------------------XXXYYYYYYY----------------- + // -------------------ZZZ----------------- + // + // In this case, any element that started in the 'X' range will keep its position. + // However any element htat started after that will have their pos adjusted to be + // at the end of the new range. i.e. any node that started in the 'Y' range will + // be adjusted to have their start at the end of the 'Z' range. + // + // The element will keep its position if possible. Or Move backward to the new-end + // if it's in the 'Y' range. + element.pos = Math.min(element.pos, changeRangeNewEnd); + // If the 'end' is after the change range, then we always adjust it by the delta + // amount. However, if the end is in the change range, then how we adjust it + // will depend on if delta is positive or negative. If delta is positive then we + // have something like: + // + // -------------------AAA----------------- + // -------------------BBBCCCCCCC----------------- + // + // In this case, we consider any node that ended inside the change range to keep its + // end position. + // + // however, if the delta is negative, then we instead have something like this: + // + // -------------------XXXYYYYYYY----------------- + // -------------------ZZZ----------------- + // + // In this case, any element that ended in the 'X' range will keep its position. + // However any element htat ended after that will have their pos adjusted to be + // at the end of the new range. i.e. any node that ended in the 'Y' range will + // be adjusted to have their end at the end of the 'Z' range. + if (element.end >= changeRangeOldEnd) { + // Element ends after the change range. Always adjust the end pos. + element.end += delta; } else { - node.members = createMissingList(); + // Element ends in the change range. The element will keep its position if + // possible. Or Move backward to the new-end if it's in the 'Y' range. + element.end = Math.min(element.end, changeRangeNewEnd); } - return finishNode(node); - } - function parseNameOfClassDeclarationOrExpression() { - // implements is a future reserved word so - // 'class implements' might mean either - // - class expression with omitted name, 'implements' starts heritage clause - // - class with name 'implements' - // 'isImplementsClause' helps to disambiguate between these two cases - return isIdentifier() && !isImplementsClause() - ? parseIdentifier() - : undefined; - } - function isImplementsClause() { - return token === 106 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); - } - function parseHeritageClauses(isClassHeritageClause) { - // ClassTail[Yield,Await] : (Modified) See 14.5 - // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } - if (isHeritageClause()) { - return parseList(20 /* HeritageClauses */, parseHeritageClause); + ts.Debug.assert(element.pos <= element.end); + if (element.parent) { + ts.Debug.assert(element.pos >= element.parent.pos); + ts.Debug.assert(element.end <= element.parent.end); } - return undefined; - } - function parseHeritageClausesWorker() { - return parseList(20 /* HeritageClauses */, parseHeritageClause); } - function parseHeritageClause() { - if (token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */) { - var node = createNode(243 /* HeritageClause */); - node.token = token; - nextToken(); - node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); - return finishNode(node); + function checkNodePositions(node, aggressiveChecks) { + if (aggressiveChecks) { + var pos = node.pos; + forEachChild(node, function (child) { + ts.Debug.assert(child.pos >= pos); + pos = child.end; + }); + ts.Debug.assert(pos <= node.end); } - return undefined; } - function parseExpressionWithTypeArguments() { - var node = createNode(188 /* ExpressionWithTypeArguments */); - node.expression = parseLeftHandSideExpressionOrHigher(); - if (token === 25 /* LessThanToken */) { - node.typeArguments = parseBracketedList(18 /* TypeArguments */, parseType, 25 /* LessThanToken */, 27 /* GreaterThanToken */); + function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) { + visitNode(sourceFile); + return; + function visitNode(child) { + ts.Debug.assert(child.pos <= child.end); + if (child.pos > changeRangeOldEnd) { + // Node is entirely past the change range. We need to move both its pos and + // end, forward or backward appropriately. + moveElementEntirelyPastChangeRange(child, /*isArray*/ false, delta, oldText, newText, aggressiveChecks); + return; + } + // Check if the element intersects the change range. If it does, then it is not + // reusable. Also, we'll need to recurse to see what constituent portions we may + // be able to use. + var fullEnd = child.end; + if (fullEnd >= changeStart) { + child.intersectsChange = true; + child._children = undefined; + // Adjust the pos or end (or both) of the intersecting element accordingly. + adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); + forEachChild(child, visitNode, visitArray); + checkNodePositions(child, aggressiveChecks); + return; + } + // Otherwise, the node is entirely before the change range. No need to do anything with it. + ts.Debug.assert(fullEnd < changeStart); + } + function visitArray(array) { + ts.Debug.assert(array.pos <= array.end); + if (array.pos > changeRangeOldEnd) { + // Array is entirely after the change range. We need to move it, and move any of + // its children. + moveElementEntirelyPastChangeRange(array, /*isArray*/ true, delta, oldText, newText, aggressiveChecks); + return; + } + // Check if the element intersects the change range. If it does, then it is not + // reusable. Also, we'll need to recurse to see what constituent portions we may + // be able to use. + var fullEnd = array.end; + if (fullEnd >= changeStart) { + array.intersectsChange = true; + array._children = undefined; + // Adjust the pos or end (or both) of the intersecting array accordingly. + adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); + for (var _i = 0, array_8 = array; _i < array_8.length; _i++) { + var node = array_8[_i]; + visitNode(node); + } + return; + } + // Otherwise, the array is entirely before the change range. No need to do anything with it. + ts.Debug.assert(fullEnd < changeStart); } - return finishNode(node); - } - function isHeritageClause() { - return token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */; - } - function parseClassMembers() { - return parseList(5 /* ClassMembers */, parseClassElement); - } - function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(215 /* InterfaceDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(107 /* InterfaceKeyword */); - node.name = parseIdentifier(); - node.typeParameters = parseTypeParameters(); - node.heritageClauses = parseHeritageClauses(/*isClassHeritageClause*/ false); - node.members = parseObjectTypeMembers(); - return finishNode(node); - } - function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(216 /* TypeAliasDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(132 /* TypeKeyword */); - node.name = parseIdentifier(); - node.typeParameters = parseTypeParameters(); - parseExpected(56 /* EqualsToken */); - node.type = parseType(); - parseSemicolon(); - return finishNode(node); } - // In an ambient declaration, the grammar only allows integer literals as initializers. - // 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 parseEnumMember() { - var node = createNode(247 /* EnumMember */, scanner.getStartPos()); - node.name = parsePropertyName(); - node.initializer = allowInAnd(parseNonParameterInitializer); - return finishNode(node); + function extendToAffectedRange(sourceFile, changeRange) { + // Consider the following code: + // void foo() { /; } + // + // If the text changes with an insertion of / just before the semicolon then we end up with: + // void foo() { //; } + // + // If we were to just use the changeRange a is, then we would not rescan the { token + // (as it does not intersect the actual original change range). Because an edit may + // change the token touching it, we actually need to look back *at least* one token so + // that the prior token sees that change. + var maxLookahead = 1; + var start = changeRange.span.start; + // the first iteration aligns us with the change start. subsequent iteration move us to + // the left by maxLookahead tokens. We only need to do this as long as we're not at the + // start of the tree. + for (var i = 0; start > 0 && i <= maxLookahead; i++) { + var nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start); + ts.Debug.assert(nearestNode.pos <= start); + var position = nearestNode.pos; + start = Math.max(0, position - 1); + } + var finalSpan = ts.createTextSpanFromBounds(start, ts.textSpanEnd(changeRange.span)); + var finalLength = changeRange.newLength + (changeRange.span.start - start); + return ts.createTextChangeRange(finalSpan, finalLength); } - function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(217 /* EnumDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(81 /* EnumKeyword */); - node.name = parseIdentifier(); - if (parseExpected(15 /* OpenBraceToken */)) { - node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); - parseExpected(16 /* CloseBraceToken */); + function findNearestNodeStartingBeforeOrAtPosition(sourceFile, position) { + var bestResult = sourceFile; + var lastNodeEntirelyBeforePosition; + forEachChild(sourceFile, visit); + if (lastNodeEntirelyBeforePosition) { + var lastChildOfLastEntireNodeBeforePosition = getLastChild(lastNodeEntirelyBeforePosition); + if (lastChildOfLastEntireNodeBeforePosition.pos > bestResult.pos) { + bestResult = lastChildOfLastEntireNodeBeforePosition; + } } - else { - node.members = createMissingList(); + return bestResult; + function getLastChild(node) { + while (true) { + var lastChild = getLastChildWorker(node); + if (lastChild) { + node = lastChild; + } + else { + return node; + } + } } - return finishNode(node); - } - function parseModuleBlock() { - var node = createNode(219 /* ModuleBlock */, scanner.getStartPos()); - if (parseExpected(15 /* OpenBraceToken */)) { - node.statements = parseList(1 /* BlockStatements */, parseStatement); - parseExpected(16 /* CloseBraceToken */); + function getLastChildWorker(node) { + var last = undefined; + forEachChild(node, function (child) { + if (ts.nodeIsPresent(child)) { + last = child; + } + }); + return last; } - else { - node.statements = createMissingList(); + function visit(child) { + if (ts.nodeIsMissing(child)) { + // Missing nodes are effectively invisible to us. We never even consider them + // When trying to find the nearest node before us. + return; + } + // If the child intersects this position, then this node is currently the nearest + // node that starts before the position. + if (child.pos <= position) { + if (child.pos >= bestResult.pos) { + // This node starts before the position, and is closer to the position than + // the previous best node we found. It is now the new best node. + bestResult = child; + } + // Now, the node may overlap the position, or it may end entirely before the + // position. If it overlaps with the position, then either it, or one of its + // children must be the nearest node before the position. So we can just + // recurse into this child to see if we can find something better. + if (position < child.end) { + // The nearest node is either this child, or one of the children inside + // of it. We've already marked this child as the best so far. Recurse + // in case one of the children is better. + forEachChild(child, visit); + // Once we look at the children of this node, then there's no need to + // continue any further. + return true; + } + else { + ts.Debug.assert(child.end <= position); + // The child ends entirely before this position. Say you have the following + // (where $ is the position) + // + // ? $ : <...> <...> + // + // We would want to find the nearest preceding node in "complex expr 2". + // To support that, we keep track of this node, and once we're done searching + // for a best node, we recurse down this node to see if we can find a good + // result in it. + // + // This approach allows us to quickly skip over nodes that are entirely + // before the position, while still allowing us to find any nodes in the + // last one that might be what we want. + lastNodeEntirelyBeforePosition = child; + } + } + else { + ts.Debug.assert(child.pos > position); + // We're now at a node that is entirely past the position we're searching for. + // This node (and all following nodes) could never contribute to the result, + // so just skip them by returning 'true' here. + return true; + } } - return finishNode(node); - } - function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(218 /* ModuleDeclaration */, fullStart); - // If we are parsing a dotted namespace name, we want to - // propagate the 'Namespace' flag across the names if set. - var namespaceFlag = flags & 65536 /* Namespace */; - node.decorators = decorators; - setModifiers(node, modifiers); - node.flags |= flags; - node.name = parseIdentifier(); - node.body = parseOptional(21 /* DotToken */) - ? parseModuleOrNamespaceDeclaration(getNodePos(), /*decorators*/ undefined, /*modifiers*/ undefined, 2 /* Export */ | namespaceFlag) - : parseModuleBlock(); - return finishNode(node); - } - function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(218 /* ModuleDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.name = parseLiteralNode(/*internName*/ true); - node.body = parseModuleBlock(); - return finishNode(node); } - function parseModuleDeclaration(fullStart, decorators, modifiers) { - var flags = modifiers ? modifiers.flags : 0; - if (parseOptional(126 /* NamespaceKeyword */)) { - flags |= 65536 /* Namespace */; + function checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks) { + var oldText = sourceFile.text; + if (textChangeRange) { + ts.Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); + if (aggressiveChecks || ts.Debug.shouldAssert(3 /* VeryAggressive */)) { + var oldTextPrefix = oldText.substr(0, textChangeRange.span.start); + var newTextPrefix = newText.substr(0, textChangeRange.span.start); + ts.Debug.assert(oldTextPrefix === newTextPrefix); + var oldTextSuffix = oldText.substring(ts.textSpanEnd(textChangeRange.span), oldText.length); + var newTextSuffix = newText.substring(ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange)), newText.length); + ts.Debug.assert(oldTextSuffix === newTextSuffix); + } } - else { - parseExpected(125 /* ModuleKeyword */); - if (token === 9 /* StringLiteral */) { - return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); + } + function createSyntaxCursor(sourceFile) { + var currentArray = sourceFile.statements; + var currentArrayIndex = 0; + ts.Debug.assert(currentArrayIndex < currentArray.length); + var current = currentArray[currentArrayIndex]; + var lastQueriedPosition = -1 /* Value */; + return { + currentNode: function (position) { + // Only compute the current node if the position is different than the last time + // we were asked. The parser commonly asks for the node at the same position + // twice. Once to know if can read an appropriate list element at a certain point, + // and then to actually read and consume the node. + if (position !== lastQueriedPosition) { + // Much of the time the parser will need the very next node in the array that + // we just returned a node from.So just simply check for that case and move + // forward in the array instead of searching for the node again. + if (current && current.end === position && currentArrayIndex < (currentArray.length - 1)) { + currentArrayIndex++; + current = currentArray[currentArrayIndex]; + } + // If we don't have a node, or the node we have isn't in the right position, + // then try to find a viable node at the position requested. + if (!current || current.pos !== position) { + findHighestListElementThatStartsAtPosition(position); + } + } + // Cache this query so that we don't do any extra work if the parser calls back + // into us. Note: this is very common as the parser will make pairs of calls like + // 'isListElement -> parseListElement'. If we were unable to find a node when + // called with 'isListElement', we don't want to redo the work when parseListElement + // is called immediately after. + lastQueriedPosition = position; + // Either we don'd have a node, or we have a node at the position being asked for. + ts.Debug.assert(!current || current.pos === position); + return current; + } + }; + // Finds the highest element in the tree we can find that starts at the provided position. + // The element must be a direct child of some node list in the tree. This way after we + // return it, we can easily return its next sibling in the list. + function findHighestListElementThatStartsAtPosition(position) { + // Clear out any cached state about the last node we found. + currentArray = undefined; + currentArrayIndex = -1 /* Value */; + current = undefined; + // Recurse into the source file to find the highest node at this position. + forEachChild(sourceFile, visitNode, visitArray); + return; + function visitNode(node) { + if (position >= node.pos && position < node.end) { + // Position was within this node. Keep searching deeper to find the node. + forEachChild(node, visitNode, visitArray); + // don't procede any futher in the search. + return true; + } + // position wasn't in this node, have to keep searching. + return false; + } + function visitArray(array) { + if (position >= array.pos && position < array.end) { + // position was in this array. Search through this array to see if we find a + // viable element. + for (var i = 0, n = array.length; i < n; i++) { + var child = array[i]; + if (child) { + if (child.pos === position) { + // Found the right node. We're done. + currentArray = array; + currentArrayIndex = i; + current = child; + return true; + } + else { + if (child.pos < position && position < child.end) { + // Position in somewhere within this child. Search in it and + // stop searching in this array. + forEachChild(child, visitNode, visitArray); + return true; + } + } + } + } + } + // position wasn't in this array, have to keep searching. + return false; } } - return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); - } - function isExternalModuleReference() { - return token === 127 /* RequireKeyword */ && - lookAhead(nextTokenIsOpenParen); } - function nextTokenIsOpenParen() { - return nextToken() === 17 /* OpenParenToken */; + var InvalidPosition; + (function (InvalidPosition) { + InvalidPosition[InvalidPosition["Value"] = -1] = "Value"; + })(InvalidPosition || (InvalidPosition = {})); + })(IncrementalParser || (IncrementalParser = {})); +})(ts || (ts = {})); +/// +/// +/* @internal */ +var ts; +(function (ts) { + ts.bindTime = 0; + (function (ModuleInstanceState) { + ModuleInstanceState[ModuleInstanceState["NonInstantiated"] = 0] = "NonInstantiated"; + ModuleInstanceState[ModuleInstanceState["Instantiated"] = 1] = "Instantiated"; + ModuleInstanceState[ModuleInstanceState["ConstEnumOnly"] = 2] = "ConstEnumOnly"; + })(ts.ModuleInstanceState || (ts.ModuleInstanceState = {})); + var ModuleInstanceState = ts.ModuleInstanceState; + var Reachability; + (function (Reachability) { + Reachability[Reachability["Unintialized"] = 1] = "Unintialized"; + Reachability[Reachability["Reachable"] = 2] = "Reachable"; + Reachability[Reachability["Unreachable"] = 4] = "Unreachable"; + Reachability[Reachability["ReportedUnreachable"] = 8] = "ReportedUnreachable"; + })(Reachability || (Reachability = {})); + function or(state1, state2) { + return (state1 | state2) & 2 /* Reachable */ + ? 2 /* Reachable */ + : (state1 & state2) & 8 /* ReportedUnreachable */ + ? 8 /* ReportedUnreachable */ + : 4 /* Unreachable */; + } + function getModuleInstanceState(node) { + // A module is uninstantiated if it contains only + // 1. interface declarations, type alias declarations + if (node.kind === 215 /* InterfaceDeclaration */ || node.kind === 216 /* TypeAliasDeclaration */) { + return 0 /* NonInstantiated */; } - function nextTokenIsSlash() { - return nextToken() === 39 /* SlashToken */; + else if (ts.isConstEnumDeclaration(node)) { + return 2 /* ConstEnumOnly */; } - function nextTokenIsCommaOrFromKeyword() { - nextToken(); - return token === 24 /* CommaToken */ || - token === 133 /* FromKeyword */; + else if ((node.kind === 222 /* ImportDeclaration */ || node.kind === 221 /* ImportEqualsDeclaration */) && !(node.flags & 2 /* Export */)) { + return 0 /* NonInstantiated */; } - function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { - parseExpected(89 /* ImportKeyword */); - var afterImportPos = scanner.getStartPos(); - var identifier; - if (isIdentifier()) { - identifier = parseIdentifier(); - if (token !== 24 /* CommaToken */ && token !== 133 /* FromKeyword */) { - // ImportEquals declaration of type: - // import x = require("mod"); or - // import x = M.x; - var importEqualsDeclaration = createNode(221 /* ImportEqualsDeclaration */, fullStart); - importEqualsDeclaration.decorators = decorators; - setModifiers(importEqualsDeclaration, modifiers); - importEqualsDeclaration.name = identifier; - parseExpected(56 /* EqualsToken */); - importEqualsDeclaration.moduleReference = parseModuleReference(); - parseSemicolon(); - return finishNode(importEqualsDeclaration); + else if (node.kind === 219 /* ModuleBlock */) { + var state = 0 /* NonInstantiated */; + ts.forEachChild(node, function (n) { + switch (getModuleInstanceState(n)) { + case 0 /* NonInstantiated */: + // child is non-instantiated - continue searching + return false; + case 2 /* ConstEnumOnly */: + // child is const enum only - record state and continue searching + state = 2 /* ConstEnumOnly */; + return false; + case 1 /* Instantiated */: + // child is instantiated - record state and stop + state = 1 /* Instantiated */; + return true; } - } - // Import statement - var importDeclaration = createNode(222 /* ImportDeclaration */, fullStart); - importDeclaration.decorators = decorators; - setModifiers(importDeclaration, modifiers); - // ImportDeclaration: - // import ImportClause from ModuleSpecifier ; - // import ModuleSpecifier; - if (identifier || - token === 37 /* AsteriskToken */ || - token === 15 /* OpenBraceToken */) { - importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(133 /* FromKeyword */); - } - importDeclaration.moduleSpecifier = parseModuleSpecifier(); - parseSemicolon(); - return finishNode(importDeclaration); - } - function parseImportClause(identifier, fullStart) { - // ImportClause: - // ImportedDefaultBinding - // NameSpaceImport - // NamedImports - // ImportedDefaultBinding, NameSpaceImport - // ImportedDefaultBinding, NamedImports - var importClause = createNode(223 /* ImportClause */, fullStart); - if (identifier) { - // ImportedDefaultBinding: - // ImportedBinding - importClause.name = identifier; - } - // If there was no default import or if there is comma token after default import - // parse namespace or named imports - if (!importClause.name || - parseOptional(24 /* CommaToken */)) { - importClause.namedBindings = token === 37 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(225 /* NamedImports */); - } - return finishNode(importClause); + }); + return state; } - function parseModuleReference() { - return isExternalModuleReference() - ? parseExternalModuleReference() - : parseEntityName(/*allowReservedWords*/ false); + else if (node.kind === 218 /* ModuleDeclaration */) { + return getModuleInstanceState(node.body); } - function parseExternalModuleReference() { - var node = createNode(232 /* ExternalModuleReference */); - parseExpected(127 /* RequireKeyword */); - parseExpected(17 /* OpenParenToken */); - node.expression = parseModuleSpecifier(); - parseExpected(18 /* CloseParenToken */); - return finishNode(node); + else { + return 1 /* Instantiated */; } - function parseModuleSpecifier() { - // We allow arbitrary expressions here, even though the grammar only allows string - // literals. We check to ensure that it is only a string literal later in the grammar - // walker. - var result = parseExpression(); - // Ensure the string being required is in our 'identifier' table. This will ensure - // that features like 'find refs' will look inside this file when search for its name. - if (result.kind === 9 /* StringLiteral */) { - internIdentifier(result.text); + } + ts.getModuleInstanceState = getModuleInstanceState; + var ContainerFlags; + (function (ContainerFlags) { + // The current node is not a container, and no container manipulation should happen before + // recursing into it. + ContainerFlags[ContainerFlags["None"] = 0] = "None"; + // The current node is a container. It should be set as the current container (and block- + // container) before recursing into it. The current node does not have locals. Examples: + // + // Classes, ObjectLiterals, TypeLiterals, Interfaces... + ContainerFlags[ContainerFlags["IsContainer"] = 1] = "IsContainer"; + // The current node is a block-scoped-container. It should be set as the current block- + // container before recursing into it. Examples: + // + // Blocks (when not parented by functions), Catch clauses, For/For-in/For-of statements... + ContainerFlags[ContainerFlags["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer"; + ContainerFlags[ContainerFlags["HasLocals"] = 4] = "HasLocals"; + // If the current node is a container that also container that also contains locals. Examples: + // + // Functions, Methods, Modules, Source-files. + ContainerFlags[ContainerFlags["IsContainerWithLocals"] = 5] = "IsContainerWithLocals"; + })(ContainerFlags || (ContainerFlags = {})); + var binder = createBinder(); + function bindSourceFile(file, options) { + var start = new Date().getTime(); + binder(file, options); + ts.bindTime += new Date().getTime() - start; + } + ts.bindSourceFile = bindSourceFile; + function createBinder() { + var file; + var options; + var parent; + var container; + var blockScopeContainer; + var lastContainer; + var seenThisKeyword; + // state used by reachability checks + var hasExplicitReturn; + var currentReachabilityState; + var labelStack; + var labelIndexMap; + var implicitLabels; + // If this file is an external module, then it is automatically in strict-mode according to + // ES6. If it is not an external module, then we'll determine if it is in strict mode or + // not depending on if we see "use strict" in certain places (or if we hit a class/namespace). + var inStrictMode; + var symbolCount = 0; + var Symbol; + var classifiableNames; + function bindSourceFile(f, opts) { + file = f; + options = opts; + inStrictMode = !!file.externalModuleIndicator; + classifiableNames = {}; + Symbol = ts.objectAllocator.getSymbolConstructor(); + if (!file.locals) { + bind(file); + file.symbolCount = symbolCount; + file.classifiableNames = classifiableNames; } - return result; - } - function parseNamespaceImport() { - // NameSpaceImport: - // * as ImportedBinding - var namespaceImport = createNode(224 /* NamespaceImport */); - parseExpected(37 /* AsteriskToken */); - parseExpected(116 /* AsKeyword */); - namespaceImport.name = parseIdentifier(); - return finishNode(namespaceImport); - } - function parseNamedImportsOrExports(kind) { - var node = createNode(kind); - // NamedImports: - // { } - // { ImportsList } - // { ImportsList, } - // ImportsList: - // ImportSpecifier - // ImportsList, ImportSpecifier - node.elements = parseBracketedList(21 /* ImportOrExportSpecifiers */, kind === 225 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 15 /* OpenBraceToken */, 16 /* CloseBraceToken */); - return finishNode(node); - } - function parseExportSpecifier() { - return parseImportOrExportSpecifier(230 /* ExportSpecifier */); - } - function parseImportSpecifier() { - return parseImportOrExportSpecifier(226 /* ImportSpecifier */); + parent = undefined; + container = undefined; + blockScopeContainer = undefined; + lastContainer = undefined; + seenThisKeyword = false; + hasExplicitReturn = false; + labelStack = undefined; + labelIndexMap = undefined; + implicitLabels = undefined; } - function parseImportOrExportSpecifier(kind) { - var node = createNode(kind); - // ImportSpecifier: - // BindingIdentifier - // IdentifierName as BindingIdentifier - // ExportSpecififer: - // IdentifierName - // IdentifierName as IdentifierName - var checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); - var checkIdentifierStart = scanner.getTokenPos(); - var checkIdentifierEnd = scanner.getTextPos(); - var identifierName = parseIdentifierName(); - if (token === 116 /* AsKeyword */) { - node.propertyName = identifierName; - parseExpected(116 /* AsKeyword */); - checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); - checkIdentifierStart = scanner.getTokenPos(); - checkIdentifierEnd = scanner.getTextPos(); - node.name = parseIdentifierName(); - } - else { - node.name = identifierName; - } - if (kind === 226 /* ImportSpecifier */ && checkIdentifierIsKeyword) { - // Report error identifier expected - parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); - } - return finishNode(node); + return bindSourceFile; + function createSymbol(flags, name) { + symbolCount++; + return new Symbol(flags, name); } - function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(228 /* ExportDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - if (parseOptional(37 /* AsteriskToken */)) { - parseExpected(133 /* FromKeyword */); - node.moduleSpecifier = parseModuleSpecifier(); + function addDeclarationToSymbol(symbol, node, symbolFlags) { + symbol.flags |= symbolFlags; + node.symbol = symbol; + if (!symbol.declarations) { + symbol.declarations = []; } - else { - node.exportClause = parseNamedImportsOrExports(229 /* NamedExports */); - // It is not uncommon to accidentally omit the 'from' keyword. Additionally, in editing scenarios, - // the 'from' keyword can be parsed as a named export when the export clause is unterminated (i.e. `export { from "moduleName";`) - // If we don't have a 'from' keyword, see if we have a string literal such that ASI won't take effect. - if (token === 133 /* FromKeyword */ || (token === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) { - parseExpected(133 /* FromKeyword */); - node.moduleSpecifier = parseModuleSpecifier(); - } + symbol.declarations.push(node); + if (symbolFlags & 1952 /* HasExports */ && !symbol.exports) { + symbol.exports = {}; } - parseSemicolon(); - return finishNode(node); - } - function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(227 /* ExportAssignment */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - if (parseOptional(56 /* EqualsToken */)) { - node.isExportEquals = true; + if (symbolFlags & 6240 /* HasMembers */ && !symbol.members) { + symbol.members = {}; } - else { - parseExpected(77 /* DefaultKeyword */); + if (symbolFlags & 107455 /* Value */ && !symbol.valueDeclaration) { + symbol.valueDeclaration = node; } - node.expression = parseAssignmentExpressionOrHigher(); - parseSemicolon(); - return finishNode(node); } - function processReferenceComments(sourceFile) { - var triviaScanner = ts.createScanner(sourceFile.languageVersion, /*skipTrivia*/ false, 0 /* Standard */, sourceText); - var referencedFiles = []; - var amdDependencies = []; - var amdModuleName; - // Keep scanning all the leading trivia in the file until we get to something that - // isn't trivia. Any single line comment will be analyzed to see if it is a - // reference comment. - while (true) { - var kind = triviaScanner.scan(); - if (kind === 5 /* WhitespaceTrivia */ || kind === 4 /* NewLineTrivia */ || kind === 3 /* MultiLineCommentTrivia */) { - continue; - } - if (kind !== 2 /* SingleLineCommentTrivia */) { - break; - } - var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() }; - var comment = sourceText.substring(range.pos, range.end); - var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range); - if (referencePathMatchResult) { - var fileReference = referencePathMatchResult.fileReference; - sourceFile.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib; - var diagnosticMessage = referencePathMatchResult.diagnosticMessage; - if (fileReference) { - referencedFiles.push(fileReference); - } - if (diagnosticMessage) { - parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, diagnosticMessage)); - } + // Should not be called on a declaration with a computed property name, + // unless it is a well known Symbol. + function getDeclarationName(node) { + if (node.name) { + if (node.kind === 218 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { + return "\"" + node.name.text + "\""; } - else { - var amdModuleNameRegEx = /^\/\/\/\s*".length; - return parseErrorAtPosition(start, end - start, ts.Diagnostics.Type_argument_list_cannot_be_empty); - } + container = saveContainer; + parent = saveParent; + blockScopeContainer = savedBlockScopeContainer; + } + /** + * Returns true if node and its subnodes were successfully traversed. + * Returning false means that node was not examined and caller needs to dive into the node himself. + */ + function bindReachableStatement(node) { + if (checkUnreachable(node)) { + ts.forEachChild(node, bind); + return; } - function parseQualifiedName(left) { - var result = createNode(135 /* QualifiedName */, left.pos); - result.left = left; - result.right = parseIdentifierName(); - return finishNode(result); + switch (node.kind) { + case 198 /* WhileStatement */: + bindWhileStatement(node); + break; + case 197 /* DoStatement */: + bindDoStatement(node); + break; + case 199 /* ForStatement */: + bindForStatement(node); + break; + case 200 /* ForInStatement */: + case 201 /* ForOfStatement */: + bindForInOrForOfStatement(node); + break; + case 196 /* IfStatement */: + bindIfStatement(node); + break; + case 204 /* ReturnStatement */: + case 208 /* ThrowStatement */: + bindReturnOrThrow(node); + break; + case 203 /* BreakStatement */: + case 202 /* ContinueStatement */: + bindBreakOrContinueStatement(node); + break; + case 209 /* TryStatement */: + bindTryStatement(node); + break; + case 206 /* SwitchStatement */: + bindSwitchStatement(node); + break; + case 220 /* CaseBlock */: + bindCaseBlock(node); + break; + case 207 /* LabeledStatement */: + bindLabeledStatement(node); + break; + default: + ts.forEachChild(node, bind); + break; } - function parseJSDocRecordType() { - var result = createNode(257 /* JSDocRecordType */); - nextToken(); - result.members = parseDelimitedList(24 /* JSDocRecordMembers */, parseJSDocRecordMember); - checkForTrailingComma(result.members); - parseExpected(16 /* CloseBraceToken */); - return finishNode(result); + } + function bindWhileStatement(n) { + var preWhileState = n.expression.kind === 84 /* FalseKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; + var postWhileState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; + // bind expressions (don't affect reachability) + bind(n.expression); + currentReachabilityState = preWhileState; + var postWhileLabel = pushImplicitLabel(); + bind(n.statement); + popImplicitLabel(postWhileLabel, postWhileState); + } + function bindDoStatement(n) { + var preDoState = currentReachabilityState; + var postDoLabel = pushImplicitLabel(); + bind(n.statement); + var postDoState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : preDoState; + popImplicitLabel(postDoLabel, postDoState); + // bind expressions (don't affect reachability) + bind(n.expression); + } + function bindForStatement(n) { + var preForState = currentReachabilityState; + var postForLabel = pushImplicitLabel(); + // bind expressions (don't affect reachability) + bind(n.initializer); + bind(n.condition); + bind(n.incrementor); + bind(n.statement); + // for statement is considered infinite when it condition is either omitted or is true keyword + // - for(..;;..) + // - for(..;true;..) + var isInfiniteLoop = (!n.condition || n.condition.kind === 99 /* TrueKeyword */); + var postForState = isInfiniteLoop ? 4 /* Unreachable */ : preForState; + popImplicitLabel(postForLabel, postForState); + } + function bindForInOrForOfStatement(n) { + var preStatementState = currentReachabilityState; + var postStatementLabel = pushImplicitLabel(); + // bind expressions (don't affect reachability) + bind(n.initializer); + bind(n.expression); + bind(n.statement); + popImplicitLabel(postStatementLabel, preStatementState); + } + function bindIfStatement(n) { + // denotes reachability state when entering 'thenStatement' part of the if statement: + // i.e. if condition is false then thenStatement is unreachable + var ifTrueState = n.expression.kind === 84 /* FalseKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; + // denotes reachability state when entering 'elseStatement': + // i.e. if condition is true then elseStatement is unreachable + var ifFalseState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; + currentReachabilityState = ifTrueState; + // bind expression (don't affect reachability) + bind(n.expression); + bind(n.thenStatement); + if (n.elseStatement) { + var preElseState = currentReachabilityState; + currentReachabilityState = ifFalseState; + bind(n.elseStatement); + currentReachabilityState = or(currentReachabilityState, preElseState); } - function parseJSDocRecordMember() { - var result = createNode(258 /* JSDocRecordMember */); - result.name = parseSimplePropertyName(); - if (token === 54 /* ColonToken */) { - nextToken(); - result.type = parseJSDocType(); - } - return finishNode(result); + else { + currentReachabilityState = or(currentReachabilityState, ifFalseState); } - function parseJSDocNonNullableType() { - var result = createNode(256 /* JSDocNonNullableType */); - nextToken(); - result.type = parseJSDocType(); - return finishNode(result); + } + function bindReturnOrThrow(n) { + // bind expression (don't affect reachability) + bind(n.expression); + if (n.kind === 204 /* ReturnStatement */) { + hasExplicitReturn = true; } - function parseJSDocTupleType() { - var result = createNode(254 /* JSDocTupleType */); - nextToken(); - result.types = parseDelimitedList(25 /* JSDocTupleTypes */, parseJSDocType); - checkForTrailingComma(result.types); - parseExpected(20 /* CloseBracketToken */); - return finishNode(result); + currentReachabilityState = 4 /* Unreachable */; + } + function bindBreakOrContinueStatement(n) { + // call bind on label (don't affect reachability) + bind(n.label); + // for continue case touch label so it will be marked a used + var isValidJump = jumpToLabel(n.label, n.kind === 203 /* BreakStatement */ ? currentReachabilityState : 4 /* Unreachable */); + if (isValidJump) { + currentReachabilityState = 4 /* Unreachable */; } - function checkForTrailingComma(list) { - if (parseDiagnostics.length === 0 && list.hasTrailingComma) { - var start = list.end - ",".length; - parseErrorAtPosition(start, ",".length, ts.Diagnostics.Trailing_comma_not_allowed); + } + function bindTryStatement(n) { + // catch\finally blocks has the same reachability as try block + var preTryState = currentReachabilityState; + bind(n.tryBlock); + var postTryState = currentReachabilityState; + currentReachabilityState = preTryState; + bind(n.catchClause); + var postCatchState = currentReachabilityState; + currentReachabilityState = preTryState; + bind(n.finallyBlock); + // post catch/finally state is reachable if + // - post try state is reachable - control flow can fall out of try block + // - post catch state is reachable - control flow can fall out of catch block + currentReachabilityState = or(postTryState, postCatchState); + } + function bindSwitchStatement(n) { + var preSwitchState = currentReachabilityState; + var postSwitchLabel = pushImplicitLabel(); + // bind expression (don't affect reachability) + bind(n.expression); + bind(n.caseBlock); + var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 242 /* DefaultClause */; }); + // post switch state is unreachable if switch is exaustive (has a default case ) and does not have fallthrough from the last case + var postSwitchState = hasDefault && currentReachabilityState !== 2 /* Reachable */ ? 4 /* Unreachable */ : preSwitchState; + popImplicitLabel(postSwitchLabel, postSwitchState); + } + function bindCaseBlock(n) { + var startState = currentReachabilityState; + for (var _i = 0, _a = n.clauses; _i < _a.length; _i++) { + var clause = _a[_i]; + currentReachabilityState = startState; + bind(clause); + if (clause.statements.length && currentReachabilityState === 2 /* Reachable */ && options.noFallthroughCasesInSwitch) { + errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); } } - function parseJSDocUnionType() { - var result = createNode(253 /* JSDocUnionType */); - nextToken(); - result.types = parseJSDocTypeList(parseJSDocType()); - parseExpected(18 /* CloseParenToken */); - return finishNode(result); + } + function bindLabeledStatement(n) { + // call bind on label (don't affect reachability) + bind(n.label); + var ok = pushNamedLabel(n.label); + bind(n.statement); + if (ok) { + popNamedLabel(n.label, currentReachabilityState); } - function parseJSDocTypeList(firstType) { - ts.Debug.assert(!!firstType); - var types = []; - types.pos = firstType.pos; - types.push(firstType); - while (parseOptional(47 /* BarToken */)) { - types.push(parseJSDocType()); - } - types.end = scanner.getStartPos(); - return types; + } + function getContainerFlags(node) { + switch (node.kind) { + case 186 /* ClassExpression */: + case 214 /* ClassDeclaration */: + case 215 /* InterfaceDeclaration */: + case 217 /* EnumDeclaration */: + case 155 /* TypeLiteral */: + case 165 /* ObjectLiteralExpression */: + return 1 /* IsContainer */; + case 147 /* CallSignature */: + case 148 /* ConstructSignature */: + case 149 /* IndexSignature */: + case 143 /* MethodDeclaration */: + case 142 /* MethodSignature */: + case 213 /* FunctionDeclaration */: + case 144 /* Constructor */: + case 145 /* GetAccessor */: + case 146 /* SetAccessor */: + case 152 /* FunctionType */: + case 153 /* ConstructorType */: + case 173 /* FunctionExpression */: + case 174 /* ArrowFunction */: + case 218 /* ModuleDeclaration */: + case 248 /* SourceFile */: + case 216 /* TypeAliasDeclaration */: + return 5 /* IsContainerWithLocals */; + case 244 /* CatchClause */: + case 199 /* ForStatement */: + case 200 /* ForInStatement */: + case 201 /* ForOfStatement */: + case 220 /* CaseBlock */: + return 2 /* IsBlockScopedContainer */; + case 192 /* Block */: + // do not treat blocks directly inside a function as a block-scoped-container. + // Locals that reside in this block should go to the function locals. Othewise 'x' + // would not appear to be a redeclaration of a block scoped local in the following + // example: + // + // function foo() { + // var x; + // let x; + // } + // + // If we placed 'var x' into the function locals and 'let x' into the locals of + // the block, then there would be no collision. + // + // By not creating a new block-scoped-container here, we ensure that both 'var x' + // and 'let x' go into the Function-container's locals, and we do get a collision + // conflict. + return ts.isFunctionLike(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; } - function parseJSDocAllType() { - var result = createNode(250 /* JSDocAllType */); - nextToken(); - return finishNode(result); + return 0 /* None */; + } + function addToContainerChain(next) { + if (lastContainer) { + lastContainer.nextContainer = next; } - function parseJSDocUnknownOrNullableType() { - var pos = scanner.getStartPos(); - // skip the ? - nextToken(); - // Need to lookahead to decide if this is a nullable or unknown type. - // Here are cases where we'll pick the unknown type: - // - // Foo(?, - // { a: ? } - // Foo(?) - // Foo - // Foo(?= - // (?| - if (token === 24 /* CommaToken */ || - token === 16 /* CloseBraceToken */ || - token === 18 /* CloseParenToken */ || - token === 27 /* GreaterThanToken */ || - token === 56 /* EqualsToken */ || - token === 47 /* BarToken */) { - var result = createNode(251 /* JSDocUnknownType */, pos); - return finishNode(result); - } - else { - var result = createNode(255 /* JSDocNullableType */, pos); - result.type = parseJSDocType(); - return finishNode(result); + lastContainer = next; + } + function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { + // Just call this directly so that the return type of this function stays "void". + declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes); + } + function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { + switch (container.kind) { + // Modules, source files, and classes need specialized handling for how their + // members are declared (for example, a member of a class will go into a specific + // symbol table depending on if it is static or not). We defer to specialized + // handlers to take care of declaring these child members. + case 218 /* ModuleDeclaration */: + return declareModuleMember(node, symbolFlags, symbolExcludes); + case 248 /* SourceFile */: + return declareSourceFileMember(node, symbolFlags, symbolExcludes); + case 186 /* ClassExpression */: + case 214 /* ClassDeclaration */: + return declareClassMember(node, symbolFlags, symbolExcludes); + case 217 /* EnumDeclaration */: + return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); + case 155 /* TypeLiteral */: + case 165 /* ObjectLiteralExpression */: + case 215 /* InterfaceDeclaration */: + // Interface/Object-types always have their children added to the 'members' of + // their container. They are only accessible through an instance of their + // container, and are never in scope otherwise (even inside the body of the + // object / type / interface declaring them). An exception is type parameters, + // which are in scope without qualification (similar to 'locals'). + return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); + case 152 /* FunctionType */: + case 153 /* ConstructorType */: + case 147 /* CallSignature */: + case 148 /* ConstructSignature */: + case 149 /* IndexSignature */: + case 143 /* MethodDeclaration */: + case 142 /* MethodSignature */: + case 144 /* Constructor */: + case 145 /* GetAccessor */: + case 146 /* SetAccessor */: + case 213 /* FunctionDeclaration */: + case 173 /* FunctionExpression */: + case 174 /* ArrowFunction */: + case 216 /* TypeAliasDeclaration */: + // All the children of these container types are never visible through another + // symbol (i.e. through another symbol's 'exports' or 'members'). Instead, + // they're only accessed 'lexically' (i.e. from code that exists underneath + // their container in the tree. To accomplish this, we simply add their declared + // symbol to the 'locals' of the container. These symbols can then be found as + // the type checker walks up the containers, checking them for matching names. + return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); + } + } + function declareClassMember(node, symbolFlags, symbolExcludes) { + return node.flags & 64 /* Static */ + ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes) + : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); + } + function declareSourceFileMember(node, symbolFlags, symbolExcludes) { + return ts.isExternalModule(file) + ? declareModuleMember(node, symbolFlags, symbolExcludes) + : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); + } + function hasExportDeclarations(node) { + var body = node.kind === 248 /* SourceFile */ ? node : node.body; + if (body.kind === 248 /* SourceFile */ || body.kind === 219 /* ModuleBlock */) { + for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { + var stat = _a[_i]; + if (stat.kind === 228 /* ExportDeclaration */ || stat.kind === 227 /* ExportAssignment */) { + return true; + } } } - function parseIsolatedJSDocComment(content, start, length) { - initializeState("file.js", content, 2 /* Latest */, /*_syntaxCursor:*/ undefined); - var jsDocComment = parseJSDocComment(/*parent:*/ undefined, start, length); - var diagnostics = parseDiagnostics; - clearState(); - return jsDocComment ? { jsDocComment: jsDocComment, diagnostics: diagnostics } : undefined; + return false; + } + function setExportContextFlag(node) { + // A declaration source file or ambient module declaration that contains no export declarations (but possibly regular + // declarations with export modifiers) is an export context in which declarations are implicitly exported. + if (ts.isInAmbientContext(node) && !hasExportDeclarations(node)) { + node.flags |= 131072 /* ExportContext */; } - JSDocParser.parseIsolatedJSDocComment = parseIsolatedJSDocComment; - function parseJSDocComment(parent, start, length) { - var comment = parseJSDocCommentWorker(start, length); - if (comment) { - fixupParentReferences(comment); - comment.parent = parent; - } - return comment; + else { + node.flags &= ~131072 /* ExportContext */; } - JSDocParser.parseJSDocComment = parseJSDocComment; - function parseJSDocCommentWorker(start, length) { - var content = sourceText; - start = start || 0; - var end = length === undefined ? content.length : start + length; - length = end - start; - ts.Debug.assert(start >= 0); - ts.Debug.assert(start <= end); - ts.Debug.assert(end <= content.length); - var tags; - var pos; - // NOTE(cyrusn): This is essentially a handwritten scanner for JSDocComments. I - // considered using an actual Scanner, but this would complicate things. The - // scanner would need to know it was in a Doc Comment. Otherwise, it would then - // produce comments *inside* the doc comment. In the end it was just easier to - // write a simple scanner rather than go that route. - if (length >= "/** */".length) { - if (content.charCodeAt(start) === 47 /* slash */ && - content.charCodeAt(start + 1) === 42 /* asterisk */ && - content.charCodeAt(start + 2) === 42 /* asterisk */ && - content.charCodeAt(start + 3) !== 42 /* asterisk */) { - // Initially we can parse out a tag. We also have seen a starting asterisk. - // This is so that /** * @type */ doesn't parse. - var canParseTag = true; - var seenAsterisk = true; - for (pos = start + "/**".length; pos < end;) { - var ch = content.charCodeAt(pos); - pos++; - if (ch === 64 /* at */ && canParseTag) { - parseTag(); - // Once we parse out a tag, we cannot keep parsing out tags on this line. - canParseTag = false; - continue; - } - if (ts.isLineBreak(ch)) { - // After a line break, we can parse a tag, and we haven't seen as asterisk - // on the next line yet. - canParseTag = true; - seenAsterisk = false; - continue; - } - if (ts.isWhiteSpace(ch)) { - // Whitespace doesn't affect any of our parsing. - continue; - } - // Ignore the first asterisk on a line. - if (ch === 42 /* asterisk */) { - if (seenAsterisk) { - // If we've already seen an asterisk, then we can no longer parse a tag - // on this line. - canParseTag = false; - } - seenAsterisk = true; - continue; - } - // Anything else is doc comment text. We can't do anything with it. Because it - // wasn't a tag, we can no longer parse a tag on this line until we hit the next - // line break. - canParseTag = false; - } - } - } - return createJSDocComment(); - function createJSDocComment() { - if (!tags) { - return undefined; - } - var result = createNode(265 /* JSDocComment */, start); - result.tags = tags; - return finishNode(result, end); - } - function skipWhitespace() { - while (pos < end && ts.isWhiteSpace(content.charCodeAt(pos))) { - pos++; - } + } + function bindModuleDeclaration(node) { + setExportContextFlag(node); + if (node.name.kind === 9 /* StringLiteral */) { + declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); + } + else { + var state = getModuleInstanceState(node); + if (state === 0 /* NonInstantiated */) { + declareSymbolAndAddToSymbolTable(node, 1024 /* NamespaceModule */, 0 /* NamespaceModuleExcludes */); } - function parseTag() { - ts.Debug.assert(content.charCodeAt(pos - 1) === 64 /* at */); - var atToken = createNode(55 /* AtToken */, pos - 1); - atToken.end = pos; - var tagName = scanIdentifier(); - if (!tagName) { - return; + else { + declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); + if (node.symbol.flags & (16 /* Function */ | 32 /* Class */ | 256 /* RegularEnum */)) { + // if module was already merged with some function, class or non-const enum + // treat is a non-const-enum-only + node.symbol.constEnumOnlyModule = false; } - var tag = handleTag(atToken, tagName) || handleUnknownTag(atToken, tagName); - addTag(tag); - } - function handleTag(atToken, tagName) { - if (tagName) { - switch (tagName.text) { - case "param": - return handleParamTag(atToken, tagName); - case "return": - case "returns": - return handleReturnTag(atToken, tagName); - case "template": - return handleTemplateTag(atToken, tagName); - case "type": - return handleTypeTag(atToken, tagName); + else { + var currentModuleIsConstEnumOnly = state === 2 /* ConstEnumOnly */; + if (node.symbol.constEnumOnlyModule === undefined) { + // non-merged case - use the current state + node.symbol.constEnumOnlyModule = currentModuleIsConstEnumOnly; } - } - return undefined; - } - function handleUnknownTag(atToken, tagName) { - var result = createNode(266 /* JSDocTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - return finishNode(result, pos); - } - function addTag(tag) { - if (tag) { - if (!tags) { - tags = []; - tags.pos = tag.pos; + else { + // merged case: module is const enum only if all its pieces are non-instantiated or const enum + node.symbol.constEnumOnlyModule = node.symbol.constEnumOnlyModule && currentModuleIsConstEnumOnly; } - tags.push(tag); - tags.end = tag.end; - } - } - function tryParseTypeExpression() { - skipWhitespace(); - if (content.charCodeAt(pos) !== 123 /* openBrace */) { - return undefined; - } - var typeExpression = parseJSDocTypeExpression(pos, end - pos); - pos = typeExpression.end; - return typeExpression; - } - function handleParamTag(atToken, tagName) { - var typeExpression = tryParseTypeExpression(); - skipWhitespace(); - var name; - var isBracketed; - if (content.charCodeAt(pos) === 91 /* openBracket */) { - pos++; - skipWhitespace(); - name = scanIdentifier(); - isBracketed = true; - } - else { - name = scanIdentifier(); - } - if (!name) { - parseErrorAtPosition(pos, 0, ts.Diagnostics.Identifier_expected); - } - var preName, postName; - if (typeExpression) { - postName = name; - } - else { - preName = name; - } - if (!typeExpression) { - typeExpression = tryParseTypeExpression(); - } - var result = createNode(267 /* JSDocParameterTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.preParameterName = preName; - result.typeExpression = typeExpression; - result.postParameterName = postName; - result.isBracketed = isBracketed; - return finishNode(result, pos); - } - function handleReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 268 /* JSDocReturnTag */; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(268 /* JSDocReturnTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); } - function handleTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 269 /* JSDocTypeTag */; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } + } + function bindFunctionOrConstructorType(node) { + // For a given function symbol "<...>(...) => T" we want to generate a symbol identical + // to the one we would get for: { <...>(...): T } + // + // We do that by making an anonymous type literal symbol, and then setting the function + // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable + // from an actual type literal symbol you would have gotten had you used the long form. + var symbol = createSymbol(131072 /* Signature */, getDeclarationName(node)); + addDeclarationToSymbol(symbol, node, 131072 /* Signature */); + var typeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type"); + addDeclarationToSymbol(typeLiteralSymbol, node, 2048 /* TypeLiteral */); + typeLiteralSymbol.members = (_a = {}, _a[symbol.name] = symbol, _a); + var _a; + } + function bindObjectLiteralExpression(node) { + var ElementKind; + (function (ElementKind) { + ElementKind[ElementKind["Property"] = 1] = "Property"; + ElementKind[ElementKind["Accessor"] = 2] = "Accessor"; + })(ElementKind || (ElementKind = {})); + if (inStrictMode) { + var seen = {}; + for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { + var prop = _a[_i]; + if (prop.name.kind !== 69 /* Identifier */) { + continue; } - var result = createNode(269 /* JSDocTypeTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); - } - function handleTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 270 /* JSDocTemplateTag */; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + var identifier = prop.name; + // ECMA-262 11.1.5 Object Initialiser + // If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + // a.This production is contained in strict code and IsDataDescriptor(previous) is true and + // IsDataDescriptor(propId.descriptor) is true. + // b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true. + // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. + // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true + // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields + var currentKind = prop.kind === 245 /* PropertyAssignment */ || prop.kind === 246 /* ShorthandPropertyAssignment */ || prop.kind === 143 /* MethodDeclaration */ + ? 1 /* Property */ + : 2 /* Accessor */; + var existingKind = seen[identifier.text]; + if (!existingKind) { + seen[identifier.text] = currentKind; + continue; } - var typeParameters = []; - typeParameters.pos = pos; - while (true) { - skipWhitespace(); - var startPos = pos; - var name_8 = scanIdentifier(); - if (!name_8) { - parseErrorAtPosition(startPos, 0, ts.Diagnostics.Identifier_expected); - return undefined; - } - var typeParameter = createNode(137 /* TypeParameter */, name_8.pos); - typeParameter.name = name_8; - finishNode(typeParameter, pos); - typeParameters.push(typeParameter); - skipWhitespace(); - if (content.charCodeAt(pos) !== 44 /* comma */) { - break; - } - pos++; + if (currentKind === 1 /* Property */ && existingKind === 1 /* Property */) { + var span = ts.getErrorSpanForNode(file, identifier); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode)); } - typeParameters.end = pos; - var result = createNode(270 /* JSDocTemplateTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeParameters = typeParameters; - return finishNode(result, pos); } - function scanIdentifier() { - var startPos = pos; - for (; pos < end; pos++) { - var ch = content.charCodeAt(pos); - if (pos === startPos && ts.isIdentifierStart(ch, 2 /* Latest */)) { - continue; - } - else if (pos > startPos && ts.isIdentifierPart(ch, 2 /* Latest */)) { - continue; - } + } + return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, "__object"); + } + function bindAnonymousDeclaration(node, symbolFlags, name) { + var symbol = createSymbol(symbolFlags, name); + addDeclarationToSymbol(symbol, node, symbolFlags); + } + function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { + switch (blockScopeContainer.kind) { + case 218 /* ModuleDeclaration */: + declareModuleMember(node, symbolFlags, symbolExcludes); + break; + case 248 /* SourceFile */: + if (ts.isExternalModule(container)) { + declareModuleMember(node, symbolFlags, symbolExcludes); break; } - if (startPos === pos) { - return undefined; - } - var result = createNode(69 /* Identifier */, startPos); - result.text = content.substring(startPos, pos); - return finishNode(result, pos); + // fall through. + default: + if (!blockScopeContainer.locals) { + blockScopeContainer.locals = {}; + addToContainerChain(blockScopeContainer); + } + declareSymbol(blockScopeContainer.locals, undefined, node, symbolFlags, symbolExcludes); + } + } + function bindBlockScopedVariableDeclaration(node) { + bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 107455 /* BlockScopedVariableExcludes */); + } + // The binder visits every node in the syntax tree so it is a convenient place to perform a single localized + // check for reserved words used as identifiers in strict mode code. + function checkStrictModeIdentifier(node) { + if (inStrictMode && + node.originalKeywordKind >= 106 /* FirstFutureReservedWord */ && + node.originalKeywordKind <= 114 /* LastFutureReservedWord */ && + !ts.isIdentifierName(node)) { + // Report error only if there are no parse errors in file + if (!file.parseDiagnostics.length) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(node, getStrictModeIdentifierMessage(node), ts.declarationNameToString(node))); } } - JSDocParser.parseJSDocCommentWorker = parseJSDocCommentWorker; - })(JSDocParser = Parser.JSDocParser || (Parser.JSDocParser = {})); - })(Parser || (Parser = {})); - var IncrementalParser; - (function (IncrementalParser) { - function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) { - aggressiveChecks = aggressiveChecks || ts.Debug.shouldAssert(2 /* Aggressive */); - checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks); - if (ts.textChangeRangeIsUnchanged(textChangeRange)) { - // if the text didn't change, then we can just return our current source file as-is. - return sourceFile; + } + function getStrictModeIdentifierMessage(node) { + // Provide specialized messages to help the user understand why we think they're in + // strict mode. + if (ts.getContainingClass(node)) { + return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode; } - if (sourceFile.statements.length === 0) { - // If we don't have any statements in the current source file, then there's no real - // way to incrementally parse. So just do a full parse instead. - return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, /*syntaxCursor*/ undefined, /*setNodeParents*/ true); + if (file.externalModuleIndicator) { + return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode; } - // Make sure we're not trying to incrementally update a source file more than once. Once - // we do an update the original source file is considered unusbale from that point onwards. - // - // This is because we do incremental parsing in-place. i.e. we take nodes from the old - // tree and give them new positions and parents. From that point on, trusting the old - // tree at all is not possible as far too much of it may violate invariants. - var incrementalSourceFile = sourceFile; - ts.Debug.assert(!incrementalSourceFile.hasBeenIncrementallyParsed); - incrementalSourceFile.hasBeenIncrementallyParsed = true; - var oldText = sourceFile.text; - var syntaxCursor = createSyntaxCursor(sourceFile); - // Make the actual change larger so that we know to reparse anything whose lookahead - // might have intersected the change. - var changeRange = extendToAffectedRange(sourceFile, textChangeRange); - checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks); - // Ensure that extending the affected range only moved the start of the change range - // earlier in the file. - ts.Debug.assert(changeRange.span.start <= textChangeRange.span.start); - ts.Debug.assert(ts.textSpanEnd(changeRange.span) === ts.textSpanEnd(textChangeRange.span)); - ts.Debug.assert(ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)) === ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange))); - // The is the amount the nodes after the edit range need to be adjusted. It can be - // positive (if the edit added characters), negative (if the edit deleted characters) - // or zero (if this was a pure overwrite with nothing added/removed). - var delta = ts.textChangeRangeNewSpan(changeRange).length - changeRange.span.length; - // If we added or removed characters during the edit, then we need to go and adjust all - // the nodes after the edit. Those nodes may move forward (if we inserted chars) or they - // may move backward (if we deleted chars). - // - // Doing this helps us out in two ways. First, it means that any nodes/tokens we want - // to reuse are already at the appropriate position in the new text. That way when we - // reuse them, we don't have to figure out if they need to be adjusted. Second, it makes - // it very easy to determine if we can reuse a node. If the node's position is at where - // we are in the text, then we can reuse it. Otherwise we can't. If the node's position - // is ahead of us, then we'll need to rescan tokens. If the node's position is behind - // us, then we'll need to skip it or crumble it as appropriate - // - // We will also adjust the positions of nodes that intersect the change range as well. - // By doing this, we ensure that all the positions in the old tree are consistent, not - // just the positions of nodes entirely before/after the change range. By being - // consistent, we can then easily map from positions to nodes in the old tree easily. - // - // Also, mark any syntax elements that intersect the changed span. We know, up front, - // that we cannot reuse these elements. - updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, ts.textSpanEnd(changeRange.span), ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); - // Now that we've set up our internal incremental state just proceed and parse the - // source file in the normal fashion. When possible the parser will retrieve and - // reuse nodes from the old tree. - // - // Note: passing in 'true' for setNodeParents is very important. When incrementally - // parsing, we will be reusing nodes from the old tree, and placing it into new - // parents. If we don't set the parents now, we'll end up with an observably - // inconsistent tree. Setting the parents on the new tree should be very fast. We - // will immediately bail out of walking any subtrees when we can see that their parents - // are already correct. - var result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, /* setParentNode */ true); - return result; + return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode; } - IncrementalParser.updateSourceFile = updateSourceFile; - function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) { - if (isArray) { - visitArray(element); + function checkStrictModeBinaryExpression(node) { + if (inStrictMode && ts.isLeftHandSideExpression(node.left) && ts.isAssignmentOperator(node.operatorToken.kind)) { + // ECMA 262 (Annex C) The identifier eval or arguments may not appear as the LeftHandSideExpression of an + // Assignment operator(11.13) or of a PostfixExpression(11.3) + checkStrictModeEvalOrArguments(node, node.left); } - else { - visitNode(element); + } + function checkStrictModeCatchClause(node) { + // It is a SyntaxError if a TryStatement with a Catch occurs within strict code and the Identifier of the + // Catch production is eval or arguments + if (inStrictMode && node.variableDeclaration) { + checkStrictModeEvalOrArguments(node, node.variableDeclaration.name); } - return; - function visitNode(node) { - var text = ""; - if (aggressiveChecks && shouldCheckNode(node)) { - text = oldText.substring(node.pos, node.end); - } - // Ditch any existing LS children we may have created. This way we can avoid - // moving them forward. - if (node._children) { - node._children = undefined; - } - if (node.jsDocComment) { - node.jsDocComment = undefined; - } - node.pos += delta; - node.end += delta; - if (aggressiveChecks && shouldCheckNode(node)) { - ts.Debug.assert(text === newText.substring(node.pos, node.end)); - } - forEachChild(node, visitNode, visitArray); - checkNodePositions(node, aggressiveChecks); + } + function checkStrictModeDeleteExpression(node) { + // Grammar checking + if (inStrictMode && node.expression.kind === 69 /* Identifier */) { + // When a delete operator occurs within strict mode code, a SyntaxError is thrown if its + // UnaryExpression is a direct reference to a variable, function argument, or function name + var span = ts.getErrorSpanForNode(file, node.expression); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode)); } - function visitArray(array) { - array._children = undefined; - array.pos += delta; - array.end += delta; - for (var _i = 0, array_7 = array; _i < array_7.length; _i++) { - var node = array_7[_i]; - visitNode(node); + } + function isEvalOrArgumentsIdentifier(node) { + return node.kind === 69 /* Identifier */ && + (node.text === "eval" || node.text === "arguments"); + } + function checkStrictModeEvalOrArguments(contextNode, name) { + if (name && name.kind === 69 /* Identifier */) { + var identifier = name; + if (isEvalOrArgumentsIdentifier(identifier)) { + // We check first if the name is inside class declaration or class expression; if so give explicit message + // otherwise report generic error message. + var span = ts.getErrorSpanForNode(file, name); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, getStrictModeEvalOrArgumentsMessage(contextNode), identifier.text)); } } } - function shouldCheckNode(node) { - switch (node.kind) { - case 9 /* StringLiteral */: - case 8 /* NumericLiteral */: - case 69 /* Identifier */: - return true; + function getStrictModeEvalOrArgumentsMessage(node) { + // Provide specialized messages to help the user understand why we think they're in + // strict mode. + if (ts.getContainingClass(node)) { + return ts.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode; } - return false; + if (file.externalModuleIndicator) { + return ts.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode; + } + return ts.Diagnostics.Invalid_use_of_0_in_strict_mode; } - function adjustIntersectingElement(element, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta) { - ts.Debug.assert(element.end >= changeStart, "Adjusting an element that was entirely before the change range"); - ts.Debug.assert(element.pos <= changeRangeOldEnd, "Adjusting an element that was entirely after the change range"); - ts.Debug.assert(element.pos <= element.end); - // We have an element that intersects the change range in some way. It may have its - // start, or its end (or both) in the changed range. We want to adjust any part - // that intersects such that the final tree is in a consistent state. i.e. all - // chlidren have spans within the span of their parent, and all siblings are ordered - // properly. - // We may need to update both the 'pos' and the 'end' of the element. - // If the 'pos' is before the start of the change, then we don't need to touch it. - // If it isn't, then the 'pos' must be inside the change. How we update it will - // depend if delta is positive or negative. If delta is positive then we have - // something like: - // - // -------------------AAA----------------- - // -------------------BBBCCCCCCC----------------- - // - // In this case, we consider any node that started in the change range to still be - // starting at the same position. - // - // however, if the delta is negative, then we instead have something like this: - // - // -------------------XXXYYYYYYY----------------- - // -------------------ZZZ----------------- - // - // In this case, any element that started in the 'X' range will keep its position. - // However any element htat started after that will have their pos adjusted to be - // at the end of the new range. i.e. any node that started in the 'Y' range will - // be adjusted to have their start at the end of the 'Z' range. - // - // The element will keep its position if possible. Or Move backward to the new-end - // if it's in the 'Y' range. - element.pos = Math.min(element.pos, changeRangeNewEnd); - // If the 'end' is after the change range, then we always adjust it by the delta - // amount. However, if the end is in the change range, then how we adjust it - // will depend on if delta is positive or negative. If delta is positive then we - // have something like: - // - // -------------------AAA----------------- - // -------------------BBBCCCCCCC----------------- - // - // In this case, we consider any node that ended inside the change range to keep its - // end position. - // - // however, if the delta is negative, then we instead have something like this: - // - // -------------------XXXYYYYYYY----------------- - // -------------------ZZZ----------------- - // - // In this case, any element that ended in the 'X' range will keep its position. - // However any element htat ended after that will have their pos adjusted to be - // at the end of the new range. i.e. any node that ended in the 'Y' range will - // be adjusted to have their end at the end of the 'Z' range. - if (element.end >= changeRangeOldEnd) { - // Element ends after the change range. Always adjust the end pos. - element.end += delta; + function checkStrictModeFunctionName(node) { + if (inStrictMode) { + // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a strict mode FunctionDeclaration or FunctionExpression (13.1)) + checkStrictModeEvalOrArguments(node, node.name); } - else { - // Element ends in the change range. The element will keep its position if - // possible. Or Move backward to the new-end if it's in the 'Y' range. - element.end = Math.min(element.end, changeRangeNewEnd); + } + function checkStrictModeNumericLiteral(node) { + if (inStrictMode && node.flags & 32768 /* OctalLiteral */) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode)); } - ts.Debug.assert(element.pos <= element.end); - if (element.parent) { - ts.Debug.assert(element.pos >= element.parent.pos); - ts.Debug.assert(element.end <= element.parent.end); + } + function checkStrictModePostfixUnaryExpression(node) { + // Grammar checking + // The identifier eval or arguments may not appear as the LeftHandSideExpression of an + // Assignment operator(11.13) or of a PostfixExpression(11.3) or as the UnaryExpression + // operated upon by a Prefix Increment(11.4.4) or a Prefix Decrement(11.4.5) operator. + if (inStrictMode) { + checkStrictModeEvalOrArguments(node, node.operand); } } - function checkNodePositions(node, aggressiveChecks) { - if (aggressiveChecks) { - var pos = node.pos; - forEachChild(node, function (child) { - ts.Debug.assert(child.pos >= pos); - pos = child.end; - }); - ts.Debug.assert(pos <= node.end); + function checkStrictModePrefixUnaryExpression(node) { + // Grammar checking + if (inStrictMode) { + if (node.operator === 41 /* PlusPlusToken */ || node.operator === 42 /* MinusMinusToken */) { + checkStrictModeEvalOrArguments(node, node.operand); + } } } - function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) { - visitNode(sourceFile); - return; - function visitNode(child) { - ts.Debug.assert(child.pos <= child.end); - if (child.pos > changeRangeOldEnd) { - // Node is entirely past the change range. We need to move both its pos and - // end, forward or backward appropriately. - moveElementEntirelyPastChangeRange(child, /*isArray*/ false, delta, oldText, newText, aggressiveChecks); + function checkStrictModeWithStatement(node) { + // Grammar checking for withStatement + if (inStrictMode) { + errorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_strict_mode); + } + } + function errorOnFirstToken(node, message, arg0, arg1, arg2) { + var span = ts.getSpanOfTokenAtPosition(file, node.pos); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, message, arg0, arg1, arg2)); + } + function getDestructuringParameterName(node) { + return "__" + ts.indexOf(node.parent.parameters, node); + } + function bind(node) { + if (!node) { + return; + } + node.parent = parent; + var savedInStrictMode = inStrictMode; + if (!savedInStrictMode) { + updateStrictMode(node); + } + // First we bind declaration nodes to a symbol if possible. We'll both create a symbol + // and then potentially add the symbol to an appropriate symbol table. Possible + // destination symbol tables are: + // + // 1) The 'exports' table of the current container's symbol. + // 2) The 'members' table of the current container's symbol. + // 3) The 'locals' table of the current container. + // + // However, not all symbols will end up in any of these tables. 'Anonymous' symbols + // (like TypeLiterals for example) will not be put in any table. + bindWorker(node); + // Then we recurse into the children of the node to bind them as well. For certain + // symbols we do specialized work when we recurse. For example, we'll keep track of + // the current 'container' node when it changes. This helps us know which symbol table + // a local should go into for example. + bindChildren(node); + inStrictMode = savedInStrictMode; + } + function updateStrictMode(node) { + switch (node.kind) { + case 248 /* SourceFile */: + case 219 /* ModuleBlock */: + updateStrictModeStatementList(node.statements); return; - } - // Check if the element intersects the change range. If it does, then it is not - // reusable. Also, we'll need to recurse to see what constituent portions we may - // be able to use. - var fullEnd = child.end; - if (fullEnd >= changeStart) { - child.intersectsChange = true; - child._children = undefined; - // Adjust the pos or end (or both) of the intersecting element accordingly. - adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - forEachChild(child, visitNode, visitArray); - checkNodePositions(child, aggressiveChecks); + case 192 /* Block */: + if (ts.isFunctionLike(node.parent)) { + updateStrictModeStatementList(node.statements); + } + return; + case 214 /* ClassDeclaration */: + case 186 /* ClassExpression */: + // All classes are automatically in strict mode in ES6. + inStrictMode = true; return; - } - // Otherwise, the node is entirely before the change range. No need to do anything with it. - ts.Debug.assert(fullEnd < changeStart); } - function visitArray(array) { - ts.Debug.assert(array.pos <= array.end); - if (array.pos > changeRangeOldEnd) { - // Array is entirely after the change range. We need to move it, and move any of - // its children. - moveElementEntirelyPastChangeRange(array, /*isArray*/ true, delta, oldText, newText, aggressiveChecks); + } + function updateStrictModeStatementList(statements) { + for (var _i = 0, statements_1 = statements; _i < statements_1.length; _i++) { + var statement = statements_1[_i]; + if (!ts.isPrologueDirective(statement)) { return; } - // Check if the element intersects the change range. If it does, then it is not - // reusable. Also, we'll need to recurse to see what constituent portions we may - // be able to use. - var fullEnd = array.end; - if (fullEnd >= changeStart) { - array.intersectsChange = true; - array._children = undefined; - // Adjust the pos or end (or both) of the intersecting array accordingly. - adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - for (var _i = 0, array_8 = array; _i < array_8.length; _i++) { - var node = array_8[_i]; - visitNode(node); - } + if (isUseStrictPrologueDirective(statement)) { + inStrictMode = true; return; } - // Otherwise, the array is entirely before the change range. No need to do anything with it. - ts.Debug.assert(fullEnd < changeStart); } } - function extendToAffectedRange(sourceFile, changeRange) { - // Consider the following code: - // void foo() { /; } - // - // If the text changes with an insertion of / just before the semicolon then we end up with: - // void foo() { //; } - // - // If we were to just use the changeRange a is, then we would not rescan the { token - // (as it does not intersect the actual original change range). Because an edit may - // change the token touching it, we actually need to look back *at least* one token so - // that the prior token sees that change. - var maxLookahead = 1; - var start = changeRange.span.start; - // the first iteration aligns us with the change start. subsequent iteration move us to - // the left by maxLookahead tokens. We only need to do this as long as we're not at the - // start of the tree. - for (var i = 0; start > 0 && i <= maxLookahead; i++) { - var nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start); - ts.Debug.assert(nearestNode.pos <= start); - var position = nearestNode.pos; - start = Math.max(0, position - 1); + /// Should be called only on prologue directives (isPrologueDirective(node) should be true) + function isUseStrictPrologueDirective(node) { + var nodeText = ts.getTextOfNodeFromSourceText(file.text, node.expression); + // Note: the node text must be exactly "use strict" or 'use strict'. It is not ok for the + // string to contain unicode escapes (as per ES5). + return nodeText === "\"use strict\"" || nodeText === "'use strict'"; + } + function bindWorker(node) { + switch (node.kind) { + /* Strict mode checks */ + case 69 /* Identifier */: + return checkStrictModeIdentifier(node); + case 181 /* BinaryExpression */: + if (ts.isInJavaScriptFile(node)) { + if (ts.isExportsPropertyAssignment(node)) { + bindExportsPropertyAssignment(node); + } + else if (ts.isModuleExportsAssignment(node)) { + bindModuleExportsAssignment(node); + } + } + return checkStrictModeBinaryExpression(node); + case 244 /* CatchClause */: + return checkStrictModeCatchClause(node); + case 175 /* DeleteExpression */: + return checkStrictModeDeleteExpression(node); + case 8 /* NumericLiteral */: + return checkStrictModeNumericLiteral(node); + case 180 /* PostfixUnaryExpression */: + return checkStrictModePostfixUnaryExpression(node); + case 179 /* PrefixUnaryExpression */: + return checkStrictModePrefixUnaryExpression(node); + case 205 /* WithStatement */: + return checkStrictModeWithStatement(node); + case 97 /* ThisKeyword */: + seenThisKeyword = true; + return; + case 137 /* TypeParameter */: + return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530912 /* TypeParameterExcludes */); + case 138 /* Parameter */: + return bindParameter(node); + case 211 /* VariableDeclaration */: + case 163 /* BindingElement */: + return bindVariableDeclarationOrBindingElement(node); + case 141 /* PropertyDeclaration */: + case 140 /* PropertySignature */: + return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 107455 /* PropertyExcludes */); + case 245 /* PropertyAssignment */: + case 246 /* ShorthandPropertyAssignment */: + return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 107455 /* PropertyExcludes */); + case 247 /* EnumMember */: + return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 107455 /* EnumMemberExcludes */); + case 147 /* CallSignature */: + case 148 /* ConstructSignature */: + case 149 /* IndexSignature */: + return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); + case 143 /* MethodDeclaration */: + case 142 /* MethodSignature */: + // If this is an ObjectLiteralExpression method, then it sits in the same space + // as other properties in the object literal. So we use SymbolFlags.PropertyExcludes + // so that it will conflict with any other object literal members with the same + // name. + return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 107455 /* PropertyExcludes */ : 99263 /* MethodExcludes */); + case 213 /* FunctionDeclaration */: + checkStrictModeFunctionName(node); + return declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 106927 /* FunctionExcludes */); + case 144 /* Constructor */: + return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */); + case 145 /* GetAccessor */: + return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */); + case 146 /* SetAccessor */: + return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */); + case 152 /* FunctionType */: + case 153 /* ConstructorType */: + return bindFunctionOrConstructorType(node); + case 155 /* TypeLiteral */: + return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type"); + case 165 /* ObjectLiteralExpression */: + return bindObjectLiteralExpression(node); + case 173 /* FunctionExpression */: + case 174 /* ArrowFunction */: + checkStrictModeFunctionName(node); + var bindingName = node.name ? node.name.text : "__function"; + return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); + case 168 /* CallExpression */: + if (ts.isInJavaScriptFile(node)) { + bindCallExpression(node); + } + break; + // Members of classes, interfaces, and modules + case 186 /* ClassExpression */: + case 214 /* ClassDeclaration */: + return bindClassLikeDeclaration(node); + case 215 /* InterfaceDeclaration */: + return bindBlockScopedDeclaration(node, 64 /* Interface */, 792960 /* InterfaceExcludes */); + case 216 /* TypeAliasDeclaration */: + return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793056 /* TypeAliasExcludes */); + case 217 /* EnumDeclaration */: + return bindEnumDeclaration(node); + case 218 /* ModuleDeclaration */: + return bindModuleDeclaration(node); + // Imports and exports + case 221 /* ImportEqualsDeclaration */: + case 224 /* NamespaceImport */: + case 226 /* ImportSpecifier */: + case 230 /* ExportSpecifier */: + return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); + case 223 /* ImportClause */: + return bindImportClause(node); + case 228 /* ExportDeclaration */: + return bindExportDeclaration(node); + case 227 /* ExportAssignment */: + return bindExportAssignment(node); + case 248 /* SourceFile */: + return bindSourceFileIfExternalModule(); + } + } + function bindSourceFileIfExternalModule() { + setExportContextFlag(file); + if (ts.isExternalModule(file)) { + bindSourceFileAsExternalModule(); + } + } + function bindSourceFileAsExternalModule() { + bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"" + ts.removeFileExtension(file.fileName) + "\""); + } + function bindExportAssignment(node) { + var boundExpression = node.kind === 227 /* ExportAssignment */ ? node.expression : node.right; + if (!container.symbol || !container.symbol.exports) { + // Export assignment in some sort of block construct + bindAnonymousDeclaration(node, 8388608 /* Alias */, getDeclarationName(node)); + } + else if (boundExpression.kind === 69 /* Identifier */) { + // An export default clause with an identifier exports all meanings of that identifier + declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* Alias */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); + } + else { + // An export default clause with an expression exports a value + declareSymbol(container.symbol.exports, container.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); + } + } + function bindExportDeclaration(node) { + if (!container.symbol || !container.symbol.exports) { + // Export * in some sort of block construct + bindAnonymousDeclaration(node, 1073741824 /* ExportStar */, getDeclarationName(node)); + } + else if (!node.exportClause) { + // All export * declarations are collected in an __export symbol + declareSymbol(container.symbol.exports, container.symbol, node, 1073741824 /* ExportStar */, 0 /* None */); } - var finalSpan = ts.createTextSpanFromBounds(start, ts.textSpanEnd(changeRange.span)); - var finalLength = changeRange.newLength + (changeRange.span.start - start); - return ts.createTextChangeRange(finalSpan, finalLength); } - function findNearestNodeStartingBeforeOrAtPosition(sourceFile, position) { - var bestResult = sourceFile; - var lastNodeEntirelyBeforePosition; - forEachChild(sourceFile, visit); - if (lastNodeEntirelyBeforePosition) { - var lastChildOfLastEntireNodeBeforePosition = getLastChild(lastNodeEntirelyBeforePosition); - if (lastChildOfLastEntireNodeBeforePosition.pos > bestResult.pos) { - bestResult = lastChildOfLastEntireNodeBeforePosition; + function bindImportClause(node) { + if (node.name) { + declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); + } + } + function setCommonJsModuleIndicator(node) { + if (!file.commonJsModuleIndicator) { + file.commonJsModuleIndicator = node; + bindSourceFileAsExternalModule(); + } + } + function bindExportsPropertyAssignment(node) { + // When we create a property via 'exports.foo = bar', the 'exports.foo' property access + // expression is the declaration + setCommonJsModuleIndicator(node); + declareSymbol(file.symbol.exports, file.symbol, node.left, 4 /* Property */ | 7340032 /* Export */, 0 /* None */); + } + function bindModuleExportsAssignment(node) { + // 'module.exports = expr' assignment + setCommonJsModuleIndicator(node); + bindExportAssignment(node); + } + function bindCallExpression(node) { + // We're only inspecting call expressions to detect CommonJS modules, so we can skip + // this check if we've already seen the module indicator + if (!file.commonJsModuleIndicator && ts.isRequireCall(node)) { + setCommonJsModuleIndicator(node); + } + } + function bindClassLikeDeclaration(node) { + if (node.kind === 214 /* ClassDeclaration */) { + bindBlockScopedDeclaration(node, 32 /* Class */, 899519 /* ClassExcludes */); + } + else { + var bindingName = node.name ? node.name.text : "__class"; + bindAnonymousDeclaration(node, 32 /* Class */, bindingName); + // Add name of class expression into the map for semantic classifier + if (node.name) { + classifiableNames[node.name.text] = node.name.text; } } - return bestResult; - function getLastChild(node) { - while (true) { - var lastChild = getLastChildWorker(node); - if (lastChild) { - node = lastChild; - } - else { - return node; - } + var symbol = node.symbol; + // TypeScript 1.0 spec (April 2014): 8.4 + // Every class automatically contains a static property member named 'prototype', the + // type of which is an instantiation of the class type with type Any supplied as a type + // argument for each type parameter. It is an error to explicitly declare a static + // property member with the name 'prototype'. + // + // Note: we check for this here because this class may be merging into a module. The + // module might have an exported variable called 'prototype'. We can't allow that as + // that would clash with the built-in 'prototype' for the class. + var prototypeSymbol = createSymbol(4 /* Property */ | 134217728 /* Prototype */, "prototype"); + if (ts.hasProperty(symbol.exports, prototypeSymbol.name)) { + if (node.name) { + node.name.parent = node; } + file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name)); } - function getLastChildWorker(node) { - var last = undefined; - forEachChild(node, function (child) { - if (ts.nodeIsPresent(child)) { - last = child; - } - }); - return last; + symbol.exports[prototypeSymbol.name] = prototypeSymbol; + prototypeSymbol.parent = symbol; + } + function bindEnumDeclaration(node) { + return ts.isConst(node) + ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) + : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); + } + function bindVariableDeclarationOrBindingElement(node) { + if (inStrictMode) { + checkStrictModeEvalOrArguments(node, node.name); } - function visit(child) { - if (ts.nodeIsMissing(child)) { - // Missing nodes are effectively invisible to us. We never even consider them - // When trying to find the nearest node before us. - return; + if (!ts.isBindingPattern(node.name)) { + if (ts.isBlockOrCatchScoped(node)) { + bindBlockScopedVariableDeclaration(node); } - // If the child intersects this position, then this node is currently the nearest - // node that starts before the position. - if (child.pos <= position) { - if (child.pos >= bestResult.pos) { - // This node starts before the position, and is closer to the position than - // the previous best node we found. It is now the new best node. - bestResult = child; - } - // Now, the node may overlap the position, or it may end entirely before the - // position. If it overlaps with the position, then either it, or one of its - // children must be the nearest node before the position. So we can just - // recurse into this child to see if we can find something better. - if (position < child.end) { - // The nearest node is either this child, or one of the children inside - // of it. We've already marked this child as the best so far. Recurse - // in case one of the children is better. - forEachChild(child, visit); - // Once we look at the children of this node, then there's no need to - // continue any further. - return true; - } - else { - ts.Debug.assert(child.end <= position); - // The child ends entirely before this position. Say you have the following - // (where $ is the position) - // - // ? $ : <...> <...> - // - // We would want to find the nearest preceding node in "complex expr 2". - // To support that, we keep track of this node, and once we're done searching - // for a best node, we recurse down this node to see if we can find a good - // result in it. - // - // This approach allows us to quickly skip over nodes that are entirely - // before the position, while still allowing us to find any nodes in the - // last one that might be what we want. - lastNodeEntirelyBeforePosition = child; - } + else if (ts.isParameterDeclaration(node)) { + // It is safe to walk up parent chain to find whether the node is a destructing parameter declaration + // because its parent chain has already been set up, since parents are set before descending into children. + // + // If node is a binding element in parameter declaration, we need to use ParameterExcludes. + // Using ParameterExcludes flag allows the compiler to report an error on duplicate identifiers in Parameter Declaration + // For example: + // function foo([a,a]) {} // Duplicate Identifier error + // function bar(a,a) {} // Duplicate Identifier error, parameter declaration in this case is handled in bindParameter + // // which correctly set excluded symbols + declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); } else { - ts.Debug.assert(child.pos > position); - // We're now at a node that is entirely past the position we're searching for. - // This node (and all following nodes) could never contribute to the result, - // so just skip them by returning 'true' here. - return true; + declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107454 /* FunctionScopedVariableExcludes */); } } } - function checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks) { - var oldText = sourceFile.text; - if (textChangeRange) { - ts.Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); - if (aggressiveChecks || ts.Debug.shouldAssert(3 /* VeryAggressive */)) { - var oldTextPrefix = oldText.substr(0, textChangeRange.span.start); - var newTextPrefix = newText.substr(0, textChangeRange.span.start); - ts.Debug.assert(oldTextPrefix === newTextPrefix); - var oldTextSuffix = oldText.substring(ts.textSpanEnd(textChangeRange.span), oldText.length); - var newTextSuffix = newText.substring(ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange)), newText.length); - ts.Debug.assert(oldTextSuffix === newTextSuffix); - } + function bindParameter(node) { + if (inStrictMode) { + // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a + // strict mode FunctionLikeDeclaration or FunctionExpression(13.1) + checkStrictModeEvalOrArguments(node, node.name); + } + if (ts.isBindingPattern(node.name)) { + bindAnonymousDeclaration(node, 1 /* FunctionScopedVariable */, getDestructuringParameterName(node)); + } + else { + declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); + } + // If this is a property-parameter, then also declare the property symbol into the + // containing class. + if (node.flags & 56 /* AccessibilityModifier */ && + node.parent.kind === 144 /* Constructor */ && + ts.isClassLike(node.parent.parent)) { + var classDeclaration = node.parent.parent; + declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */); } } - function createSyntaxCursor(sourceFile) { - var currentArray = sourceFile.statements; - var currentArrayIndex = 0; - ts.Debug.assert(currentArrayIndex < currentArray.length); - var current = currentArray[currentArrayIndex]; - var lastQueriedPosition = -1 /* Value */; - return { - currentNode: function (position) { - // Only compute the current node if the position is different than the last time - // we were asked. The parser commonly asks for the node at the same position - // twice. Once to know if can read an appropriate list element at a certain point, - // and then to actually read and consume the node. - if (position !== lastQueriedPosition) { - // Much of the time the parser will need the very next node in the array that - // we just returned a node from.So just simply check for that case and move - // forward in the array instead of searching for the node again. - if (current && current.end === position && currentArrayIndex < (currentArray.length - 1)) { - currentArrayIndex++; - current = currentArray[currentArrayIndex]; - } - // If we don't have a node, or the node we have isn't in the right position, - // then try to find a viable node at the position requested. - if (!current || current.pos !== position) { - findHighestListElementThatStartsAtPosition(position); - } - } - // Cache this query so that we don't do any extra work if the parser calls back - // into us. Note: this is very common as the parser will make pairs of calls like - // 'isListElement -> parseListElement'. If we were unable to find a node when - // called with 'isListElement', we don't want to redo the work when parseListElement - // is called immediately after. - lastQueriedPosition = position; - // Either we don'd have a node, or we have a node at the position being asked for. - ts.Debug.assert(!current || current.pos === position); - return current; - } - }; - // Finds the highest element in the tree we can find that starts at the provided position. - // The element must be a direct child of some node list in the tree. This way after we - // return it, we can easily return its next sibling in the list. - function findHighestListElementThatStartsAtPosition(position) { - // Clear out any cached state about the last node we found. - currentArray = undefined; - currentArrayIndex = -1 /* Value */; - current = undefined; - // Recurse into the source file to find the highest node at this position. - forEachChild(sourceFile, visitNode, visitArray); - return; - function visitNode(node) { - if (position >= node.pos && position < node.end) { - // Position was within this node. Keep searching deeper to find the node. - forEachChild(node, visitNode, visitArray); - // don't procede any futher in the search. - return true; - } - // position wasn't in this node, have to keep searching. - return false; + function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { + return ts.hasDynamicName(node) + ? bindAnonymousDeclaration(node, symbolFlags, "__computed") + : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); + } + // reachability checks + function pushNamedLabel(name) { + initializeReachabilityStateIfNecessary(); + if (ts.hasProperty(labelIndexMap, name.text)) { + return false; + } + labelIndexMap[name.text] = labelStack.push(1 /* Unintialized */) - 1; + return true; + } + function pushImplicitLabel() { + initializeReachabilityStateIfNecessary(); + var index = labelStack.push(1 /* Unintialized */) - 1; + implicitLabels.push(index); + return index; + } + function popNamedLabel(label, outerState) { + var index = labelIndexMap[label.text]; + ts.Debug.assert(index !== undefined); + ts.Debug.assert(labelStack.length == index + 1); + labelIndexMap[label.text] = undefined; + setCurrentStateAtLabel(labelStack.pop(), outerState, label); + } + function popImplicitLabel(implicitLabelIndex, outerState) { + if (labelStack.length !== implicitLabelIndex + 1) { + ts.Debug.assert(false, "Label stack: " + labelStack.length + ", index:" + implicitLabelIndex); + } + var i = implicitLabels.pop(); + if (implicitLabelIndex !== i) { + ts.Debug.assert(false, "i: " + i + ", index: " + implicitLabelIndex); + } + setCurrentStateAtLabel(labelStack.pop(), outerState, /*name*/ undefined); + } + function setCurrentStateAtLabel(innerMergedState, outerState, label) { + if (innerMergedState === 1 /* Unintialized */) { + if (label && !options.allowUnusedLabels) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(label, ts.Diagnostics.Unused_label)); } - function visitArray(array) { - if (position >= array.pos && position < array.end) { - // position was in this array. Search through this array to see if we find a - // viable element. - for (var i = 0, n = array.length; i < n; i++) { - var child = array[i]; - if (child) { - if (child.pos === position) { - // Found the right node. We're done. - currentArray = array; - currentArrayIndex = i; - current = child; - return true; - } - else { - if (child.pos < position && position < child.end) { - // Position in somewhere within this child. Search in it and - // stop searching in this array. - forEachChild(child, visitNode, visitArray); - return true; - } - } - } + currentReachabilityState = outerState; + } + else { + currentReachabilityState = or(innerMergedState, outerState); + } + } + function jumpToLabel(label, outerState) { + initializeReachabilityStateIfNecessary(); + var index = label ? labelIndexMap[label.text] : ts.lastOrUndefined(implicitLabels); + if (index === undefined) { + // reference to unknown label or + // break/continue used outside of loops + return false; + } + var stateAtLabel = labelStack[index]; + labelStack[index] = stateAtLabel === 1 /* Unintialized */ ? outerState : or(stateAtLabel, outerState); + return true; + } + function checkUnreachable(node) { + switch (currentReachabilityState) { + case 4 /* Unreachable */: + var reportError = + // report error on all statements except empty ones + (ts.isStatement(node) && node.kind !== 194 /* EmptyStatement */) || + // report error on class declarations + node.kind === 214 /* ClassDeclaration */ || + // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + (node.kind === 218 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || + // report error on regular enums and const enums if preserveConstEnums is set + (node.kind === 217 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + if (reportError) { + currentReachabilityState = 8 /* ReportedUnreachable */; + // unreachable code is reported if + // - user has explicitly asked about it AND + // - statement is in not ambient context (statements in ambient context is already an error + // so we should not report extras) AND + // - node is not variable statement OR + // - node is block scoped variable statement OR + // - node is not block scoped variable statement and at least one variable declaration has initializer + // Rationale: we don't want to report errors on non-initialized var's since they are hoisted + // On the other side we do want to report errors on non-initialized 'lets' because of TDZ + var reportUnreachableCode = !options.allowUnreachableCode && + !ts.isInAmbientContext(node) && + (node.kind !== 193 /* VariableStatement */ || + ts.getCombinedNodeFlags(node.declarationList) & 24576 /* BlockScoped */ || + ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); + if (reportUnreachableCode) { + errorOnFirstToken(node, ts.Diagnostics.Unreachable_code_detected); } } - // position wasn't in this array, have to keep searching. + case 8 /* ReportedUnreachable */: + return true; + default: return false; - } + } + function shouldReportErrorOnModuleDeclaration(node) { + var instanceState = getModuleInstanceState(node); + return instanceState === 1 /* Instantiated */ || (instanceState === 2 /* ConstEnumOnly */ && options.preserveConstEnums); } } - var InvalidPosition; - (function (InvalidPosition) { - InvalidPosition[InvalidPosition["Value"] = -1] = "Value"; - })(InvalidPosition || (InvalidPosition = {})); - })(IncrementalParser || (IncrementalParser = {})); + function initializeReachabilityStateIfNecessary() { + if (labelIndexMap) { + return; + } + currentReachabilityState = 2 /* Reachable */; + labelIndexMap = {}; + labelStack = []; + implicitLabels = []; + } + } })(ts || (ts = {})); /// /* @internal */ @@ -13755,7 +13918,7 @@ var ts; symbolToString: symbolToString, getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, getRootSymbols: getRootSymbols, - getContextualType: getContextualType, + getContextualType: getApparentTypeOfContextualType, getFullyQualifiedName: getFullyQualifiedName, getResolvedSignature: getResolvedSignature, getConstantValue: getConstantValue, @@ -14025,7 +14188,7 @@ var ts; return ts.getAncestor(node, 248 /* SourceFile */); } function isGlobalSourceFile(node) { - return node.kind === 248 /* SourceFile */ && !ts.isExternalModule(node); + return node.kind === 248 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -14127,15 +14290,24 @@ var ts; } switch (location.kind) { case 248 /* SourceFile */: - if (!ts.isExternalModule(location)) + if (!ts.isExternalOrCommonJsModule(location)) break; case 218 /* ModuleDeclaration */: var moduleExports = getSymbolOfNode(location).exports; if (location.kind === 248 /* SourceFile */ || (location.kind === 218 /* ModuleDeclaration */ && location.name.kind === 9 /* StringLiteral */)) { - // It's an external module. Because of module/namespace merging, a module's exports are in scope, - // yet we never want to treat an export specifier as putting a member in scope. Therefore, - // if the name we find is purely an export specifier, it is not actually considered in scope. + // It's an external module. First see if the module has an export default and if the local + // name of that export default matches. + if (result = moduleExports["default"]) { + var localSymbol = ts.getLocalSymbolForExportDefault(result); + if (localSymbol && (result.flags & meaning) && localSymbol.name === name) { + break loop; + } + result = undefined; + } + // Because of module/namespace merging, a module's exports are in scope, + // yet we never want to treat an export specifier as putting a member in scope. + // Therefore, if the name we find is purely an export specifier, it is not actually considered in scope. // Two things to note about this: // 1. We have to check this without calling getSymbol. The problem with calling getSymbol // on an export specifier is that it might find the export specifier itself, and try to @@ -14149,12 +14321,6 @@ var ts; ts.getDeclarationOfKind(moduleExports[name], 230 /* ExportSpecifier */)) { break; } - result = moduleExports["default"]; - var localSymbol = ts.getLocalSymbolForExportDefault(result); - if (result && localSymbol && (result.flags & meaning) && localSymbol.name === name) { - break loop; - } - result = undefined; } if (result = getSymbol(moduleExports, name, meaning & 8914931 /* ModuleMember */)) { break loop; @@ -14297,7 +14463,7 @@ var ts; // declare module foo { // interface bar {} // } - // let foo/*1*/: foo/*2*/.bar; + // const foo/*1*/: foo/*2*/.bar; // The foo at /*1*/ and /*2*/ will share same symbol with two meaning // block - scope variable and namespace module. However, only when we // try to resolve name in /*1*/ which is used in variable position, @@ -14601,6 +14767,9 @@ var ts; if (moduleName === undefined) { return; } + if (moduleName.indexOf("!") >= 0) { + moduleName = moduleName.substr(0, moduleName.indexOf("!")); + } var isRelative = ts.isExternalModuleNameRelative(moduleName); if (!isRelative) { var symbol = getSymbol(globals, "\"" + moduleName + "\"", 512 /* ValueModule */); @@ -14788,7 +14957,7 @@ var ts; } switch (location_1.kind) { case 248 /* SourceFile */: - if (!ts.isExternalModule(location_1)) { + if (!ts.isExternalOrCommonJsModule(location_1)) { break; } case 218 /* ModuleDeclaration */: @@ -14910,7 +15079,7 @@ var ts; // export class c { // } // } - // let x: typeof m.c + // const 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 can't, hence the accessible is going to be undefined, but that doesn't mean m.c is inaccessible @@ -14949,7 +15118,7 @@ var ts; } function hasExternalModuleSymbol(declaration) { return (declaration.kind === 218 /* ModuleDeclaration */ && declaration.name.kind === 9 /* StringLiteral */) || - (declaration.kind === 248 /* SourceFile */ && ts.isExternalModule(declaration)); + (declaration.kind === 248 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -15100,7 +15269,7 @@ var ts; parentSymbol = symbol; appendSymbolNameOnly(symbol, writer); } - // Let the writer know we just wrote out a symbol. The declaration emitter writer uses + // const the writer know we just wrote out a symbol. The declaration emitter writer uses // this to determine if an import it has previously seen (and not written out) needs // to be written to the file once the walk of the tree is complete. // @@ -15181,7 +15350,7 @@ var ts; writeAnonymousType(type, flags); } else if (type.flags & 256 /* StringLiteral */) { - writer.writeStringLiteral(type.text); + writer.writeStringLiteral("\"" + ts.escapeString(type.text) + "\""); } else { // Should never get here @@ -15568,7 +15737,7 @@ var ts; } } else if (node.kind === 248 /* SourceFile */) { - return ts.isExternalModule(node) ? node : undefined; + return ts.isExternalOrCommonJsModule(node) ? node : undefined; } } ts.Debug.fail("getContainingModule cant reach here"); @@ -15650,7 +15819,7 @@ var ts; // Private/protected properties/methods are not visible return false; } - // Public properties/methods are visible if its parents are visible, so let it fall into next case statement + // Public properties/methods are visible if its parents are visible, so const it fall into next case statement case 144 /* Constructor */: case 148 /* ConstructSignature */: case 147 /* CallSignature */: @@ -15678,7 +15847,7 @@ var ts; // Source file is always visible case 248 /* SourceFile */: return true; - // Export assignements do not create name bindings outside the module + // Export assignments do not create name bindings outside the module case 227 /* ExportAssignment */: return false; default: @@ -15814,6 +15983,23 @@ var ts; var symbol = getSymbolOfNode(node); return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node); } + function getTextOfPropertyName(name) { + switch (name.kind) { + case 69 /* Identifier */: + return name.text; + case 9 /* StringLiteral */: + case 8 /* NumericLiteral */: + return name.text; + case 136 /* ComputedPropertyName */: + if (ts.isStringOrNumericLiteral(name.expression.kind)) { + return name.expression.text; + } + } + return undefined; + } + function isComputedNonLiteralName(name) { + return name.kind === 136 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression.kind); + } // Return the inferred type for a binding element function getTypeForBindingElement(declaration) { var pattern = declaration.parent; @@ -15835,10 +16021,15 @@ var ts; if (pattern.kind === 161 /* ObjectBindingPattern */) { // Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form) var name_10 = declaration.propertyName || declaration.name; + if (isComputedNonLiteralName(name_10)) { + // computed properties with non-literal names are treated as 'any' + return anyType; + } // Use type of the specified property, or otherwise, for a numeric name, the type of the numeric index signature, // or otherwise the type of the string index signature. - type = getTypeOfPropertyOfType(parentType, name_10.text) || - isNumericLiteralName(name_10.text) && getIndexTypeOfType(parentType, 1 /* Number */) || + var text = getTextOfPropertyName(name_10); + type = getTypeOfPropertyOfType(parentType, text) || + isNumericLiteralName(text) && getIndexTypeOfType(parentType, 1 /* Number */) || getIndexTypeOfType(parentType, 0 /* String */); if (!type) { error(name_10, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_10)); @@ -15938,10 +16129,17 @@ var ts; // Return the type implied by an object binding pattern function getTypeFromObjectBindingPattern(pattern, includePatternInType) { var members = {}; + var hasComputedProperties = false; ts.forEach(pattern.elements, function (e) { - var flags = 4 /* Property */ | 67108864 /* Transient */ | (e.initializer ? 536870912 /* Optional */ : 0); var name = e.propertyName || e.name; - var symbol = createSymbol(flags, name.text); + if (isComputedNonLiteralName(name)) { + // do not include computed properties in the implied type + hasComputedProperties = true; + return; + } + var text = getTextOfPropertyName(name); + var flags = 4 /* Property */ | 67108864 /* Transient */ | (e.initializer ? 536870912 /* Optional */ : 0); + var symbol = createSymbol(flags, text); symbol.type = getTypeFromBindingElement(e, includePatternInType); symbol.bindingElement = e; members[symbol.name] = symbol; @@ -15950,6 +16148,9 @@ var ts; if (includePatternInType) { result.pattern = pattern; } + if (hasComputedProperties) { + result.flags |= 67108864 /* ObjectLiteralPatternWithComputedProperties */; + } return result; } // Return the type implied by an array binding pattern @@ -16026,6 +16227,14 @@ var ts; if (declaration.kind === 227 /* ExportAssignment */) { return links.type = checkExpression(declaration.expression); } + // Handle module.exports = expr + if (declaration.kind === 181 /* BinaryExpression */) { + return links.type = checkExpression(declaration.right); + } + // Handle exports.p = expr + if (declaration.kind === 166 /* PropertyAccessExpression */) { + return checkExpressionCached(declaration.parent.right); + } // Handle variable, parameter or property if (!pushTypeResolution(symbol, 0 /* Type */)) { return unknownType; @@ -16304,23 +16513,25 @@ var ts; } function resolveBaseTypesOfClass(type) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; - var baseContructorType = getBaseConstructorTypeOfClass(type); - if (!(baseContructorType.flags & 80896 /* ObjectType */)) { + var baseConstructorType = getBaseConstructorTypeOfClass(type); + if (!(baseConstructorType.flags & 80896 /* ObjectType */)) { return; } var baseTypeNode = getBaseTypeNodeOfClass(type); var baseType; - if (baseContructorType.symbol && baseContructorType.symbol.flags & 32 /* Class */) { - // When base constructor type is a class we know that the constructors all have the same type parameters as the + var originalBaseType = baseConstructorType && baseConstructorType.symbol ? getDeclaredTypeOfSymbol(baseConstructorType.symbol) : undefined; + if (baseConstructorType.symbol && baseConstructorType.symbol.flags & 32 /* Class */ && + areAllOuterTypeParametersApplied(originalBaseType)) { + // When base constructor type is a class with no captured type arguments we know that the constructors all have the same type parameters as the // class and all return the instance type of the class. There is no need for further checks and we can apply the // type arguments in the same manner as a type reference to get the same error reporting experience. - baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseContructorType.symbol); + baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol); } else { // The class derives from a "class-like" constructor function, check that we have at least one construct signature // with a matching number of type parameters and use the return type of the first instantiated signature. Elsewhere // we check that all instantiated signatures return the same type. - var constructors = getInstantiatedConstructorsForTypeArguments(baseContructorType, baseTypeNode.typeArguments); + var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments); if (!constructors.length) { error(baseTypeNode.expression, ts.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments); return; @@ -16345,6 +16556,17 @@ var ts; type.resolvedBaseTypes.push(baseType); } } + function areAllOuterTypeParametersApplied(type) { + // An unapplied type parameter has its symbol still the same as the matching argument symbol. + // Since parameters are applied outer-to-inner, only the last outer parameter needs to be checked. + var outerTypeParameters = type.outerTypeParameters; + if (outerTypeParameters) { + var last = outerTypeParameters.length - 1; + var typeArguments = type.typeArguments; + return outerTypeParameters[last].symbol !== typeArguments[last].symbol; + } + return true; + } function resolveBaseTypesOfInterface(type) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { @@ -16424,7 +16646,7 @@ var ts; type.typeArguments = type.typeParameters; type.thisType = createType(512 /* TypeParameter */ | 33554432 /* ThisType */); type.thisType.symbol = symbol; - type.thisType.constraint = getTypeWithThisArgument(type); + type.thisType.constraint = type; } } return links.declaredType; @@ -16939,6 +17161,20 @@ var ts; type = getApparentType(type); return type.flags & 49152 /* UnionOrIntersection */ ? getPropertiesOfUnionOrIntersectionType(type) : getPropertiesOfObjectType(type); } + /** + * The apparent type of a type parameter is the base constraint instantiated with the type parameter + * as the type argument for the 'this' type. + */ + function getApparentTypeOfTypeParameter(type) { + if (!type.resolvedApparentType) { + var constraintType = getConstraintOfTypeParameter(type); + while (constraintType && constraintType.flags & 512 /* TypeParameter */) { + constraintType = getConstraintOfTypeParameter(constraintType); + } + type.resolvedApparentType = getTypeWithThisArgument(constraintType || emptyObjectType, type); + } + return type.resolvedApparentType; + } /** * For a type parameter, return the base constraint of the type parameter. For the string, number, * boolean, and symbol primitive types, return the corresponding object types. Otherwise return the @@ -16946,12 +17182,7 @@ var ts; */ function getApparentType(type) { if (type.flags & 512 /* TypeParameter */) { - do { - type = getConstraintOfTypeParameter(type); - } while (type && type.flags & 512 /* TypeParameter */); - if (!type) { - type = emptyObjectType; - } + type = getApparentTypeOfTypeParameter(type); } if (type.flags & 258 /* StringLike */) { type = globalStringType; @@ -17116,7 +17347,7 @@ var ts; if (node.initializer) { var signatureDeclaration = node.parent; var signature = getSignatureFromDeclaration(signatureDeclaration); - var parameterIndex = signatureDeclaration.parameters.indexOf(node); + var parameterIndex = ts.indexOf(signatureDeclaration.parameters, node); ts.Debug.assert(parameterIndex >= 0); return parameterIndex >= signature.minArgumentCount; } @@ -17217,6 +17448,16 @@ var ts; } return result; } + function resolveExternalModuleTypeByLiteral(name) { + var moduleSym = resolveExternalModuleName(name, name); + if (moduleSym) { + var resolvedModuleSymbol = resolveExternalModuleSymbol(moduleSym); + if (resolvedModuleSymbol) { + return getTypeOfSymbol(resolvedModuleSymbol); + } + } + return anyType; + } function getReturnTypeOfSignature(signature) { if (!signature.resolvedReturnType) { if (!pushTypeResolution(signature, 3 /* ResolvedReturnType */)) { @@ -17740,11 +17981,12 @@ var ts; return links.resolvedType; } function getStringLiteralType(node) { - if (ts.hasProperty(stringLiteralTypes, node.text)) { - return stringLiteralTypes[node.text]; + var text = node.text; + if (ts.hasProperty(stringLiteralTypes, text)) { + return stringLiteralTypes[text]; } - var type = stringLiteralTypes[node.text] = createType(256 /* StringLiteral */); - type.text = ts.getTextOfNode(node); + var type = stringLiteralTypes[text] = createType(256 /* StringLiteral */); + type.text = text; return type; } function getTypeFromStringLiteral(node) { @@ -18265,7 +18507,7 @@ var ts; return false; } function hasExcessProperties(source, target, reportErrors) { - if (someConstituentTypeHasKind(target, 80896 /* ObjectType */)) { + if (!(target.flags & 67108864 /* ObjectLiteralPatternWithComputedProperties */) && someConstituentTypeHasKind(target, 80896 /* ObjectType */)) { for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) { var prop = _a[_i]; if (!isKnownProperty(target, prop.name)) { @@ -18358,9 +18600,6 @@ var ts; return result; } function typeParameterIdenticalTo(source, target) { - if (source.symbol.name !== target.symbol.name) { - return 0 /* False */; - } // covers case when both type parameters does not have constraint (both equal to noConstraintType) if (source.constraint === target.constraint) { return -1 /* True */; @@ -18852,18 +19091,29 @@ var ts; } return compareTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); } + function isMatchingSignature(source, target, partialMatch) { + // A source signature matches a target signature if the two signatures have the same number of required, + // optional, and rest parameters. + if (source.parameters.length === target.parameters.length && + source.minArgumentCount === target.minArgumentCount && + source.hasRestParameter === target.hasRestParameter) { + return true; + } + // A source signature partially matches a target signature if the target signature has no fewer required + // parameters and no more overall parameters than the source signature (where a signature with a rest + // parameter is always considered to have more overall parameters than one without). + if (partialMatch && source.minArgumentCount <= target.minArgumentCount && (source.hasRestParameter && !target.hasRestParameter || + source.hasRestParameter === target.hasRestParameter && source.parameters.length >= target.parameters.length)) { + return true; + } + return false; + } function compareSignatures(source, target, partialMatch, ignoreReturnTypes, compareTypes) { if (source === target) { return -1 /* True */; } - if (source.parameters.length !== target.parameters.length || - source.minArgumentCount !== target.minArgumentCount || - source.hasRestParameter !== target.hasRestParameter) { - if (!partialMatch || - source.parameters.length < target.parameters.length && !source.hasRestParameter || - source.minArgumentCount > target.minArgumentCount) { - return 0 /* False */; - } + if (!(isMatchingSignature(source, target, partialMatch))) { + return 0 /* False */; } var result = -1 /* True */; if (source.typeParameters && target.typeParameters) { @@ -18957,6 +19207,9 @@ var ts; function isTupleLikeType(type) { return !!getPropertyOfType(type, "0"); } + function isStringLiteralType(type) { + return type.flags & 256 /* StringLiteral */; + } /** * Check if a Type was written as a tuple type literal. * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. @@ -19629,7 +19882,7 @@ var ts; } function narrowTypeByInstanceof(type, expr, assumeTrue) { // Check that type is not any, assumed result is true, and we have variable symbol on the left - if (isTypeAny(type) || !assumeTrue || expr.left.kind !== 69 /* Identifier */ || getResolvedSymbol(expr.left) !== symbol) { + if (isTypeAny(type) || expr.left.kind !== 69 /* Identifier */ || getResolvedSymbol(expr.left) !== symbol) { return type; } // Check that right operand is a function type with a prototype property @@ -19660,6 +19913,12 @@ var ts; } } if (targetType) { + if (!assumeTrue) { + if (type.flags & 16384 /* Union */) { + return getUnionType(ts.filter(type.types, function (t) { return !isTypeSubtypeOf(t, targetType); })); + } + return type; + } return getNarrowedType(type, targetType); } return type; @@ -20129,6 +20388,9 @@ var ts; function getIndexTypeOfContextualType(type, kind) { return applyToContextualType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); }); } + function contextualTypeIsStringLiteralType(type) { + return !!(type.flags & 16384 /* Union */ ? ts.forEach(type.types, isStringLiteralType) : isStringLiteralType(type)); + } // Return true if the given contextual type is a tuple-like type function contextualTypeIsTupleLikeType(type) { return !!(type.flags & 16384 /* Union */ ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type)); @@ -20150,7 +20412,7 @@ var ts; } function getContextualTypeForObjectLiteralElement(element) { var objectLiteral = element.parent; - var type = getContextualType(objectLiteral); + var type = getApparentTypeOfContextualType(objectLiteral); if (type) { if (!ts.hasDynamicName(element)) { // For a (non-symbol) computed property, there is no reason to look up the name @@ -20173,7 +20435,7 @@ var ts; // type of T. function getContextualTypeForElementExpression(node) { var arrayLiteral = node.parent; - var type = getContextualType(arrayLiteral); + var type = getApparentTypeOfContextualType(arrayLiteral); if (type) { var index = ts.indexOf(arrayLiteral.elements, node); return getTypeOfPropertyOfContextualType(type, "" + index) @@ -20206,11 +20468,28 @@ var ts; } // Return the contextual type for a given expression node. During overload resolution, a contextual type may temporarily // be "pushed" onto a node using the contextualType property. - function getContextualType(node) { - var type = getContextualTypeWorker(node); + function getApparentTypeOfContextualType(node) { + var type = getContextualType(node); return type && getApparentType(type); } - function getContextualTypeWorker(node) { + /** + * Woah! Do you really want to use this function? + * + * Unless you're trying to get the *non-apparent* type for a + * value-literal type or you're authoring relevant portions of this algorithm, + * you probably meant to use 'getApparentTypeOfContextualType'. + * Otherwise this may not be very useful. + * + * In cases where you *are* working on this function, you should understand + * when it is appropriate to use 'getContextualType' and 'getApparentTypeOfContetxualType'. + * + * - Use 'getContextualType' when you are simply going to propagate the result to the expression. + * - Use 'getApparentTypeOfContextualType' when you're going to need the members of the type. + * + * @param node the expression whose contextual type will be returned. + * @returns the contextual type of an expression. + */ + function getContextualType(node) { if (isInsideWithStatementBody(node)) { // We cannot answer semantic questions within a with block, do not proceed any further return undefined; @@ -20285,7 +20564,7 @@ var ts; ts.Debug.assert(node.kind !== 143 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var type = ts.isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) - : getContextualType(node); + : getApparentTypeOfContextualType(node); if (!type) { return undefined; } @@ -20411,7 +20690,7 @@ var ts; type.pattern = node; return type; } - var contextualType = getContextualType(node); + var contextualType = getApparentTypeOfContextualType(node); if (contextualType && contextualTypeIsTupleLikeType(contextualType)) { var pattern = contextualType.pattern; // If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting @@ -20494,10 +20773,11 @@ var ts; checkGrammarObjectLiteralExpression(node, inDestructuringPattern); var propertiesTable = {}; var propertiesArray = []; - var contextualType = getContextualType(node); + var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 161 /* ObjectBindingPattern */ || contextualType.pattern.kind === 165 /* ObjectLiteralExpression */); var typeFlags = 0; + var patternWithComputedProperties = false; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var memberDecl = _a[_i]; var member = memberDecl.symbol; @@ -20525,8 +20805,11 @@ var ts; if (isOptional) { prop.flags |= 536870912 /* Optional */; } + if (ts.hasDynamicName(memberDecl)) { + patternWithComputedProperties = true; + } } - else if (contextualTypeHasPattern) { + else if (contextualTypeHasPattern && !(contextualType.flags & 67108864 /* ObjectLiteralPatternWithComputedProperties */)) { // If object literal is contextually typed by the implied type of a binding pattern, and if the // binding pattern specifies a default value for the property, make the property optional. var impliedProp = getPropertyOfType(contextualType, member.name); @@ -20578,7 +20861,7 @@ var ts; var numberIndexType = getIndexType(1 /* Number */); var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType); var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576 /* FreshObjectLiteral */; - result.flags |= 524288 /* ObjectLiteral */ | 4194304 /* ContainsObjectLiteral */ | freshObjectLiteralFlag | (typeFlags & 14680064 /* PropagatingFlags */); + result.flags |= 524288 /* ObjectLiteral */ | 4194304 /* ContainsObjectLiteral */ | freshObjectLiteralFlag | (typeFlags & 14680064 /* PropagatingFlags */) | (patternWithComputedProperties ? 67108864 /* ObjectLiteralPatternWithComputedProperties */ : 0); if (inDestructuringPattern) { result.pattern = node; } @@ -21289,7 +21572,7 @@ var ts; // so order how inherited signatures are processed is still preserved. // interface A { (x: string): void } // interface B extends A { (x: 'foo'): string } - // let b: B; + // const b: B; // b('foo') // <- here overloads should be processed as [(x:'foo'): string, (x: string): void] function reorderCandidates(signatures, result) { var lastParent; @@ -22247,6 +22530,10 @@ var ts; return anyType; } } + // In JavaScript files, calls to any identifier 'require' are treated as external module imports + if (ts.isInJavaScriptFile(node) && ts.isRequireCall(node)) { + return resolveExternalModuleTypeByLiteral(node.arguments[0]); + } return getReturnTypeOfSignature(signature); } function checkTaggedTemplateExpression(node) { @@ -22257,7 +22544,10 @@ var ts; var targetType = getTypeFromTypeNode(node.type); if (produceDiagnostics && targetType !== unknownType) { var widenedType = getWidenedType(exprType); - if (!(isTypeAssignableTo(targetType, widenedType))) { + // Permit 'number[] | "foo"' to be asserted to 'string'. + var bothAreStringLike = someConstituentTypeHasKind(targetType, 258 /* StringLike */) && + someConstituentTypeHasKind(widenedType, 258 /* StringLike */); + if (!bothAreStringLike && !(isTypeAssignableTo(targetType, widenedType))) { checkTypeAssignableTo(exprType, targetType, node, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); } } @@ -22801,19 +23091,26 @@ var ts; for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) { var p = properties_3[_i]; if (p.kind === 245 /* PropertyAssignment */ || p.kind === 246 /* ShorthandPropertyAssignment */) { - // TODO(andersh): Computed property support var name_13 = p.name; + if (name_13.kind === 136 /* ComputedPropertyName */) { + checkComputedPropertyName(name_13); + } + if (isComputedNonLiteralName(name_13)) { + continue; + } + var text = getTextOfPropertyName(name_13); var type = isTypeAny(sourceType) ? sourceType - : getTypeOfPropertyOfType(sourceType, name_13.text) || - isNumericLiteralName(name_13.text) && getIndexTypeOfType(sourceType, 1 /* Number */) || + : getTypeOfPropertyOfType(sourceType, text) || + isNumericLiteralName(text) && getIndexTypeOfType(sourceType, 1 /* Number */) || getIndexTypeOfType(sourceType, 0 /* String */); if (type) { if (p.kind === 246 /* ShorthandPropertyAssignment */) { checkDestructuringAssignment(p, type); } else { - checkDestructuringAssignment(p.initializer || name_13, type); + // non-shorthand property assignments should always have initializers + checkDestructuringAssignment(p.initializer, type); } } else { @@ -23014,6 +23311,10 @@ var ts; case 31 /* ExclamationEqualsToken */: case 32 /* EqualsEqualsEqualsToken */: case 33 /* ExclamationEqualsEqualsToken */: + // Permit 'number[] | "foo"' to be asserted to 'string'. + if (someConstituentTypeHasKind(leftType, 258 /* StringLike */) && someConstituentTypeHasKind(rightType, 258 /* StringLike */)) { + return booleanType; + } if (!isTypeAssignableTo(leftType, rightType) && !isTypeAssignableTo(rightType, leftType)) { reportOperatorError(); } @@ -23137,6 +23438,13 @@ var ts; var type2 = checkExpression(node.whenFalse, contextualMapper); return getUnionType([type1, type2]); } + function checkStringLiteralExpression(node) { + var contextualType = getContextualType(node); + if (contextualType && contextualTypeIsStringLiteralType(contextualType)) { + return getStringLiteralType(node); + } + return stringType; + } function checkTemplateExpression(node) { // We just want to check each expressions, but we are unconcerned with // the type of each expression, as any value may be coerced into a string. @@ -23187,7 +23495,7 @@ var ts; if (isInferentialContext(contextualMapper)) { var signature = getSingleCallSignature(type); if (signature && signature.typeParameters) { - var contextualType = getContextualType(node); + var contextualType = getApparentTypeOfContextualType(node); if (contextualType) { var contextualSignature = getSingleCallSignature(contextualType); if (contextualSignature && !contextualSignature.typeParameters) { @@ -23251,6 +23559,7 @@ var ts; case 183 /* TemplateExpression */: return checkTemplateExpression(node); case 9 /* StringLiteral */: + return checkStringLiteralExpression(node); case 11 /* NoSubstitutionTemplateLiteral */: return stringType; case 10 /* RegularExpressionLiteral */: @@ -24580,7 +24889,7 @@ var ts; } // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent var parent = getDeclarationContainer(node); - if (parent.kind === 248 /* SourceFile */ && ts.isExternalModule(parent)) { + if (parent.kind === 248 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) { // If the declaration happens to be in external module, report error that require and exports are reserved keywords error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } @@ -24598,15 +24907,15 @@ var ts; // A non-initialized declaration is a no-op as the block declaration will resolve before the var // declaration. the problem is if the declaration has an initializer. this will act as a write to the // block declared value. this is fine for let, but not const. - // Only consider declarations with initializers, uninitialized let declarations will not + // Only consider declarations with initializers, uninitialized const declarations will not // step on a let/const variable. - // Do not consider let and const declarations, as duplicate block-scoped declarations + // Do not consider const and const declarations, as duplicate block-scoped declarations // are handled by the binder. - // We are only looking for let declarations that step on let\const declarations from a + // We are only looking for const declarations that step on let\const declarations from a // different scope. e.g.: // { // const x = 0; // localDeclarationSymbol obtained after name resolution will correspond to this declaration - // let x = 0; // symbol for this declaration will be 'symbol' + // const x = 0; // symbol for this declaration will be 'symbol' // } // skip block-scoped variables and parameters if ((ts.getCombinedNodeFlags(node) & 24576 /* BlockScoped */) !== 0 || ts.isParameterDeclaration(node)) { @@ -24693,6 +25002,12 @@ var ts; checkExpressionCached(node.initializer); } } + if (node.kind === 163 /* BindingElement */) { + // check computed properties inside property names of binding elements + if (node.propertyName && node.propertyName.kind === 136 /* ComputedPropertyName */) { + checkComputedPropertyName(node.propertyName); + } + } // For a binding pattern, check contained binding elements if (ts.isBindingPattern(node.name)) { ts.forEach(node.name.elements, checkSourceElement); @@ -25176,6 +25491,7 @@ var ts; var firstDefaultClause; var hasDuplicateDefaultClause = false; var expressionType = checkExpression(node.expression); + var expressionTypeIsStringLike = someConstituentTypeHasKind(expressionType, 258 /* StringLike */); ts.forEach(node.caseBlock.clauses, function (clause) { // Grammar check for duplicate default clauses, skip if we already report duplicate default clause if (clause.kind === 242 /* DefaultClause */ && !hasDuplicateDefaultClause) { @@ -25195,6 +25511,10 @@ var ts; // TypeScript 1.0 spec (April 2014):5.9 // In a 'switch' statement, each 'case' expression must be of a type that is assignable to or from the type of the 'switch' expression. var caseType = checkExpression(caseClause.expression); + // Permit 'number[] | "foo"' to be asserted to 'string'. + if (expressionTypeIsStringLike && someConstituentTypeHasKind(caseType, 258 /* StringLike */)) { + return; + } if (!isTypeAssignableTo(expressionType, caseType)) { // check 'expressionType isAssignableTo caseType' failed, try the reversed check and report errors if it fails checkTypeAssignableTo(caseType, expressionType, caseClause.expression, /*headMessage*/ undefined); @@ -25659,11 +25979,14 @@ var ts; var enumIsConst = ts.isConst(node); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.name.kind === 136 /* ComputedPropertyName */) { + if (isComputedNonLiteralName(member.name)) { error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums); } - else if (isNumericLiteralName(member.name.text)) { - error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name); + else { + var text = getTextOfPropertyName(member.name); + if (isNumericLiteralName(text)) { + error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name); + } } var previousEnumMemberIsNonConstant = autoValue === undefined; var initializer = member.initializer; @@ -26305,8 +26628,8 @@ var ts; } // Function and class expression bodies are checked after all statements in the enclosing body. This is // to ensure constructs like the following are permitted: - // let foo = function () { - // let s = foo(); + // const foo = function () { + // const s = foo(); // return "hello"; // } // Here, performing a full type check of the body of the function expression whilst in the process of @@ -26421,8 +26744,12 @@ var ts; if (!(links.flags & 1 /* TypeChecked */)) { // Check whether the file has declared it is the default lib, // and whether the user has specifically chosen to avoid checking it. - if (node.isDefaultLib && compilerOptions.skipDefaultLibCheck) { - return; + if (compilerOptions.skipDefaultLibCheck) { + // If the user specified '--noLib' and a file has a '/// ', + // then we should treat that file as a default lib. + if (node.hasNoDefaultLib) { + return; + } } // Grammar checking checkGrammarSourceFile(node); @@ -26432,7 +26759,7 @@ var ts; potentialThisCollisions.length = 0; ts.forEach(node.statements, checkSourceElement); checkFunctionAndClassExpressionBodies(node); - if (ts.isExternalModule(node)) { + if (ts.isExternalOrCommonJsModule(node)) { checkExternalModuleExports(node); } if (potentialThisCollisions.length) { @@ -26515,7 +26842,7 @@ var ts; } switch (location.kind) { case 248 /* SourceFile */: - if (!ts.isExternalModule(location)) { + if (!ts.isExternalOrCommonJsModule(location)) { break; } case 218 /* ModuleDeclaration */: @@ -27153,9 +27480,18 @@ var ts; getReferencedValueDeclaration: getReferencedValueDeclaration, getTypeReferenceSerializationKind: getTypeReferenceSerializationKind, isOptionalParameter: isOptionalParameter, - isArgumentsLocalBinding: isArgumentsLocalBinding + isArgumentsLocalBinding: isArgumentsLocalBinding, + getExternalModuleFileFromDeclaration: getExternalModuleFileFromDeclaration }; } + function getExternalModuleFileFromDeclaration(declaration) { + var specifier = ts.getExternalModuleName(declaration); + var moduleSymbol = getSymbolAtLocation(specifier); + if (!moduleSymbol) { + return undefined; + } + return ts.getDeclarationOfKind(moduleSymbol, 248 /* SourceFile */); + } function initializeTypeChecker() { // Bind all source files and propagate errors ts.forEach(host.getSourceFiles(), function (file) { @@ -27163,11 +27499,10 @@ var ts; }); // Initialize global symbol table ts.forEach(host.getSourceFiles(), function (file) { - if (!ts.isExternalModule(file)) { + if (!ts.isExternalOrCommonJsModule(file)) { mergeSymbolTable(globals, file.locals); } }); - // Initialize special symbols getSymbolLinks(undefinedSymbol).type = undefinedType; getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments"); getSymbolLinks(unknownSymbol).type = unknownType; @@ -27866,7 +28201,7 @@ var ts; } } function checkGrammarForNonSymbolComputedProperty(node, message) { - if (node.kind === 136 /* ComputedPropertyName */ && !ts.isWellKnownSymbolSyntactically(node.expression)) { + if (ts.isDynamicName(node)) { return grammarErrorOnNode(node, message); } } @@ -28225,11 +28560,15 @@ var ts; var writeTextOfNode; var writer = createAndSetNewTextWriterWithSymbolWriter(); var enclosingDeclaration; - var currentSourceFile; + var currentText; + var currentLineMap; + var currentIdentifiers; + var isCurrentFileExternalModule; var reportedDeclarationError = false; var errorNameNode; var emitJsDocComments = compilerOptions.removeComments ? function (declaration) { } : writeJsDocComments; var emit = compilerOptions.stripInternal ? stripInternal : emitNode; + var noDeclare = !root; var moduleElementDeclarationEmitInfo = []; var asynchronousSubModuleDeclarationEmitInfo; // Contains the reference paths that needs to go in the declaration file. @@ -28272,23 +28611,56 @@ var ts; else { // Emit references corresponding to this file var emittedReferencedFiles = []; + var prevModuleElementDeclarationEmitInfo = []; ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (!ts.isExternalModuleOrDeclarationFile(sourceFile)) { + if (!ts.isDeclarationFile(sourceFile)) { // Check what references need to be added if (!compilerOptions.noResolve) { ts.forEach(sourceFile.referencedFiles, function (fileReference) { var referencedFile = ts.tryResolveScriptReference(host, sourceFile, fileReference); - // If the reference file is a declaration file or an external module, emit that reference - if (referencedFile && (ts.isExternalModuleOrDeclarationFile(referencedFile) && + // If the reference file is a declaration file, emit that reference + if (referencedFile && (ts.isDeclarationFile(referencedFile) && !ts.contains(emittedReferencedFiles, referencedFile))) { writeReferencePath(referencedFile); emittedReferencedFiles.push(referencedFile); } }); } + } + if (!ts.isExternalModuleOrDeclarationFile(sourceFile)) { + noDeclare = false; + emitSourceFile(sourceFile); + } + else if (ts.isExternalModule(sourceFile)) { + noDeclare = true; + write("declare module \"" + ts.getResolvedExternalModuleName(host, sourceFile) + "\" {"); + writeLine(); + increaseIndent(); emitSourceFile(sourceFile); + decreaseIndent(); + write("}"); + writeLine(); + // create asynchronous output for the importDeclarations + if (moduleElementDeclarationEmitInfo.length) { + var oldWriter = writer; + ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { + if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { + ts.Debug.assert(aliasEmitInfo.node.kind === 222 /* ImportDeclaration */); + createAndSetNewTextWriterWithSymbolWriter(); + ts.Debug.assert(aliasEmitInfo.indent === 1); + increaseIndent(); + writeImportDeclaration(aliasEmitInfo.node); + aliasEmitInfo.asynchronousOutput = writer.getText(); + decreaseIndent(); + } + }); + setWriter(oldWriter); + } + prevModuleElementDeclarationEmitInfo = prevModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); + moduleElementDeclarationEmitInfo = []; } }); + moduleElementDeclarationEmitInfo = moduleElementDeclarationEmitInfo.concat(prevModuleElementDeclarationEmitInfo); } return { reportedDeclarationError: reportedDeclarationError, @@ -28297,13 +28669,12 @@ var ts; referencePathsOutput: referencePathsOutput }; function hasInternalAnnotation(range) { - var text = currentSourceFile.text; - var comment = text.substring(range.pos, range.end); + var comment = currentText.substring(range.pos, range.end); return comment.indexOf("@internal") >= 0; } function stripInternal(node) { if (node) { - var leadingCommentRanges = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos); + var leadingCommentRanges = ts.getLeadingCommentRanges(currentText, node.pos); if (ts.forEach(leadingCommentRanges, hasInternalAnnotation)) { return; } @@ -28395,7 +28766,7 @@ var ts; var errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccesibilityResult); if (errorInfo) { if (errorInfo.typeName) { - diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); + diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getTextOfNodeFromSourceText(currentText, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); } else { diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); @@ -28461,10 +28832,10 @@ var ts; } function writeJsDocComments(declaration) { if (declaration) { - var jsDocComments = ts.getJsDocComments(declaration, currentSourceFile); - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, declaration, jsDocComments); + var jsDocComments = ts.getJsDocCommentsFromText(declaration, currentText); + ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, declaration, jsDocComments); // jsDoc comments are emitted at /*leading comment1 */space/*leading comment*/space - ts.emitComments(currentSourceFile, writer, jsDocComments, /*trailingSeparator*/ true, newLine, ts.writeCommentRange); + ts.emitComments(currentText, currentLineMap, writer, jsDocComments, /*trailingSeparator*/ true, newLine, ts.writeCommentRange); } } function emitTypeWithNewGetSymbolAccessibilityDiagnostic(type, getSymbolAccessibilityDiagnostic) { @@ -28481,7 +28852,7 @@ var ts; case 103 /* VoidKeyword */: case 97 /* ThisKeyword */: case 9 /* StringLiteral */: - return writeTextOfNode(currentSourceFile, type); + return writeTextOfNode(currentText, type); case 188 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(type); case 151 /* TypeReference */: @@ -28512,14 +28883,14 @@ var ts; } function writeEntityName(entityName) { if (entityName.kind === 69 /* Identifier */) { - writeTextOfNode(currentSourceFile, entityName); + writeTextOfNode(currentText, entityName); } else { var left = entityName.kind === 135 /* QualifiedName */ ? entityName.left : entityName.expression; var right = entityName.kind === 135 /* QualifiedName */ ? entityName.right : entityName.name; writeEntityName(left); write("."); - writeTextOfNode(currentSourceFile, right); + writeTextOfNode(currentText, right); } } function emitEntityName(entityName) { @@ -28549,7 +28920,7 @@ var ts; } } function emitTypePredicate(type) { - writeTextOfNode(currentSourceFile, type.parameterName); + writeTextOfNode(currentText, type.parameterName); write(" is "); emitType(type.type); } @@ -28590,9 +28961,12 @@ var ts; } } function emitSourceFile(node) { - currentSourceFile = node; + currentText = node.text; + currentLineMap = ts.getLineStarts(node); + currentIdentifiers = node.identifiers; + isCurrentFileExternalModule = ts.isExternalModule(node); enclosingDeclaration = node; - ts.emitDetachedComments(currentSourceFile, writer, ts.writeCommentRange, node, newLine, true /* remove comments */); + ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, true /* remove comments */); emitLines(node.statements); } // Return a temp variable name to be used in `export default` statements. @@ -28601,13 +28975,13 @@ var ts; // do not need to keep track of created temp names. function getExportDefaultTempVariableName() { var baseName = "_default"; - if (!ts.hasProperty(currentSourceFile.identifiers, baseName)) { + if (!ts.hasProperty(currentIdentifiers, baseName)) { return baseName; } var count = 0; while (true) { var name_18 = baseName + "_" + (++count); - if (!ts.hasProperty(currentSourceFile.identifiers, name_18)) { + if (!ts.hasProperty(currentIdentifiers, name_18)) { return name_18; } } @@ -28615,7 +28989,7 @@ var ts; function emitExportAssignment(node) { if (node.expression.kind === 69 /* Identifier */) { write(node.isExportEquals ? "export = " : "export default "); - writeTextOfNode(currentSourceFile, node.expression); + writeTextOfNode(currentText, node.expression); } else { // Expression @@ -28653,7 +29027,7 @@ var ts; writeModuleElement(node); } else if (node.kind === 221 /* ImportEqualsDeclaration */ || - (node.parent.kind === 248 /* SourceFile */ && ts.isExternalModule(currentSourceFile))) { + (node.parent.kind === 248 /* SourceFile */ && isCurrentFileExternalModule)) { var isVisible; if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 248 /* SourceFile */) { // Import declaration of another module that is visited async so lets put it in right spot @@ -28707,7 +29081,7 @@ var ts; } function emitModuleElementDeclarationFlags(node) { // If the node is parented in the current source file we need to emit export declare or just export - if (node.parent === currentSourceFile) { + if (node.parent.kind === 248 /* SourceFile */) { // If the node is exported if (node.flags & 2 /* Export */) { write("export "); @@ -28715,7 +29089,7 @@ var ts; if (node.flags & 512 /* Default */) { write("default "); } - else if (node.kind !== 215 /* InterfaceDeclaration */) { + else if (node.kind !== 215 /* InterfaceDeclaration */ && !noDeclare) { write("declare "); } } @@ -28742,7 +29116,7 @@ var ts; write("export "); } write("import "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); write(" = "); if (ts.isInternalModuleImportEqualsDeclaration(node)) { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.moduleReference, getImportEntityNameVisibilityError); @@ -28750,7 +29124,7 @@ var ts; } else { write("require("); - writeTextOfNode(currentSourceFile, ts.getExternalModuleImportEqualsDeclarationExpression(node)); + writeTextOfNode(currentText, ts.getExternalModuleImportEqualsDeclarationExpression(node)); write(");"); } writer.writeLine(); @@ -28785,7 +29159,7 @@ var ts; if (node.importClause) { var currentWriterPos = writer.getTextPos(); if (node.importClause.name && resolver.isDeclarationVisible(node.importClause)) { - writeTextOfNode(currentSourceFile, node.importClause.name); + writeTextOfNode(currentText, node.importClause.name); } if (node.importClause.namedBindings && isVisibleNamedBinding(node.importClause.namedBindings)) { if (currentWriterPos !== writer.getTextPos()) { @@ -28794,7 +29168,7 @@ var ts; } if (node.importClause.namedBindings.kind === 224 /* NamespaceImport */) { write("* as "); - writeTextOfNode(currentSourceFile, node.importClause.namedBindings.name); + writeTextOfNode(currentText, node.importClause.namedBindings.name); } else { write("{ "); @@ -28804,16 +29178,28 @@ var ts; } write(" from "); } - writeTextOfNode(currentSourceFile, node.moduleSpecifier); + emitExternalModuleSpecifier(node.moduleSpecifier); write(";"); writer.writeLine(); } + function emitExternalModuleSpecifier(moduleSpecifier) { + if (moduleSpecifier.kind === 9 /* StringLiteral */ && (!root) && (compilerOptions.out || compilerOptions.outFile)) { + var moduleName = ts.getExternalModuleNameFromDeclaration(host, resolver, moduleSpecifier.parent); + if (moduleName) { + write("\""); + write(moduleName); + write("\""); + return; + } + } + writeTextOfNode(currentText, moduleSpecifier); + } function emitImportOrExportSpecifier(node) { if (node.propertyName) { - writeTextOfNode(currentSourceFile, node.propertyName); + writeTextOfNode(currentText, node.propertyName); write(" as "); } - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } function emitExportSpecifier(node) { emitImportOrExportSpecifier(node); @@ -28835,7 +29221,7 @@ var ts; } if (node.moduleSpecifier) { write(" from "); - writeTextOfNode(currentSourceFile, node.moduleSpecifier); + emitExternalModuleSpecifier(node.moduleSpecifier); } write(";"); writer.writeLine(); @@ -28849,11 +29235,11 @@ var ts; else { write("module "); } - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); while (node.body.kind !== 219 /* ModuleBlock */) { node = node.body; write("."); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; @@ -28872,7 +29258,7 @@ var ts; emitJsDocComments(node); emitModuleElementDeclarationFlags(node); write("type "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); emitTypeParameters(node.typeParameters); write(" = "); emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.type, getTypeAliasDeclarationVisibilityError); @@ -28894,7 +29280,7 @@ var ts; write("const "); } write("enum "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); write(" {"); writeLine(); increaseIndent(); @@ -28905,7 +29291,7 @@ var ts; } function emitEnumMemberDeclaration(node) { emitJsDocComments(node); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); var enumMemberValue = resolver.getConstantValue(node); if (enumMemberValue !== undefined) { write(" = "); @@ -28922,7 +29308,7 @@ var ts; increaseIndent(); emitJsDocComments(node); decreaseIndent(); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); // If there is constraint present and this is not a type parameter of the private method emit the constraint if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); @@ -29037,7 +29423,7 @@ var ts; write("abstract "); } write("class "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; emitTypeParameters(node.typeParameters); @@ -29060,7 +29446,7 @@ var ts; emitJsDocComments(node); emitModuleElementDeclarationFlags(node); write("interface "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; emitTypeParameters(node.typeParameters); @@ -29095,7 +29481,7 @@ var ts; // If this node is a computed name, it can only be a symbol, because we've already skipped // it if it's not a well known symbol. In that case, the text of the name will be exactly // what we want, namely the name expression enclosed in brackets. - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); // If optional property emit ? if ((node.kind === 141 /* PropertyDeclaration */ || node.kind === 140 /* PropertySignature */) && ts.hasQuestionToken(node)) { write("?"); @@ -29177,7 +29563,7 @@ var ts; emitBindingPattern(bindingElement.name); } else { - writeTextOfNode(currentSourceFile, bindingElement.name); + writeTextOfNode(currentText, bindingElement.name); writeTypeOfDeclaration(bindingElement, /*type*/ undefined, getBindingElementTypeVisibilityError); } } @@ -29221,7 +29607,7 @@ var ts; emitJsDocComments(accessors.getAccessor); emitJsDocComments(accessors.setAccessor); emitClassMemberDeclarationFlags(node); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); if (!(node.flags & 16 /* Private */)) { accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); @@ -29307,13 +29693,13 @@ var ts; } if (node.kind === 213 /* FunctionDeclaration */) { write("function "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } else if (node.kind === 144 /* Constructor */) { write("constructor"); } else { - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); if (ts.hasQuestionToken(node)) { write("?"); } @@ -29437,7 +29823,7 @@ var ts; emitBindingPattern(node.name); } else { - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } if (resolver.isOptionalParameter(node)) { write("?"); @@ -29552,7 +29938,7 @@ var ts; // Example: // original: function foo({y: [a,b,c]}) {} // emit : declare function foo({y: [a, b, c]}: { y: [any, any, any] }) void; - writeTextOfNode(currentSourceFile, bindingElement.propertyName); + writeTextOfNode(currentText, bindingElement.propertyName); write(": "); } if (bindingElement.name) { @@ -29575,7 +29961,7 @@ var ts; if (bindingElement.dotDotDotToken) { write("..."); } - writeTextOfNode(currentSourceFile, bindingElement.name); + writeTextOfNode(currentText, bindingElement.name); } } } @@ -29667,6 +30053,18 @@ var ts; return ts.isExternalModule(sourceFile) || ts.isDeclarationFile(sourceFile); } ts.isExternalModuleOrDeclarationFile = isExternalModuleOrDeclarationFile; + function getResolvedExternalModuleName(host, file) { + return file.moduleName || ts.getExternalModuleNameFromPath(host, file.fileName); + } + ts.getResolvedExternalModuleName = getResolvedExternalModuleName; + function getExternalModuleNameFromDeclaration(host, resolver, declaration) { + var file = resolver.getExternalModuleFileFromDeclaration(declaration); + if (!file || ts.isDeclarationFile(file)) { + return undefined; + } + return getResolvedExternalModuleName(host, file); + } + ts.getExternalModuleNameFromDeclaration = getExternalModuleNameFromDeclaration; var Jump; (function (Jump) { Jump[Jump["Break"] = 2] = "Break"; @@ -29954,15 +30352,19 @@ var ts; var newLine = host.getNewLine(); var jsxDesugaring = host.getCompilerOptions().jsx !== 1 /* Preserve */; var shouldEmitJsx = function (s) { return (s.languageVariant === 1 /* JSX */ && !jsxDesugaring); }; + var outFile = compilerOptions.outFile || compilerOptions.out; + var emitJavaScript = createFileEmitter(); if (targetSourceFile === undefined) { - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (ts.shouldEmitToOwnFile(sourceFile, compilerOptions)) { - var jsFilePath = ts.getOwnEmitOutputFilePath(sourceFile, host, shouldEmitJsx(sourceFile) ? ".jsx" : ".js"); - emitFile(jsFilePath, sourceFile); - } - }); - if (compilerOptions.outFile || compilerOptions.out) { - emitFile(compilerOptions.outFile || compilerOptions.out); + if (outFile) { + emitFile(outFile); + } + else { + ts.forEach(host.getSourceFiles(), function (sourceFile) { + if (ts.shouldEmitToOwnFile(sourceFile, compilerOptions)) { + var jsFilePath = ts.getOwnEmitOutputFilePath(sourceFile, host, shouldEmitJsx(sourceFile) ? ".jsx" : ".js"); + emitFile(jsFilePath, sourceFile); + } + }); } } else { @@ -29971,8 +30373,8 @@ var ts; var jsFilePath = ts.getOwnEmitOutputFilePath(targetSourceFile, host, shouldEmitJsx(targetSourceFile) ? ".jsx" : ".js"); emitFile(jsFilePath, targetSourceFile); } - else if (!ts.isDeclarationFile(targetSourceFile) && (compilerOptions.outFile || compilerOptions.out)) { - emitFile(compilerOptions.outFile || compilerOptions.out); + else if (!ts.isDeclarationFile(targetSourceFile) && outFile) { + emitFile(outFile); } } // Sort and make the unique list of diagnostics @@ -30024,10 +30426,16 @@ var ts; } } } - function emitJavaScript(jsFilePath, root) { + function createFileEmitter() { var writer = ts.createTextWriter(newLine); var write = writer.write, writeTextOfNode = writer.writeTextOfNode, writeLine = writer.writeLine, increaseIndent = writer.increaseIndent, decreaseIndent = writer.decreaseIndent; var currentSourceFile; + var currentText; + var currentLineMap; + var currentFileIdentifiers; + var renamedDependencies; + var isEs6Module; + var isCurrentFileExternalModule; // name of an exporter function if file is a System external module // System.register([...], function () {...}) // exporting in System modules looks like: @@ -30035,15 +30443,15 @@ var ts; // => // var x;... exporter("x", x = 1) var exportFunctionForFile; - var generatedNameSet = {}; - var nodeToGeneratedName = []; + var generatedNameSet; + var nodeToGeneratedName; var computedPropertyNamesToGeneratedNames; var convertedLoopState; - var extendsEmitted = false; - var decorateEmitted = false; - var paramEmitted = false; - var awaiterEmitted = false; - var tempFlags = 0; + var extendsEmitted; + var decorateEmitted; + var paramEmitted; + var awaiterEmitted; + var tempFlags; var tempVariables; var tempParameters; var externalImports; @@ -30075,6 +30483,8 @@ var ts; var scopeEmitEnd = function () { }; /** Sourcemap data that will get encoded */ var sourceMapData; + /** The root file passed to the emit function (if present) */ + var root; /** If removeComments is true, no leading-comments needed to be emitted **/ var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfPositionWorker; var moduleEmitDelegates = (_a = {}, @@ -30085,31 +30495,77 @@ var ts; _a[1 /* CommonJS */] = emitCommonJSModule, _a ); - if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) { - initializeEmitterWithSourceMaps(); - } - if (root) { - // Do not call emit directly. It does not set the currentSourceFile. - emitSourceFile(root); - } - else { - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (!isExternalModuleOrDeclarationFile(sourceFile)) { - emitSourceFile(sourceFile); + var bundleEmitDelegates = (_b = {}, + _b[5 /* ES6 */] = function () { }, + _b[2 /* AMD */] = emitAMDModule, + _b[4 /* System */] = emitSystemModule, + _b[3 /* UMD */] = function () { }, + _b[1 /* CommonJS */] = function () { }, + _b + ); + return doEmit; + function doEmit(jsFilePath, rootFile) { + // reset the state + writer.reset(); + currentSourceFile = undefined; + currentText = undefined; + currentLineMap = undefined; + exportFunctionForFile = undefined; + generatedNameSet = {}; + nodeToGeneratedName = []; + computedPropertyNamesToGeneratedNames = undefined; + convertedLoopState = undefined; + extendsEmitted = false; + decorateEmitted = false; + paramEmitted = false; + awaiterEmitted = false; + tempFlags = 0; + tempVariables = undefined; + tempParameters = undefined; + externalImports = undefined; + exportSpecifiers = undefined; + exportEquals = undefined; + hasExportStars = undefined; + detachedCommentsInfo = undefined; + sourceMapData = undefined; + isEs6Module = false; + renamedDependencies = undefined; + isCurrentFileExternalModule = false; + root = rootFile; + if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) { + initializeEmitterWithSourceMaps(jsFilePath, root); + } + if (root) { + // Do not call emit directly. It does not set the currentSourceFile. + emitSourceFile(root); + } + else { + if (modulekind) { + ts.forEach(host.getSourceFiles(), emitEmitHelpers); } - }); + ts.forEach(host.getSourceFiles(), function (sourceFile) { + if ((!isExternalModuleOrDeclarationFile(sourceFile)) || (modulekind && ts.isExternalModule(sourceFile))) { + emitSourceFile(sourceFile); + } + }); + } + writeLine(); + writeEmittedFiles(writer.getText(), jsFilePath, /*writeByteOrderMark*/ compilerOptions.emitBOM); } - writeLine(); - writeEmittedFiles(writer.getText(), /*writeByteOrderMark*/ compilerOptions.emitBOM); - return; function emitSourceFile(sourceFile) { currentSourceFile = sourceFile; + currentText = sourceFile.text; + currentLineMap = ts.getLineStarts(sourceFile); exportFunctionForFile = undefined; + isEs6Module = sourceFile.symbol && sourceFile.symbol.exports && !!sourceFile.symbol.exports["___esModule"]; + renamedDependencies = sourceFile.renamedDependencies; + currentFileIdentifiers = sourceFile.identifiers; + isCurrentFileExternalModule = ts.isExternalModule(sourceFile); emit(sourceFile); } function isUniqueName(name) { return !resolver.hasGlobalName(name) && - !ts.hasProperty(currentSourceFile.identifiers, name) && + !ts.hasProperty(currentFileIdentifiers, name) && !ts.hasProperty(generatedNameSet, name); } // Return the next available name in the pattern _a ... _z, _0, _1, ... @@ -30192,7 +30648,7 @@ var ts; var id = ts.getNodeId(node); return nodeToGeneratedName[id] || (nodeToGeneratedName[id] = ts.unescapeIdentifier(generateNameForNode(node))); } - function initializeEmitterWithSourceMaps() { + function initializeEmitterWithSourceMaps(jsFilePath, root) { var sourceMapDir; // The directory in which sourcemap will be // Current source map file and its index in the sources list var sourceMapSourceIndex = -1; @@ -30280,7 +30736,7 @@ var ts; } } function recordSourceMapSpan(pos) { - var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos); + var sourceLinePos = ts.computeLineAndCharacterOfPosition(currentLineMap, pos); // Convert the location to be one-based. sourceLinePos.line++; sourceLinePos.character++; @@ -30314,13 +30770,13 @@ var ts; } function recordEmitNodeStartSpan(node) { // Get the token pos after skipping to the token (ignoring the leading trivia) - recordSourceMapSpan(ts.skipTrivia(currentSourceFile.text, node.pos)); + recordSourceMapSpan(ts.skipTrivia(currentText, node.pos)); } function recordEmitNodeEndSpan(node) { recordSourceMapSpan(node.end); } function writeTextWithSpanRecord(tokenKind, startPos, emitFn) { - var tokenStartPos = ts.skipTrivia(currentSourceFile.text, startPos); + var tokenStartPos = ts.skipTrivia(currentText, startPos); recordSourceMapSpan(tokenStartPos); var tokenEndPos = emitTokenText(tokenKind, tokenStartPos, emitFn); recordSourceMapSpan(tokenEndPos); @@ -30402,9 +30858,9 @@ var ts; sourceMapNameIndices.pop(); } ; - function writeCommentRangeWithMap(curentSourceFile, writer, comment, newLine) { + function writeCommentRangeWithMap(currentText, currentLineMap, writer, comment, newLine) { recordSourceMapSpan(comment.pos); - ts.writeCommentRange(currentSourceFile, writer, comment, newLine); + ts.writeCommentRange(currentText, currentLineMap, writer, comment, newLine); recordSourceMapSpan(comment.end); } function serializeSourceMapContents(version, file, sourceRoot, sources, names, mappings, sourcesContent) { @@ -30434,7 +30890,7 @@ var ts; return output; } } - function writeJavaScriptAndSourceMapFile(emitOutput, writeByteOrderMark) { + function writeJavaScriptAndSourceMapFile(emitOutput, jsFilePath, writeByteOrderMark) { encodeLastRecordedSourceMapSpan(); var sourceMapText = serializeSourceMapContents(3, sourceMapData.sourceMapFile, sourceMapData.sourceMapSourceRoot, sourceMapData.sourceMapSources, sourceMapData.sourceMapNames, sourceMapData.sourceMapMappings, sourceMapData.sourceMapSourcesContent); sourceMapDataList.push(sourceMapData); @@ -30450,7 +30906,7 @@ var ts; sourceMapUrl = "//# sourceMappingURL=" + sourceMapData.jsSourceMappingURL; } // Write sourcemap url to the js file and write the js file - writeJavaScriptFile(emitOutput + sourceMapUrl, writeByteOrderMark); + writeJavaScriptFile(emitOutput + sourceMapUrl, jsFilePath, writeByteOrderMark); } // Initialize source map data var sourceMapJsFile = ts.getBaseFileName(ts.normalizeSlashes(jsFilePath)); @@ -30522,7 +30978,7 @@ var ts; scopeEmitEnd = recordScopeNameEnd; writeComment = writeCommentRangeWithMap; } - function writeJavaScriptFile(emitOutput, writeByteOrderMark) { + function writeJavaScriptFile(emitOutput, jsFilePath, writeByteOrderMark) { ts.writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark); } // Create a temporary variable with a unique unused name. @@ -30702,7 +31158,7 @@ var ts; // If we don't need to downlevel and we can reach the original source text using // the node's parent reference, then simply get the text as it was originally written. if (node.parent) { - return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + return ts.getTextOfNodeFromSourceText(currentText, node); } // If we can't reach the original source text, use the canonical form if it's a number, // or an escaped quoted form of the original text if it's string-like. @@ -30729,7 +31185,7 @@ var ts; // Find original source text, since we need to emit the raw strings of the tagged template. // The raw strings contain the (escaped) strings of what the user wrote. // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". - var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + var text = ts.getTextOfNodeFromSourceText(currentText, node); // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), // thus we need to remove those characters. // First template piece starts with "`", others with "}" @@ -31146,7 +31602,7 @@ var ts; write(node.text); } else { - writeTextOfNode(currentSourceFile, node); + writeTextOfNode(currentText, node); } write("\""); } @@ -31246,7 +31702,7 @@ var ts; // Identifier references named import write(getGeneratedNameForNode(declaration.parent.parent.parent)); var name_23 = declaration.propertyName || declaration.name; - var identifier = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, name_23); + var identifier = ts.getTextOfNodeFromSourceText(currentText, name_23); if (languageVersion === 0 /* ES3 */ && identifier === "default") { write("[\"default\"]"); } @@ -31270,7 +31726,7 @@ var ts; write(node.text); } else { - writeTextOfNode(currentSourceFile, node); + writeTextOfNode(currentText, node); } } function isNameOfNestedRedeclaration(node) { @@ -31308,7 +31764,7 @@ var ts; write(node.text); } else { - writeTextOfNode(currentSourceFile, node); + writeTextOfNode(currentText, node); } } function emitThis(node) { @@ -31712,7 +32168,7 @@ var ts; function emitShorthandPropertyAssignment(node) { // The name property of a short-hand property assignment is considered an expression position, so here // we manually emit the identifier to avoid rewriting. - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); // If emitting pre-ES6 code, or if the name requires rewriting when resolved as an expression identifier, // we emit a normal property assignment. For example: // module m { @@ -31722,7 +32178,7 @@ var ts; // let obj = { y }; // } // Here we need to emit obj = { y : m.y } regardless of the output target. - if (languageVersion < 2 /* ES6 */ || isNamespaceExportReference(node.name)) { + if (modulekind !== 5 /* ES6 */ || isNamespaceExportReference(node.name)) { // Emit identifier as an identifier write(": "); emit(node.name); @@ -31779,11 +32235,11 @@ var ts; var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); // 1 .toString is a valid property access, emit a space after the literal // Also emit a space if expression is a integer const enum value - it will appear in generated code as numeric literal - var shouldEmitSpace; + var shouldEmitSpace = false; if (!indentedBeforeDot) { if (node.expression.kind === 8 /* NumericLiteral */) { // check if numeric literal was originally written with a dot - var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node.expression); + var text = ts.getTextOfNodeFromSourceText(currentText, node.expression); shouldEmitSpace = text.indexOf(ts.tokenToString(21 /* DotToken */)) < 0; } else { @@ -32962,16 +33418,16 @@ var ts; emitToken(16 /* CloseBraceToken */, node.clauses.end); } function nodeStartPositionsAreOnSameLine(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node1.pos)) === - ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); + return ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node1.pos)) === + ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function nodeEndPositionsAreOnSameLine(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, node1.end) === - ts.getLineOfLocalPosition(currentSourceFile, node2.end); + return ts.getLineOfLocalPositionFromLineMap(currentLineMap, node1.end) === + ts.getLineOfLocalPositionFromLineMap(currentLineMap, node2.end); } function nodeEndIsOnSameLineAsNodeStart(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, node1.end) === - ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); + return ts.getLineOfLocalPositionFromLineMap(currentLineMap, node1.end) === + ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function emitCaseOrDefaultClause(node) { if (node.kind === 241 /* CaseClause */) { @@ -33077,7 +33533,7 @@ var ts; ts.Debug.assert(!!(node.flags & 512 /* Default */) || node.kind === 227 /* ExportAssignment */); // only allow export default at a source file level if (modulekind === 1 /* CommonJS */ || modulekind === 2 /* AMD */ || modulekind === 3 /* UMD */) { - if (!currentSourceFile.symbol.exports["___esModule"]) { + if (!isEs6Module) { if (languageVersion === 1 /* ES5 */) { // default value of configurable, enumerable, writable are `false`. write("Object.defineProperty(exports, \"__esModule\", { value: true });"); @@ -33272,14 +33728,20 @@ var ts; return node; } function createPropertyAccessForDestructuringProperty(object, propName) { - // We create a synthetic copy of the identifier in order to avoid the rewriting that might - // otherwise occur when the identifier is emitted. - var syntheticName = ts.createSynthesizedNode(propName.kind); - syntheticName.text = propName.text; - if (syntheticName.kind !== 69 /* Identifier */) { - return createElementAccessExpression(object, syntheticName); + var index; + var nameIsComputed = propName.kind === 136 /* ComputedPropertyName */; + if (nameIsComputed) { + index = ensureIdentifier(propName.expression, /* reuseIdentifierExpression */ false); + } + else { + // We create a synthetic copy of the identifier in order to avoid the rewriting that might + // otherwise occur when the identifier is emitted. + index = ts.createSynthesizedNode(propName.kind); + index.text = propName.text; } - return createPropertyAccessExpression(object, syntheticName); + return !nameIsComputed && index.kind === 69 /* Identifier */ + ? createPropertyAccessExpression(object, index) + : createElementAccessExpression(object, index); } function createSliceCall(value, sliceIndex) { var call = ts.createSynthesizedNode(168 /* CallExpression */); @@ -33742,7 +34204,6 @@ var ts; var promiseConstructor = ts.getEntityNameFromTypeNode(node.type); var isArrowFunction = node.kind === 174 /* ArrowFunction */; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 4096 /* CaptureArguments */) !== 0; - var args; // An async function is emit as an outer function that calls an inner // generator function. To preserve lexical bindings, we pass the current // `this` and `arguments` objects to `__awaiter`. The generator function @@ -35197,8 +35658,8 @@ var ts; * Here we check if alternative name was provided for a given moduleName and return it if possible. */ function tryRenameExternalModule(moduleName) { - if (currentSourceFile.renamedDependencies && ts.hasProperty(currentSourceFile.renamedDependencies, moduleName.text)) { - return "\"" + currentSourceFile.renamedDependencies[moduleName.text] + "\""; + if (renamedDependencies && ts.hasProperty(renamedDependencies, moduleName.text)) { + return "\"" + renamedDependencies[moduleName.text] + "\""; } return undefined; } @@ -35351,7 +35812,7 @@ var ts; // - current file is not external module // - import declaration is top level and target is value imported by entity name if (resolver.isReferencedAliasDeclaration(node) || - (!ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { + (!isCurrentFileExternalModule && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { emitLeadingComments(node); emitStart(node); // variable declaration for import-equals declaration can be hoisted in system modules @@ -35579,7 +36040,7 @@ var ts; function getLocalNameForExternalImport(node) { var namespaceDeclaration = getNamespaceDeclarationNode(node); if (namespaceDeclaration && !isDefaultImport(node)) { - return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, namespaceDeclaration.name); + return ts.getTextOfNodeFromSourceText(currentText, namespaceDeclaration.name); } if (node.kind === 222 /* ImportDeclaration */ && node.importClause) { return getGeneratedNameForNode(node); @@ -35884,7 +36345,7 @@ var ts; ts.getEnclosingBlockScopeContainer(node).kind === 248 /* SourceFile */; } function isCurrentFileSystemExternalModule() { - return modulekind === 4 /* System */ && ts.isExternalModule(currentSourceFile); + return modulekind === 4 /* System */ && isCurrentFileExternalModule; } function emitSystemModuleBody(node, dependencyGroups, startIndex) { // shape of the body in system modules: @@ -36054,7 +36515,13 @@ var ts; writeLine(); write("}"); // execute } - function emitSystemModule(node) { + function writeModuleName(node, emitRelativePathAsModuleName) { + var moduleName = node.moduleName; + if (moduleName || (emitRelativePathAsModuleName && (moduleName = getResolvedExternalModuleName(host, node)))) { + write("\"" + moduleName + "\", "); + } + } + function emitSystemModule(node, emitRelativePathAsModuleName) { collectExternalModuleInfo(node); // System modules has the following shape // System.register(['dep-1', ... 'dep-n'], function(exports) {/* module body function */}) @@ -36069,9 +36536,7 @@ var ts; exportFunctionForFile = makeUniqueName("exports"); writeLine(); write("System.register("); - if (node.moduleName) { - write("\"" + node.moduleName + "\", "); - } + writeModuleName(node, emitRelativePathAsModuleName); write("["); var groupIndices = {}; var dependencyGroups = []; @@ -36090,6 +36555,12 @@ var ts; if (i !== 0) { write(", "); } + if (emitRelativePathAsModuleName) { + var name_29 = getExternalModuleNameFromDeclaration(host, resolver, externalImports[i]); + if (name_29) { + text = "\"" + name_29 + "\""; + } + } write(text); } write("], function(" + exportFunctionForFile + ") {"); @@ -36103,7 +36574,7 @@ var ts; writeLine(); write("});"); } - function getAMDDependencyNames(node, includeNonAmdDependencies) { + function getAMDDependencyNames(node, includeNonAmdDependencies, emitRelativePathAsModuleName) { // names of modules with corresponding parameter in the factory function var aliasedModuleNames = []; // names of modules with no corresponding parameters in factory function @@ -36126,6 +36597,12 @@ var ts; var importNode = externalImports_4[_c]; // Find the name of the external module var externalModuleName = getExternalModuleNameText(importNode); + if (emitRelativePathAsModuleName) { + var name_30 = getExternalModuleNameFromDeclaration(host, resolver, importNode); + if (name_30) { + externalModuleName = "\"" + name_30 + "\""; + } + } // Find the name of the module alias, if there is one var importAliasName = getLocalNameForExternalImport(importNode); if (includeNonAmdDependencies && importAliasName) { @@ -36138,7 +36615,7 @@ var ts; } return { aliasedModuleNames: aliasedModuleNames, unaliasedModuleNames: unaliasedModuleNames, importAliasNames: importAliasNames }; } - function emitAMDDependencies(node, includeNonAmdDependencies) { + function emitAMDDependencies(node, includeNonAmdDependencies, emitRelativePathAsModuleName) { // An AMD define function has the following shape: // define(id?, dependencies?, factory); // @@ -36150,7 +36627,7 @@ var ts; // To ensure this is true in cases of modules with no aliases, e.g.: // `import "module"` or `` // we need to add modules without alias names to the end of the dependencies list - var dependencyNames = getAMDDependencyNames(node, includeNonAmdDependencies); + var dependencyNames = getAMDDependencyNames(node, includeNonAmdDependencies, emitRelativePathAsModuleName); emitAMDDependencyList(dependencyNames); write(", "); emitAMDFactoryHeader(dependencyNames); @@ -36177,15 +36654,13 @@ var ts; } write(") {"); } - function emitAMDModule(node) { + function emitAMDModule(node, emitRelativePathAsModuleName) { emitEmitHelpers(node); collectExternalModuleInfo(node); writeLine(); write("define("); - if (node.moduleName) { - write("\"" + node.moduleName + "\", "); - } - emitAMDDependencies(node, /*includeNonAmdDependencies*/ true); + writeModuleName(node, emitRelativePathAsModuleName); + emitAMDDependencies(node, /*includeNonAmdDependencies*/ true, emitRelativePathAsModuleName); increaseIndent(); var startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true); emitExportStarHelper(); @@ -36404,8 +36879,13 @@ var ts; emitShebang(); emitDetachedCommentsAndUpdateCommentsInfo(node); if (ts.isExternalModule(node) || compilerOptions.isolatedModules) { - var emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[1 /* CommonJS */]; - emitModule(node); + if (root || (!ts.isExternalModule(node) && compilerOptions.isolatedModules)) { + var emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[1 /* CommonJS */]; + emitModule(node); + } + else { + bundleEmitDelegates[modulekind](node, /*emitRelativePathAsModuleName*/ true); + } } else { // emit prologue directives prior to __extends @@ -36666,7 +37146,7 @@ var ts; } function getLeadingCommentsWithoutDetachedComments() { // get the leading comments from detachedPos - var leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, ts.lastOrUndefined(detachedCommentsInfo).detachedCommentEndPos); + var leadingComments = ts.getLeadingCommentRanges(currentText, ts.lastOrUndefined(detachedCommentsInfo).detachedCommentEndPos); if (detachedCommentsInfo.length - 1) { detachedCommentsInfo.pop(); } @@ -36683,10 +37163,10 @@ var ts; function isTripleSlashComment(comment) { // Verify this is /// comment, but do the regexp match only when we first can find /// in the comment text // so that we don't end up computing comment string and doing match for all // comments - if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 47 /* slash */ && + if (currentText.charCodeAt(comment.pos + 1) === 47 /* slash */ && comment.pos + 2 < comment.end && - currentSourceFile.text.charCodeAt(comment.pos + 2) === 47 /* slash */) { - var textSubStr = currentSourceFile.text.substring(comment.pos, comment.end); + currentText.charCodeAt(comment.pos + 2) === 47 /* slash */) { + var textSubStr = currentText.substring(comment.pos, comment.end); return textSubStr.match(ts.fullTripleSlashReferencePathRegEx) || textSubStr.match(ts.fullTripleSlashAMDReferencePathRegEx) ? true : false; @@ -36703,7 +37183,7 @@ var ts; } else { // get the leading comments from the node - return ts.getLeadingCommentRangesOfNode(node, currentSourceFile); + return ts.getLeadingCommentRangesOfNodeFromText(node, currentText); } } } @@ -36712,7 +37192,7 @@ var ts; // Emit the trailing comments only if the parent's pos doesn't match because parent should take care of emitting these comments if (node.parent) { if (node.parent.kind === 248 /* SourceFile */ || node.end !== node.parent.end) { - return ts.getTrailingCommentRanges(currentSourceFile.text, node.end); + return ts.getTrailingCommentRanges(currentText, node.end); } } } @@ -36746,9 +37226,9 @@ var ts; leadingComments = ts.filter(getLeadingCommentsToEmit(node), isTripleSlashComment); } } - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); + ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, node, leadingComments); // Leading comments are emitted at /*leading comment1 */space/*leading comment*/space - ts.emitComments(currentSourceFile, writer, leadingComments, /*trailingSeparator:*/ true, newLine, writeComment); + ts.emitComments(currentText, currentLineMap, writer, leadingComments, /*trailingSeparator:*/ true, newLine, writeComment); } function emitTrailingComments(node) { if (compilerOptions.removeComments) { @@ -36757,7 +37237,7 @@ var ts; // Emit the trailing comments only if the parent's end doesn't match var trailingComments = getTrailingCommentsToEmit(node); // trailing comments are emitted at space/*trailing comment1 */space/*trailing comment*/ - ts.emitComments(currentSourceFile, writer, trailingComments, /*trailingSeparator*/ false, newLine, writeComment); + ts.emitComments(currentText, currentLineMap, writer, trailingComments, /*trailingSeparator*/ false, newLine, writeComment); } /** * Emit trailing comments at the position. The term trailing comment is used here to describe following comment: @@ -36768,9 +37248,9 @@ var ts; if (compilerOptions.removeComments) { return; } - var trailingComments = ts.getTrailingCommentRanges(currentSourceFile.text, pos); + var trailingComments = ts.getTrailingCommentRanges(currentText, pos); // trailing comments are emitted at space/*trailing comment1 */space/*trailing comment*/ - ts.emitComments(currentSourceFile, writer, trailingComments, /*trailingSeparator*/ true, newLine, writeComment); + ts.emitComments(currentText, currentLineMap, writer, trailingComments, /*trailingSeparator*/ true, newLine, writeComment); } function emitLeadingCommentsOfPositionWorker(pos) { if (compilerOptions.removeComments) { @@ -36783,14 +37263,14 @@ var ts; } else { // get the leading comments from the node - leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, pos); + leadingComments = ts.getLeadingCommentRanges(currentText, pos); } - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, { pos: pos, end: pos }, leadingComments); + ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, { pos: pos, end: pos }, leadingComments); // Leading comments are emitted at /*leading comment1 */space/*leading comment*/space - ts.emitComments(currentSourceFile, writer, leadingComments, /*trailingSeparator*/ true, newLine, writeComment); + ts.emitComments(currentText, currentLineMap, writer, leadingComments, /*trailingSeparator*/ true, newLine, writeComment); } function emitDetachedCommentsAndUpdateCommentsInfo(node) { - var currentDetachedCommentInfo = ts.emitDetachedComments(currentSourceFile, writer, writeComment, node, newLine, compilerOptions.removeComments); + var currentDetachedCommentInfo = ts.emitDetachedComments(currentText, currentLineMap, writer, writeComment, node, newLine, compilerOptions.removeComments); if (currentDetachedCommentInfo) { if (detachedCommentsInfo) { detachedCommentsInfo.push(currentDetachedCommentInfo); @@ -36801,12 +37281,12 @@ var ts; } } function emitShebang() { - var shebang = ts.getShebang(currentSourceFile.text); + var shebang = ts.getShebang(currentText); if (shebang) { write(shebang); } } - var _a; + var _a, _b; } function emitFile(jsFilePath, sourceFile) { emitJavaScript(jsFilePath, sourceFile); @@ -36866,11 +37346,11 @@ var ts; if (ts.getRootLength(moduleName) !== 0 || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { var failedLookupLocations = []; var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName)); - var resolvedFileName = loadNodeModuleFromFile(candidate, failedLookupLocations, host); + var resolvedFileName = loadNodeModuleFromFile(ts.supportedJsExtensions, candidate, failedLookupLocations, host); if (resolvedFileName) { return { resolvedModule: { resolvedFileName: resolvedFileName }, failedLookupLocations: failedLookupLocations }; } - resolvedFileName = loadNodeModuleFromDirectory(candidate, failedLookupLocations, host); + resolvedFileName = loadNodeModuleFromDirectory(ts.supportedJsExtensions, candidate, failedLookupLocations, host); return resolvedFileName ? { resolvedModule: { resolvedFileName: resolvedFileName }, failedLookupLocations: failedLookupLocations } : { resolvedModule: undefined, failedLookupLocations: failedLookupLocations }; @@ -36880,8 +37360,8 @@ var ts; } } ts.nodeModuleNameResolver = nodeModuleNameResolver; - function loadNodeModuleFromFile(candidate, failedLookupLocation, host) { - return ts.forEach(ts.moduleFileExtensions, tryLoad); + function loadNodeModuleFromFile(extensions, candidate, failedLookupLocation, host) { + return ts.forEach(extensions, tryLoad); function tryLoad(ext) { var fileName = ts.fileExtensionIs(candidate, ext) ? candidate : candidate + ext; if (host.fileExists(fileName)) { @@ -36893,7 +37373,7 @@ var ts; } } } - function loadNodeModuleFromDirectory(candidate, failedLookupLocation, host) { + function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocation, host) { var packageJsonPath = ts.combinePaths(candidate, "package.json"); if (host.fileExists(packageJsonPath)) { var jsonContent; @@ -36906,7 +37386,7 @@ var ts; jsonContent = { typings: undefined }; } if (jsonContent.typings) { - var result = loadNodeModuleFromFile(ts.normalizePath(ts.combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host); + var result = loadNodeModuleFromFile(extensions, ts.normalizePath(ts.combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host); if (result) { return result; } @@ -36916,7 +37396,7 @@ var ts; // record package json as one of failed lookup locations - in the future if this file will appear it will invalidate resolution results failedLookupLocation.push(packageJsonPath); } - return loadNodeModuleFromFile(ts.combinePaths(candidate, "index"), failedLookupLocation, host); + return loadNodeModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocation, host); } function loadModuleFromNodeModules(moduleName, directory, host) { var failedLookupLocations = []; @@ -36926,11 +37406,11 @@ var ts; if (baseName !== "node_modules") { var nodeModulesFolder = ts.combinePaths(directory, "node_modules"); var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName)); - var result = loadNodeModuleFromFile(candidate, failedLookupLocations, host); + var result = loadNodeModuleFromFile(ts.supportedExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations: failedLookupLocations }; } - result = loadNodeModuleFromDirectory(candidate, failedLookupLocations, host); + result = loadNodeModuleFromDirectory(ts.supportedExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations: failedLookupLocations }; } @@ -36956,9 +37436,10 @@ var ts; var searchName; var failedLookupLocations = []; var referencedSourceFile; + var extensions = compilerOptions.allowNonTsExtensions ? ts.supportedJsExtensions : ts.supportedExtensions; while (true) { searchName = ts.normalizePath(ts.combinePaths(searchPath, moduleName)); - referencedSourceFile = ts.forEach(ts.supportedExtensions, function (extension) { + referencedSourceFile = ts.forEach(extensions, function (extension) { if (extension === ".tsx" && !compilerOptions.jsx) { // resolve .tsx files only if jsx support is enabled // 'logical not' handles both undefined and None cases @@ -36989,10 +37470,8 @@ var ts; /* @internal */ ts.defaultInitCompilerOptions = { module: 1 /* CommonJS */, - target: 0 /* ES3 */, + target: 1 /* ES5 */, noImplicitAny: false, - outDir: "built", - rootDir: ".", sourceMap: false }; function createCompilerHost(options, setParentNodes) { @@ -37397,43 +37876,55 @@ var ts; if (file.imports) { return; } + var isJavaScriptFile = ts.isSourceFileJavaScript(file); var imports; for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var node = _a[_i]; - collect(node, /* allowRelativeModuleNames */ true); + collect(node, /* allowRelativeModuleNames */ true, /* collectOnlyRequireCalls */ false); } file.imports = imports || emptyArray; - function collect(node, allowRelativeModuleNames) { - switch (node.kind) { - case 222 /* ImportDeclaration */: - case 221 /* ImportEqualsDeclaration */: - case 228 /* ExportDeclaration */: - var moduleNameExpr = ts.getExternalModuleName(node); - if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) { - break; - } - if (!moduleNameExpr.text) { + return; + function collect(node, allowRelativeModuleNames, collectOnlyRequireCalls) { + if (!collectOnlyRequireCalls) { + switch (node.kind) { + case 222 /* ImportDeclaration */: + case 221 /* ImportEqualsDeclaration */: + case 228 /* ExportDeclaration */: + var moduleNameExpr = ts.getExternalModuleName(node); + if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) { + break; + } + if (!moduleNameExpr.text) { + break; + } + if (allowRelativeModuleNames || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { + (imports || (imports = [])).push(moduleNameExpr); + } break; - } - if (allowRelativeModuleNames || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { - (imports || (imports = [])).push(moduleNameExpr); - } - break; - case 218 /* ModuleDeclaration */: - if (node.name.kind === 9 /* StringLiteral */ && (node.flags & 4 /* Ambient */ || ts.isDeclarationFile(file))) { - // TypeScript 1.0 spec (April 2014): 12.1.6 - // An AmbientExternalModuleDeclaration declares an external module. - // This type of declaration is permitted only in the global module. - // The StringLiteral must specify a top - level external module name. - // Relative external module names are not permitted - ts.forEachChild(node.body, function (node) { + case 218 /* ModuleDeclaration */: + if (node.name.kind === 9 /* StringLiteral */ && (node.flags & 4 /* Ambient */ || ts.isDeclarationFile(file))) { // TypeScript 1.0 spec (April 2014): 12.1.6 - // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules - // only through top - level external module names. Relative external module names are not permitted. - collect(node, /* allowRelativeModuleNames */ false); - }); - } - break; + // An AmbientExternalModuleDeclaration declares an external module. + // This type of declaration is permitted only in the global module. + // The StringLiteral must specify a top - level external module name. + // Relative external module names are not permitted + ts.forEachChild(node.body, function (node) { + // TypeScript 1.0 spec (April 2014): 12.1.6 + // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules + // only through top - level external module names. Relative external module names are not permitted. + collect(node, /* allowRelativeModuleNames */ false, collectOnlyRequireCalls); + }); + } + break; + } + } + if (isJavaScriptFile) { + if (ts.isRequireCall(node)) { + (imports || (imports = [])).push(node.arguments[0]); + } + else { + ts.forEachChild(node, function (node) { return collect(node, allowRelativeModuleNames, /* collectOnlyRequireCalls */ true); }); + } } } } @@ -37526,7 +38017,6 @@ var ts; // always process imported modules to record module name resolutions processImportedModules(file, basePath); if (isDefaultLib) { - file.isDefaultLib = true; files.unshift(file); } else { @@ -37604,6 +38094,9 @@ var ts; commonPathComponents.length = sourcePathComponents.length; } }); + if (!commonPathComponents) { + return currentDirectory; + } return ts.getNormalizedPathFromPathComponents(commonPathComponents); } function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) { @@ -37689,12 +38182,15 @@ var ts; if (options.module === 5 /* ES6 */ && languageVersion < 2 /* ES6 */) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_compile_modules_into_es2015_when_targeting_ES5_or_lower)); } + // Cannot specify module gen that isn't amd or system with --out + if (outFile && options.module && !(options.module === 2 /* AMD */ || options.module === 4 /* System */)) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, options.out ? "out" : "outFile")); + } // there has to be common source directory if user specified --outdir || --sourceRoot // if user specified --mapRoot, there needs to be common source directory if there would be multiple files being emitted if (options.outDir || options.sourceRoot || - (options.mapRoot && - (!outFile || firstExternalModuleSourceFile !== undefined))) { + options.mapRoot) { if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) { // If a rootDir is specified and is valid use it as the commonSourceDirectory commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, currentDirectory); @@ -38212,20 +38708,20 @@ var ts; var exclude = json["exclude"] instanceof Array ? ts.map(json["exclude"], ts.normalizeSlashes) : undefined; var sysFiles = host.readDirectory(basePath, ".ts", exclude).concat(host.readDirectory(basePath, ".tsx", exclude)); for (var i = 0; i < sysFiles.length; i++) { - var name_29 = sysFiles[i]; - if (ts.fileExtensionIs(name_29, ".d.ts")) { - var baseName = name_29.substr(0, name_29.length - ".d.ts".length); + var name_31 = sysFiles[i]; + if (ts.fileExtensionIs(name_31, ".d.ts")) { + var baseName = name_31.substr(0, name_31.length - ".d.ts".length); if (!ts.contains(sysFiles, baseName + ".tsx") && !ts.contains(sysFiles, baseName + ".ts")) { - fileNames.push(name_29); + fileNames.push(name_31); } } - else if (ts.fileExtensionIs(name_29, ".ts")) { - if (!ts.contains(sysFiles, name_29 + "x")) { - fileNames.push(name_29); + else if (ts.fileExtensionIs(name_31, ".ts")) { + if (!ts.contains(sysFiles, name_31 + "x")) { + fileNames.push(name_31); } } else { - fileNames.push(name_29); + fileNames.push(name_31); } } } @@ -38453,12 +38949,12 @@ var ts; ts.forEach(program.getSourceFiles(), function (sourceFile) { cancellationToken.throwIfCancellationRequested(); var nameToDeclarations = sourceFile.getNamedDeclarations(); - for (var name_30 in nameToDeclarations) { - var declarations = ts.getProperty(nameToDeclarations, name_30); + for (var name_32 in nameToDeclarations) { + var declarations = ts.getProperty(nameToDeclarations, name_32); if (declarations) { // First do a quick check to see if the name of the declaration matches the // last portion of the (possibly) dotted name they're searching for. - var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_30); + var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_32); if (!matches) { continue; } @@ -38471,14 +38967,14 @@ var ts; if (!containers) { return undefined; } - matches = patternMatcher.getMatches(containers, name_30); + matches = patternMatcher.getMatches(containers, name_32); if (!matches) { continue; } } var fileName = sourceFile.fileName; var matchKind = bestMatchKind(matches); - rawItems.push({ name: name_30, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); + rawItems.push({ name: name_32, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); } } } @@ -38859,9 +39355,9 @@ var ts; case 211 /* VariableDeclaration */: case 163 /* BindingElement */: var variableDeclarationNode; - var name_31; + var name_33; if (node.kind === 163 /* BindingElement */) { - name_31 = node.name; + name_33 = node.name; variableDeclarationNode = node; // binding elements are added only for variable declarations // bubble up to the containing variable declaration @@ -38873,16 +39369,16 @@ var ts; else { ts.Debug.assert(!ts.isBindingPattern(node.name)); variableDeclarationNode = node; - name_31 = node.name; + name_33 = node.name; } if (ts.isConst(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_31), ts.ScriptElementKind.constElement); + return createItem(node, getTextOfNode(name_33), ts.ScriptElementKind.constElement); } else if (ts.isLet(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_31), ts.ScriptElementKind.letElement); + return createItem(node, getTextOfNode(name_33), ts.ScriptElementKind.letElement); } else { - return createItem(node, getTextOfNode(name_31), ts.ScriptElementKind.variableElement); + return createItem(node, getTextOfNode(name_33), ts.ScriptElementKind.variableElement); } case 144 /* Constructor */: return createItem(node, "constructor", ts.ScriptElementKind.constructorImplementationElement); @@ -39802,7 +40298,7 @@ var ts; if (!candidates.length) { // We didn't have any sig help items produced by the TS compiler. If this is a JS // file, then see if we can figure out anything better. - if (ts.isJavaScript(sourceFile.fileName)) { + if (ts.isSourceFileJavaScript(sourceFile)) { return createJavaScriptSignatureHelpItems(argumentInfo); } return undefined; @@ -41662,9 +42158,9 @@ var ts; } Rules.prototype.getRuleName = function (rule) { var o = this; - for (var name_32 in o) { - if (o[name_32] === rule) { - return name_32; + for (var name_34 in o) { + if (o[name_34] === rule) { + return name_34; } } throw new Error("Unknown rule"); @@ -42096,7 +42592,7 @@ var ts; function TokenRangeAccess(from, to, except) { this.tokens = []; for (var token = from; token <= to; token++) { - if (except.indexOf(token) < 0) { + if (ts.indexOf(except, token) < 0) { this.tokens.push(token); } } @@ -43709,13 +44205,18 @@ var ts; ]; var jsDocCompletionEntries; function createNode(kind, pos, end, flags, parent) { - var node = new (ts.getNodeConstructor(kind))(pos, end); + var node = new NodeObject(kind, pos, end); node.flags = flags; node.parent = parent; return node; } var NodeObject = (function () { - function NodeObject() { + function NodeObject(kind, pos, end) { + this.kind = kind; + this.pos = pos; + this.end = end; + this.flags = 0 /* None */; + this.parent = undefined; } NodeObject.prototype.getSourceFile = function () { return ts.getSourceFileOfNode(this); @@ -44198,8 +44699,8 @@ var ts; })(); var SourceFileObject = (function (_super) { __extends(SourceFileObject, _super); - function SourceFileObject() { - _super.apply(this, arguments); + function SourceFileObject(kind, pos, end) { + _super.call(this, kind, pos, end); } SourceFileObject.prototype.update = function (newText, textChangeRange) { return ts.updateSourceFile(this, newText, textChangeRange); @@ -44521,6 +45022,9 @@ var ts; ClassificationTypeNames.typeAliasName = "type alias name"; ClassificationTypeNames.parameterName = "parameter name"; ClassificationTypeNames.docCommentTagName = "doc comment tag name"; + ClassificationTypeNames.jsxOpenTagName = "jsx open tag name"; + ClassificationTypeNames.jsxCloseTagName = "jsx close tag name"; + ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name"; return ClassificationTypeNames; })(); ts.ClassificationTypeNames = ClassificationTypeNames; @@ -44543,6 +45047,9 @@ var ts; ClassificationType[ClassificationType["typeAliasName"] = 16] = "typeAliasName"; ClassificationType[ClassificationType["parameterName"] = 17] = "parameterName"; ClassificationType[ClassificationType["docCommentTagName"] = 18] = "docCommentTagName"; + ClassificationType[ClassificationType["jsxOpenTagName"] = 19] = "jsxOpenTagName"; + ClassificationType[ClassificationType["jsxCloseTagName"] = 20] = "jsxCloseTagName"; + ClassificationType[ClassificationType["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName"; })(ts.ClassificationType || (ts.ClassificationType = {})); var ClassificationType = ts.ClassificationType; function displayPartsToString(displayParts) { @@ -44922,8 +45429,9 @@ var ts; }; } ts.createDocumentRegistry = createDocumentRegistry; - function preProcessFile(sourceText, readImportFiles) { + function preProcessFile(sourceText, readImportFiles, detectJavaScriptImports) { if (readImportFiles === void 0) { readImportFiles = true; } + if (detectJavaScriptImports === void 0) { detectJavaScriptImports = false; } var referencedFiles = []; var importedFiles = []; var ambientExternalModules; @@ -44957,116 +45465,66 @@ var ts; end: pos + importPath.length }); } - function processImport() { - scanner.setText(sourceText); - var token = scanner.scan(); - // Look for: - // import "mod"; - // import d from "mod" - // import {a as A } from "mod"; - // import * as NS from "mod" - // import d, {a, b as B} from "mod" - // import i = require("mod"); - // - // export * from "mod" - // export {a as b} from "mod" - // export import i = require("mod") - while (token !== 1 /* EndOfFileToken */) { - if (token === 122 /* DeclareKeyword */) { - // declare module "mod" - token = scanner.scan(); - if (token === 125 /* ModuleKeyword */) { - token = scanner.scan(); - if (token === 9 /* StringLiteral */) { - recordAmbientExternalModule(); - continue; - } - } - } - else if (token === 89 /* ImportKeyword */) { + /** + * Returns true if at least one token was consumed from the stream + */ + function tryConsumeDeclare() { + var token = scanner.getToken(); + if (token === 122 /* DeclareKeyword */) { + // declare module "mod" + token = scanner.scan(); + if (token === 125 /* ModuleKeyword */) { token = scanner.scan(); if (token === 9 /* StringLiteral */) { - // import "mod"; - recordModuleName(); - continue; + recordAmbientExternalModule(); } - else { - if (token === 69 /* Identifier */ || ts.isKeyword(token)) { + } + return true; + } + return false; + } + /** + * Returns true if at least one token was consumed from the stream + */ + function tryConsumeImport() { + var token = scanner.getToken(); + if (token === 89 /* ImportKeyword */) { + token = scanner.scan(); + if (token === 9 /* StringLiteral */) { + // import "mod"; + recordModuleName(); + return true; + } + else { + if (token === 69 /* Identifier */ || ts.isKeyword(token)) { + token = scanner.scan(); + if (token === 133 /* FromKeyword */) { token = scanner.scan(); - if (token === 133 /* FromKeyword */) { - token = scanner.scan(); - if (token === 9 /* StringLiteral */) { - // import d from "mod"; - recordModuleName(); - continue; - } - } - else if (token === 56 /* EqualsToken */) { - token = scanner.scan(); - if (token === 127 /* RequireKeyword */) { - token = scanner.scan(); - if (token === 17 /* OpenParenToken */) { - token = scanner.scan(); - if (token === 9 /* StringLiteral */) { - // import i = require("mod"); - recordModuleName(); - continue; - } - } - } - } - else if (token === 24 /* CommaToken */) { - // consume comma and keep going - token = scanner.scan(); - } - else { - // unknown syntax - continue; + if (token === 9 /* StringLiteral */) { + // import d from "mod"; + recordModuleName(); + return true; } } - if (token === 15 /* OpenBraceToken */) { - token = scanner.scan(); - // consume "{ a as B, c, d as D}" clauses - while (token !== 16 /* CloseBraceToken */) { - token = scanner.scan(); - } - if (token === 16 /* CloseBraceToken */) { - token = scanner.scan(); - if (token === 133 /* FromKeyword */) { - token = scanner.scan(); - if (token === 9 /* StringLiteral */) { - // import {a as A} from "mod"; - // import d, {a, b as B} from "mod" - recordModuleName(); - } - } + else if (token === 56 /* EqualsToken */) { + if (tryConsumeRequireCall(/* skipCurrentToken */ true)) { + return true; } } - else if (token === 37 /* AsteriskToken */) { + else if (token === 24 /* CommaToken */) { + // consume comma and keep going token = scanner.scan(); - if (token === 116 /* AsKeyword */) { - token = scanner.scan(); - if (token === 69 /* Identifier */ || ts.isKeyword(token)) { - token = scanner.scan(); - if (token === 133 /* FromKeyword */) { - token = scanner.scan(); - if (token === 9 /* StringLiteral */) { - // import * as NS from "mod" - // import d, * as NS from "mod" - recordModuleName(); - } - } - } - } + } + else { + // unknown syntax + return true; } } - } - else if (token === 82 /* ExportKeyword */) { - token = scanner.scan(); if (token === 15 /* OpenBraceToken */) { token = scanner.scan(); // consume "{ a as B, c, d as D}" clauses - while (token !== 16 /* CloseBraceToken */) { + // make sure that it stops on EOF + while (token !== 16 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { token = scanner.scan(); } if (token === 16 /* CloseBraceToken */) { @@ -45074,49 +45532,171 @@ var ts; if (token === 133 /* FromKeyword */) { token = scanner.scan(); if (token === 9 /* StringLiteral */) { - // export {a as A} from "mod"; - // export {a, b as B} from "mod" + // import {a as A} from "mod"; + // import d, {a, b as B} from "mod" recordModuleName(); } } } } else if (token === 37 /* AsteriskToken */) { + token = scanner.scan(); + if (token === 116 /* AsKeyword */) { + token = scanner.scan(); + if (token === 69 /* Identifier */ || ts.isKeyword(token)) { + token = scanner.scan(); + if (token === 133 /* FromKeyword */) { + token = scanner.scan(); + if (token === 9 /* StringLiteral */) { + // import * as NS from "mod" + // import d, * as NS from "mod" + recordModuleName(); + } + } + } + } + } + } + return true; + } + return false; + } + function tryConsumeExport() { + var token = scanner.getToken(); + if (token === 82 /* ExportKeyword */) { + token = scanner.scan(); + if (token === 15 /* OpenBraceToken */) { + token = scanner.scan(); + // consume "{ a as B, c, d as D}" clauses + // make sure it stops on EOF + while (token !== 16 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { + token = scanner.scan(); + } + if (token === 16 /* CloseBraceToken */) { token = scanner.scan(); if (token === 133 /* FromKeyword */) { token = scanner.scan(); if (token === 9 /* StringLiteral */) { - // export * from "mod" + // export {a as A} from "mod"; + // export {a, b as B} from "mod" recordModuleName(); } } } - else if (token === 89 /* ImportKeyword */) { + } + else if (token === 37 /* AsteriskToken */) { + token = scanner.scan(); + if (token === 133 /* FromKeyword */) { token = scanner.scan(); - if (token === 69 /* Identifier */ || ts.isKeyword(token)) { - token = scanner.scan(); - if (token === 56 /* EqualsToken */) { - token = scanner.scan(); - if (token === 127 /* RequireKeyword */) { - token = scanner.scan(); - if (token === 17 /* OpenParenToken */) { - token = scanner.scan(); - if (token === 9 /* StringLiteral */) { - // export import i = require("mod"); - recordModuleName(); - } - } - } + if (token === 9 /* StringLiteral */) { + // export * from "mod" + recordModuleName(); + } + } + } + else if (token === 89 /* ImportKeyword */) { + token = scanner.scan(); + if (token === 69 /* Identifier */ || ts.isKeyword(token)) { + token = scanner.scan(); + if (token === 56 /* EqualsToken */) { + if (tryConsumeRequireCall(/* skipCurrentToken */ true)) { + return true; } } } } + return true; + } + return false; + } + function tryConsumeRequireCall(skipCurrentToken) { + var token = skipCurrentToken ? scanner.scan() : scanner.getToken(); + if (token === 127 /* RequireKeyword */) { + token = scanner.scan(); + if (token === 17 /* OpenParenToken */) { + token = scanner.scan(); + if (token === 9 /* StringLiteral */) { + // require("mod"); + recordModuleName(); + } + } + return true; + } + return false; + } + function tryConsumeDefine() { + var token = scanner.getToken(); + if (token === 69 /* Identifier */ && scanner.getTokenValue() === "define") { + token = scanner.scan(); + if (token !== 17 /* OpenParenToken */) { + return true; + } token = scanner.scan(); + if (token === 9 /* StringLiteral */) { + // looks like define ("modname", ... - skip string literal and comma + token = scanner.scan(); + if (token === 24 /* CommaToken */) { + token = scanner.scan(); + } + else { + // unexpected token + return true; + } + } + // should be start of dependency list + if (token !== 19 /* OpenBracketToken */) { + return true; + } + // skip open bracket + token = scanner.scan(); + var i = 0; + // scan until ']' or EOF + while (token !== 20 /* CloseBracketToken */ && token !== 1 /* EndOfFileToken */) { + // record string literals as module names + if (token === 9 /* StringLiteral */) { + recordModuleName(); + i++; + } + token = scanner.scan(); + } + return true; + } + return false; + } + function processImports() { + scanner.setText(sourceText); + scanner.scan(); + // Look for: + // import "mod"; + // import d from "mod" + // import {a as A } from "mod"; + // import * as NS from "mod" + // import d, {a, b as B} from "mod" + // import i = require("mod"); + // + // export * from "mod" + // export {a as b} from "mod" + // export import i = require("mod") + // (for JavaScript files) require("mod") + while (true) { + if (scanner.getToken() === 1 /* EndOfFileToken */) { + break; + } + // check if at least one of alternative have moved scanner forward + if (tryConsumeDeclare() || + tryConsumeImport() || + tryConsumeExport() || + (detectJavaScriptImports && (tryConsumeRequireCall(/* skipCurrentToken */ false) || tryConsumeDefine()))) { + continue; + } + else { + scanner.scan(); + } } scanner.setText(undefined); } if (readImportFiles) { - processImport(); + processImports(); } processTripleSlashDirectives(); return { referencedFiles: referencedFiles, importedFiles: importedFiles, isLibFile: isNoDefaultLib, ambientExternalModules: ambientExternalModules }; @@ -45547,7 +46127,7 @@ var ts; // For JavaScript files, we don't want to report the normal typescript semantic errors. // Instead, we just report errors for using TypeScript-only constructs from within a // JavaScript file. - if (ts.isJavaScript(fileName)) { + if (ts.isSourceFileJavaScript(targetSourceFile)) { return getJavaScriptSemanticDiagnostics(targetSourceFile); } // Only perform the action per file regardless of '-out' flag as LanguageServiceHost is expected to call this function per file. @@ -45759,7 +46339,7 @@ var ts; var typeChecker = program.getTypeChecker(); var syntacticStart = new Date().getTime(); var sourceFile = getValidSourceFile(fileName); - var isJavaScriptFile = ts.isJavaScript(fileName); + var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile); var isJsDocTagName = false; var start = new Date().getTime(); var currentToken = ts.getTokenAtPosition(sourceFile, position); @@ -46393,8 +46973,8 @@ var ts; if (element.getStart() <= position && position <= element.getEnd()) { continue; } - var name_33 = element.propertyName || element.name; - exisingImportsOrExports[name_33.text] = true; + var name_35 = element.propertyName || element.name; + exisingImportsOrExports[name_35.text] = true; } if (ts.isEmpty(exisingImportsOrExports)) { return exportsOfModule; @@ -46426,7 +47006,10 @@ var ts; } var existingName = void 0; if (m.kind === 163 /* BindingElement */ && m.propertyName) { - existingName = m.propertyName.text; + // include only identifiers in completion list + if (m.propertyName.kind === 69 /* Identifier */) { + existingName = m.propertyName.text; + } } else { // TODO(jfreeman): Account for computed property name @@ -46466,46 +47049,43 @@ var ts; return undefined; } var symbols = completionData.symbols, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, isRightOfDot = completionData.isRightOfDot, isJsDocTagName = completionData.isJsDocTagName; - var entries; if (isJsDocTagName) { // If the current position is a jsDoc tag name, only tag names should be provided for completion return { isMemberCompletion: false, isNewIdentifierLocation: false, entries: getAllJsDocCompletionEntries() }; } - if (isRightOfDot && ts.isJavaScript(fileName)) { - entries = getCompletionEntriesFromSymbols(symbols); - ts.addRange(entries, getJavaScriptCompletionEntries()); + var sourceFile = getValidSourceFile(fileName); + var entries = []; + if (isRightOfDot && ts.isSourceFileJavaScript(sourceFile)) { + var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries); + ts.addRange(entries, getJavaScriptCompletionEntries(sourceFile, uniqueNames)); } else { if (!symbols || symbols.length === 0) { return undefined; } - entries = getCompletionEntriesFromSymbols(symbols); + getCompletionEntriesFromSymbols(symbols, entries); } // Add keywords if this is not a member completion list if (!isMemberCompletion && !isJsDocTagName) { ts.addRange(entries, keywordCompletions); } return { isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries }; - function getJavaScriptCompletionEntries() { + function getJavaScriptCompletionEntries(sourceFile, uniqueNames) { var entries = []; - var allNames = {}; var target = program.getCompilerOptions().target; - for (var _i = 0, _a = program.getSourceFiles(); _i < _a.length; _i++) { - var sourceFile = _a[_i]; - var nameTable = getNameTable(sourceFile); - for (var name_34 in nameTable) { - if (!allNames[name_34]) { - allNames[name_34] = name_34; - var displayName = getCompletionEntryDisplayName(name_34, target, /*performCharacterChecks:*/ true); - if (displayName) { - var entry = { - name: displayName, - kind: ScriptElementKind.warning, - kindModifiers: "", - sortText: "1" - }; - entries.push(entry); - } + var nameTable = getNameTable(sourceFile); + for (var name_36 in nameTable) { + if (!uniqueNames[name_36]) { + uniqueNames[name_36] = name_36; + var displayName = getCompletionEntryDisplayName(name_36, target, /*performCharacterChecks:*/ true); + if (displayName) { + var entry = { + name: displayName, + kind: ScriptElementKind.warning, + kindModifiers: "", + sortText: "1" + }; + entries.push(entry); } } } @@ -46543,25 +47123,24 @@ var ts; sortText: "0" }; } - function getCompletionEntriesFromSymbols(symbols) { + function getCompletionEntriesFromSymbols(symbols, entries) { var start = new Date().getTime(); - var entries = []; + var uniqueNames = {}; if (symbols) { - var nameToSymbol = {}; for (var _i = 0, symbols_3 = symbols; _i < symbols_3.length; _i++) { var symbol = symbols_3[_i]; var entry = createCompletionEntry(symbol, location); if (entry) { var id = ts.escapeIdentifier(entry.name); - if (!ts.lookUp(nameToSymbol, id)) { + if (!ts.lookUp(uniqueNames, id)) { entries.push(entry); - nameToSymbol[id] = symbol; + uniqueNames[id] = id; } } } } log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - start)); - return entries; + return uniqueNames; } } function getCompletionEntryDetails(fileName, position, entryName) { @@ -46762,16 +47341,16 @@ var ts; case ScriptElementKind.parameterElement: case ScriptElementKind.localVariableElement: // If it is call or construct signature of lambda's write type name - displayParts.push(ts.punctuationPart(54 /* ColonToken */)); + displayParts.push(ts.punctuationPart(ts.SyntaxKind.ColonToken)); displayParts.push(ts.spacePart()); if (useConstructSignatures) { - displayParts.push(ts.keywordPart(92 /* NewKeyword */)); + displayParts.push(ts.keywordPart(ts.SyntaxKind.NewKeyword)); displayParts.push(ts.spacePart()); } - if (!(type.flags & 65536 /* Anonymous */)) { - ts.addRange(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, /*meaning*/ undefined, 1 /* WriteTypeParametersOrArguments */)); + if (!(type.flags & ts.TypeFlags.Anonymous)) { + ts.addRange(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, /*meaning*/ undefined, ts.SymbolFormatFlags.WriteTypeParametersOrArguments)); } - addSignatureDisplayParts(signature, allSignatures, 8 /* WriteArrowStyleSignature */); + addSignatureDisplayParts(signature, allSignatures, ts.TypeFormatFlags.WriteArrowStyleSignature); break; default: // Just signature @@ -48396,19 +48975,19 @@ var ts; if (isNameOfPropertyAssignment(node)) { var objectLiteral = node.parent.parent; var contextualType = typeChecker.getContextualType(objectLiteral); - var name_35 = node.text; + var name_37 = node.text; if (contextualType) { if (contextualType.flags & 16384 /* Union */) { // This is a union type, first see if the property we are looking for is a union property (i.e. exists in all types) // if not, search the constituent types for the property - var unionProperty = contextualType.getProperty(name_35); + var unionProperty = contextualType.getProperty(name_37); if (unionProperty) { return [unionProperty]; } else { var result_4 = []; ts.forEach(contextualType.types, function (t) { - var symbol = t.getProperty(name_35); + var symbol = t.getProperty(name_37); if (symbol) { result_4.push(symbol); } @@ -48417,7 +48996,7 @@ var ts; } } else { - var symbol_1 = contextualType.getProperty(name_35); + var symbol_1 = contextualType.getProperty(name_37); if (symbol_1) { return [symbol_1]; } @@ -48828,6 +49407,9 @@ var ts; case 16 /* typeAliasName */: return ClassificationTypeNames.typeAliasName; case 17 /* parameterName */: return ClassificationTypeNames.parameterName; case 18 /* docCommentTagName */: return ClassificationTypeNames.docCommentTagName; + case 19 /* jsxOpenTagName */: return ClassificationTypeNames.jsxOpenTagName; + case 20 /* jsxCloseTagName */: return ClassificationTypeNames.jsxCloseTagName; + case 21 /* jsxSelfClosingTagName */: return ClassificationTypeNames.jsxSelfClosingTagName; } } function convertClassifications(classifications) { @@ -49097,6 +49679,21 @@ var ts; return 17 /* parameterName */; } return; + case 235 /* JsxOpeningElement */: + if (token.parent.tagName === token) { + return 19 /* jsxOpenTagName */; + } + return; + case 237 /* JsxClosingElement */: + if (token.parent.tagName === token) { + return 20 /* jsxCloseTagName */; + } + return; + case 234 /* JsxSelfClosingElement */: + if (token.parent.tagName === token) { + return 21 /* jsxSelfClosingTagName */; + } + return; } } return 2 /* identifier */; @@ -50021,18 +50618,8 @@ var ts; ts.getDefaultLibFilePath = getDefaultLibFilePath; function initializeServices() { ts.objectAllocator = { - getNodeConstructor: function (kind) { - function Node(pos, end) { - this.pos = pos; - this.end = end; - this.flags = 0 /* None */; - this.parent = undefined; - } - var proto = kind === 248 /* SourceFile */ ? new SourceFileObject() : new NodeObject(); - proto.kind = kind; - Node.prototype = proto; - return Node; - }, + getNodeConstructor: function () { return NodeObject; }, + getSourceFileConstructor: function () { return SourceFileObject; }, getSymbolConstructor: function () { return SymbolObject; }, getTypeConstructor: function () { return TypeObject; }, getSignatureConstructor: function () { return SignatureObject; } @@ -51102,7 +51689,8 @@ var ts; }; CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) { return this.forwardJSONCall("getPreProcessedFileInfo('" + fileName + "')", function () { - var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength())); + // for now treat files as JavaScript + var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()), /* readImportFiles */ true, /* detectJavaScriptImports */ true); var convertResult = { referencedFiles: [], importedFiles: [], @@ -51166,7 +51754,7 @@ var ts; TypeScriptServicesFactory.prototype.createLanguageServiceShim = function (host) { try { if (this.documentRegistry === undefined) { - this.documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames()); + this.documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); } var hostAdapter = new LanguageServiceShimHostAdapter(host); var languageService = ts.createLanguageService(hostAdapter, this.documentRegistry); @@ -51199,7 +51787,7 @@ var ts; TypeScriptServicesFactory.prototype.close = function () { // Forget all the registered shims this._shims = []; - this.documentRegistry = ts.createDocumentRegistry(); + this.documentRegistry = undefined; }; TypeScriptServicesFactory.prototype.registerShim = function (shim) { this._shims.push(shim); diff --git a/lib/typescriptServices.d.ts b/lib/typescriptServices.d.ts index d2758e6d5e9a7..af9a8bffe3574 100644 --- a/lib/typescriptServices.d.ts +++ b/lib/typescriptServices.d.ts @@ -387,6 +387,7 @@ declare namespace ts { right: Identifier; } type EntityName = Identifier | QualifiedName; + type PropertyName = Identifier | LiteralExpression | ComputedPropertyName; type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; interface Declaration extends Node { _declarationBrand: any; @@ -425,7 +426,7 @@ declare namespace ts { initializer?: Expression; } interface BindingElement extends Declaration { - propertyName?: Identifier; + propertyName?: PropertyName; dotDotDotToken?: Node; name: Identifier | BindingPattern; initializer?: Expression; @@ -452,7 +453,7 @@ declare namespace ts { objectAssignmentInitializer?: Expression; } interface VariableLikeDeclaration extends Declaration { - propertyName?: Identifier; + propertyName?: PropertyName; dotDotDotToken?: Node; name: DeclarationName; questionToken?: Node; @@ -581,7 +582,7 @@ declare namespace ts { asteriskToken?: Node; expression?: Expression; } - interface BinaryExpression extends Expression { + interface BinaryExpression extends Expression, Declaration { left: Expression; operatorToken: Node; right: Expression; @@ -625,7 +626,7 @@ declare namespace ts { interface ObjectLiteralExpression extends PrimaryExpression, Declaration { properties: NodeArray; } - interface PropertyAccessExpression extends MemberExpression { + interface PropertyAccessExpression extends MemberExpression, Declaration { expression: LeftHandSideExpression; dotToken: Node; name: Identifier; @@ -1220,6 +1221,7 @@ declare namespace ts { ObjectLiteral = 524288, ESSymbol = 16777216, ThisType = 33554432, + ObjectLiteralPatternWithComputedProperties = 67108864, StringLike = 258, NumberLike = 132, ObjectType = 80896, @@ -1537,7 +1539,6 @@ declare namespace ts { function getTypeParameterOwner(d: Declaration): Declaration; } declare namespace ts { - function getNodeConstructor(kind: SyntaxKind): new (pos?: number, end?: number) => Node; function createNode(kind: SyntaxKind, pos?: number, end?: number): Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; @@ -2126,6 +2127,9 @@ declare namespace ts { static typeAliasName: string; static parameterName: string; static docCommentTagName: string; + static jsxOpenTagName: string; + static jsxCloseTagName: string; + static jsxSelfClosingTagName: string; } enum ClassificationType { comment = 1, @@ -2146,6 +2150,9 @@ declare namespace ts { typeAliasName = 16, parameterName = 17, docCommentTagName = 18, + jsxOpenTagName = 19, + jsxCloseTagName = 20, + jsxSelfClosingTagName = 21, } interface DisplayPartsSymbolWriter extends SymbolWriter { displayParts(): SymbolDisplayPart[]; @@ -2171,7 +2178,7 @@ declare namespace ts { function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function createGetCanonicalFileName(useCaseSensitivefileNames: boolean): (fileName: string) => string; function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry; - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; + function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo; function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; function createClassifier(): Classifier; /** diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index 8b0ef04f96e45..498ddc3786075 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -622,6 +622,7 @@ var ts; TypeFlags[TypeFlags["ContainsAnyFunctionType"] = 8388608] = "ContainsAnyFunctionType"; TypeFlags[TypeFlags["ESSymbol"] = 16777216] = "ESSymbol"; TypeFlags[TypeFlags["ThisType"] = 33554432] = "ThisType"; + TypeFlags[TypeFlags["ObjectLiteralPatternWithComputedProperties"] = 67108864] = "ObjectLiteralPatternWithComputedProperties"; /* @internal */ TypeFlags[TypeFlags["Intrinsic"] = 16777343] = "Intrinsic"; /* @internal */ @@ -1530,12 +1531,7 @@ var ts; * List of supported extensions in order of file resolution precedence. */ ts.supportedExtensions = [".ts", ".tsx", ".d.ts"]; - /** - * List of extensions that will be used to look for external modules. - * This list is kept separate from supportedExtensions to for cases when we'll allow to include .js files in compilation, - * but still would like to load only TypeScript files as modules - */ - ts.moduleFileExtensions = ts.supportedExtensions; + ts.supportedJsExtensions = ts.supportedExtensions.concat(".js", ".jsx"); function isSupportedSourceFileName(fileName) { if (!fileName) { return false; @@ -1586,17 +1582,16 @@ var ts; } function Signature(checker) { } + function Node(kind, pos, end) { + this.kind = kind; + this.pos = pos; + this.end = end; + this.flags = 0 /* None */; + this.parent = undefined; + } ts.objectAllocator = { - getNodeConstructor: function (kind) { - function Node(pos, end) { - this.pos = pos; - this.end = end; - this.flags = 0 /* None */; - this.parent = undefined; - } - Node.prototype = { kind: kind }; - return Node; - }, + getNodeConstructor: function () { return Node; }, + getSourceFileConstructor: function () { return Node; }, getSymbolConstructor: function () { return Symbol; }, getTypeConstructor: function () { return Type; }, getSignatureConstructor: function () { return Signature; } @@ -1913,7 +1908,16 @@ var ts; if (writeByteOrderMark) { data = "\uFEFF" + data; } - _fs.writeFileSync(fileName, data, "utf8"); + var fd; + try { + fd = _fs.openSync(fileName, "w"); + _fs.writeSync(fd, data, undefined, "utf8"); + } + finally { + if (fd !== undefined) { + _fs.closeSync(fd); + } + } } function getCanonicalPath(path) { return useCaseSensitiveFileNames ? path.toLowerCase() : path; @@ -2614,6 +2618,7 @@ var ts; Disallow_inconsistently_cased_references_to_the_same_file: { code: 6078, category: ts.DiagnosticCategory.Message, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", message: "Disallow inconsistently-cased references to the same file." }, Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_or_react_6080", message: "Specify JSX code generation: 'preserve' or 'react'" }, Argument_for_jsx_must_be_preserve_or_react: { code: 6081, category: ts.DiagnosticCategory.Message, key: "Argument_for_jsx_must_be_preserve_or_react_6081", message: "Argument for '--jsx' must be 'preserve' or 'react'." }, + Only_amd_and_system_modules_are_supported_alongside_0: { code: 6082, category: ts.DiagnosticCategory.Error, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", message: "Only 'amd' and 'system' modules are supported alongside --{0}." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_an_1_type_7005", message: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter_0_implicitly_has_an_1_type_7006", message: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member_0_implicitly_has_an_1_type_7008", message: "Member '{0}' implicitly has an '{1}' type." }, @@ -3173,7 +3178,7 @@ var ts; function getCommentRanges(text, pos, trailing) { var result; var collecting = trailing || pos === 0; - while (true) { + while (pos < text.length) { var ch = text.charCodeAt(pos); switch (ch) { case 13 /* carriageReturn */: @@ -3242,6 +3247,7 @@ var ts; } return result; } + return result; } function getLeadingCommentRanges(text, pos) { return getCommentRanges(text, pos, /*trailing*/ false); @@ -3343,7 +3349,7 @@ var ts; error(ts.Diagnostics.Digit_expected); } } - return +(text.substring(start, end)); + return "" + +(text.substring(start, end)); } function scanOctalDigits() { var start = pos; @@ -3770,7 +3776,7 @@ var ts; return pos++, token = 36 /* MinusToken */; case 46 /* dot */: if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = "" + scanNumber(); + tokenValue = scanNumber(); return token = 8 /* NumericLiteral */; } if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { @@ -3873,7 +3879,7 @@ var ts; case 55 /* _7 */: case 56 /* _8 */: case 57 /* _9 */: - tokenValue = "" + scanNumber(); + tokenValue = scanNumber(); return token = 8 /* NumericLiteral */; case 58 /* colon */: return pos++, token = 54 /* ColonToken */; @@ -4177,1558 +4183,243 @@ var ts; } ts.createScanner = createScanner; })(ts || (ts = {})); -/// +/// /* @internal */ var ts; (function (ts) { - ts.bindTime = 0; - (function (ModuleInstanceState) { - ModuleInstanceState[ModuleInstanceState["NonInstantiated"] = 0] = "NonInstantiated"; - ModuleInstanceState[ModuleInstanceState["Instantiated"] = 1] = "Instantiated"; - ModuleInstanceState[ModuleInstanceState["ConstEnumOnly"] = 2] = "ConstEnumOnly"; - })(ts.ModuleInstanceState || (ts.ModuleInstanceState = {})); - var ModuleInstanceState = ts.ModuleInstanceState; - var Reachability; - (function (Reachability) { - Reachability[Reachability["Unintialized"] = 1] = "Unintialized"; - Reachability[Reachability["Reachable"] = 2] = "Reachable"; - Reachability[Reachability["Unreachable"] = 4] = "Unreachable"; - Reachability[Reachability["ReportedUnreachable"] = 8] = "ReportedUnreachable"; - })(Reachability || (Reachability = {})); - function or(state1, state2) { - return (state1 | state2) & 2 /* Reachable */ - ? 2 /* Reachable */ - : (state1 & state2) & 8 /* ReportedUnreachable */ - ? 8 /* ReportedUnreachable */ - : 4 /* Unreachable */; - } - function getModuleInstanceState(node) { - // A module is uninstantiated if it contains only - // 1. interface declarations, type alias declarations - if (node.kind === 215 /* InterfaceDeclaration */ || node.kind === 216 /* TypeAliasDeclaration */) { - return 0 /* NonInstantiated */; + function getDeclarationOfKind(symbol, kind) { + var declarations = symbol.declarations; + if (declarations) { + for (var _i = 0, declarations_1 = declarations; _i < declarations_1.length; _i++) { + var declaration = declarations_1[_i]; + if (declaration.kind === kind) { + return declaration; + } + } } - else if (ts.isConstEnumDeclaration(node)) { - return 2 /* ConstEnumOnly */; + return undefined; + } + ts.getDeclarationOfKind = getDeclarationOfKind; + // Pool writers to avoid needing to allocate them for every symbol we write. + var stringWriters = []; + function getSingleLineStringWriter() { + if (stringWriters.length === 0) { + var str = ""; + var writeText = function (text) { return str += text; }; + return { + string: function () { return str; }, + writeKeyword: writeText, + writeOperator: writeText, + writePunctuation: writeText, + writeSpace: writeText, + writeStringLiteral: writeText, + writeParameter: writeText, + writeSymbol: writeText, + // Completely ignore indentation for string writers. And map newlines to + // a single space. + writeLine: function () { return str += " "; }, + increaseIndent: function () { }, + decreaseIndent: function () { }, + clear: function () { return str = ""; }, + trackSymbol: function () { }, + reportInaccessibleThisError: function () { } + }; } - else if ((node.kind === 222 /* ImportDeclaration */ || node.kind === 221 /* ImportEqualsDeclaration */) && !(node.flags & 2 /* Export */)) { - return 0 /* NonInstantiated */; + return stringWriters.pop(); + } + ts.getSingleLineStringWriter = getSingleLineStringWriter; + function releaseStringWriter(writer) { + writer.clear(); + stringWriters.push(writer); + } + ts.releaseStringWriter = releaseStringWriter; + function getFullWidth(node) { + return node.end - node.pos; + } + ts.getFullWidth = getFullWidth; + function arrayIsEqualTo(array1, array2, equaler) { + if (!array1 || !array2) { + return array1 === array2; } - else if (node.kind === 219 /* ModuleBlock */) { - var state = 0 /* NonInstantiated */; - ts.forEachChild(node, function (n) { - switch (getModuleInstanceState(n)) { - case 0 /* NonInstantiated */: - // child is non-instantiated - continue searching - return false; - case 2 /* ConstEnumOnly */: - // child is const enum only - record state and continue searching - state = 2 /* ConstEnumOnly */; - return false; - case 1 /* Instantiated */: - // child is instantiated - record state and stop - state = 1 /* Instantiated */; - return true; - } - }); - return state; + if (array1.length !== array2.length) { + return false; } - else if (node.kind === 218 /* ModuleDeclaration */) { - return getModuleInstanceState(node.body); + for (var i = 0; i < array1.length; ++i) { + var equals = equaler ? equaler(array1[i], array2[i]) : array1[i] === array2[i]; + if (!equals) { + return false; + } } - else { - return 1 /* Instantiated */; + return true; + } + ts.arrayIsEqualTo = arrayIsEqualTo; + function hasResolvedModule(sourceFile, moduleNameText) { + return sourceFile.resolvedModules && ts.hasProperty(sourceFile.resolvedModules, moduleNameText); + } + ts.hasResolvedModule = hasResolvedModule; + function getResolvedModule(sourceFile, moduleNameText) { + return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules[moduleNameText] : undefined; + } + ts.getResolvedModule = getResolvedModule; + function setResolvedModule(sourceFile, moduleNameText, resolvedModule) { + if (!sourceFile.resolvedModules) { + sourceFile.resolvedModules = {}; } + sourceFile.resolvedModules[moduleNameText] = resolvedModule; } - ts.getModuleInstanceState = getModuleInstanceState; - var ContainerFlags; - (function (ContainerFlags) { - // The current node is not a container, and no container manipulation should happen before - // recursing into it. - ContainerFlags[ContainerFlags["None"] = 0] = "None"; - // The current node is a container. It should be set as the current container (and block- - // container) before recursing into it. The current node does not have locals. Examples: - // - // Classes, ObjectLiterals, TypeLiterals, Interfaces... - ContainerFlags[ContainerFlags["IsContainer"] = 1] = "IsContainer"; - // The current node is a block-scoped-container. It should be set as the current block- - // container before recursing into it. Examples: - // - // Blocks (when not parented by functions), Catch clauses, For/For-in/For-of statements... - ContainerFlags[ContainerFlags["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer"; - ContainerFlags[ContainerFlags["HasLocals"] = 4] = "HasLocals"; - // If the current node is a container that also container that also contains locals. Examples: - // - // Functions, Methods, Modules, Source-files. - ContainerFlags[ContainerFlags["IsContainerWithLocals"] = 5] = "IsContainerWithLocals"; - })(ContainerFlags || (ContainerFlags = {})); - var binder = createBinder(); - function bindSourceFile(file, options) { - var start = new Date().getTime(); - binder(file, options); - ts.bindTime += new Date().getTime() - start; + ts.setResolvedModule = setResolvedModule; + // Returns true if this node contains a parse error anywhere underneath it. + function containsParseError(node) { + aggregateChildData(node); + return (node.parserContextFlags & 64 /* ThisNodeOrAnySubNodesHasError */) !== 0; } - ts.bindSourceFile = bindSourceFile; - function createBinder() { - var file; - var options; - var parent; - var container; - var blockScopeContainer; - var lastContainer; - var seenThisKeyword; - // state used by reachability checks - var hasExplicitReturn; - var currentReachabilityState; - var labelStack; - var labelIndexMap; - var implicitLabels; - // If this file is an external module, then it is automatically in strict-mode according to - // ES6. If it is not an external module, then we'll determine if it is in strict mode or - // not depending on if we see "use strict" in certain places (or if we hit a class/namespace). - var inStrictMode; - var symbolCount = 0; - var Symbol; - var classifiableNames; - function bindSourceFile(f, opts) { - file = f; - options = opts; - inStrictMode = !!file.externalModuleIndicator; - classifiableNames = {}; - Symbol = ts.objectAllocator.getSymbolConstructor(); - if (!file.locals) { - bind(file); - file.symbolCount = symbolCount; - file.classifiableNames = classifiableNames; + ts.containsParseError = containsParseError; + function aggregateChildData(node) { + if (!(node.parserContextFlags & 128 /* HasAggregatedChildData */)) { + // A node is considered to contain a parse error if: + // a) the parser explicitly marked that it had an error + // b) any of it's children reported that it had an error. + var thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & 16 /* ThisNodeHasError */) !== 0) || + ts.forEachChild(node, containsParseError); + // If so, mark ourselves accordingly. + if (thisNodeOrAnySubNodesHasError) { + node.parserContextFlags |= 64 /* ThisNodeOrAnySubNodesHasError */; } - parent = undefined; - container = undefined; - blockScopeContainer = undefined; - lastContainer = undefined; - seenThisKeyword = false; - hasExplicitReturn = false; - labelStack = undefined; - labelIndexMap = undefined; - implicitLabels = undefined; + // Also mark that we've propogated the child information to this node. This way we can + // always consult the bit directly on this node without needing to check its children + // again. + node.parserContextFlags |= 128 /* HasAggregatedChildData */; } - return bindSourceFile; - function createSymbol(flags, name) { - symbolCount++; - return new Symbol(flags, name); + } + function getSourceFileOfNode(node) { + while (node && node.kind !== 248 /* SourceFile */) { + node = node.parent; } - function addDeclarationToSymbol(symbol, node, symbolFlags) { - symbol.flags |= symbolFlags; - node.symbol = symbol; - if (!symbol.declarations) { - symbol.declarations = []; - } - symbol.declarations.push(node); - if (symbolFlags & 1952 /* HasExports */ && !symbol.exports) { - symbol.exports = {}; - } - if (symbolFlags & 6240 /* HasMembers */ && !symbol.members) { - symbol.members = {}; - } - if (symbolFlags & 107455 /* Value */ && !symbol.valueDeclaration) { - symbol.valueDeclaration = node; - } + return node; + } + ts.getSourceFileOfNode = getSourceFileOfNode; + function getStartPositionOfLine(line, sourceFile) { + ts.Debug.assert(line >= 0); + return ts.getLineStarts(sourceFile)[line]; + } + ts.getStartPositionOfLine = getStartPositionOfLine; + // This is a useful function for debugging purposes. + function nodePosToString(node) { + var file = getSourceFileOfNode(node); + var loc = ts.getLineAndCharacterOfPosition(file, node.pos); + return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")"; + } + ts.nodePosToString = nodePosToString; + function getStartPosOfNode(node) { + return node.pos; + } + ts.getStartPosOfNode = getStartPosOfNode; + // Returns true if this node is missing from the actual source code. A 'missing' node is different + // from 'undefined/defined'. When a node is undefined (which can happen for optional nodes + // in the tree), it is definitely missing. However, a node may be defined, but still be + // missing. This happens whenever the parser knows it needs to parse something, but can't + // get anything in the source code that it expects at that location. For example: + // + // let a: ; + // + // Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source + // code). So the parser will attempt to parse out a type, and will create an actual node. + // However, this node will be 'missing' in the sense that no actual source-code/tokens are + // contained within it. + function nodeIsMissing(node) { + if (!node) { + return true; } - // Should not be called on a declaration with a computed property name, - // unless it is a well known Symbol. - function getDeclarationName(node) { - if (node.name) { - if (node.kind === 218 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { - return "\"" + node.name.text + "\""; - } - if (node.name.kind === 136 /* ComputedPropertyName */) { - var nameExpression = node.name.expression; - ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression)); - return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text); - } - return node.name.text; - } - switch (node.kind) { - case 144 /* Constructor */: - return "__constructor"; - case 152 /* FunctionType */: - case 147 /* CallSignature */: - return "__call"; - case 153 /* ConstructorType */: - case 148 /* ConstructSignature */: - return "__new"; - case 149 /* IndexSignature */: - return "__index"; - case 228 /* ExportDeclaration */: - return "__export"; - case 227 /* ExportAssignment */: - return node.isExportEquals ? "export=" : "default"; - case 213 /* FunctionDeclaration */: - case 214 /* ClassDeclaration */: - return node.flags & 512 /* Default */ ? "default" : undefined; - } + return node.pos === node.end && node.pos >= 0 && node.kind !== 1 /* EndOfFileToken */; + } + ts.nodeIsMissing = nodeIsMissing; + function nodeIsPresent(node) { + return !nodeIsMissing(node); + } + ts.nodeIsPresent = nodeIsPresent; + function getTokenPosOfNode(node, sourceFile) { + // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* + // want to skip trivia because this will launch us forward to the next token. + if (nodeIsMissing(node)) { + return node.pos; } - function getDisplayName(node) { - return node.name ? ts.declarationNameToString(node.name) : getDeclarationName(node); + return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); + } + ts.getTokenPosOfNode = getTokenPosOfNode; + function getNonDecoratorTokenPosOfNode(node, sourceFile) { + if (nodeIsMissing(node) || !node.decorators) { + return getTokenPosOfNode(node, sourceFile); } - /** - * Declares a Symbol for the node and adds it to symbols. Reports errors for conflicting identifier names. - * @param symbolTable - The symbol table which node will be added to. - * @param parent - node's parent declaration. - * @param node - The declaration to be added to the symbol table - * @param includes - The SymbolFlags that node has in addition to its declaration type (eg: export, ambient, etc.) - * @param excludes - The flags which node cannot be declared alongside in a symbol table. Used to report forbidden declarations. - */ - function declareSymbol(symbolTable, parent, node, includes, excludes) { - ts.Debug.assert(!ts.hasDynamicName(node)); - var isDefaultExport = node.flags & 512 /* Default */; - // The exported symbol for an export default function/class node is always named "default" - var name = isDefaultExport && parent ? "default" : getDeclarationName(node); - var symbol; - if (name !== undefined) { - // Check and see if the symbol table already has a symbol with this name. If not, - // create a new symbol with this name and add it to the table. Note that we don't - // give the new symbol any flags *yet*. This ensures that it will not conflict - // with the 'excludes' flags we pass in. - // - // If we do get an existing symbol, see if it conflicts with the new symbol we're - // creating. For example, a 'var' symbol and a 'class' symbol will conflict within - // the same symbol table. If we have a conflict, report the issue on each - // declaration we have for this symbol, and then create a new symbol for this - // declaration. - // - // If we created a new symbol, either because we didn't have a symbol with this name - // in the symbol table, or we conflicted with an existing symbol, then just add this - // node as the sole declaration of the new symbol. - // - // Otherwise, we'll be merging into a compatible existing symbol (for example when - // you have multiple 'vars' with the same name in the same container). In this case - // just add this node into the declarations list of the symbol. - symbol = ts.hasProperty(symbolTable, name) - ? symbolTable[name] - : (symbolTable[name] = createSymbol(0 /* None */, name)); - if (name && (includes & 788448 /* Classifiable */)) { - classifiableNames[name] = name; - } - if (symbol.flags & excludes) { - if (node.name) { - node.name.parent = node; - } - // Report errors every position with duplicate declaration - // Report errors on previous encountered declarations - var message = symbol.flags & 2 /* BlockScopedVariable */ - ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 - : ts.Diagnostics.Duplicate_identifier_0; - ts.forEach(symbol.declarations, function (declaration) { - if (declaration.flags & 512 /* Default */) { - message = ts.Diagnostics.A_module_cannot_have_multiple_default_exports; - } - }); - ts.forEach(symbol.declarations, function (declaration) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration))); - }); - file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message, getDisplayName(node))); - symbol = createSymbol(0 /* None */, name); - } - } - else { - symbol = createSymbol(0 /* None */, "__missing"); - } - addDeclarationToSymbol(symbol, node, includes); - symbol.parent = parent; - return symbol; + return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.decorators.end); + } + ts.getNonDecoratorTokenPosOfNode = getNonDecoratorTokenPosOfNode; + function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia) { + if (includeTrivia === void 0) { includeTrivia = false; } + if (nodeIsMissing(node)) { + return ""; } - function declareModuleMember(node, symbolFlags, symbolExcludes) { - var hasExportModifier = ts.getCombinedNodeFlags(node) & 2 /* Export */; - if (symbolFlags & 8388608 /* Alias */) { - if (node.kind === 230 /* ExportSpecifier */ || (node.kind === 221 /* ImportEqualsDeclaration */ && hasExportModifier)) { - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - } - else { - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } + var text = sourceFile.text; + return text.substring(includeTrivia ? node.pos : ts.skipTrivia(text, node.pos), node.end); + } + ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; + function getTextOfNodeFromSourceText(sourceText, node) { + if (nodeIsMissing(node)) { + return ""; + } + return sourceText.substring(ts.skipTrivia(sourceText, node.pos), node.end); + } + ts.getTextOfNodeFromSourceText = getTextOfNodeFromSourceText; + function getTextOfNode(node, includeTrivia) { + if (includeTrivia === void 0) { includeTrivia = false; } + return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia); + } + ts.getTextOfNode = getTextOfNode; + // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' + function escapeIdentifier(identifier) { + return identifier.length >= 2 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ ? "_" + identifier : identifier; + } + ts.escapeIdentifier = escapeIdentifier; + // Remove extra underscore from escaped identifier + function unescapeIdentifier(identifier) { + return identifier.length >= 3 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ && identifier.charCodeAt(2) === 95 /* _ */ ? identifier.substr(1) : identifier; + } + ts.unescapeIdentifier = unescapeIdentifier; + // Make an identifier from an external module name by extracting the string after the last "/" and replacing + // all non-alphanumeric characters with underscores + function makeIdentifierFromModuleName(moduleName) { + return ts.getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); + } + ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; + function isBlockOrCatchScoped(declaration) { + return (getCombinedNodeFlags(declaration) & 24576 /* BlockScoped */) !== 0 || + isCatchClauseVariableDeclaration(declaration); + } + ts.isBlockOrCatchScoped = isBlockOrCatchScoped; + // Gets the nearest enclosing block scope container that has the provided node + // as a descendant, that is not the provided node. + function getEnclosingBlockScopeContainer(node) { + var current = node.parent; + while (current) { + if (isFunctionLike(current)) { + return current; } - else { - // Exported module members are given 2 symbols: A local symbol that is classified with an ExportValue, - // ExportType, or ExportContainer flag, and an associated export symbol with all the correct flags set - // on it. There are 2 main reasons: - // - // 1. We treat locals and exports of the same name as mutually exclusive within a container. - // That means the binder will issue a Duplicate Identifier error if you mix locals and exports - // with the same name in the same container. - // TODO: Make this a more specific error and decouple it from the exclusion logic. - // 2. When we checkIdentifier in the checker, we set its resolved symbol to the local symbol, - // but return the export symbol (by calling getExportSymbolOfValueSymbolIfExported). That way - // when the emitter comes back to it, it knows not to qualify the name if it was found in a containing scope. - if (hasExportModifier || container.flags & 131072 /* ExportContext */) { - var exportKind = (symbolFlags & 107455 /* Value */ ? 1048576 /* ExportValue */ : 0) | - (symbolFlags & 793056 /* Type */ ? 2097152 /* ExportType */ : 0) | - (symbolFlags & 1536 /* Namespace */ ? 4194304 /* ExportNamespace */ : 0); - var local = declareSymbol(container.locals, undefined, node, exportKind, symbolExcludes); - local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - node.localSymbol = local; - return local; - } - else { - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } + switch (current.kind) { + case 248 /* SourceFile */: + case 220 /* CaseBlock */: + case 244 /* CatchClause */: + case 218 /* ModuleDeclaration */: + case 199 /* ForStatement */: + case 200 /* ForInStatement */: + case 201 /* ForOfStatement */: + return current; + case 192 /* Block */: + // function block is not considered block-scope container + // see comment in binder.ts: bind(...), case for SyntaxKind.Block + if (!isFunctionLike(current.parent)) { + return current; + } } - } - // All container nodes are kept on a linked list in declaration order. This list is used by - // the getLocalNameOfContainer function in the type checker to validate that the local name - // used for a container is unique. - function bindChildren(node) { - // Before we recurse into a node's chilren, we first save the existing parent, container - // and block-container. Then after we pop out of processing the children, we restore - // these saved values. - var saveParent = parent; - var saveContainer = container; - var savedBlockScopeContainer = blockScopeContainer; - // This node will now be set as the parent of all of its children as we recurse into them. - parent = node; - // Depending on what kind of node this is, we may have to adjust the current container - // and block-container. If the current node is a container, then it is automatically - // considered the current block-container as well. Also, for containers that we know - // may contain locals, we proactively initialize the .locals field. We do this because - // it's highly likely that the .locals will be needed to place some child in (for example, - // a parameter, or variable declaration). - // - // However, we do not proactively create the .locals for block-containers because it's - // totally normal and common for block-containers to never actually have a block-scoped - // variable in them. We don't want to end up allocating an object for every 'block' we - // run into when most of them won't be necessary. - // - // Finally, if this is a block-container, then we clear out any existing .locals object - // it may contain within it. This happens in incremental scenarios. Because we can be - // reusing a node from a previous compilation, that node may have had 'locals' created - // for it. We must clear this so we don't accidently move any stale data forward from - // a previous compilation. - var containerFlags = getContainerFlags(node); - if (containerFlags & 1 /* IsContainer */) { - container = blockScopeContainer = node; - if (containerFlags & 4 /* HasLocals */) { - container.locals = {}; - } - addToContainerChain(container); - } - else if (containerFlags & 2 /* IsBlockScopedContainer */) { - blockScopeContainer = node; - blockScopeContainer.locals = undefined; - } - var savedReachabilityState; - var savedLabelStack; - var savedLabels; - var savedImplicitLabels; - var savedHasExplicitReturn; - var kind = node.kind; - var flags = node.flags; - // reset all reachability check related flags on node (for incremental scenarios) - flags &= ~1572864 /* ReachabilityCheckFlags */; - if (kind === 215 /* InterfaceDeclaration */) { - seenThisKeyword = false; - } - var saveState = kind === 248 /* SourceFile */ || kind === 219 /* ModuleBlock */ || ts.isFunctionLikeKind(kind); - if (saveState) { - savedReachabilityState = currentReachabilityState; - savedLabelStack = labelStack; - savedLabels = labelIndexMap; - savedImplicitLabels = implicitLabels; - savedHasExplicitReturn = hasExplicitReturn; - currentReachabilityState = 2 /* Reachable */; - hasExplicitReturn = false; - labelStack = labelIndexMap = implicitLabels = undefined; - } - bindReachableStatement(node); - if (currentReachabilityState === 2 /* Reachable */ && ts.isFunctionLikeKind(kind) && ts.nodeIsPresent(node.body)) { - flags |= 524288 /* HasImplicitReturn */; - if (hasExplicitReturn) { - flags |= 1048576 /* HasExplicitReturn */; - } - } - if (kind === 215 /* InterfaceDeclaration */) { - flags = seenThisKeyword ? flags | 262144 /* ContainsThis */ : flags & ~262144 /* ContainsThis */; - } - node.flags = flags; - if (saveState) { - hasExplicitReturn = savedHasExplicitReturn; - currentReachabilityState = savedReachabilityState; - labelStack = savedLabelStack; - labelIndexMap = savedLabels; - implicitLabels = savedImplicitLabels; - } - container = saveContainer; - parent = saveParent; - blockScopeContainer = savedBlockScopeContainer; - } - /** - * Returns true if node and its subnodes were successfully traversed. - * Returning false means that node was not examined and caller needs to dive into the node himself. - */ - function bindReachableStatement(node) { - if (checkUnreachable(node)) { - ts.forEachChild(node, bind); - return; - } - switch (node.kind) { - case 198 /* WhileStatement */: - bindWhileStatement(node); - break; - case 197 /* DoStatement */: - bindDoStatement(node); - break; - case 199 /* ForStatement */: - bindForStatement(node); - break; - case 200 /* ForInStatement */: - case 201 /* ForOfStatement */: - bindForInOrForOfStatement(node); - break; - case 196 /* IfStatement */: - bindIfStatement(node); - break; - case 204 /* ReturnStatement */: - case 208 /* ThrowStatement */: - bindReturnOrThrow(node); - break; - case 203 /* BreakStatement */: - case 202 /* ContinueStatement */: - bindBreakOrContinueStatement(node); - break; - case 209 /* TryStatement */: - bindTryStatement(node); - break; - case 206 /* SwitchStatement */: - bindSwitchStatement(node); - break; - case 220 /* CaseBlock */: - bindCaseBlock(node); - break; - case 207 /* LabeledStatement */: - bindLabeledStatement(node); - break; - default: - ts.forEachChild(node, bind); - break; - } - } - function bindWhileStatement(n) { - var preWhileState = n.expression.kind === 84 /* FalseKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; - var postWhileState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; - // bind expressions (don't affect reachability) - bind(n.expression); - currentReachabilityState = preWhileState; - var postWhileLabel = pushImplicitLabel(); - bind(n.statement); - popImplicitLabel(postWhileLabel, postWhileState); - } - function bindDoStatement(n) { - var preDoState = currentReachabilityState; - var postDoLabel = pushImplicitLabel(); - bind(n.statement); - var postDoState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : preDoState; - popImplicitLabel(postDoLabel, postDoState); - // bind expressions (don't affect reachability) - bind(n.expression); - } - function bindForStatement(n) { - var preForState = currentReachabilityState; - var postForLabel = pushImplicitLabel(); - // bind expressions (don't affect reachability) - bind(n.initializer); - bind(n.condition); - bind(n.incrementor); - bind(n.statement); - // for statement is considered infinite when it condition is either omitted or is true keyword - // - for(..;;..) - // - for(..;true;..) - var isInfiniteLoop = (!n.condition || n.condition.kind === 99 /* TrueKeyword */); - var postForState = isInfiniteLoop ? 4 /* Unreachable */ : preForState; - popImplicitLabel(postForLabel, postForState); - } - function bindForInOrForOfStatement(n) { - var preStatementState = currentReachabilityState; - var postStatementLabel = pushImplicitLabel(); - // bind expressions (don't affect reachability) - bind(n.initializer); - bind(n.expression); - bind(n.statement); - popImplicitLabel(postStatementLabel, preStatementState); - } - function bindIfStatement(n) { - // denotes reachability state when entering 'thenStatement' part of the if statement: - // i.e. if condition is false then thenStatement is unreachable - var ifTrueState = n.expression.kind === 84 /* FalseKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; - // denotes reachability state when entering 'elseStatement': - // i.e. if condition is true then elseStatement is unreachable - var ifFalseState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; - currentReachabilityState = ifTrueState; - // bind expression (don't affect reachability) - bind(n.expression); - bind(n.thenStatement); - if (n.elseStatement) { - var preElseState = currentReachabilityState; - currentReachabilityState = ifFalseState; - bind(n.elseStatement); - currentReachabilityState = or(currentReachabilityState, preElseState); - } - else { - currentReachabilityState = or(currentReachabilityState, ifFalseState); - } - } - function bindReturnOrThrow(n) { - // bind expression (don't affect reachability) - bind(n.expression); - if (n.kind === 204 /* ReturnStatement */) { - hasExplicitReturn = true; - } - currentReachabilityState = 4 /* Unreachable */; - } - function bindBreakOrContinueStatement(n) { - // call bind on label (don't affect reachability) - bind(n.label); - // for continue case touch label so it will be marked a used - var isValidJump = jumpToLabel(n.label, n.kind === 203 /* BreakStatement */ ? currentReachabilityState : 4 /* Unreachable */); - if (isValidJump) { - currentReachabilityState = 4 /* Unreachable */; - } - } - function bindTryStatement(n) { - // catch\finally blocks has the same reachability as try block - var preTryState = currentReachabilityState; - bind(n.tryBlock); - var postTryState = currentReachabilityState; - currentReachabilityState = preTryState; - bind(n.catchClause); - var postCatchState = currentReachabilityState; - currentReachabilityState = preTryState; - bind(n.finallyBlock); - // post catch/finally state is reachable if - // - post try state is reachable - control flow can fall out of try block - // - post catch state is reachable - control flow can fall out of catch block - currentReachabilityState = or(postTryState, postCatchState); - } - function bindSwitchStatement(n) { - var preSwitchState = currentReachabilityState; - var postSwitchLabel = pushImplicitLabel(); - // bind expression (don't affect reachability) - bind(n.expression); - bind(n.caseBlock); - var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 242 /* DefaultClause */; }); - // post switch state is unreachable if switch is exaustive (has a default case ) and does not have fallthrough from the last case - var postSwitchState = hasDefault && currentReachabilityState !== 2 /* Reachable */ ? 4 /* Unreachable */ : preSwitchState; - popImplicitLabel(postSwitchLabel, postSwitchState); - } - function bindCaseBlock(n) { - var startState = currentReachabilityState; - for (var _i = 0, _a = n.clauses; _i < _a.length; _i++) { - var clause = _a[_i]; - currentReachabilityState = startState; - bind(clause); - if (clause.statements.length && currentReachabilityState === 2 /* Reachable */ && options.noFallthroughCasesInSwitch) { - errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); - } - } - } - function bindLabeledStatement(n) { - // call bind on label (don't affect reachability) - bind(n.label); - var ok = pushNamedLabel(n.label); - bind(n.statement); - if (ok) { - popNamedLabel(n.label, currentReachabilityState); - } - } - function getContainerFlags(node) { - switch (node.kind) { - case 186 /* ClassExpression */: - case 214 /* ClassDeclaration */: - case 215 /* InterfaceDeclaration */: - case 217 /* EnumDeclaration */: - case 155 /* TypeLiteral */: - case 165 /* ObjectLiteralExpression */: - return 1 /* IsContainer */; - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 213 /* FunctionDeclaration */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 173 /* FunctionExpression */: - case 174 /* ArrowFunction */: - case 218 /* ModuleDeclaration */: - case 248 /* SourceFile */: - case 216 /* TypeAliasDeclaration */: - return 5 /* IsContainerWithLocals */; - case 244 /* CatchClause */: - case 199 /* ForStatement */: - case 200 /* ForInStatement */: - case 201 /* ForOfStatement */: - case 220 /* CaseBlock */: - return 2 /* IsBlockScopedContainer */; - case 192 /* Block */: - // do not treat blocks directly inside a function as a block-scoped-container. - // Locals that reside in this block should go to the function locals. Othewise 'x' - // would not appear to be a redeclaration of a block scoped local in the following - // example: - // - // function foo() { - // var x; - // let x; - // } - // - // If we placed 'var x' into the function locals and 'let x' into the locals of - // the block, then there would be no collision. - // - // By not creating a new block-scoped-container here, we ensure that both 'var x' - // and 'let x' go into the Function-container's locals, and we do get a collision - // conflict. - return ts.isFunctionLike(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; - } - return 0 /* None */; - } - function addToContainerChain(next) { - if (lastContainer) { - lastContainer.nextContainer = next; - } - lastContainer = next; - } - function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { - // Just call this directly so that the return type of this function stays "void". - declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes); - } - function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { - switch (container.kind) { - // Modules, source files, and classes need specialized handling for how their - // members are declared (for example, a member of a class will go into a specific - // symbol table depending on if it is static or not). We defer to specialized - // handlers to take care of declaring these child members. - case 218 /* ModuleDeclaration */: - return declareModuleMember(node, symbolFlags, symbolExcludes); - case 248 /* SourceFile */: - return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 186 /* ClassExpression */: - case 214 /* ClassDeclaration */: - return declareClassMember(node, symbolFlags, symbolExcludes); - case 217 /* EnumDeclaration */: - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 155 /* TypeLiteral */: - case 165 /* ObjectLiteralExpression */: - case 215 /* InterfaceDeclaration */: - // Interface/Object-types always have their children added to the 'members' of - // their container. They are only accessible through an instance of their - // container, and are never in scope otherwise (even inside the body of the - // object / type / interface declaring them). An exception is type parameters, - // which are in scope without qualification (similar to 'locals'). - return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 213 /* FunctionDeclaration */: - case 173 /* FunctionExpression */: - case 174 /* ArrowFunction */: - case 216 /* TypeAliasDeclaration */: - // All the children of these container types are never visible through another - // symbol (i.e. through another symbol's 'exports' or 'members'). Instead, - // they're only accessed 'lexically' (i.e. from code that exists underneath - // their container in the tree. To accomplish this, we simply add their declared - // symbol to the 'locals' of the container. These symbols can then be found as - // the type checker walks up the containers, checking them for matching names. - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - function declareClassMember(node, symbolFlags, symbolExcludes) { - return node.flags & 64 /* Static */ - ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes) - : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - } - function declareSourceFileMember(node, symbolFlags, symbolExcludes) { - return ts.isExternalModule(file) - ? declareModuleMember(node, symbolFlags, symbolExcludes) - : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); - } - function hasExportDeclarations(node) { - var body = node.kind === 248 /* SourceFile */ ? node : node.body; - if (body.kind === 248 /* SourceFile */ || body.kind === 219 /* ModuleBlock */) { - for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { - var stat = _a[_i]; - if (stat.kind === 228 /* ExportDeclaration */ || stat.kind === 227 /* ExportAssignment */) { - return true; - } - } - } - return false; - } - function setExportContextFlag(node) { - // A declaration source file or ambient module declaration that contains no export declarations (but possibly regular - // declarations with export modifiers) is an export context in which declarations are implicitly exported. - if (ts.isInAmbientContext(node) && !hasExportDeclarations(node)) { - node.flags |= 131072 /* ExportContext */; - } - else { - node.flags &= ~131072 /* ExportContext */; - } - } - function bindModuleDeclaration(node) { - setExportContextFlag(node); - if (node.name.kind === 9 /* StringLiteral */) { - declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); - } - else { - var state = getModuleInstanceState(node); - if (state === 0 /* NonInstantiated */) { - declareSymbolAndAddToSymbolTable(node, 1024 /* NamespaceModule */, 0 /* NamespaceModuleExcludes */); - } - else { - declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); - if (node.symbol.flags & (16 /* Function */ | 32 /* Class */ | 256 /* RegularEnum */)) { - // if module was already merged with some function, class or non-const enum - // treat is a non-const-enum-only - node.symbol.constEnumOnlyModule = false; - } - else { - var currentModuleIsConstEnumOnly = state === 2 /* ConstEnumOnly */; - if (node.symbol.constEnumOnlyModule === undefined) { - // non-merged case - use the current state - node.symbol.constEnumOnlyModule = currentModuleIsConstEnumOnly; - } - else { - // merged case: module is const enum only if all its pieces are non-instantiated or const enum - node.symbol.constEnumOnlyModule = node.symbol.constEnumOnlyModule && currentModuleIsConstEnumOnly; - } - } - } - } - } - function bindFunctionOrConstructorType(node) { - // For a given function symbol "<...>(...) => T" we want to generate a symbol identical - // to the one we would get for: { <...>(...): T } - // - // We do that by making an anonymous type literal symbol, and then setting the function - // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable - // from an actual type literal symbol you would have gotten had you used the long form. - var symbol = createSymbol(131072 /* Signature */, getDeclarationName(node)); - addDeclarationToSymbol(symbol, node, 131072 /* Signature */); - var typeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type"); - addDeclarationToSymbol(typeLiteralSymbol, node, 2048 /* TypeLiteral */); - typeLiteralSymbol.members = (_a = {}, _a[symbol.name] = symbol, _a); - var _a; - } - function bindObjectLiteralExpression(node) { - var ElementKind; - (function (ElementKind) { - ElementKind[ElementKind["Property"] = 1] = "Property"; - ElementKind[ElementKind["Accessor"] = 2] = "Accessor"; - })(ElementKind || (ElementKind = {})); - if (inStrictMode) { - var seen = {}; - for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { - var prop = _a[_i]; - if (prop.name.kind !== 69 /* Identifier */) { - continue; - } - var identifier = prop.name; - // ECMA-262 11.1.5 Object Initialiser - // If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - // a.This production is contained in strict code and IsDataDescriptor(previous) is true and - // IsDataDescriptor(propId.descriptor) is true. - // b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true. - // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. - // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true - // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields - var currentKind = prop.kind === 245 /* PropertyAssignment */ || prop.kind === 246 /* ShorthandPropertyAssignment */ || prop.kind === 143 /* MethodDeclaration */ - ? 1 /* Property */ - : 2 /* Accessor */; - var existingKind = seen[identifier.text]; - if (!existingKind) { - seen[identifier.text] = currentKind; - continue; - } - if (currentKind === 1 /* Property */ && existingKind === 1 /* Property */) { - var span = ts.getErrorSpanForNode(file, identifier); - file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode)); - } - } - } - return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, "__object"); - } - function bindAnonymousDeclaration(node, symbolFlags, name) { - var symbol = createSymbol(symbolFlags, name); - addDeclarationToSymbol(symbol, node, symbolFlags); - } - function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { - switch (blockScopeContainer.kind) { - case 218 /* ModuleDeclaration */: - declareModuleMember(node, symbolFlags, symbolExcludes); - break; - case 248 /* SourceFile */: - if (ts.isExternalModule(container)) { - declareModuleMember(node, symbolFlags, symbolExcludes); - break; - } - // fall through. - default: - if (!blockScopeContainer.locals) { - blockScopeContainer.locals = {}; - addToContainerChain(blockScopeContainer); - } - declareSymbol(blockScopeContainer.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - function bindBlockScopedVariableDeclaration(node) { - bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 107455 /* BlockScopedVariableExcludes */); - } - // The binder visits every node in the syntax tree so it is a convenient place to perform a single localized - // check for reserved words used as identifiers in strict mode code. - function checkStrictModeIdentifier(node) { - if (inStrictMode && - node.originalKeywordKind >= 106 /* FirstFutureReservedWord */ && - node.originalKeywordKind <= 114 /* LastFutureReservedWord */ && - !ts.isIdentifierName(node)) { - // Report error only if there are no parse errors in file - if (!file.parseDiagnostics.length) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(node, getStrictModeIdentifierMessage(node), ts.declarationNameToString(node))); - } - } - } - function getStrictModeIdentifierMessage(node) { - // Provide specialized messages to help the user understand why we think they're in - // strict mode. - if (ts.getContainingClass(node)) { - return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode; - } - if (file.externalModuleIndicator) { - return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode; - } - return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode; - } - function checkStrictModeBinaryExpression(node) { - if (inStrictMode && ts.isLeftHandSideExpression(node.left) && ts.isAssignmentOperator(node.operatorToken.kind)) { - // ECMA 262 (Annex C) The identifier eval or arguments may not appear as the LeftHandSideExpression of an - // Assignment operator(11.13) or of a PostfixExpression(11.3) - checkStrictModeEvalOrArguments(node, node.left); - } - } - function checkStrictModeCatchClause(node) { - // It is a SyntaxError if a TryStatement with a Catch occurs within strict code and the Identifier of the - // Catch production is eval or arguments - if (inStrictMode && node.variableDeclaration) { - checkStrictModeEvalOrArguments(node, node.variableDeclaration.name); - } - } - function checkStrictModeDeleteExpression(node) { - // Grammar checking - if (inStrictMode && node.expression.kind === 69 /* Identifier */) { - // When a delete operator occurs within strict mode code, a SyntaxError is thrown if its - // UnaryExpression is a direct reference to a variable, function argument, or function name - var span = ts.getErrorSpanForNode(file, node.expression); - file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode)); - } - } - function isEvalOrArgumentsIdentifier(node) { - return node.kind === 69 /* Identifier */ && - (node.text === "eval" || node.text === "arguments"); - } - function checkStrictModeEvalOrArguments(contextNode, name) { - if (name && name.kind === 69 /* Identifier */) { - var identifier = name; - if (isEvalOrArgumentsIdentifier(identifier)) { - // We check first if the name is inside class declaration or class expression; if so give explicit message - // otherwise report generic error message. - var span = ts.getErrorSpanForNode(file, name); - file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, getStrictModeEvalOrArgumentsMessage(contextNode), identifier.text)); - } - } - } - function getStrictModeEvalOrArgumentsMessage(node) { - // Provide specialized messages to help the user understand why we think they're in - // strict mode. - if (ts.getContainingClass(node)) { - return ts.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode; - } - if (file.externalModuleIndicator) { - return ts.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode; - } - return ts.Diagnostics.Invalid_use_of_0_in_strict_mode; - } - function checkStrictModeFunctionName(node) { - if (inStrictMode) { - // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a strict mode FunctionDeclaration or FunctionExpression (13.1)) - checkStrictModeEvalOrArguments(node, node.name); - } - } - function checkStrictModeNumericLiteral(node) { - if (inStrictMode && node.flags & 32768 /* OctalLiteral */) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode)); - } - } - function checkStrictModePostfixUnaryExpression(node) { - // Grammar checking - // The identifier eval or arguments may not appear as the LeftHandSideExpression of an - // Assignment operator(11.13) or of a PostfixExpression(11.3) or as the UnaryExpression - // operated upon by a Prefix Increment(11.4.4) or a Prefix Decrement(11.4.5) operator. - if (inStrictMode) { - checkStrictModeEvalOrArguments(node, node.operand); - } - } - function checkStrictModePrefixUnaryExpression(node) { - // Grammar checking - if (inStrictMode) { - if (node.operator === 41 /* PlusPlusToken */ || node.operator === 42 /* MinusMinusToken */) { - checkStrictModeEvalOrArguments(node, node.operand); - } - } - } - function checkStrictModeWithStatement(node) { - // Grammar checking for withStatement - if (inStrictMode) { - errorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_strict_mode); - } - } - function errorOnFirstToken(node, message, arg0, arg1, arg2) { - var span = ts.getSpanOfTokenAtPosition(file, node.pos); - file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, message, arg0, arg1, arg2)); - } - function getDestructuringParameterName(node) { - return "__" + ts.indexOf(node.parent.parameters, node); - } - function bind(node) { - if (!node) { - return; - } - node.parent = parent; - var savedInStrictMode = inStrictMode; - if (!savedInStrictMode) { - updateStrictMode(node); - } - // First we bind declaration nodes to a symbol if possible. We'll both create a symbol - // and then potentially add the symbol to an appropriate symbol table. Possible - // destination symbol tables are: - // - // 1) The 'exports' table of the current container's symbol. - // 2) The 'members' table of the current container's symbol. - // 3) The 'locals' table of the current container. - // - // However, not all symbols will end up in any of these tables. 'Anonymous' symbols - // (like TypeLiterals for example) will not be put in any table. - bindWorker(node); - // Then we recurse into the children of the node to bind them as well. For certain - // symbols we do specialized work when we recurse. For example, we'll keep track of - // the current 'container' node when it changes. This helps us know which symbol table - // a local should go into for example. - bindChildren(node); - inStrictMode = savedInStrictMode; - } - function updateStrictMode(node) { - switch (node.kind) { - case 248 /* SourceFile */: - case 219 /* ModuleBlock */: - updateStrictModeStatementList(node.statements); - return; - case 192 /* Block */: - if (ts.isFunctionLike(node.parent)) { - updateStrictModeStatementList(node.statements); - } - return; - case 214 /* ClassDeclaration */: - case 186 /* ClassExpression */: - // All classes are automatically in strict mode in ES6. - inStrictMode = true; - return; - } - } - function updateStrictModeStatementList(statements) { - for (var _i = 0, statements_1 = statements; _i < statements_1.length; _i++) { - var statement = statements_1[_i]; - if (!ts.isPrologueDirective(statement)) { - return; - } - if (isUseStrictPrologueDirective(statement)) { - inStrictMode = true; - return; - } - } - } - /// Should be called only on prologue directives (isPrologueDirective(node) should be true) - function isUseStrictPrologueDirective(node) { - var nodeText = ts.getTextOfNodeFromSourceText(file.text, node.expression); - // Note: the node text must be exactly "use strict" or 'use strict'. It is not ok for the - // string to contain unicode escapes (as per ES5). - return nodeText === "\"use strict\"" || nodeText === "'use strict'"; - } - function bindWorker(node) { - switch (node.kind) { - case 69 /* Identifier */: - return checkStrictModeIdentifier(node); - case 181 /* BinaryExpression */: - return checkStrictModeBinaryExpression(node); - case 244 /* CatchClause */: - return checkStrictModeCatchClause(node); - case 175 /* DeleteExpression */: - return checkStrictModeDeleteExpression(node); - case 8 /* NumericLiteral */: - return checkStrictModeNumericLiteral(node); - case 180 /* PostfixUnaryExpression */: - return checkStrictModePostfixUnaryExpression(node); - case 179 /* PrefixUnaryExpression */: - return checkStrictModePrefixUnaryExpression(node); - case 205 /* WithStatement */: - return checkStrictModeWithStatement(node); - case 97 /* ThisKeyword */: - seenThisKeyword = true; - return; - case 137 /* TypeParameter */: - return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530912 /* TypeParameterExcludes */); - case 138 /* Parameter */: - return bindParameter(node); - case 211 /* VariableDeclaration */: - case 163 /* BindingElement */: - return bindVariableDeclarationOrBindingElement(node); - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 107455 /* PropertyExcludes */); - case 245 /* PropertyAssignment */: - case 246 /* ShorthandPropertyAssignment */: - return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 107455 /* PropertyExcludes */); - case 247 /* EnumMember */: - return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 107455 /* EnumMemberExcludes */); - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - // If this is an ObjectLiteralExpression method, then it sits in the same space - // as other properties in the object literal. So we use SymbolFlags.PropertyExcludes - // so that it will conflict with any other object literal members with the same - // name. - return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 107455 /* PropertyExcludes */ : 99263 /* MethodExcludes */); - case 213 /* FunctionDeclaration */: - checkStrictModeFunctionName(node); - return declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 106927 /* FunctionExcludes */); - case 144 /* Constructor */: - return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */); - case 145 /* GetAccessor */: - return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */); - case 146 /* SetAccessor */: - return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - return bindFunctionOrConstructorType(node); - case 155 /* TypeLiteral */: - return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type"); - case 165 /* ObjectLiteralExpression */: - return bindObjectLiteralExpression(node); - case 173 /* FunctionExpression */: - case 174 /* ArrowFunction */: - checkStrictModeFunctionName(node); - var bindingName = node.name ? node.name.text : "__function"; - return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); - case 186 /* ClassExpression */: - case 214 /* ClassDeclaration */: - return bindClassLikeDeclaration(node); - case 215 /* InterfaceDeclaration */: - return bindBlockScopedDeclaration(node, 64 /* Interface */, 792960 /* InterfaceExcludes */); - case 216 /* TypeAliasDeclaration */: - return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793056 /* TypeAliasExcludes */); - case 217 /* EnumDeclaration */: - return bindEnumDeclaration(node); - case 218 /* ModuleDeclaration */: - return bindModuleDeclaration(node); - case 221 /* ImportEqualsDeclaration */: - case 224 /* NamespaceImport */: - case 226 /* ImportSpecifier */: - case 230 /* ExportSpecifier */: - return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - case 223 /* ImportClause */: - return bindImportClause(node); - case 228 /* ExportDeclaration */: - return bindExportDeclaration(node); - case 227 /* ExportAssignment */: - return bindExportAssignment(node); - case 248 /* SourceFile */: - return bindSourceFileIfExternalModule(); - } - } - function bindSourceFileIfExternalModule() { - setExportContextFlag(file); - if (ts.isExternalModule(file)) { - bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"" + ts.removeFileExtension(file.fileName) + "\""); - } - } - function bindExportAssignment(node) { - if (!container.symbol || !container.symbol.exports) { - // Export assignment in some sort of block construct - bindAnonymousDeclaration(node, 8388608 /* Alias */, getDeclarationName(node)); - } - else if (node.expression.kind === 69 /* Identifier */) { - // An export default clause with an identifier exports all meanings of that identifier - declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* Alias */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); - } - else { - // An export default clause with an expression exports a value - declareSymbol(container.symbol.exports, container.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); - } - } - function bindExportDeclaration(node) { - if (!container.symbol || !container.symbol.exports) { - // Export * in some sort of block construct - bindAnonymousDeclaration(node, 1073741824 /* ExportStar */, getDeclarationName(node)); - } - else if (!node.exportClause) { - // All export * declarations are collected in an __export symbol - declareSymbol(container.symbol.exports, container.symbol, node, 1073741824 /* ExportStar */, 0 /* None */); - } - } - function bindImportClause(node) { - if (node.name) { - declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - } - } - function bindClassLikeDeclaration(node) { - if (node.kind === 214 /* ClassDeclaration */) { - bindBlockScopedDeclaration(node, 32 /* Class */, 899519 /* ClassExcludes */); - } - else { - var bindingName = node.name ? node.name.text : "__class"; - bindAnonymousDeclaration(node, 32 /* Class */, bindingName); - // Add name of class expression into the map for semantic classifier - if (node.name) { - classifiableNames[node.name.text] = node.name.text; - } - } - var symbol = node.symbol; - // TypeScript 1.0 spec (April 2014): 8.4 - // Every class automatically contains a static property member named 'prototype', the - // type of which is an instantiation of the class type with type Any supplied as a type - // argument for each type parameter. It is an error to explicitly declare a static - // property member with the name 'prototype'. - // - // Note: we check for this here because this class may be merging into a module. The - // module might have an exported variable called 'prototype'. We can't allow that as - // that would clash with the built-in 'prototype' for the class. - var prototypeSymbol = createSymbol(4 /* Property */ | 134217728 /* Prototype */, "prototype"); - if (ts.hasProperty(symbol.exports, prototypeSymbol.name)) { - if (node.name) { - node.name.parent = node; - } - file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name)); - } - symbol.exports[prototypeSymbol.name] = prototypeSymbol; - prototypeSymbol.parent = symbol; - } - function bindEnumDeclaration(node) { - return ts.isConst(node) - ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) - : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); - } - function bindVariableDeclarationOrBindingElement(node) { - if (inStrictMode) { - checkStrictModeEvalOrArguments(node, node.name); - } - if (!ts.isBindingPattern(node.name)) { - if (ts.isBlockOrCatchScoped(node)) { - bindBlockScopedVariableDeclaration(node); - } - else if (ts.isParameterDeclaration(node)) { - // It is safe to walk up parent chain to find whether the node is a destructing parameter declaration - // because its parent chain has already been set up, since parents are set before descending into children. - // - // If node is a binding element in parameter declaration, we need to use ParameterExcludes. - // Using ParameterExcludes flag allows the compiler to report an error on duplicate identifiers in Parameter Declaration - // For example: - // function foo([a,a]) {} // Duplicate Identifier error - // function bar(a,a) {} // Duplicate Identifier error, parameter declaration in this case is handled in bindParameter - // // which correctly set excluded symbols - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); - } - else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107454 /* FunctionScopedVariableExcludes */); - } - } - } - function bindParameter(node) { - if (inStrictMode) { - // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a - // strict mode FunctionLikeDeclaration or FunctionExpression(13.1) - checkStrictModeEvalOrArguments(node, node.name); - } - if (ts.isBindingPattern(node.name)) { - bindAnonymousDeclaration(node, 1 /* FunctionScopedVariable */, getDestructuringParameterName(node)); - } - else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); - } - // If this is a property-parameter, then also declare the property symbol into the - // containing class. - if (node.flags & 56 /* AccessibilityModifier */ && - node.parent.kind === 144 /* Constructor */ && - ts.isClassLike(node.parent.parent)) { - var classDeclaration = node.parent.parent; - declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */); - } - } - function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { - return ts.hasDynamicName(node) - ? bindAnonymousDeclaration(node, symbolFlags, "__computed") - : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); - } - // reachability checks - function pushNamedLabel(name) { - initializeReachabilityStateIfNecessary(); - if (ts.hasProperty(labelIndexMap, name.text)) { - return false; - } - labelIndexMap[name.text] = labelStack.push(1 /* Unintialized */) - 1; - return true; - } - function pushImplicitLabel() { - initializeReachabilityStateIfNecessary(); - var index = labelStack.push(1 /* Unintialized */) - 1; - implicitLabels.push(index); - return index; - } - function popNamedLabel(label, outerState) { - var index = labelIndexMap[label.text]; - ts.Debug.assert(index !== undefined); - ts.Debug.assert(labelStack.length == index + 1); - labelIndexMap[label.text] = undefined; - setCurrentStateAtLabel(labelStack.pop(), outerState, label); - } - function popImplicitLabel(implicitLabelIndex, outerState) { - if (labelStack.length !== implicitLabelIndex + 1) { - ts.Debug.assert(false, "Label stack: " + labelStack.length + ", index:" + implicitLabelIndex); - } - var i = implicitLabels.pop(); - if (implicitLabelIndex !== i) { - ts.Debug.assert(false, "i: " + i + ", index: " + implicitLabelIndex); - } - setCurrentStateAtLabel(labelStack.pop(), outerState, /*name*/ undefined); - } - function setCurrentStateAtLabel(innerMergedState, outerState, label) { - if (innerMergedState === 1 /* Unintialized */) { - if (label && !options.allowUnusedLabels) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(label, ts.Diagnostics.Unused_label)); - } - currentReachabilityState = outerState; - } - else { - currentReachabilityState = or(innerMergedState, outerState); - } - } - function jumpToLabel(label, outerState) { - initializeReachabilityStateIfNecessary(); - var index = label ? labelIndexMap[label.text] : ts.lastOrUndefined(implicitLabels); - if (index === undefined) { - // reference to unknown label or - // break/continue used outside of loops - return false; - } - var stateAtLabel = labelStack[index]; - labelStack[index] = stateAtLabel === 1 /* Unintialized */ ? outerState : or(stateAtLabel, outerState); - return true; - } - function checkUnreachable(node) { - switch (currentReachabilityState) { - case 4 /* Unreachable */: - var reportError = - // report error on all statements - ts.isStatement(node) || - // report error on class declarations - node.kind === 214 /* ClassDeclaration */ || - // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - (node.kind === 218 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || - // report error on regular enums and const enums if preserveConstEnums is set - (node.kind === 217 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); - if (reportError) { - currentReachabilityState = 8 /* ReportedUnreachable */; - // unreachable code is reported if - // - user has explicitly asked about it AND - // - statement is in not ambient context (statements in ambient context is already an error - // so we should not report extras) AND - // - node is not variable statement OR - // - node is block scoped variable statement OR - // - node is not block scoped variable statement and at least one variable declaration has initializer - // Rationale: we don't want to report errors on non-initialized var's since they are hoisted - // On the other side we do want to report errors on non-initialized 'lets' because of TDZ - var reportUnreachableCode = !options.allowUnreachableCode && - !ts.isInAmbientContext(node) && - (node.kind !== 193 /* VariableStatement */ || - ts.getCombinedNodeFlags(node.declarationList) & 24576 /* BlockScoped */ || - ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); - if (reportUnreachableCode) { - errorOnFirstToken(node, ts.Diagnostics.Unreachable_code_detected); - } - } - case 8 /* ReportedUnreachable */: - return true; - default: - return false; - } - function shouldReportErrorOnModuleDeclaration(node) { - var instanceState = getModuleInstanceState(node); - return instanceState === 1 /* Instantiated */ || (instanceState === 2 /* ConstEnumOnly */ && options.preserveConstEnums); - } - } - function initializeReachabilityStateIfNecessary() { - if (labelIndexMap) { - return; - } - currentReachabilityState = 2 /* Reachable */; - labelIndexMap = {}; - labelStack = []; - implicitLabels = []; - } - } -})(ts || (ts = {})); -/// -/// -/* @internal */ -var ts; -(function (ts) { - function getDeclarationOfKind(symbol, kind) { - var declarations = symbol.declarations; - if (declarations) { - for (var _i = 0, declarations_1 = declarations; _i < declarations_1.length; _i++) { - var declaration = declarations_1[_i]; - if (declaration.kind === kind) { - return declaration; - } - } - } - return undefined; - } - ts.getDeclarationOfKind = getDeclarationOfKind; - // Pool writers to avoid needing to allocate them for every symbol we write. - var stringWriters = []; - function getSingleLineStringWriter() { - if (stringWriters.length === 0) { - var str = ""; - var writeText = function (text) { return str += text; }; - return { - string: function () { return str; }, - writeKeyword: writeText, - writeOperator: writeText, - writePunctuation: writeText, - writeSpace: writeText, - writeStringLiteral: writeText, - writeParameter: writeText, - writeSymbol: writeText, - // Completely ignore indentation for string writers. And map newlines to - // a single space. - writeLine: function () { return str += " "; }, - increaseIndent: function () { }, - decreaseIndent: function () { }, - clear: function () { return str = ""; }, - trackSymbol: function () { }, - reportInaccessibleThisError: function () { } - }; - } - return stringWriters.pop(); - } - ts.getSingleLineStringWriter = getSingleLineStringWriter; - function releaseStringWriter(writer) { - writer.clear(); - stringWriters.push(writer); - } - ts.releaseStringWriter = releaseStringWriter; - function getFullWidth(node) { - return node.end - node.pos; - } - ts.getFullWidth = getFullWidth; - function arrayIsEqualTo(array1, array2, equaler) { - if (!array1 || !array2) { - return array1 === array2; - } - if (array1.length !== array2.length) { - return false; - } - for (var i = 0; i < array1.length; ++i) { - var equals = equaler ? equaler(array1[i], array2[i]) : array1[i] === array2[i]; - if (!equals) { - return false; - } - } - return true; - } - ts.arrayIsEqualTo = arrayIsEqualTo; - function hasResolvedModule(sourceFile, moduleNameText) { - return sourceFile.resolvedModules && ts.hasProperty(sourceFile.resolvedModules, moduleNameText); - } - ts.hasResolvedModule = hasResolvedModule; - function getResolvedModule(sourceFile, moduleNameText) { - return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules[moduleNameText] : undefined; - } - ts.getResolvedModule = getResolvedModule; - function setResolvedModule(sourceFile, moduleNameText, resolvedModule) { - if (!sourceFile.resolvedModules) { - sourceFile.resolvedModules = {}; - } - sourceFile.resolvedModules[moduleNameText] = resolvedModule; - } - ts.setResolvedModule = setResolvedModule; - // Returns true if this node contains a parse error anywhere underneath it. - function containsParseError(node) { - aggregateChildData(node); - return (node.parserContextFlags & 64 /* ThisNodeOrAnySubNodesHasError */) !== 0; - } - ts.containsParseError = containsParseError; - function aggregateChildData(node) { - if (!(node.parserContextFlags & 128 /* HasAggregatedChildData */)) { - // A node is considered to contain a parse error if: - // a) the parser explicitly marked that it had an error - // b) any of it's children reported that it had an error. - var thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & 16 /* ThisNodeHasError */) !== 0) || - ts.forEachChild(node, containsParseError); - // If so, mark ourselves accordingly. - if (thisNodeOrAnySubNodesHasError) { - node.parserContextFlags |= 64 /* ThisNodeOrAnySubNodesHasError */; - } - // Also mark that we've propogated the child information to this node. This way we can - // always consult the bit directly on this node without needing to check its children - // again. - node.parserContextFlags |= 128 /* HasAggregatedChildData */; - } - } - function getSourceFileOfNode(node) { - while (node && node.kind !== 248 /* SourceFile */) { - node = node.parent; - } - return node; - } - ts.getSourceFileOfNode = getSourceFileOfNode; - function getStartPositionOfLine(line, sourceFile) { - ts.Debug.assert(line >= 0); - return ts.getLineStarts(sourceFile)[line]; - } - ts.getStartPositionOfLine = getStartPositionOfLine; - // This is a useful function for debugging purposes. - function nodePosToString(node) { - var file = getSourceFileOfNode(node); - var loc = ts.getLineAndCharacterOfPosition(file, node.pos); - return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")"; - } - ts.nodePosToString = nodePosToString; - function getStartPosOfNode(node) { - return node.pos; - } - ts.getStartPosOfNode = getStartPosOfNode; - // Returns true if this node is missing from the actual source code. A 'missing' node is different - // from 'undefined/defined'. When a node is undefined (which can happen for optional nodes - // in the tree), it is definitely missing. However, a node may be defined, but still be - // missing. This happens whenever the parser knows it needs to parse something, but can't - // get anything in the source code that it expects at that location. For example: - // - // let a: ; - // - // Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source - // code). So the parser will attempt to parse out a type, and will create an actual node. - // However, this node will be 'missing' in the sense that no actual source-code/tokens are - // contained within it. - function nodeIsMissing(node) { - if (!node) { - return true; - } - return node.pos === node.end && node.pos >= 0 && node.kind !== 1 /* EndOfFileToken */; - } - ts.nodeIsMissing = nodeIsMissing; - function nodeIsPresent(node) { - return !nodeIsMissing(node); - } - ts.nodeIsPresent = nodeIsPresent; - function getTokenPosOfNode(node, sourceFile) { - // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* - // want to skip trivia because this will launch us forward to the next token. - if (nodeIsMissing(node)) { - return node.pos; - } - return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); - } - ts.getTokenPosOfNode = getTokenPosOfNode; - function getNonDecoratorTokenPosOfNode(node, sourceFile) { - if (nodeIsMissing(node) || !node.decorators) { - return getTokenPosOfNode(node, sourceFile); - } - return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.decorators.end); - } - ts.getNonDecoratorTokenPosOfNode = getNonDecoratorTokenPosOfNode; - function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia) { - if (includeTrivia === void 0) { includeTrivia = false; } - if (nodeIsMissing(node)) { - return ""; - } - var text = sourceFile.text; - return text.substring(includeTrivia ? node.pos : ts.skipTrivia(text, node.pos), node.end); - } - ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; - function getTextOfNodeFromSourceText(sourceText, node) { - if (nodeIsMissing(node)) { - return ""; - } - return sourceText.substring(ts.skipTrivia(sourceText, node.pos), node.end); - } - ts.getTextOfNodeFromSourceText = getTextOfNodeFromSourceText; - function getTextOfNode(node, includeTrivia) { - if (includeTrivia === void 0) { includeTrivia = false; } - return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia); - } - ts.getTextOfNode = getTextOfNode; - // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' - function escapeIdentifier(identifier) { - return identifier.length >= 2 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ ? "_" + identifier : identifier; - } - ts.escapeIdentifier = escapeIdentifier; - // Remove extra underscore from escaped identifier - function unescapeIdentifier(identifier) { - return identifier.length >= 3 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ && identifier.charCodeAt(2) === 95 /* _ */ ? identifier.substr(1) : identifier; - } - ts.unescapeIdentifier = unescapeIdentifier; - // Make an identifier from an external module name by extracting the string after the last "/" and replacing - // all non-alphanumeric characters with underscores - function makeIdentifierFromModuleName(moduleName) { - return ts.getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); - } - ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; - function isBlockOrCatchScoped(declaration) { - return (getCombinedNodeFlags(declaration) & 24576 /* BlockScoped */) !== 0 || - isCatchClauseVariableDeclaration(declaration); - } - ts.isBlockOrCatchScoped = isBlockOrCatchScoped; - // Gets the nearest enclosing block scope container that has the provided node - // as a descendant, that is not the provided node. - function getEnclosingBlockScopeContainer(node) { - var current = node.parent; - while (current) { - if (isFunctionLike(current)) { - return current; - } - switch (current.kind) { - case 248 /* SourceFile */: - case 220 /* CaseBlock */: - case 244 /* CatchClause */: - case 218 /* ModuleDeclaration */: - case 199 /* ForStatement */: - case 200 /* ForInStatement */: - case 201 /* ForOfStatement */: - return current; - case 192 /* Block */: - // function block is not considered block-scope container - // see comment in binder.ts: bind(...), case for SyntaxKind.Block - if (!isFunctionLike(current.parent)) { - return current; - } - } - current = current.parent; + current = current.parent; } } ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; @@ -5812,6 +4503,10 @@ var ts; return file.externalModuleIndicator !== undefined; } ts.isExternalModule = isExternalModule; + function isExternalOrCommonJsModule(file) { + return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined; + } + ts.isExternalOrCommonJsModule = isExternalOrCommonJsModule; function isDeclarationFile(file) { return (file.flags & 4096 /* DeclarationFile */) !== 0; } @@ -5865,19 +4560,27 @@ var ts; return ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos); } ts.getLeadingCommentRangesOfNode = getLeadingCommentRangesOfNode; + function getLeadingCommentRangesOfNodeFromText(node, text) { + return ts.getLeadingCommentRanges(text, node.pos); + } + ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText; function getJsDocComments(node, sourceFileOfNode) { + return getJsDocCommentsFromText(node, sourceFileOfNode.text); + } + ts.getJsDocComments = getJsDocComments; + function getJsDocCommentsFromText(node, text) { var commentRanges = (node.kind === 138 /* Parameter */ || node.kind === 137 /* TypeParameter */) ? - ts.concatenate(ts.getTrailingCommentRanges(sourceFileOfNode.text, node.pos), ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos)) : - getLeadingCommentRangesOfNode(node, sourceFileOfNode); + ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : + getLeadingCommentRangesOfNodeFromText(node, text); return ts.filter(commentRanges, isJsDocComment); function isJsDocComment(comment) { // True if the comment starts with '/**' but not if it is '/**/' - return sourceFileOfNode.text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && - sourceFileOfNode.text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && - sourceFileOfNode.text.charCodeAt(comment.pos + 3) !== 47 /* slash */; + return text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && + text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && + text.charCodeAt(comment.pos + 3) !== 47 /* slash */; } } - ts.getJsDocComments = getJsDocComments; + ts.getJsDocCommentsFromText = getJsDocCommentsFromText; ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isTypeNode(node) { @@ -6464,6 +5167,57 @@ var ts; return node.kind === 221 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 232 /* ExternalModuleReference */; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; + function isSourceFileJavaScript(file) { + return isInJavaScriptFile(file); + } + ts.isSourceFileJavaScript = isSourceFileJavaScript; + function isInJavaScriptFile(node) { + return node && !!(node.parserContextFlags & 32 /* JavaScriptFile */); + } + ts.isInJavaScriptFile = isInJavaScriptFile; + /** + * Returns true if the node is a CallExpression to the identifier 'require' with + * exactly one string literal argument. + * This function does not test if the node is in a JavaScript file or not. + */ + function isRequireCall(expression) { + // of the form 'require("name")' + return expression.kind === 168 /* CallExpression */ && + expression.expression.kind === 69 /* Identifier */ && + expression.expression.text === "require" && + expression.arguments.length === 1 && + expression.arguments[0].kind === 9 /* StringLiteral */; + } + ts.isRequireCall = isRequireCall; + /** + * Returns true if the node is an assignment to a property on the identifier 'exports'. + * This function does not test if the node is in a JavaScript file or not. + */ + function isExportsPropertyAssignment(expression) { + // of the form 'exports.name = expr' where 'name' and 'expr' are arbitrary + return isInJavaScriptFile(expression) && + (expression.kind === 181 /* BinaryExpression */) && + (expression.operatorToken.kind === 56 /* EqualsToken */) && + (expression.left.kind === 166 /* PropertyAccessExpression */) && + (expression.left.expression.kind === 69 /* Identifier */) && + ((expression.left.expression).text === "exports"); + } + ts.isExportsPropertyAssignment = isExportsPropertyAssignment; + /** + * Returns true if the node is an assignment to the property access expression 'module.exports'. + * This function does not test if the node is in a JavaScript file or not. + */ + function isModuleExportsAssignment(expression) { + // of the form 'module.exports = expr' where 'expr' is arbitrary + return isInJavaScriptFile(expression) && + (expression.kind === 181 /* BinaryExpression */) && + (expression.operatorToken.kind === 56 /* EqualsToken */) && + (expression.left.kind === 166 /* PropertyAccessExpression */) && + (expression.left.expression.kind === 69 /* Identifier */) && + ((expression.left.expression).text === "module") && + (expression.left.name.text === "exports"); + } + ts.isModuleExportsAssignment = isModuleExportsAssignment; function getExternalModuleName(node) { if (node.kind === 222 /* ImportDeclaration */) { return node.moduleSpecifier; @@ -6791,8 +5545,8 @@ var ts; function getFileReferenceFromReferencePath(comment, commentRange) { var simpleReferenceRegEx = /^\/\/\/\s*/gim; - if (simpleReferenceRegEx.exec(comment)) { - if (isNoDefaultLibRegEx.exec(comment)) { + if (simpleReferenceRegEx.test(comment)) { + if (isNoDefaultLibRegEx.test(comment)) { return { isNoDefaultLib: true }; @@ -6834,6 +5588,10 @@ var ts; return isFunctionLike(node) && (node.flags & 256 /* Async */) !== 0 && !isAccessor(node); } ts.isAsyncFunctionLike = isAsyncFunctionLike; + function isStringOrNumericLiteral(kind) { + return kind === 9 /* StringLiteral */ || kind === 8 /* NumericLiteral */; + } + ts.isStringOrNumericLiteral = isStringOrNumericLiteral; /** * A declaration has a dynamic name if both of the following are true: * 1. The declaration has a computed property name @@ -6842,11 +5600,15 @@ var ts; * Symbol. */ function hasDynamicName(declaration) { - return declaration.name && - declaration.name.kind === 136 /* ComputedPropertyName */ && - !isWellKnownSymbolSyntactically(declaration.name.expression); + return declaration.name && isDynamicName(declaration.name); } ts.hasDynamicName = hasDynamicName; + function isDynamicName(name) { + return name.kind === 136 /* ComputedPropertyName */ && + !isStringOrNumericLiteral(name.expression.kind) && + !isWellKnownSymbolSyntactically(name.expression); + } + ts.isDynamicName = isDynamicName; /** * Checks if the expression is of the form: * Symbol.name @@ -7087,11 +5849,11 @@ var ts; } ts.getIndentSize = getIndentSize; function createTextWriter(newLine) { - var output = ""; - var indent = 0; - var lineStart = true; - var lineCount = 0; - var linePos = 0; + var output; + var indent; + var lineStart; + var lineCount; + var linePos; function write(s) { if (s && s.length) { if (lineStart) { @@ -7101,6 +5863,13 @@ var ts; output += s; } } + function reset() { + output = ""; + indent = 0; + lineStart = true; + lineCount = 0; + linePos = 0; + } function rawWrite(s) { if (s !== undefined) { if (lineStart) { @@ -7127,9 +5896,10 @@ var ts; lineStart = true; } } - function writeTextOfNode(sourceFile, node) { - write(getSourceTextOfNodeFromSourceFile(sourceFile, node)); + function writeTextOfNode(text, node) { + write(getTextOfNodeFromSourceText(text, node)); } + reset(); return { write: write, rawWrite: rawWrite, @@ -7142,10 +5912,20 @@ var ts; getTextPos: function () { return output.length; }, getLine: function () { return lineCount + 1; }, getColumn: function () { return lineStart ? indent * getIndentSize() + 1 : output.length - linePos + 1; }, - getText: function () { return output; } + getText: function () { return output; }, + reset: reset }; } ts.createTextWriter = createTextWriter; + /** + * Resolves a local path to a path which is absolute to the base of the emit + */ + function getExternalModuleNameFromPath(host, fileName) { + var dir = host.getCurrentDirectory(); + var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, fileName, dir, function (f) { return host.getCanonicalFileName(f); }, /*isAbsolutePathAnUrl*/ false); + return ts.removeFileExtension(relativePath); + } + ts.getExternalModuleNameFromPath = getExternalModuleNameFromPath; function getOwnEmitOutputFilePath(sourceFile, host, extension) { var compilerOptions = host.getCompilerOptions(); var emitOutputFilePathWithoutExtension; @@ -7174,6 +5954,10 @@ var ts; return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; } ts.getLineOfLocalPosition = getLineOfLocalPosition; + function getLineOfLocalPositionFromLineMap(lineMap, pos) { + return ts.computeLineAndCharacterOfPosition(lineMap, pos).line; + } + ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { if (member.kind === 144 /* Constructor */ && nodeIsPresent(member.body)) { @@ -7246,22 +6030,22 @@ var ts; }; } ts.getAllAccessorDeclarations = getAllAccessorDeclarations; - function emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments) { + function emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments) { // If the leading comments start on different line than the start of node, write new line if (leadingComments && leadingComments.length && node.pos !== leadingComments[0].pos && - getLineOfLocalPosition(currentSourceFile, node.pos) !== getLineOfLocalPosition(currentSourceFile, leadingComments[0].pos)) { + getLineOfLocalPositionFromLineMap(lineMap, node.pos) !== getLineOfLocalPositionFromLineMap(lineMap, leadingComments[0].pos)) { writer.writeLine(); } } ts.emitNewLineBeforeLeadingComments = emitNewLineBeforeLeadingComments; - function emitComments(currentSourceFile, writer, comments, trailingSeparator, newLine, writeComment) { + function emitComments(text, lineMap, writer, comments, trailingSeparator, newLine, writeComment) { var emitLeadingSpace = !trailingSeparator; ts.forEach(comments, function (comment) { if (emitLeadingSpace) { writer.write(" "); emitLeadingSpace = false; } - writeComment(currentSourceFile, writer, comment, newLine); + writeComment(text, lineMap, writer, comment, newLine); if (comment.hasTrailingNewLine) { writer.writeLine(); } @@ -7279,7 +6063,7 @@ var ts; * Detached comment is a comment at the top of file or function body that is separated from * the next statement by space. */ - function emitDetachedComments(currentSourceFile, writer, writeComment, node, newLine, removeComments) { + function emitDetachedComments(text, lineMap, writer, writeComment, node, newLine, removeComments) { var leadingComments; var currentDetachedCommentInfo; if (removeComments) { @@ -7289,12 +6073,12 @@ var ts; // // var x = 10; if (node.pos === 0) { - leadingComments = ts.filter(ts.getLeadingCommentRanges(currentSourceFile.text, node.pos), isPinnedComment); + leadingComments = ts.filter(ts.getLeadingCommentRanges(text, node.pos), isPinnedComment); } } else { // removeComments is false, just get detached as normal and bypass the process to filter comment - leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos); + leadingComments = ts.getLeadingCommentRanges(text, node.pos); } if (leadingComments) { var detachedComments = []; @@ -7302,8 +6086,8 @@ var ts; for (var _i = 0, leadingComments_1 = leadingComments; _i < leadingComments_1.length; _i++) { var comment = leadingComments_1[_i]; if (lastComment) { - var lastCommentLine = getLineOfLocalPosition(currentSourceFile, lastComment.end); - var commentLine = getLineOfLocalPosition(currentSourceFile, comment.pos); + var lastCommentLine = getLineOfLocalPositionFromLineMap(lineMap, lastComment.end); + var commentLine = getLineOfLocalPositionFromLineMap(lineMap, comment.pos); if (commentLine >= lastCommentLine + 2) { // There was a blank line between the last comment and this comment. This // comment is not part of the copyright comments. Return what we have so @@ -7318,36 +6102,36 @@ var ts; // All comments look like they could have been part of the copyright header. Make // sure there is at least one blank line between it and the node. If not, it's not // a copyright header. - var lastCommentLine = getLineOfLocalPosition(currentSourceFile, ts.lastOrUndefined(detachedComments).end); - var nodeLine = getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.pos)); + var lastCommentLine = getLineOfLocalPositionFromLineMap(lineMap, ts.lastOrUndefined(detachedComments).end); + var nodeLine = getLineOfLocalPositionFromLineMap(lineMap, ts.skipTrivia(text, node.pos)); if (nodeLine >= lastCommentLine + 2) { // Valid detachedComments - emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); - emitComments(currentSourceFile, writer, detachedComments, /*trailingSeparator*/ true, newLine, writeComment); + emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments); + emitComments(text, lineMap, writer, detachedComments, /*trailingSeparator*/ true, newLine, writeComment); currentDetachedCommentInfo = { nodePos: node.pos, detachedCommentEndPos: ts.lastOrUndefined(detachedComments).end }; } } } return currentDetachedCommentInfo; function isPinnedComment(comment) { - return currentSourceFile.text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && - currentSourceFile.text.charCodeAt(comment.pos + 2) === 33 /* exclamation */; + return text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && + text.charCodeAt(comment.pos + 2) === 33 /* exclamation */; } } ts.emitDetachedComments = emitDetachedComments; - function writeCommentRange(currentSourceFile, writer, comment, newLine) { - if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42 /* asterisk */) { - var firstCommentLineAndCharacter = ts.getLineAndCharacterOfPosition(currentSourceFile, comment.pos); - var lineCount = ts.getLineStarts(currentSourceFile).length; + function writeCommentRange(text, lineMap, writer, comment, newLine) { + if (text.charCodeAt(comment.pos + 1) === 42 /* asterisk */) { + var firstCommentLineAndCharacter = ts.computeLineAndCharacterOfPosition(lineMap, comment.pos); + var lineCount = lineMap.length; var firstCommentLineIndent; for (var pos = comment.pos, currentLine = firstCommentLineAndCharacter.line; pos < comment.end; currentLine++) { var nextLineStart = (currentLine + 1) === lineCount - ? currentSourceFile.text.length + 1 - : getStartPositionOfLine(currentLine + 1, currentSourceFile); + ? text.length + 1 + : lineMap[currentLine + 1]; if (pos !== comment.pos) { // If we are not emitting first line, we need to write the spaces to adjust the alignment if (firstCommentLineIndent === undefined) { - firstCommentLineIndent = calculateIndent(getStartPositionOfLine(firstCommentLineAndCharacter.line, currentSourceFile), comment.pos); + firstCommentLineIndent = calculateIndent(text, lineMap[firstCommentLineAndCharacter.line], comment.pos); } // These are number of spaces writer is going to write at current indent var currentWriterIndentSpacing = writer.getIndent() * getIndentSize(); @@ -7365,7 +6149,7 @@ var ts; // More right indented comment */ --4 = 8 - 4 + 11 // class c { } // } - var spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(pos, nextLineStart); + var spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(text, pos, nextLineStart); if (spacesToEmit > 0) { var numberOfSingleSpacesToEmit = spacesToEmit % getIndentSize(); var indentSizeSpaceString = getIndentString((spacesToEmit - numberOfSingleSpacesToEmit) / getIndentSize()); @@ -7383,45 +6167,45 @@ var ts; } } // Write the comment line text - writeTrimmedCurrentLine(pos, nextLineStart); + writeTrimmedCurrentLine(text, comment, writer, newLine, pos, nextLineStart); pos = nextLineStart; } } else { // Single line comment of style //.... - writer.write(currentSourceFile.text.substring(comment.pos, comment.end)); - } - function writeTrimmedCurrentLine(pos, nextLineStart) { - var end = Math.min(comment.end, nextLineStart - 1); - var currentLineText = currentSourceFile.text.substring(pos, end).replace(/^\s+|\s+$/g, ""); - if (currentLineText) { - // trimmed forward and ending spaces text - writer.write(currentLineText); - if (end !== comment.end) { - writer.writeLine(); - } - } - else { - // Empty string - make sure we write empty line - writer.writeLiteral(newLine); + writer.write(text.substring(comment.pos, comment.end)); + } + } + ts.writeCommentRange = writeCommentRange; + function writeTrimmedCurrentLine(text, comment, writer, newLine, pos, nextLineStart) { + var end = Math.min(comment.end, nextLineStart - 1); + var currentLineText = text.substring(pos, end).replace(/^\s+|\s+$/g, ""); + if (currentLineText) { + // trimmed forward and ending spaces text + writer.write(currentLineText); + if (end !== comment.end) { + writer.writeLine(); } } - function calculateIndent(pos, end) { - var currentLineIndent = 0; - for (; pos < end && ts.isWhiteSpace(currentSourceFile.text.charCodeAt(pos)); pos++) { - if (currentSourceFile.text.charCodeAt(pos) === 9 /* tab */) { - // Tabs = TabSize = indent size and go to next tabStop - currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); - } - else { - // Single space - currentLineIndent++; - } + else { + // Empty string - make sure we write empty line + writer.writeLiteral(newLine); + } + } + function calculateIndent(text, pos, end) { + var currentLineIndent = 0; + for (; pos < end && ts.isWhiteSpace(text.charCodeAt(pos)); pos++) { + if (text.charCodeAt(pos) === 9 /* tab */) { + // Tabs = TabSize = indent size and go to next tabStop + currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); + } + else { + // Single space + currentLineIndent++; } - return currentLineIndent; } + return currentLineIndent; } - ts.writeCommentRange = writeCommentRange; function modifierToFlag(token) { switch (token) { case 113 /* StaticKeyword */: return 64 /* Static */; @@ -7517,14 +6301,14 @@ var ts; return symbol && symbol.valueDeclaration && (symbol.valueDeclaration.flags & 512 /* Default */) ? symbol.valueDeclaration.localSymbol : undefined; } ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault; - function isJavaScript(fileName) { - return ts.fileExtensionIs(fileName, ".js"); + function hasJavaScriptFileExtension(fileName) { + return ts.fileExtensionIs(fileName, ".js") || ts.fileExtensionIs(fileName, ".jsx"); } - ts.isJavaScript = isJavaScript; - function isTsx(fileName) { - return ts.fileExtensionIs(fileName, ".tsx"); + ts.hasJavaScriptFileExtension = hasJavaScriptFileExtension; + function allowsJsxExpressions(fileName) { + return ts.fileExtensionIs(fileName, ".tsx") || ts.fileExtensionIs(fileName, ".jsx"); } - ts.isTsx = isTsx; + ts.allowsJsxExpressions = allowsJsxExpressions; /** * Replace each instance of non-ascii characters by one, two, three, or four escape sequences * representing the UTF-8 encoding of the character, and return the expanded char code list. @@ -7835,18 +6619,20 @@ var ts; } ts.getTypeParameterOwner = getTypeParameterOwner; })(ts || (ts = {})); -/// /// +/// var ts; (function (ts) { - var nodeConstructors = new Array(272 /* Count */); /* @internal */ ts.parseTime = 0; - function getNodeConstructor(kind) { - return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)); - } - ts.getNodeConstructor = getNodeConstructor; + var NodeConstructor; + var SourceFileConstructor; function createNode(kind, pos, end) { - return new (getNodeConstructor(kind))(pos, end); + if (kind === 248 /* SourceFile */) { + return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); + } + else { + return new (NodeConstructor || (NodeConstructor = ts.objectAllocator.getNodeConstructor()))(kind, pos, end); + } } ts.createNode = createNode; function visitNode(cbNode, node) { @@ -8269,6 +7055,9 @@ var ts; // up by avoiding the cost of creating/compiling scanners over and over again. var scanner = ts.createScanner(2 /* Latest */, /*skipTrivia*/ true); var disallowInAndDecoratorContext = 1 /* DisallowIn */ | 4 /* Decorator */; + // capture constructors in 'initializeState' to avoid null checks + var NodeConstructor; + var SourceFileConstructor; var sourceFile; var parseDiagnostics; var syntaxCursor; @@ -8354,13 +7143,16 @@ var ts; // attached to the EOF token. var parseErrorBeforeNextFinishedNode = false; function parseSourceFile(fileName, _sourceText, languageVersion, _syntaxCursor, setParentNodes) { - initializeState(fileName, _sourceText, languageVersion, _syntaxCursor); + var isJavaScriptFile = ts.hasJavaScriptFileExtension(fileName) || _sourceText.lastIndexOf("// @language=javascript", 0) === 0; + initializeState(fileName, _sourceText, languageVersion, isJavaScriptFile, _syntaxCursor); var result = parseSourceFileWorker(fileName, languageVersion, setParentNodes); clearState(); return result; } Parser.parseSourceFile = parseSourceFile; - function initializeState(fileName, _sourceText, languageVersion, _syntaxCursor) { + function initializeState(fileName, _sourceText, languageVersion, isJavaScriptFile, _syntaxCursor) { + NodeConstructor = ts.objectAllocator.getNodeConstructor(); + SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor(); sourceText = _sourceText; syntaxCursor = _syntaxCursor; parseDiagnostics = []; @@ -8368,13 +7160,13 @@ var ts; identifiers = {}; identifierCount = 0; nodeCount = 0; - contextFlags = ts.isJavaScript(fileName) ? 32 /* JavaScriptFile */ : 0 /* None */; + contextFlags = isJavaScriptFile ? 32 /* JavaScriptFile */ : 0 /* None */; parseErrorBeforeNextFinishedNode = false; // Initialize and prime the scanner before parsing the source elements. scanner.setText(sourceText); scanner.setOnError(scanError); scanner.setScriptTarget(languageVersion); - scanner.setLanguageVariant(ts.isTsx(fileName) ? 1 /* JSX */ : 0 /* Standard */); + scanner.setLanguageVariant(ts.allowsJsxExpressions(fileName) ? 1 /* JSX */ : 0 /* Standard */); } function clearState() { // Clear out the text the scanner is pointing at, so it doesn't keep anything alive unnecessarily. @@ -8389,6 +7181,9 @@ var ts; } function parseSourceFileWorker(fileName, languageVersion, setParentNodes) { sourceFile = createSourceFile(fileName, languageVersion); + if (contextFlags & 32 /* JavaScriptFile */) { + sourceFile.parserContextFlags = 32 /* JavaScriptFile */; + } // Prime the scanner. token = nextToken(); processReferenceComments(sourceFile); @@ -8406,7 +7201,7 @@ var ts; // If this is a javascript file, proactively see if we can get JSDoc comments for // relevant nodes in the file. We'll use these to provide typing informaion if they're // available. - if (ts.isJavaScript(fileName)) { + if (ts.isSourceFileJavaScript(sourceFile)) { addJSDocComments(); } return sourceFile; @@ -8461,15 +7256,16 @@ var ts; } Parser.fixupParentReferences = fixupParentReferences; function createSourceFile(fileName, languageVersion) { - var sourceFile = createNode(248 /* SourceFile */, /*pos*/ 0); - sourceFile.pos = 0; - sourceFile.end = sourceText.length; + // code from createNode is inlined here so createNode won't have to deal with special case of creating source files + // this is quite rare comparing to other nodes and createNode should be as fast as possible + var sourceFile = new SourceFileConstructor(248 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length); + nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; sourceFile.languageVersion = languageVersion; sourceFile.fileName = ts.normalizePath(fileName); sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 4096 /* DeclarationFile */ : 0; - sourceFile.languageVariant = ts.isTsx(sourceFile.fileName) ? 1 /* JSX */ : 0 /* Standard */; + sourceFile.languageVariant = ts.allowsJsxExpressions(sourceFile.fileName) ? 1 /* JSX */ : 0 /* Standard */; return sourceFile; } function setContextFlag(val, flag) { @@ -8734,12 +7530,13 @@ var ts; return parseExpected(23 /* SemicolonToken */); } } + // note: this function creates only node function createNode(kind, pos) { nodeCount++; if (!(pos >= 0)) { pos = scanner.getStartPos(); } - return new (nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)))(pos, pos); + return new NodeConstructor(kind, pos, pos); } function finishNode(node, end) { node.end = end === undefined ? scanner.getStartPos() : end; @@ -8904,7 +7701,7 @@ var ts; case 12 /* ObjectLiteralMembers */: return token === 19 /* OpenBracketToken */ || token === 37 /* AsteriskToken */ || isLiteralPropertyName(); case 9 /* ObjectBindingElements */: - return isLiteralPropertyName(); + return token === 19 /* OpenBracketToken */ || isLiteralPropertyName(); case 7 /* HeritageClauseElement */: // If we see { } then only consume it as an expression if it is followed by , or { // That way we won't consume the body of a class in its heritage clause. @@ -9584,9 +8381,7 @@ var ts; } function parseParameterType() { if (parseOptional(54 /* ColonToken */)) { - return token === 9 /* StringLiteral */ - ? parseLiteralNode(/*internName*/ true) - : parseType(); + return parseType(); } return undefined; } @@ -9917,6 +8712,8 @@ var ts; // If these are followed by a dot, then parse these out as a dotted type reference instead. var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReferenceOrTypePredicate(); + case 9 /* StringLiteral */: + return parseLiteralNode(/*internName*/ true); case 103 /* VoidKeyword */: case 97 /* ThisKeyword */: return parseTokenNode(); @@ -9946,6 +8743,7 @@ var ts; case 19 /* OpenBracketToken */: case 25 /* LessThanToken */: case 92 /* NewKeyword */: + case 9 /* StringLiteral */: return true; case 17 /* OpenParenToken */: // Only consider '(' the start of a type if followed by ')', '...', an identifier, a modifier, @@ -10362,7 +9160,7 @@ var ts; return 1 /* True */; } // This *could* be a parenthesized arrow function. - // Return Unknown to let the caller know. + // Return Unknown to const the caller know. return 2 /* Unknown */; } else { @@ -10448,7 +9246,7 @@ var ts; // user meant to supply a block. For example, if the user wrote: // // a => - // let v = 0; + // const v = 0; // } // // they may be missing an open brace. Check to see if that's the case so we can @@ -10485,3202 +9283,4567 @@ var ts; function isInOrOfKeyword(t) { return t === 90 /* InKeyword */ || t === 134 /* OfKeyword */; } - function parseBinaryExpressionRest(precedence, leftOperand) { + function parseBinaryExpressionRest(precedence, leftOperand) { + while (true) { + // We either have a binary operator here, or we're finished. We call + // reScanGreaterToken so that we merge token sequences like > and = into >= + reScanGreaterToken(); + var newPrecedence = getBinaryOperatorPrecedence(); + // Check the precedence to see if we should "take" this operator + // - For left associative operator (all operator but **), consume the operator, + // recursively call the function below, and parse binaryExpression as a rightOperand + // of the caller if the new precendence of the operator is greater then or equal to the current precendence. + // For example: + // a - b - c; + // ^token; leftOperand = b. Return b to the caller as a rightOperand + // a * b - c + // ^token; leftOperand = b. Return b to the caller as a rightOperand + // a - b * c; + // ^token; leftOperand = b. Return b * c to the caller as a rightOperand + // - For right associative operator (**), consume the operator, recursively call the function + // and parse binaryExpression as a rightOperand of the caller if the new precendence of + // the operator is strictly grater than the current precendence + // For example: + // a ** b ** c; + // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand + // a - b ** c; + // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand + // a ** b - c + // ^token; leftOperand = b. Return b to the caller as a rightOperand + var consumeCurrentOperator = token === 38 /* AsteriskAsteriskToken */ ? + newPrecedence >= precedence : + newPrecedence > precedence; + if (!consumeCurrentOperator) { + break; + } + if (token === 90 /* InKeyword */ && inDisallowInContext()) { + break; + } + if (token === 116 /* AsKeyword */) { + // Make sure we *do* perform ASI for constructs like this: + // var x = foo + // as (Bar) + // This should be parsed as an initialized variable, followed + // by a function call to 'as' with the argument 'Bar' + if (scanner.hasPrecedingLineBreak()) { + break; + } + else { + nextToken(); + leftOperand = makeAsExpression(leftOperand, parseType()); + } + } + else { + leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence)); + } + } + return leftOperand; + } + function isBinaryOperator() { + if (inDisallowInContext() && token === 90 /* InKeyword */) { + return false; + } + return getBinaryOperatorPrecedence() > 0; + } + function getBinaryOperatorPrecedence() { + switch (token) { + case 52 /* BarBarToken */: + return 1; + case 51 /* AmpersandAmpersandToken */: + return 2; + case 47 /* BarToken */: + return 3; + case 48 /* CaretToken */: + return 4; + case 46 /* AmpersandToken */: + return 5; + case 30 /* EqualsEqualsToken */: + case 31 /* ExclamationEqualsToken */: + case 32 /* EqualsEqualsEqualsToken */: + case 33 /* ExclamationEqualsEqualsToken */: + return 6; + case 25 /* LessThanToken */: + case 27 /* GreaterThanToken */: + case 28 /* LessThanEqualsToken */: + case 29 /* GreaterThanEqualsToken */: + case 91 /* InstanceOfKeyword */: + case 90 /* InKeyword */: + case 116 /* AsKeyword */: + return 7; + case 43 /* LessThanLessThanToken */: + case 44 /* GreaterThanGreaterThanToken */: + case 45 /* GreaterThanGreaterThanGreaterThanToken */: + return 8; + case 35 /* PlusToken */: + case 36 /* MinusToken */: + return 9; + case 37 /* AsteriskToken */: + case 39 /* SlashToken */: + case 40 /* PercentToken */: + return 10; + case 38 /* AsteriskAsteriskToken */: + return 11; + } + // -1 is lower than all other precedences. Returning it will cause binary expression + // parsing to stop. + return -1; + } + function makeBinaryExpression(left, operatorToken, right) { + var node = createNode(181 /* BinaryExpression */, left.pos); + node.left = left; + node.operatorToken = operatorToken; + node.right = right; + return finishNode(node); + } + function makeAsExpression(left, right) { + var node = createNode(189 /* AsExpression */, left.pos); + node.expression = left; + node.type = right; + return finishNode(node); + } + function parsePrefixUnaryExpression() { + var node = createNode(179 /* PrefixUnaryExpression */); + node.operator = token; + nextToken(); + node.operand = parseSimpleUnaryExpression(); + return finishNode(node); + } + function parseDeleteExpression() { + var node = createNode(175 /* DeleteExpression */); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); + } + function parseTypeOfExpression() { + var node = createNode(176 /* TypeOfExpression */); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); + } + function parseVoidExpression() { + var node = createNode(177 /* VoidExpression */); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); + } + function isAwaitExpression() { + if (token === 119 /* AwaitKeyword */) { + if (inAwaitContext()) { + return true; + } + // here we are using similar heuristics as 'isYieldExpression' + return lookAhead(nextTokenIsIdentifierOnSameLine); + } + return false; + } + function parseAwaitExpression() { + var node = createNode(178 /* AwaitExpression */); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); + } + /** + * Parse ES7 unary expression and await expression + * + * ES7 UnaryExpression: + * 1) SimpleUnaryExpression[?yield] + * 2) IncrementExpression[?yield] ** UnaryExpression[?yield] + */ + function parseUnaryExpressionOrHigher() { + if (isAwaitExpression()) { + return parseAwaitExpression(); + } + if (isIncrementExpression()) { + var incrementExpression = parseIncrementExpression(); + return token === 38 /* AsteriskAsteriskToken */ ? + parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : + incrementExpression; + } + var unaryOperator = token; + var simpleUnaryExpression = parseSimpleUnaryExpression(); + if (token === 38 /* AsteriskAsteriskToken */) { + var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); + if (simpleUnaryExpression.kind === 171 /* TypeAssertionExpression */) { + parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); + } + else { + parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, ts.tokenToString(unaryOperator)); + } + } + return simpleUnaryExpression; + } + /** + * Parse ES7 simple-unary expression or higher: + * + * ES7 SimpleUnaryExpression: + * 1) IncrementExpression[?yield] + * 2) delete UnaryExpression[?yield] + * 3) void UnaryExpression[?yield] + * 4) typeof UnaryExpression[?yield] + * 5) + UnaryExpression[?yield] + * 6) - UnaryExpression[?yield] + * 7) ~ UnaryExpression[?yield] + * 8) ! UnaryExpression[?yield] + */ + function parseSimpleUnaryExpression() { + switch (token) { + case 35 /* PlusToken */: + case 36 /* MinusToken */: + case 50 /* TildeToken */: + case 49 /* ExclamationToken */: + return parsePrefixUnaryExpression(); + case 78 /* DeleteKeyword */: + return parseDeleteExpression(); + case 101 /* TypeOfKeyword */: + return parseTypeOfExpression(); + case 103 /* VoidKeyword */: + return parseVoidExpression(); + case 25 /* LessThanToken */: + // This is modified UnaryExpression grammar in TypeScript + // UnaryExpression (modified): + // < type > UnaryExpression + return parseTypeAssertion(); + default: + return parseIncrementExpression(); + } + } + /** + * Check if the current token can possibly be an ES7 increment expression. + * + * ES7 IncrementExpression: + * LeftHandSideExpression[?Yield] + * LeftHandSideExpression[?Yield][no LineTerminator here]++ + * LeftHandSideExpression[?Yield][no LineTerminator here]-- + * ++LeftHandSideExpression[?Yield] + * --LeftHandSideExpression[?Yield] + */ + function isIncrementExpression() { + // This function is called inside parseUnaryExpression to decide + // whether to call parseSimpleUnaryExpression or call parseIncrmentExpression directly + switch (token) { + case 35 /* PlusToken */: + case 36 /* MinusToken */: + case 50 /* TildeToken */: + case 49 /* ExclamationToken */: + case 78 /* DeleteKeyword */: + case 101 /* TypeOfKeyword */: + case 103 /* VoidKeyword */: + return false; + case 25 /* LessThanToken */: + // If we are not in JSX context, we are parsing TypeAssertion which is an UnaryExpression + if (sourceFile.languageVariant !== 1 /* JSX */) { + return false; + } + // We are in JSX context and the token is part of JSXElement. + // Fall through + default: + return true; + } + } + /** + * Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. + * + * ES7 IncrementExpression[yield]: + * 1) LeftHandSideExpression[?yield] + * 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ + * 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- + * 4) ++LeftHandSideExpression[?yield] + * 5) --LeftHandSideExpression[?yield] + * In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression + */ + function parseIncrementExpression() { + if (token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) { + var node = createNode(179 /* PrefixUnaryExpression */); + node.operator = token; + nextToken(); + node.operand = parseLeftHandSideExpressionOrHigher(); + return finishNode(node); + } + else if (sourceFile.languageVariant === 1 /* JSX */ && token === 25 /* LessThanToken */ && lookAhead(nextTokenIsIdentifierOrKeyword)) { + // JSXElement is part of primaryExpression + return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); + } + var expression = parseLeftHandSideExpressionOrHigher(); + ts.Debug.assert(ts.isLeftHandSideExpression(expression)); + if ((token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { + var node = createNode(180 /* PostfixUnaryExpression */, expression.pos); + node.operand = expression; + node.operator = token; + nextToken(); + return finishNode(node); + } + return expression; + } + function parseLeftHandSideExpressionOrHigher() { + // Original Ecma: + // LeftHandSideExpression: See 11.2 + // NewExpression + // CallExpression + // + // Our simplification: + // + // LeftHandSideExpression: See 11.2 + // MemberExpression + // CallExpression + // + // See comment in parseMemberExpressionOrHigher on how we replaced NewExpression with + // MemberExpression to make our lives easier. + // + // to best understand the below code, it's important to see how CallExpression expands + // out into its own productions: + // + // CallExpression: + // MemberExpression Arguments + // CallExpression Arguments + // CallExpression[Expression] + // CallExpression.IdentifierName + // super ( ArgumentListopt ) + // super.IdentifierName + // + // Because of the recursion in these calls, we need to bottom out first. There are two + // bottom out states we can run into. Either we see 'super' which must start either of + // the last two CallExpression productions. Or we have a MemberExpression which either + // completes the LeftHandSideExpression, or starts the beginning of the first four + // CallExpression productions. + var expression = token === 95 /* SuperKeyword */ + ? parseSuperExpression() + : parseMemberExpressionOrHigher(); + // Now, we *may* be complete. However, we might have consumed the start of a + // CallExpression. As such, we need to consume the rest of it here to be complete. + return parseCallExpressionRest(expression); + } + function parseMemberExpressionOrHigher() { + // Note: to make our lives simpler, we decompose the the NewExpression productions and + // place ObjectCreationExpression and FunctionExpression into PrimaryExpression. + // like so: + // + // PrimaryExpression : See 11.1 + // this + // Identifier + // Literal + // ArrayLiteral + // ObjectLiteral + // (Expression) + // FunctionExpression + // new MemberExpression Arguments? + // + // MemberExpression : See 11.2 + // PrimaryExpression + // MemberExpression[Expression] + // MemberExpression.IdentifierName + // + // CallExpression : See 11.2 + // MemberExpression + // CallExpression Arguments + // CallExpression[Expression] + // CallExpression.IdentifierName + // + // Technically this is ambiguous. i.e. CallExpression defines: + // + // CallExpression: + // CallExpression Arguments + // + // If you see: "new Foo()" + // + // Then that could be treated as a single ObjectCreationExpression, or it could be + // treated as the invocation of "new Foo". We disambiguate that in code (to match + // the original grammar) by making sure that if we see an ObjectCreationExpression + // we always consume arguments if they are there. So we treat "new Foo()" as an + // object creation only, and not at all as an invocation) Another way to think + // about this is that for every "new" that we see, we will consume an argument list if + // it is there as part of the *associated* object creation node. Any additional + // argument lists we see, will become invocation expressions. + // + // Because there are no other places in the grammar now that refer to FunctionExpression + // or ObjectCreationExpression, it is safe to push down into the PrimaryExpression + // production. + // + // Because CallExpression and MemberExpression are left recursive, we need to bottom out + // of the recursion immediately. So we parse out a primary expression to start with. + var expression = parsePrimaryExpression(); + return parseMemberExpressionRest(expression); + } + function parseSuperExpression() { + var expression = parseTokenNode(); + if (token === 17 /* OpenParenToken */ || token === 21 /* DotToken */ || token === 19 /* OpenBracketToken */) { + return expression; + } + // If we have seen "super" it must be followed by '(' or '.'. + // If it wasn't then just try to parse out a '.' and report an error. + var node = createNode(166 /* PropertyAccessExpression */, expression.pos); + node.expression = expression; + node.dotToken = parseExpectedToken(21 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + node.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); + return finishNode(node); + } + function parseJsxElementOrSelfClosingElement(inExpressionContext) { + var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); + var result; + if (opening.kind === 235 /* JsxOpeningElement */) { + var node = createNode(233 /* JsxElement */, opening.pos); + node.openingElement = opening; + node.children = parseJsxChildren(node.openingElement.tagName); + node.closingElement = parseJsxClosingElement(inExpressionContext); + result = finishNode(node); + } + else { + ts.Debug.assert(opening.kind === 234 /* JsxSelfClosingElement */); + // Nothing else to do for self-closing elements + result = opening; + } + // If the user writes the invalid code '
' in an expression context (i.e. not wrapped in + // an enclosing tag), we'll naively try to parse ^ this as a 'less than' operator and the remainder of the tag + // as garbage, which will cause the formatter to badly mangle the JSX. Perform a speculative parse of a JSX + // element if we see a < token so that we can wrap it in a synthetic binary expression so the formatter + // does less damage and we can report a better error. + // Since JSX elements are invalid < operands anyway, this lookahead parse will only occur in error scenarios + // of one sort or another. + if (inExpressionContext && token === 25 /* LessThanToken */) { + var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); }); + if (invalidElement) { + parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); + var badNode = createNode(181 /* BinaryExpression */, result.pos); + badNode.end = invalidElement.end; + badNode.left = result; + badNode.right = invalidElement; + badNode.operatorToken = createMissingNode(24 /* CommaToken */, /*reportAtCurrentPosition*/ false, /*diagnosticMessage*/ undefined); + badNode.operatorToken.pos = badNode.operatorToken.end = badNode.right.pos; + return badNode; + } + } + return result; + } + function parseJsxText() { + var node = createNode(236 /* JsxText */, scanner.getStartPos()); + token = scanner.scanJsxToken(); + return finishNode(node); + } + function parseJsxChild() { + switch (token) { + case 236 /* JsxText */: + return parseJsxText(); + case 15 /* OpenBraceToken */: + return parseJsxExpression(/*inExpressionContext*/ false); + case 25 /* LessThanToken */: + return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ false); + } + ts.Debug.fail("Unknown JSX child kind " + token); + } + function parseJsxChildren(openingTagName) { + var result = []; + result.pos = scanner.getStartPos(); + var saveParsingContext = parsingContext; + parsingContext |= 1 << 14 /* JsxChildren */; while (true) { - // We either have a binary operator here, or we're finished. We call - // reScanGreaterToken so that we merge token sequences like > and = into >= - reScanGreaterToken(); - var newPrecedence = getBinaryOperatorPrecedence(); - // Check the precedence to see if we should "take" this operator - // - For left associative operator (all operator but **), consume the operator, - // recursively call the function below, and parse binaryExpression as a rightOperand - // of the caller if the new precendence of the operator is greater then or equal to the current precendence. - // For example: - // a - b - c; - // ^token; leftOperand = b. Return b to the caller as a rightOperand - // a * b - c - // ^token; leftOperand = b. Return b to the caller as a rightOperand - // a - b * c; - // ^token; leftOperand = b. Return b * c to the caller as a rightOperand - // - For right associative operator (**), consume the operator, recursively call the function - // and parse binaryExpression as a rightOperand of the caller if the new precendence of - // the operator is strictly grater than the current precendence - // For example: - // a ** b ** c; - // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand - // a - b ** c; - // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand - // a ** b - c - // ^token; leftOperand = b. Return b to the caller as a rightOperand - var consumeCurrentOperator = token === 38 /* AsteriskAsteriskToken */ ? - newPrecedence >= precedence : - newPrecedence > precedence; - if (!consumeCurrentOperator) { + token = scanner.reScanJsxToken(); + if (token === 26 /* LessThanSlashToken */) { break; } - if (token === 90 /* InKeyword */ && inDisallowInContext()) { + else if (token === 1 /* EndOfFileToken */) { + parseErrorAtCurrentToken(ts.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, ts.getTextOfNodeFromSourceText(sourceText, openingTagName)); break; } - if (token === 116 /* AsKeyword */) { - // Make sure we *do* perform ASI for constructs like this: - // var x = foo - // as (Bar) - // This should be parsed as an initialized variable, followed - // by a function call to 'as' with the argument 'Bar' - if (scanner.hasPrecedingLineBreak()) { - break; - } - else { - nextToken(); - leftOperand = makeAsExpression(leftOperand, parseType()); - } + result.push(parseJsxChild()); + } + result.end = scanner.getTokenPos(); + parsingContext = saveParsingContext; + return result; + } + function parseJsxOpeningOrSelfClosingElement(inExpressionContext) { + var fullStart = scanner.getStartPos(); + parseExpected(25 /* LessThanToken */); + var tagName = parseJsxElementName(); + var attributes = parseList(13 /* JsxAttributes */, parseJsxAttribute); + var node; + if (token === 27 /* GreaterThanToken */) { + // Closing tag, so scan the immediately-following text with the JSX scanning instead + // of regular scanning to avoid treating illegal characters (e.g. '#') as immediate + // scanning errors + node = createNode(235 /* JsxOpeningElement */, fullStart); + scanJsxText(); + } + else { + parseExpected(39 /* SlashToken */); + if (inExpressionContext) { + parseExpected(27 /* GreaterThanToken */); } else { - leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence)); + parseExpected(27 /* GreaterThanToken */, /*diagnostic*/ undefined, /*advance*/ false); + scanJsxText(); } + node = createNode(234 /* JsxSelfClosingElement */, fullStart); } - return leftOperand; + node.tagName = tagName; + node.attributes = attributes; + return finishNode(node); } - function isBinaryOperator() { - if (inDisallowInContext() && token === 90 /* InKeyword */) { - return false; + function parseJsxElementName() { + scanJsxIdentifier(); + var elementName = parseIdentifierName(); + while (parseOptional(21 /* DotToken */)) { + scanJsxIdentifier(); + var node = createNode(135 /* QualifiedName */, elementName.pos); + node.left = elementName; + node.right = parseIdentifierName(); + elementName = finishNode(node); } - return getBinaryOperatorPrecedence() > 0; + return elementName; } - function getBinaryOperatorPrecedence() { - switch (token) { - case 52 /* BarBarToken */: - return 1; - case 51 /* AmpersandAmpersandToken */: - return 2; - case 47 /* BarToken */: - return 3; - case 48 /* CaretToken */: - return 4; - case 46 /* AmpersandToken */: - return 5; - case 30 /* EqualsEqualsToken */: - case 31 /* ExclamationEqualsToken */: - case 32 /* EqualsEqualsEqualsToken */: - case 33 /* ExclamationEqualsEqualsToken */: - return 6; - case 25 /* LessThanToken */: - case 27 /* GreaterThanToken */: - case 28 /* LessThanEqualsToken */: - case 29 /* GreaterThanEqualsToken */: - case 91 /* InstanceOfKeyword */: - case 90 /* InKeyword */: - case 116 /* AsKeyword */: - return 7; - case 43 /* LessThanLessThanToken */: - case 44 /* GreaterThanGreaterThanToken */: - case 45 /* GreaterThanGreaterThanGreaterThanToken */: - return 8; - case 35 /* PlusToken */: - case 36 /* MinusToken */: - return 9; - case 37 /* AsteriskToken */: - case 39 /* SlashToken */: - case 40 /* PercentToken */: - return 10; - case 38 /* AsteriskAsteriskToken */: - return 11; + function parseJsxExpression(inExpressionContext) { + var node = createNode(240 /* JsxExpression */); + parseExpected(15 /* OpenBraceToken */); + if (token !== 16 /* CloseBraceToken */) { + node.expression = parseExpression(); + } + if (inExpressionContext) { + parseExpected(16 /* CloseBraceToken */); + } + else { + parseExpected(16 /* CloseBraceToken */, /*message*/ undefined, /*advance*/ false); + scanJsxText(); } - // -1 is lower than all other precedences. Returning it will cause binary expression - // parsing to stop. - return -1; - } - function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(181 /* BinaryExpression */, left.pos); - node.left = left; - node.operatorToken = operatorToken; - node.right = right; return finishNode(node); } - function makeAsExpression(left, right) { - var node = createNode(189 /* AsExpression */, left.pos); - node.expression = left; - node.type = right; + function parseJsxAttribute() { + if (token === 15 /* OpenBraceToken */) { + return parseJsxSpreadAttribute(); + } + scanJsxIdentifier(); + var node = createNode(238 /* JsxAttribute */); + node.name = parseIdentifierName(); + if (parseOptional(56 /* EqualsToken */)) { + switch (token) { + case 9 /* StringLiteral */: + node.initializer = parseLiteralNode(); + break; + default: + node.initializer = parseJsxExpression(/*inExpressionContext*/ true); + break; + } + } return finishNode(node); } - function parsePrefixUnaryExpression() { - var node = createNode(179 /* PrefixUnaryExpression */); - node.operator = token; - nextToken(); - node.operand = parseSimpleUnaryExpression(); + function parseJsxSpreadAttribute() { + var node = createNode(239 /* JsxSpreadAttribute */); + parseExpected(15 /* OpenBraceToken */); + parseExpected(22 /* DotDotDotToken */); + node.expression = parseExpression(); + parseExpected(16 /* CloseBraceToken */); return finishNode(node); } - function parseDeleteExpression() { - var node = createNode(175 /* DeleteExpression */); - nextToken(); - node.expression = parseSimpleUnaryExpression(); + function parseJsxClosingElement(inExpressionContext) { + var node = createNode(237 /* JsxClosingElement */); + parseExpected(26 /* LessThanSlashToken */); + node.tagName = parseJsxElementName(); + if (inExpressionContext) { + parseExpected(27 /* GreaterThanToken */); + } + else { + parseExpected(27 /* GreaterThanToken */, /*diagnostic*/ undefined, /*advance*/ false); + scanJsxText(); + } return finishNode(node); } - function parseTypeOfExpression() { - var node = createNode(176 /* TypeOfExpression */); - nextToken(); + function parseTypeAssertion() { + var node = createNode(171 /* TypeAssertionExpression */); + parseExpected(25 /* LessThanToken */); + node.type = parseType(); + parseExpected(27 /* GreaterThanToken */); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } - function parseVoidExpression() { - var node = createNode(177 /* VoidExpression */); - nextToken(); - node.expression = parseSimpleUnaryExpression(); - return finishNode(node); + function parseMemberExpressionRest(expression) { + while (true) { + var dotToken = parseOptionalToken(21 /* DotToken */); + if (dotToken) { + var propertyAccess = createNode(166 /* PropertyAccessExpression */, expression.pos); + propertyAccess.expression = expression; + propertyAccess.dotToken = dotToken; + propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); + expression = finishNode(propertyAccess); + continue; + } + // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName + if (!inDecoratorContext() && parseOptional(19 /* OpenBracketToken */)) { + var indexedAccess = createNode(167 /* ElementAccessExpression */, expression.pos); + indexedAccess.expression = expression; + // It's not uncommon for a user to write: "new Type[]". + // Check for that common pattern and report a better error message. + if (token !== 20 /* CloseBracketToken */) { + indexedAccess.argumentExpression = allowInAnd(parseExpression); + if (indexedAccess.argumentExpression.kind === 9 /* StringLiteral */ || indexedAccess.argumentExpression.kind === 8 /* NumericLiteral */) { + var literal = indexedAccess.argumentExpression; + literal.text = internIdentifier(literal.text); + } + } + parseExpected(20 /* CloseBracketToken */); + expression = finishNode(indexedAccess); + continue; + } + if (token === 11 /* NoSubstitutionTemplateLiteral */ || token === 12 /* TemplateHead */) { + var tagExpression = createNode(170 /* TaggedTemplateExpression */, expression.pos); + tagExpression.tag = expression; + tagExpression.template = token === 11 /* NoSubstitutionTemplateLiteral */ + ? parseLiteralNode() + : parseTemplateExpression(); + expression = finishNode(tagExpression); + continue; + } + return expression; + } } - function isAwaitExpression() { - if (token === 119 /* AwaitKeyword */) { - if (inAwaitContext()) { - return true; + function parseCallExpressionRest(expression) { + while (true) { + expression = parseMemberExpressionRest(expression); + if (token === 25 /* LessThanToken */) { + // See if this is the start of a generic invocation. If so, consume it and + // keep checking for postfix expressions. Otherwise, it's just a '<' that's + // part of an arithmetic expression. Break out so we consume it higher in the + // stack. + var typeArguments = tryParse(parseTypeArgumentsInExpression); + if (!typeArguments) { + return expression; + } + var callExpr = createNode(168 /* CallExpression */, expression.pos); + callExpr.expression = expression; + callExpr.typeArguments = typeArguments; + callExpr.arguments = parseArgumentList(); + expression = finishNode(callExpr); + continue; } - // here we are using similar heuristics as 'isYieldExpression' - return lookAhead(nextTokenIsIdentifierOnSameLine); + else if (token === 17 /* OpenParenToken */) { + var callExpr = createNode(168 /* CallExpression */, expression.pos); + callExpr.expression = expression; + callExpr.arguments = parseArgumentList(); + expression = finishNode(callExpr); + continue; + } + return expression; } - return false; } - function parseAwaitExpression() { - var node = createNode(178 /* AwaitExpression */); - nextToken(); - node.expression = parseSimpleUnaryExpression(); - return finishNode(node); + function parseArgumentList() { + parseExpected(17 /* OpenParenToken */); + var result = parseDelimitedList(11 /* ArgumentExpressions */, parseArgumentExpression); + parseExpected(18 /* CloseParenToken */); + return result; } - /** - * Parse ES7 unary expression and await expression - * - * ES7 UnaryExpression: - * 1) SimpleUnaryExpression[?yield] - * 2) IncrementExpression[?yield] ** UnaryExpression[?yield] - */ - function parseUnaryExpressionOrHigher() { - if (isAwaitExpression()) { - return parseAwaitExpression(); - } - if (isIncrementExpression()) { - var incrementExpression = parseIncrementExpression(); - return token === 38 /* AsteriskAsteriskToken */ ? - parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : - incrementExpression; + function parseTypeArgumentsInExpression() { + if (!parseOptional(25 /* LessThanToken */)) { + return undefined; } - var unaryOperator = token; - var simpleUnaryExpression = parseSimpleUnaryExpression(); - if (token === 38 /* AsteriskAsteriskToken */) { - var diagnostic; - var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 171 /* TypeAssertionExpression */) { - parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); - } - else { - parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, ts.tokenToString(unaryOperator)); - } + var typeArguments = parseDelimitedList(18 /* TypeArguments */, parseType); + if (!parseExpected(27 /* GreaterThanToken */)) { + // If it doesn't have the closing > then it's definitely not an type argument list. + return undefined; } - return simpleUnaryExpression; + // If we have a '<', then only parse this as a arugment list if the type arguments + // are complete and we have an open paren. if we don't, rewind and return nothing. + return typeArguments && canFollowTypeArgumentsInExpression() + ? typeArguments + : undefined; } - /** - * Parse ES7 simple-unary expression or higher: - * - * ES7 SimpleUnaryExpression: - * 1) IncrementExpression[?yield] - * 2) delete UnaryExpression[?yield] - * 3) void UnaryExpression[?yield] - * 4) typeof UnaryExpression[?yield] - * 5) + UnaryExpression[?yield] - * 6) - UnaryExpression[?yield] - * 7) ~ UnaryExpression[?yield] - * 8) ! UnaryExpression[?yield] - */ - function parseSimpleUnaryExpression() { + function canFollowTypeArgumentsInExpression() { switch (token) { - case 35 /* PlusToken */: - case 36 /* MinusToken */: - case 50 /* TildeToken */: - case 49 /* ExclamationToken */: - return parsePrefixUnaryExpression(); - case 78 /* DeleteKeyword */: - return parseDeleteExpression(); - case 101 /* TypeOfKeyword */: - return parseTypeOfExpression(); - case 103 /* VoidKeyword */: - return parseVoidExpression(); - case 25 /* LessThanToken */: - // This is modified UnaryExpression grammar in TypeScript - // UnaryExpression (modified): - // < type > UnaryExpression - return parseTypeAssertion(); + case 17 /* OpenParenToken */: // foo( + // this case are the only case where this token can legally follow a type argument + // list. So we definitely want to treat this as a type arg list. + case 21 /* DotToken */: // foo. + case 18 /* CloseParenToken */: // foo) + case 20 /* CloseBracketToken */: // foo] + case 54 /* ColonToken */: // foo: + case 23 /* SemicolonToken */: // foo; + case 53 /* QuestionToken */: // foo? + case 30 /* EqualsEqualsToken */: // foo == + case 32 /* EqualsEqualsEqualsToken */: // foo === + case 31 /* ExclamationEqualsToken */: // foo != + case 33 /* ExclamationEqualsEqualsToken */: // foo !== + case 51 /* AmpersandAmpersandToken */: // foo && + case 52 /* BarBarToken */: // foo || + case 48 /* CaretToken */: // foo ^ + case 46 /* AmpersandToken */: // foo & + case 47 /* BarToken */: // foo | + case 16 /* CloseBraceToken */: // foo } + case 1 /* EndOfFileToken */: + // these cases can't legally follow a type arg list. However, they're not legal + // expressions either. The user is probably in the middle of a generic type. So + // treat it as such. + return true; + case 24 /* CommaToken */: // foo, + case 15 /* OpenBraceToken */: // foo { + // We don't want to treat these as type arguments. Otherwise we'll parse this + // as an invocation expression. Instead, we want to parse out the expression + // in isolation from the type arguments. default: - return parseIncrementExpression(); + // Anything else treat as an expression. + return false; } } - /** - * Check if the current token can possibly be an ES7 increment expression. - * - * ES7 IncrementExpression: - * LeftHandSideExpression[?Yield] - * LeftHandSideExpression[?Yield][no LineTerminator here]++ - * LeftHandSideExpression[?Yield][no LineTerminator here]-- - * ++LeftHandSideExpression[?Yield] - * --LeftHandSideExpression[?Yield] - */ - function isIncrementExpression() { - // This function is called inside parseUnaryExpression to decide - // whether to call parseSimpleUnaryExpression or call parseIncrmentExpression directly + function parsePrimaryExpression() { switch (token) { - case 35 /* PlusToken */: - case 36 /* MinusToken */: - case 50 /* TildeToken */: - case 49 /* ExclamationToken */: - case 78 /* DeleteKeyword */: - case 101 /* TypeOfKeyword */: - case 103 /* VoidKeyword */: - return false; - case 25 /* LessThanToken */: - // If we are not in JSX context, we are parsing TypeAssertion which is an UnaryExpression - if (sourceFile.languageVariant !== 1 /* JSX */) { - return false; + case 8 /* NumericLiteral */: + case 9 /* StringLiteral */: + case 11 /* NoSubstitutionTemplateLiteral */: + return parseLiteralNode(); + case 97 /* ThisKeyword */: + case 95 /* SuperKeyword */: + case 93 /* NullKeyword */: + case 99 /* TrueKeyword */: + case 84 /* FalseKeyword */: + return parseTokenNode(); + case 17 /* OpenParenToken */: + return parseParenthesizedExpression(); + case 19 /* OpenBracketToken */: + return parseArrayLiteralExpression(); + case 15 /* OpenBraceToken */: + return parseObjectLiteralExpression(); + case 118 /* AsyncKeyword */: + // Async arrow functions are parsed earlier in parseAssignmentExpressionOrHigher. + // If we encounter `async [no LineTerminator here] function` then this is an async + // function; otherwise, its an identifier. + if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { + break; } - // We are in JSX context and the token is part of JSXElement. - // Fall through - default: - return true; + return parseFunctionExpression(); + case 73 /* ClassKeyword */: + return parseClassExpression(); + case 87 /* FunctionKeyword */: + return parseFunctionExpression(); + case 92 /* NewKeyword */: + return parseNewExpression(); + case 39 /* SlashToken */: + case 61 /* SlashEqualsToken */: + if (reScanSlashToken() === 10 /* RegularExpressionLiteral */) { + return parseLiteralNode(); + } + break; + case 12 /* TemplateHead */: + return parseTemplateExpression(); + } + return parseIdentifier(ts.Diagnostics.Expression_expected); + } + function parseParenthesizedExpression() { + var node = createNode(172 /* ParenthesizedExpression */); + parseExpected(17 /* OpenParenToken */); + node.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + return finishNode(node); + } + function parseSpreadElement() { + var node = createNode(185 /* SpreadElementExpression */); + parseExpected(22 /* DotDotDotToken */); + node.expression = parseAssignmentExpressionOrHigher(); + return finishNode(node); + } + function parseArgumentOrArrayLiteralElement() { + return token === 22 /* DotDotDotToken */ ? parseSpreadElement() : + token === 24 /* CommaToken */ ? createNode(187 /* OmittedExpression */) : + parseAssignmentExpressionOrHigher(); + } + function parseArgumentExpression() { + return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); + } + function parseArrayLiteralExpression() { + var node = createNode(164 /* ArrayLiteralExpression */); + parseExpected(19 /* OpenBracketToken */); + if (scanner.hasPrecedingLineBreak()) + node.flags |= 1024 /* MultiLine */; + node.elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); + parseExpected(20 /* CloseBracketToken */); + return finishNode(node); + } + function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { + if (parseContextualModifier(123 /* GetKeyword */)) { + return parseAccessorDeclaration(145 /* GetAccessor */, fullStart, decorators, modifiers); + } + else if (parseContextualModifier(129 /* SetKeyword */)) { + return parseAccessorDeclaration(146 /* SetAccessor */, fullStart, decorators, modifiers); } + return undefined; } - /** - * Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. - * - * ES7 IncrementExpression[yield]: - * 1) LeftHandSideExpression[?yield] - * 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ - * 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- - * 4) ++LeftHandSideExpression[?yield] - * 5) --LeftHandSideExpression[?yield] - * In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression - */ - function parseIncrementExpression() { - if (token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) { - var node = createNode(179 /* PrefixUnaryExpression */); - node.operator = token; - nextToken(); - node.operand = parseLeftHandSideExpressionOrHigher(); - return finishNode(node); + function parseObjectLiteralElement() { + var fullStart = scanner.getStartPos(); + var decorators = parseDecorators(); + var modifiers = parseModifiers(); + var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); + if (accessor) { + return accessor; } - else if (sourceFile.languageVariant === 1 /* JSX */ && token === 25 /* LessThanToken */ && lookAhead(nextTokenIsIdentifierOrKeyword)) { - // JSXElement is part of primaryExpression - return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); + var asteriskToken = parseOptionalToken(37 /* AsteriskToken */); + var tokenIsIdentifier = isIdentifier(); + var nameToken = token; + var propertyName = parsePropertyName(); + // Disallowing of optional property assignments happens in the grammar checker. + var questionToken = parseOptionalToken(53 /* QuestionToken */); + if (asteriskToken || token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { + return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); } - var expression = parseLeftHandSideExpressionOrHigher(); - ts.Debug.assert(ts.isLeftHandSideExpression(expression)); - if ((token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(180 /* PostfixUnaryExpression */, expression.pos); - node.operand = expression; - node.operator = token; - nextToken(); - return finishNode(node); + // check if it is short-hand property assignment or normal property assignment + // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production + // CoverInitializedName[Yield] : + // IdentifierReference[?Yield] Initializer[In, ?Yield] + // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern + var isShorthandPropertyAssignment = tokenIsIdentifier && (token === 24 /* CommaToken */ || token === 16 /* CloseBraceToken */ || token === 56 /* EqualsToken */); + if (isShorthandPropertyAssignment) { + var shorthandDeclaration = createNode(246 /* ShorthandPropertyAssignment */, fullStart); + shorthandDeclaration.name = propertyName; + shorthandDeclaration.questionToken = questionToken; + var equalsToken = parseOptionalToken(56 /* EqualsToken */); + if (equalsToken) { + shorthandDeclaration.equalsToken = equalsToken; + shorthandDeclaration.objectAssignmentInitializer = allowInAnd(parseAssignmentExpressionOrHigher); + } + return finishNode(shorthandDeclaration); + } + else { + var propertyAssignment = createNode(245 /* PropertyAssignment */, fullStart); + propertyAssignment.name = propertyName; + propertyAssignment.questionToken = questionToken; + parseExpected(54 /* ColonToken */); + propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); + return finishNode(propertyAssignment); } - return expression; } - function parseLeftHandSideExpressionOrHigher() { - // Original Ecma: - // LeftHandSideExpression: See 11.2 - // NewExpression - // CallExpression - // - // Our simplification: - // - // LeftHandSideExpression: See 11.2 - // MemberExpression - // CallExpression - // - // See comment in parseMemberExpressionOrHigher on how we replaced NewExpression with - // MemberExpression to make our lives easier. - // - // to best understand the below code, it's important to see how CallExpression expands - // out into its own productions: - // - // CallExpression: - // MemberExpression Arguments - // CallExpression Arguments - // CallExpression[Expression] - // CallExpression.IdentifierName - // super ( ArgumentListopt ) - // super.IdentifierName - // - // Because of the recursion in these calls, we need to bottom out first. There are two - // bottom out states we can run into. Either we see 'super' which must start either of - // the last two CallExpression productions. Or we have a MemberExpression which either - // completes the LeftHandSideExpression, or starts the beginning of the first four - // CallExpression productions. - var expression = token === 95 /* SuperKeyword */ - ? parseSuperExpression() - : parseMemberExpressionOrHigher(); - // Now, we *may* be complete. However, we might have consumed the start of a - // CallExpression. As such, we need to consume the rest of it here to be complete. - return parseCallExpressionRest(expression); + function parseObjectLiteralExpression() { + var node = createNode(165 /* ObjectLiteralExpression */); + parseExpected(15 /* OpenBraceToken */); + if (scanner.hasPrecedingLineBreak()) { + node.flags |= 1024 /* MultiLine */; + } + node.properties = parseDelimitedList(12 /* ObjectLiteralMembers */, parseObjectLiteralElement, /*considerSemicolonAsDelimeter*/ true); + parseExpected(16 /* CloseBraceToken */); + return finishNode(node); } - function parseMemberExpressionOrHigher() { - // Note: to make our lives simpler, we decompose the the NewExpression productions and - // place ObjectCreationExpression and FunctionExpression into PrimaryExpression. - // like so: - // - // PrimaryExpression : See 11.1 - // this - // Identifier - // Literal - // ArrayLiteral - // ObjectLiteral - // (Expression) - // FunctionExpression - // new MemberExpression Arguments? - // - // MemberExpression : See 11.2 - // PrimaryExpression - // MemberExpression[Expression] - // MemberExpression.IdentifierName - // - // CallExpression : See 11.2 - // MemberExpression - // CallExpression Arguments - // CallExpression[Expression] - // CallExpression.IdentifierName - // - // Technically this is ambiguous. i.e. CallExpression defines: - // - // CallExpression: - // CallExpression Arguments - // - // If you see: "new Foo()" - // - // Then that could be treated as a single ObjectCreationExpression, or it could be - // treated as the invocation of "new Foo". We disambiguate that in code (to match - // the original grammar) by making sure that if we see an ObjectCreationExpression - // we always consume arguments if they are there. So we treat "new Foo()" as an - // object creation only, and not at all as an invocation) Another way to think - // about this is that for every "new" that we see, we will consume an argument list if - // it is there as part of the *associated* object creation node. Any additional - // argument lists we see, will become invocation expressions. - // - // Because there are no other places in the grammar now that refer to FunctionExpression - // or ObjectCreationExpression, it is safe to push down into the PrimaryExpression - // production. + function parseFunctionExpression() { + // GeneratorExpression: + // function* BindingIdentifier [Yield][opt](FormalParameters[Yield]){ GeneratorBody } // - // Because CallExpression and MemberExpression are left recursive, we need to bottom out - // of the recursion immediately. So we parse out a primary expression to start with. - var expression = parsePrimaryExpression(); - return parseMemberExpressionRest(expression); + // FunctionExpression: + // function BindingIdentifier[opt](FormalParameters){ FunctionBody } + var saveDecoratorContext = inDecoratorContext(); + if (saveDecoratorContext) { + setDecoratorContext(false); + } + var node = createNode(173 /* FunctionExpression */); + setModifiers(node, parseModifiers()); + parseExpected(87 /* FunctionKeyword */); + node.asteriskToken = parseOptionalToken(37 /* AsteriskToken */); + var isGenerator = !!node.asteriskToken; + var isAsync = !!(node.flags & 256 /* Async */); + node.name = + isGenerator && isAsync ? doInYieldAndAwaitContext(parseOptionalIdentifier) : + isGenerator ? doInYieldContext(parseOptionalIdentifier) : + isAsync ? doInAwaitContext(parseOptionalIdentifier) : + parseOptionalIdentifier(); + fillSignature(54 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); + node.body = parseFunctionBlock(/*allowYield*/ isGenerator, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); + if (saveDecoratorContext) { + setDecoratorContext(true); + } + return finishNode(node); } - function parseSuperExpression() { - var expression = parseTokenNode(); - if (token === 17 /* OpenParenToken */ || token === 21 /* DotToken */ || token === 19 /* OpenBracketToken */) { - return expression; + function parseOptionalIdentifier() { + return isIdentifier() ? parseIdentifier() : undefined; + } + function parseNewExpression() { + var node = createNode(169 /* NewExpression */); + parseExpected(92 /* NewKeyword */); + node.expression = parseMemberExpressionOrHigher(); + node.typeArguments = tryParse(parseTypeArgumentsInExpression); + if (node.typeArguments || token === 17 /* OpenParenToken */) { + node.arguments = parseArgumentList(); } - // If we have seen "super" it must be followed by '(' or '.'. - // If it wasn't then just try to parse out a '.' and report an error. - var node = createNode(166 /* PropertyAccessExpression */, expression.pos); - node.expression = expression; - node.dotToken = parseExpectedToken(21 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); - node.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); return finishNode(node); } - function parseJsxElementOrSelfClosingElement(inExpressionContext) { - var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); - var result; - if (opening.kind === 235 /* JsxOpeningElement */) { - var node = createNode(233 /* JsxElement */, opening.pos); - node.openingElement = opening; - node.children = parseJsxChildren(node.openingElement.tagName); - node.closingElement = parseJsxClosingElement(inExpressionContext); - result = finishNode(node); + // STATEMENTS + function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { + var node = createNode(192 /* Block */); + if (parseExpected(15 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { + node.statements = parseList(1 /* BlockStatements */, parseStatement); + parseExpected(16 /* CloseBraceToken */); } else { - ts.Debug.assert(opening.kind === 234 /* JsxSelfClosingElement */); - // Nothing else to do for self-closing elements - result = opening; + node.statements = createMissingList(); } - // If the user writes the invalid code '
' in an expression context (i.e. not wrapped in - // an enclosing tag), we'll naively try to parse ^ this as a 'less than' operator and the remainder of the tag - // as garbage, which will cause the formatter to badly mangle the JSX. Perform a speculative parse of a JSX - // element if we see a < token so that we can wrap it in a synthetic binary expression so the formatter - // does less damage and we can report a better error. - // Since JSX elements are invalid < operands anyway, this lookahead parse will only occur in error scenarios - // of one sort or another. - if (inExpressionContext && token === 25 /* LessThanToken */) { - var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); }); - if (invalidElement) { - parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(181 /* BinaryExpression */, result.pos); - badNode.end = invalidElement.end; - badNode.left = result; - badNode.right = invalidElement; - badNode.operatorToken = createMissingNode(24 /* CommaToken */, /*reportAtCurrentPosition*/ false, /*diagnosticMessage*/ undefined); - badNode.operatorToken.pos = badNode.operatorToken.end = badNode.right.pos; - return badNode; - } + return finishNode(node); + } + function parseFunctionBlock(allowYield, allowAwait, ignoreMissingOpenBrace, diagnosticMessage) { + var savedYieldContext = inYieldContext(); + setYieldContext(allowYield); + var savedAwaitContext = inAwaitContext(); + setAwaitContext(allowAwait); + // We may be in a [Decorator] context when parsing a function expression or + // arrow function. The body of the function is not in [Decorator] context. + var saveDecoratorContext = inDecoratorContext(); + if (saveDecoratorContext) { + setDecoratorContext(false); } - return result; + var block = parseBlock(ignoreMissingOpenBrace, diagnosticMessage); + if (saveDecoratorContext) { + setDecoratorContext(true); + } + setYieldContext(savedYieldContext); + setAwaitContext(savedAwaitContext); + return block; } - function parseJsxText() { - var node = createNode(236 /* JsxText */, scanner.getStartPos()); - token = scanner.scanJsxToken(); + function parseEmptyStatement() { + var node = createNode(194 /* EmptyStatement */); + parseExpected(23 /* SemicolonToken */); return finishNode(node); } - function parseJsxChild() { - switch (token) { - case 236 /* JsxText */: - return parseJsxText(); - case 15 /* OpenBraceToken */: - return parseJsxExpression(/*inExpressionContext*/ false); - case 25 /* LessThanToken */: - return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ false); - } - ts.Debug.fail("Unknown JSX child kind " + token); + function parseIfStatement() { + var node = createNode(196 /* IfStatement */); + parseExpected(88 /* IfKeyword */); + parseExpected(17 /* OpenParenToken */); + node.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + node.thenStatement = parseStatement(); + node.elseStatement = parseOptional(80 /* ElseKeyword */) ? parseStatement() : undefined; + return finishNode(node); } - function parseJsxChildren(openingTagName) { - var result = []; - result.pos = scanner.getStartPos(); - var saveParsingContext = parsingContext; - parsingContext |= 1 << 14 /* JsxChildren */; - while (true) { - token = scanner.reScanJsxToken(); - if (token === 26 /* LessThanSlashToken */) { - break; + function parseDoStatement() { + var node = createNode(197 /* DoStatement */); + parseExpected(79 /* DoKeyword */); + node.statement = parseStatement(); + parseExpected(104 /* WhileKeyword */); + parseExpected(17 /* OpenParenToken */); + node.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + // From: https://mail.mozilla.org/pipermail/es-discuss/2011-August/016188.html + // 157 min --- All allen at wirfs-brock.com CONF --- "do{;}while(false)false" prohibited in + // spec but allowed in consensus reality. Approved -- this is the de-facto standard whereby + // do;while(0)x will have a semicolon inserted before x. + parseOptional(23 /* SemicolonToken */); + return finishNode(node); + } + function parseWhileStatement() { + var node = createNode(198 /* WhileStatement */); + parseExpected(104 /* WhileKeyword */); + parseExpected(17 /* OpenParenToken */); + node.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + node.statement = parseStatement(); + return finishNode(node); + } + function parseForOrForInOrForOfStatement() { + var pos = getNodePos(); + parseExpected(86 /* ForKeyword */); + parseExpected(17 /* OpenParenToken */); + var initializer = undefined; + if (token !== 23 /* SemicolonToken */) { + if (token === 102 /* VarKeyword */ || token === 108 /* LetKeyword */ || token === 74 /* ConstKeyword */) { + initializer = parseVariableDeclarationList(/*inForStatementInitializer*/ true); } - else if (token === 1 /* EndOfFileToken */) { - parseErrorAtCurrentToken(ts.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, ts.getTextOfNodeFromSourceText(sourceText, openingTagName)); - break; + else { + initializer = disallowInAnd(parseExpression); } - result.push(parseJsxChild()); } - result.end = scanner.getTokenPos(); - parsingContext = saveParsingContext; - return result; - } - function parseJsxOpeningOrSelfClosingElement(inExpressionContext) { - var fullStart = scanner.getStartPos(); - parseExpected(25 /* LessThanToken */); - var tagName = parseJsxElementName(); - var attributes = parseList(13 /* JsxAttributes */, parseJsxAttribute); - var node; - if (token === 27 /* GreaterThanToken */) { - // Closing tag, so scan the immediately-following text with the JSX scanning instead - // of regular scanning to avoid treating illegal characters (e.g. '#') as immediate - // scanning errors - node = createNode(235 /* JsxOpeningElement */, fullStart); - scanJsxText(); + var forOrForInOrForOfStatement; + if (parseOptional(90 /* InKeyword */)) { + var forInStatement = createNode(200 /* ForInStatement */, pos); + forInStatement.initializer = initializer; + forInStatement.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + forOrForInOrForOfStatement = forInStatement; + } + else if (parseOptional(134 /* OfKeyword */)) { + var forOfStatement = createNode(201 /* ForOfStatement */, pos); + forOfStatement.initializer = initializer; + forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); + parseExpected(18 /* CloseParenToken */); + forOrForInOrForOfStatement = forOfStatement; } else { - parseExpected(39 /* SlashToken */); - if (inExpressionContext) { - parseExpected(27 /* GreaterThanToken */); + var forStatement = createNode(199 /* ForStatement */, pos); + forStatement.initializer = initializer; + parseExpected(23 /* SemicolonToken */); + if (token !== 23 /* SemicolonToken */ && token !== 18 /* CloseParenToken */) { + forStatement.condition = allowInAnd(parseExpression); } - else { - parseExpected(27 /* GreaterThanToken */, /*diagnostic*/ undefined, /*advance*/ false); - scanJsxText(); + parseExpected(23 /* SemicolonToken */); + if (token !== 18 /* CloseParenToken */) { + forStatement.incrementor = allowInAnd(parseExpression); } - node = createNode(234 /* JsxSelfClosingElement */, fullStart); + parseExpected(18 /* CloseParenToken */); + forOrForInOrForOfStatement = forStatement; } - node.tagName = tagName; - node.attributes = attributes; + forOrForInOrForOfStatement.statement = parseStatement(); + return finishNode(forOrForInOrForOfStatement); + } + function parseBreakOrContinueStatement(kind) { + var node = createNode(kind); + parseExpected(kind === 203 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */); + if (!canParseSemicolon()) { + node.label = parseIdentifier(); + } + parseSemicolon(); return finishNode(node); } - function parseJsxElementName() { - scanJsxIdentifier(); - var elementName = parseIdentifierName(); - while (parseOptional(21 /* DotToken */)) { - scanJsxIdentifier(); - var node = createNode(135 /* QualifiedName */, elementName.pos); - node.left = elementName; - node.right = parseIdentifierName(); - elementName = finishNode(node); + function parseReturnStatement() { + var node = createNode(204 /* ReturnStatement */); + parseExpected(94 /* ReturnKeyword */); + if (!canParseSemicolon()) { + node.expression = allowInAnd(parseExpression); } - return elementName; + parseSemicolon(); + return finishNode(node); } - function parseJsxExpression(inExpressionContext) { - var node = createNode(240 /* JsxExpression */); + function parseWithStatement() { + var node = createNode(205 /* WithStatement */); + parseExpected(105 /* WithKeyword */); + parseExpected(17 /* OpenParenToken */); + node.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + node.statement = parseStatement(); + return finishNode(node); + } + function parseCaseClause() { + var node = createNode(241 /* CaseClause */); + parseExpected(71 /* CaseKeyword */); + node.expression = allowInAnd(parseExpression); + parseExpected(54 /* ColonToken */); + node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); + return finishNode(node); + } + function parseDefaultClause() { + var node = createNode(242 /* DefaultClause */); + parseExpected(77 /* DefaultKeyword */); + parseExpected(54 /* ColonToken */); + node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); + return finishNode(node); + } + function parseCaseOrDefaultClause() { + return token === 71 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); + } + function parseSwitchStatement() { + var node = createNode(206 /* SwitchStatement */); + parseExpected(96 /* SwitchKeyword */); + parseExpected(17 /* OpenParenToken */); + node.expression = allowInAnd(parseExpression); + parseExpected(18 /* CloseParenToken */); + var caseBlock = createNode(220 /* CaseBlock */, scanner.getStartPos()); parseExpected(15 /* OpenBraceToken */); - if (token !== 16 /* CloseBraceToken */) { - node.expression = parseExpression(); - } - if (inExpressionContext) { - parseExpected(16 /* CloseBraceToken */); - } - else { - parseExpected(16 /* CloseBraceToken */, /*message*/ undefined, /*advance*/ false); - scanJsxText(); - } + caseBlock.clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause); + parseExpected(16 /* CloseBraceToken */); + node.caseBlock = finishNode(caseBlock); return finishNode(node); } - function parseJsxAttribute() { - if (token === 15 /* OpenBraceToken */) { - return parseJsxSpreadAttribute(); - } - scanJsxIdentifier(); - var node = createNode(238 /* JsxAttribute */); - node.name = parseIdentifierName(); - if (parseOptional(56 /* EqualsToken */)) { - switch (token) { - case 9 /* StringLiteral */: - node.initializer = parseLiteralNode(); - break; - default: - node.initializer = parseJsxExpression(/*inExpressionContext*/ true); - break; - } + function parseThrowStatement() { + // ThrowStatement[Yield] : + // throw [no LineTerminator here]Expression[In, ?Yield]; + // Because of automatic semicolon insertion, we need to report error if this + // throw could be terminated with a semicolon. Note: we can't call 'parseExpression' + // directly as that might consume an expression on the following line. + // We just return 'undefined' in that case. The actual error will be reported in the + // grammar walker. + var node = createNode(208 /* ThrowStatement */); + parseExpected(98 /* ThrowKeyword */); + node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); + parseSemicolon(); + return finishNode(node); + } + // TODO: Review for error recovery + function parseTryStatement() { + var node = createNode(209 /* TryStatement */); + parseExpected(100 /* TryKeyword */); + node.tryBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); + node.catchClause = token === 72 /* CatchKeyword */ ? parseCatchClause() : undefined; + // If we don't have a catch clause, then we must have a finally clause. Try to parse + // one out no matter what. + if (!node.catchClause || token === 85 /* FinallyKeyword */) { + parseExpected(85 /* FinallyKeyword */); + node.finallyBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); } return finishNode(node); } - function parseJsxSpreadAttribute() { - var node = createNode(239 /* JsxSpreadAttribute */); - parseExpected(15 /* OpenBraceToken */); - parseExpected(22 /* DotDotDotToken */); - node.expression = parseExpression(); - parseExpected(16 /* CloseBraceToken */); + function parseCatchClause() { + var result = createNode(244 /* CatchClause */); + parseExpected(72 /* CatchKeyword */); + if (parseExpected(17 /* OpenParenToken */)) { + result.variableDeclaration = parseVariableDeclaration(); + } + parseExpected(18 /* CloseParenToken */); + result.block = parseBlock(/*ignoreMissingOpenBrace*/ false); + return finishNode(result); + } + function parseDebuggerStatement() { + var node = createNode(210 /* DebuggerStatement */); + parseExpected(76 /* DebuggerKeyword */); + parseSemicolon(); return finishNode(node); } - function parseJsxClosingElement(inExpressionContext) { - var node = createNode(237 /* JsxClosingElement */); - parseExpected(26 /* LessThanSlashToken */); - node.tagName = parseJsxElementName(); - if (inExpressionContext) { - parseExpected(27 /* GreaterThanToken */); + function parseExpressionOrLabeledStatement() { + // Avoiding having to do the lookahead for a labeled statement by just trying to parse + // out an expression, seeing if it is identifier and then seeing if it is followed by + // a colon. + var fullStart = scanner.getStartPos(); + var expression = allowInAnd(parseExpression); + if (expression.kind === 69 /* Identifier */ && parseOptional(54 /* ColonToken */)) { + var labeledStatement = createNode(207 /* LabeledStatement */, fullStart); + labeledStatement.label = expression; + labeledStatement.statement = parseStatement(); + return finishNode(labeledStatement); } else { - parseExpected(27 /* GreaterThanToken */, /*diagnostic*/ undefined, /*advance*/ false); - scanJsxText(); + var expressionStatement = createNode(195 /* ExpressionStatement */, fullStart); + expressionStatement.expression = expression; + parseSemicolon(); + return finishNode(expressionStatement); } - return finishNode(node); } - function parseTypeAssertion() { - var node = createNode(171 /* TypeAssertionExpression */); - parseExpected(25 /* LessThanToken */); - node.type = parseType(); - parseExpected(27 /* GreaterThanToken */); - node.expression = parseSimpleUnaryExpression(); - return finishNode(node); + function nextTokenIsIdentifierOrKeywordOnSameLine() { + nextToken(); + return ts.tokenIsIdentifierOrKeyword(token) && !scanner.hasPrecedingLineBreak(); } - function parseMemberExpressionRest(expression) { - while (true) { - var dotToken = parseOptionalToken(21 /* DotToken */); - if (dotToken) { - var propertyAccess = createNode(166 /* PropertyAccessExpression */, expression.pos); - propertyAccess.expression = expression; - propertyAccess.dotToken = dotToken; - propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); - expression = finishNode(propertyAccess); - continue; - } - // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName - if (!inDecoratorContext() && parseOptional(19 /* OpenBracketToken */)) { - var indexedAccess = createNode(167 /* ElementAccessExpression */, expression.pos); - indexedAccess.expression = expression; - // It's not uncommon for a user to write: "new Type[]". - // Check for that common pattern and report a better error message. - if (token !== 20 /* CloseBracketToken */) { - indexedAccess.argumentExpression = allowInAnd(parseExpression); - if (indexedAccess.argumentExpression.kind === 9 /* StringLiteral */ || indexedAccess.argumentExpression.kind === 8 /* NumericLiteral */) { - var literal = indexedAccess.argumentExpression; - literal.text = internIdentifier(literal.text); - } - } - parseExpected(20 /* CloseBracketToken */); - expression = finishNode(indexedAccess); - continue; - } - if (token === 11 /* NoSubstitutionTemplateLiteral */ || token === 12 /* TemplateHead */) { - var tagExpression = createNode(170 /* TaggedTemplateExpression */, expression.pos); - tagExpression.tag = expression; - tagExpression.template = token === 11 /* NoSubstitutionTemplateLiteral */ - ? parseLiteralNode() - : parseTemplateExpression(); - expression = finishNode(tagExpression); - continue; - } - return expression; - } + function nextTokenIsFunctionKeywordOnSameLine() { + nextToken(); + return token === 87 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); } - function parseCallExpressionRest(expression) { + function nextTokenIsIdentifierOrKeywordOrNumberOnSameLine() { + nextToken(); + return (ts.tokenIsIdentifierOrKeyword(token) || token === 8 /* NumericLiteral */) && !scanner.hasPrecedingLineBreak(); + } + function isDeclaration() { while (true) { - expression = parseMemberExpressionRest(expression); - if (token === 25 /* LessThanToken */) { - // See if this is the start of a generic invocation. If so, consume it and - // keep checking for postfix expressions. Otherwise, it's just a '<' that's - // part of an arithmetic expression. Break out so we consume it higher in the - // stack. - var typeArguments = tryParse(parseTypeArgumentsInExpression); - if (!typeArguments) { - return expression; - } - var callExpr = createNode(168 /* CallExpression */, expression.pos); - callExpr.expression = expression; - callExpr.typeArguments = typeArguments; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); - continue; - } - else if (token === 17 /* OpenParenToken */) { - var callExpr = createNode(168 /* CallExpression */, expression.pos); - callExpr.expression = expression; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); - continue; + switch (token) { + case 102 /* VarKeyword */: + case 108 /* LetKeyword */: + case 74 /* ConstKeyword */: + case 87 /* FunctionKeyword */: + case 73 /* ClassKeyword */: + case 81 /* EnumKeyword */: + return true; + // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; + // however, an identifier cannot be followed by another identifier on the same line. This is what we + // count on to parse out the respective declarations. For instance, we exploit this to say that + // + // namespace n + // + // can be none other than the beginning of a namespace declaration, but need to respect that JavaScript sees + // + // namespace + // n + // + // as the identifier 'namespace' on one line followed by the identifier 'n' on another. + // We need to look one token ahead to see if it permissible to try parsing a declaration. + // + // *Note*: 'interface' is actually a strict mode reserved word. So while + // + // "use strict" + // interface + // I {} + // + // could be legal, it would add complexity for very little gain. + case 107 /* InterfaceKeyword */: + case 132 /* TypeKeyword */: + return nextTokenIsIdentifierOnSameLine(); + case 125 /* ModuleKeyword */: + case 126 /* NamespaceKeyword */: + return nextTokenIsIdentifierOrStringLiteralOnSameLine(); + case 115 /* AbstractKeyword */: + case 118 /* AsyncKeyword */: + case 122 /* DeclareKeyword */: + case 110 /* PrivateKeyword */: + case 111 /* ProtectedKeyword */: + case 112 /* PublicKeyword */: + nextToken(); + // ASI takes effect for this modifier. + if (scanner.hasPrecedingLineBreak()) { + return false; + } + continue; + case 89 /* ImportKeyword */: + nextToken(); + return token === 9 /* StringLiteral */ || token === 37 /* AsteriskToken */ || + token === 15 /* OpenBraceToken */ || ts.tokenIsIdentifierOrKeyword(token); + case 82 /* ExportKeyword */: + nextToken(); + if (token === 56 /* EqualsToken */ || token === 37 /* AsteriskToken */ || + token === 15 /* OpenBraceToken */ || token === 77 /* DefaultKeyword */) { + return true; + } + continue; + case 113 /* StaticKeyword */: + nextToken(); + continue; + default: + return false; } - return expression; } } - function parseArgumentList() { - parseExpected(17 /* OpenParenToken */); - var result = parseDelimitedList(11 /* ArgumentExpressions */, parseArgumentExpression); - parseExpected(18 /* CloseParenToken */); - return result; - } - function parseTypeArgumentsInExpression() { - if (!parseOptional(25 /* LessThanToken */)) { - return undefined; - } - var typeArguments = parseDelimitedList(18 /* TypeArguments */, parseType); - if (!parseExpected(27 /* GreaterThanToken */)) { - // If it doesn't have the closing > then it's definitely not an type argument list. - return undefined; - } - // If we have a '<', then only parse this as a arugment list if the type arguments - // are complete and we have an open paren. if we don't, rewind and return nothing. - return typeArguments && canFollowTypeArgumentsInExpression() - ? typeArguments - : undefined; + function isStartOfDeclaration() { + return lookAhead(isDeclaration); } - function canFollowTypeArgumentsInExpression() { + function isStartOfStatement() { switch (token) { - case 17 /* OpenParenToken */: // foo( - // this case are the only case where this token can legally follow a type argument - // list. So we definitely want to treat this as a type arg list. - case 21 /* DotToken */: // foo. - case 18 /* CloseParenToken */: // foo) - case 20 /* CloseBracketToken */: // foo] - case 54 /* ColonToken */: // foo: - case 23 /* SemicolonToken */: // foo; - case 53 /* QuestionToken */: // foo? - case 30 /* EqualsEqualsToken */: // foo == - case 32 /* EqualsEqualsEqualsToken */: // foo === - case 31 /* ExclamationEqualsToken */: // foo != - case 33 /* ExclamationEqualsEqualsToken */: // foo !== - case 51 /* AmpersandAmpersandToken */: // foo && - case 52 /* BarBarToken */: // foo || - case 48 /* CaretToken */: // foo ^ - case 46 /* AmpersandToken */: // foo & - case 47 /* BarToken */: // foo | - case 16 /* CloseBraceToken */: // foo } - case 1 /* EndOfFileToken */: - // these cases can't legally follow a type arg list. However, they're not legal - // expressions either. The user is probably in the middle of a generic type. So - // treat it as such. + case 55 /* AtToken */: + case 23 /* SemicolonToken */: + case 15 /* OpenBraceToken */: + case 102 /* VarKeyword */: + case 108 /* LetKeyword */: + case 87 /* FunctionKeyword */: + case 73 /* ClassKeyword */: + case 81 /* EnumKeyword */: + case 88 /* IfKeyword */: + case 79 /* DoKeyword */: + case 104 /* WhileKeyword */: + case 86 /* ForKeyword */: + case 75 /* ContinueKeyword */: + case 70 /* BreakKeyword */: + case 94 /* ReturnKeyword */: + case 105 /* WithKeyword */: + case 96 /* SwitchKeyword */: + case 98 /* ThrowKeyword */: + case 100 /* TryKeyword */: + case 76 /* DebuggerKeyword */: + // 'catch' and 'finally' do not actually indicate that the code is part of a statement, + // however, we say they are here so that we may gracefully parse them and error later. + case 72 /* CatchKeyword */: + case 85 /* FinallyKeyword */: return true; - case 24 /* CommaToken */: // foo, - case 15 /* OpenBraceToken */: // foo { - // We don't want to treat these as type arguments. Otherwise we'll parse this - // as an invocation expression. Instead, we want to parse out the expression - // in isolation from the type arguments. + case 74 /* ConstKeyword */: + case 82 /* ExportKeyword */: + case 89 /* ImportKeyword */: + return isStartOfDeclaration(); + case 118 /* AsyncKeyword */: + case 122 /* DeclareKeyword */: + case 107 /* InterfaceKeyword */: + case 125 /* ModuleKeyword */: + case 126 /* NamespaceKeyword */: + case 132 /* TypeKeyword */: + // When these don't start a declaration, they're an identifier in an expression statement + return true; + case 112 /* PublicKeyword */: + case 110 /* PrivateKeyword */: + case 111 /* ProtectedKeyword */: + case 113 /* StaticKeyword */: + // When these don't start a declaration, they may be the start of a class member if an identifier + // immediately follows. Otherwise they're an identifier in an expression statement. + return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); default: - // Anything else treat as an expression. - return false; + return isStartOfExpression(); } } - function parsePrimaryExpression() { + function nextTokenIsIdentifierOrStartOfDestructuring() { + nextToken(); + return isIdentifier() || token === 15 /* OpenBraceToken */ || token === 19 /* OpenBracketToken */; + } + function isLetDeclaration() { + // In ES6 'let' always starts a lexical declaration if followed by an identifier or { + // or [. + return lookAhead(nextTokenIsIdentifierOrStartOfDestructuring); + } + function parseStatement() { switch (token) { - case 8 /* NumericLiteral */: - case 9 /* StringLiteral */: - case 11 /* NoSubstitutionTemplateLiteral */: - return parseLiteralNode(); - case 97 /* ThisKeyword */: - case 95 /* SuperKeyword */: - case 93 /* NullKeyword */: - case 99 /* TrueKeyword */: - case 84 /* FalseKeyword */: - return parseTokenNode(); - case 17 /* OpenParenToken */: - return parseParenthesizedExpression(); - case 19 /* OpenBracketToken */: - return parseArrayLiteralExpression(); + case 23 /* SemicolonToken */: + return parseEmptyStatement(); case 15 /* OpenBraceToken */: - return parseObjectLiteralExpression(); - case 118 /* AsyncKeyword */: - // Async arrow functions are parsed earlier in parseAssignmentExpressionOrHigher. - // If we encounter `async [no LineTerminator here] function` then this is an async - // function; otherwise, its an identifier. - if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { - break; + return parseBlock(/*ignoreMissingOpenBrace*/ false); + case 102 /* VarKeyword */: + return parseVariableStatement(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); + case 108 /* LetKeyword */: + if (isLetDeclaration()) { + return parseVariableStatement(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); } - return parseFunctionExpression(); - case 73 /* ClassKeyword */: - return parseClassExpression(); + break; case 87 /* FunctionKeyword */: - return parseFunctionExpression(); - case 92 /* NewKeyword */: - return parseNewExpression(); - case 39 /* SlashToken */: - case 61 /* SlashEqualsToken */: - if (reScanSlashToken() === 10 /* RegularExpressionLiteral */) { - return parseLiteralNode(); + return parseFunctionDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); + case 73 /* ClassKeyword */: + return parseClassDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); + case 88 /* IfKeyword */: + return parseIfStatement(); + case 79 /* DoKeyword */: + return parseDoStatement(); + case 104 /* WhileKeyword */: + return parseWhileStatement(); + case 86 /* ForKeyword */: + return parseForOrForInOrForOfStatement(); + case 75 /* ContinueKeyword */: + return parseBreakOrContinueStatement(202 /* ContinueStatement */); + case 70 /* BreakKeyword */: + return parseBreakOrContinueStatement(203 /* BreakStatement */); + case 94 /* ReturnKeyword */: + return parseReturnStatement(); + case 105 /* WithKeyword */: + return parseWithStatement(); + case 96 /* SwitchKeyword */: + return parseSwitchStatement(); + case 98 /* ThrowKeyword */: + return parseThrowStatement(); + case 100 /* TryKeyword */: + // Include 'catch' and 'finally' for error recovery. + case 72 /* CatchKeyword */: + case 85 /* FinallyKeyword */: + return parseTryStatement(); + case 76 /* DebuggerKeyword */: + return parseDebuggerStatement(); + case 55 /* AtToken */: + return parseDeclaration(); + case 118 /* AsyncKeyword */: + case 107 /* InterfaceKeyword */: + case 132 /* TypeKeyword */: + case 125 /* ModuleKeyword */: + case 126 /* NamespaceKeyword */: + case 122 /* DeclareKeyword */: + case 74 /* ConstKeyword */: + case 81 /* EnumKeyword */: + case 82 /* ExportKeyword */: + case 89 /* ImportKeyword */: + case 110 /* PrivateKeyword */: + case 111 /* ProtectedKeyword */: + case 112 /* PublicKeyword */: + case 115 /* AbstractKeyword */: + case 113 /* StaticKeyword */: + if (isStartOfDeclaration()) { + return parseDeclaration(); } break; - case 12 /* TemplateHead */: - return parseTemplateExpression(); } - return parseIdentifier(ts.Diagnostics.Expression_expected); - } - function parseParenthesizedExpression() { - var node = createNode(172 /* ParenthesizedExpression */); - parseExpected(17 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - return finishNode(node); - } - function parseSpreadElement() { - var node = createNode(185 /* SpreadElementExpression */); - parseExpected(22 /* DotDotDotToken */); - node.expression = parseAssignmentExpressionOrHigher(); - return finishNode(node); - } - function parseArgumentOrArrayLiteralElement() { - return token === 22 /* DotDotDotToken */ ? parseSpreadElement() : - token === 24 /* CommaToken */ ? createNode(187 /* OmittedExpression */) : - parseAssignmentExpressionOrHigher(); + return parseExpressionOrLabeledStatement(); } - function parseArgumentExpression() { - return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); + function parseDeclaration() { + var fullStart = getNodePos(); + var decorators = parseDecorators(); + var modifiers = parseModifiers(); + switch (token) { + case 102 /* VarKeyword */: + case 108 /* LetKeyword */: + case 74 /* ConstKeyword */: + return parseVariableStatement(fullStart, decorators, modifiers); + case 87 /* FunctionKeyword */: + return parseFunctionDeclaration(fullStart, decorators, modifiers); + case 73 /* ClassKeyword */: + return parseClassDeclaration(fullStart, decorators, modifiers); + case 107 /* InterfaceKeyword */: + return parseInterfaceDeclaration(fullStart, decorators, modifiers); + case 132 /* TypeKeyword */: + return parseTypeAliasDeclaration(fullStart, decorators, modifiers); + case 81 /* EnumKeyword */: + return parseEnumDeclaration(fullStart, decorators, modifiers); + case 125 /* ModuleKeyword */: + case 126 /* NamespaceKeyword */: + return parseModuleDeclaration(fullStart, decorators, modifiers); + case 89 /* ImportKeyword */: + return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); + case 82 /* ExportKeyword */: + nextToken(); + return token === 77 /* DefaultKeyword */ || token === 56 /* EqualsToken */ ? + parseExportAssignment(fullStart, decorators, modifiers) : + parseExportDeclaration(fullStart, decorators, modifiers); + default: + if (decorators || modifiers) { + // We reached this point because we encountered decorators and/or modifiers and assumed a declaration + // would follow. For recovery and error reporting purposes, return an incomplete declaration. + var node = createMissingNode(231 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); + node.pos = fullStart; + node.decorators = decorators; + setModifiers(node, modifiers); + return finishNode(node); + } + } } - function parseArrayLiteralExpression() { - var node = createNode(164 /* ArrayLiteralExpression */); - parseExpected(19 /* OpenBracketToken */); - if (scanner.hasPrecedingLineBreak()) - node.flags |= 1024 /* MultiLine */; - node.elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); - parseExpected(20 /* CloseBracketToken */); - return finishNode(node); + function nextTokenIsIdentifierOrStringLiteralOnSameLine() { + nextToken(); + return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token === 9 /* StringLiteral */); } - function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { - if (parseContextualModifier(123 /* GetKeyword */)) { - return parseAccessorDeclaration(145 /* GetAccessor */, fullStart, decorators, modifiers); - } - else if (parseContextualModifier(129 /* SetKeyword */)) { - return parseAccessorDeclaration(146 /* SetAccessor */, fullStart, decorators, modifiers); + function parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage) { + if (token !== 15 /* OpenBraceToken */ && canParseSemicolon()) { + parseSemicolon(); + return; } - return undefined; + return parseFunctionBlock(isGenerator, isAsync, /*ignoreMissingOpenBrace*/ false, diagnosticMessage); } - function parseObjectLiteralElement() { - var fullStart = scanner.getStartPos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); - if (accessor) { - return accessor; - } - var asteriskToken = parseOptionalToken(37 /* AsteriskToken */); - var tokenIsIdentifier = isIdentifier(); - var nameToken = token; - var propertyName = parsePropertyName(); - // Disallowing of optional property assignments happens in the grammar checker. - var questionToken = parseOptionalToken(53 /* QuestionToken */); - if (asteriskToken || token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { - return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); + // DECLARATIONS + function parseArrayBindingElement() { + if (token === 24 /* CommaToken */) { + return createNode(187 /* OmittedExpression */); } - // check if it is short-hand property assignment or normal property assignment - // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production - // CoverInitializedName[Yield] : - // IdentifierReference[?Yield] Initializer[In, ?Yield] - // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern - var isShorthandPropertyAssignment = tokenIsIdentifier && (token === 24 /* CommaToken */ || token === 16 /* CloseBraceToken */ || token === 56 /* EqualsToken */); - if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(246 /* ShorthandPropertyAssignment */, fullStart); - shorthandDeclaration.name = propertyName; - shorthandDeclaration.questionToken = questionToken; - var equalsToken = parseOptionalToken(56 /* EqualsToken */); - if (equalsToken) { - shorthandDeclaration.equalsToken = equalsToken; - shorthandDeclaration.objectAssignmentInitializer = allowInAnd(parseAssignmentExpressionOrHigher); - } - return finishNode(shorthandDeclaration); + var node = createNode(163 /* BindingElement */); + node.dotDotDotToken = parseOptionalToken(22 /* DotDotDotToken */); + node.name = parseIdentifierOrPattern(); + node.initializer = parseBindingElementInitializer(/*inParameter*/ false); + return finishNode(node); + } + function parseObjectBindingElement() { + var node = createNode(163 /* BindingElement */); + var tokenIsIdentifier = isIdentifier(); + var propertyName = parsePropertyName(); + if (tokenIsIdentifier && token !== 54 /* ColonToken */) { + node.name = propertyName; } else { - var propertyAssignment = createNode(245 /* PropertyAssignment */, fullStart); - propertyAssignment.name = propertyName; - propertyAssignment.questionToken = questionToken; parseExpected(54 /* ColonToken */); - propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); - return finishNode(propertyAssignment); + node.propertyName = propertyName; + node.name = parseIdentifierOrPattern(); } + node.initializer = parseBindingElementInitializer(/*inParameter*/ false); + return finishNode(node); } - function parseObjectLiteralExpression() { - var node = createNode(165 /* ObjectLiteralExpression */); + function parseObjectBindingPattern() { + var node = createNode(161 /* ObjectBindingPattern */); parseExpected(15 /* OpenBraceToken */); - if (scanner.hasPrecedingLineBreak()) { - node.flags |= 1024 /* MultiLine */; - } - node.properties = parseDelimitedList(12 /* ObjectLiteralMembers */, parseObjectLiteralElement, /*considerSemicolonAsDelimeter*/ true); + node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); parseExpected(16 /* CloseBraceToken */); return finishNode(node); } - function parseFunctionExpression() { - // GeneratorExpression: - // function* BindingIdentifier [Yield][opt](FormalParameters[Yield]){ GeneratorBody } - // - // FunctionExpression: - // function BindingIdentifier[opt](FormalParameters){ FunctionBody } - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var node = createNode(173 /* FunctionExpression */); - setModifiers(node, parseModifiers()); - parseExpected(87 /* FunctionKeyword */); - node.asteriskToken = parseOptionalToken(37 /* AsteriskToken */); - var isGenerator = !!node.asteriskToken; - var isAsync = !!(node.flags & 256 /* Async */); - node.name = - isGenerator && isAsync ? doInYieldAndAwaitContext(parseOptionalIdentifier) : - isGenerator ? doInYieldContext(parseOptionalIdentifier) : - isAsync ? doInAwaitContext(parseOptionalIdentifier) : - parseOptionalIdentifier(); - fillSignature(54 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); - node.body = parseFunctionBlock(/*allowYield*/ isGenerator, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); - if (saveDecoratorContext) { - setDecoratorContext(true); - } + function parseArrayBindingPattern() { + var node = createNode(162 /* ArrayBindingPattern */); + parseExpected(19 /* OpenBracketToken */); + node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); + parseExpected(20 /* CloseBracketToken */); return finishNode(node); } - function parseOptionalIdentifier() { - return isIdentifier() ? parseIdentifier() : undefined; + function isIdentifierOrPattern() { + return token === 15 /* OpenBraceToken */ || token === 19 /* OpenBracketToken */ || isIdentifier(); } - function parseNewExpression() { - var node = createNode(169 /* NewExpression */); - parseExpected(92 /* NewKeyword */); - node.expression = parseMemberExpressionOrHigher(); - node.typeArguments = tryParse(parseTypeArgumentsInExpression); - if (node.typeArguments || token === 17 /* OpenParenToken */) { - node.arguments = parseArgumentList(); + function parseIdentifierOrPattern() { + if (token === 19 /* OpenBracketToken */) { + return parseArrayBindingPattern(); + } + if (token === 15 /* OpenBraceToken */) { + return parseObjectBindingPattern(); + } + return parseIdentifier(); + } + function parseVariableDeclaration() { + var node = createNode(211 /* VariableDeclaration */); + node.name = parseIdentifierOrPattern(); + node.type = parseTypeAnnotation(); + if (!isInOrOfKeyword(token)) { + node.initializer = parseInitializer(/*inParameter*/ false); } return finishNode(node); } - // STATEMENTS - function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(192 /* Block */); - if (parseExpected(15 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { - node.statements = parseList(1 /* BlockStatements */, parseStatement); - parseExpected(16 /* CloseBraceToken */); + function parseVariableDeclarationList(inForStatementInitializer) { + var node = createNode(212 /* VariableDeclarationList */); + switch (token) { + case 102 /* VarKeyword */: + break; + case 108 /* LetKeyword */: + node.flags |= 8192 /* Let */; + break; + case 74 /* ConstKeyword */: + node.flags |= 16384 /* Const */; + break; + default: + ts.Debug.fail(); + } + nextToken(); + // The user may have written the following: + // + // for (let of X) { } + // + // In this case, we want to parse an empty declaration list, and then parse 'of' + // as a keyword. The reason this is not automatic is that 'of' is a valid identifier. + // So we need to look ahead to determine if 'of' should be treated as a keyword in + // this context. + // The checker will then give an error that there is an empty declaration list. + if (token === 134 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + node.declarations = createMissingList(); } else { - node.statements = createMissingList(); + var savedDisallowIn = inDisallowInContext(); + setDisallowInContext(inForStatementInitializer); + node.declarations = parseDelimitedList(8 /* VariableDeclarations */, parseVariableDeclaration); + setDisallowInContext(savedDisallowIn); } return finishNode(node); } - function parseFunctionBlock(allowYield, allowAwait, ignoreMissingOpenBrace, diagnosticMessage) { - var savedYieldContext = inYieldContext(); - setYieldContext(allowYield); - var savedAwaitContext = inAwaitContext(); - setAwaitContext(allowAwait); - // We may be in a [Decorator] context when parsing a function expression or - // arrow function. The body of the function is not in [Decorator] context. - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var block = parseBlock(ignoreMissingOpenBrace, diagnosticMessage); - if (saveDecoratorContext) { - setDecoratorContext(true); - } - setYieldContext(savedYieldContext); - setAwaitContext(savedAwaitContext); - return block; + function canFollowContextualOfKeyword() { + return nextTokenIsIdentifier() && nextToken() === 18 /* CloseParenToken */; } - function parseEmptyStatement() { - var node = createNode(194 /* EmptyStatement */); - parseExpected(23 /* SemicolonToken */); + function parseVariableStatement(fullStart, decorators, modifiers) { + var node = createNode(193 /* VariableStatement */, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false); + parseSemicolon(); return finishNode(node); } - function parseIfStatement() { - var node = createNode(196 /* IfStatement */); - parseExpected(88 /* IfKeyword */); - parseExpected(17 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - node.thenStatement = parseStatement(); - node.elseStatement = parseOptional(80 /* ElseKeyword */) ? parseStatement() : undefined; + function parseFunctionDeclaration(fullStart, decorators, modifiers) { + var node = createNode(213 /* FunctionDeclaration */, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(87 /* FunctionKeyword */); + node.asteriskToken = parseOptionalToken(37 /* AsteriskToken */); + node.name = node.flags & 512 /* Default */ ? parseOptionalIdentifier() : parseIdentifier(); + var isGenerator = !!node.asteriskToken; + var isAsync = !!(node.flags & 256 /* Async */); + fillSignature(54 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); + node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, ts.Diagnostics.or_expected); return finishNode(node); } - function parseDoStatement() { - var node = createNode(197 /* DoStatement */); - parseExpected(79 /* DoKeyword */); - node.statement = parseStatement(); - parseExpected(104 /* WhileKeyword */); - parseExpected(17 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - // From: https://mail.mozilla.org/pipermail/es-discuss/2011-August/016188.html - // 157 min --- All allen at wirfs-brock.com CONF --- "do{;}while(false)false" prohibited in - // spec but allowed in consensus reality. Approved -- this is the de-facto standard whereby - // do;while(0)x will have a semicolon inserted before x. - parseOptional(23 /* SemicolonToken */); + function parseConstructorDeclaration(pos, decorators, modifiers) { + var node = createNode(144 /* Constructor */, pos); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(121 /* ConstructorKeyword */); + fillSignature(54 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); + node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false, ts.Diagnostics.or_expected); return finishNode(node); } - function parseWhileStatement() { - var node = createNode(198 /* WhileStatement */); - parseExpected(104 /* WhileKeyword */); - parseExpected(17 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - node.statement = parseStatement(); + function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { + var method = createNode(143 /* MethodDeclaration */, fullStart); + method.decorators = decorators; + setModifiers(method, modifiers); + method.asteriskToken = asteriskToken; + method.name = name; + method.questionToken = questionToken; + var isGenerator = !!asteriskToken; + var isAsync = !!(method.flags & 256 /* Async */); + fillSignature(54 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, method); + method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); + return finishNode(method); + } + function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { + var property = createNode(141 /* PropertyDeclaration */, fullStart); + property.decorators = decorators; + setModifiers(property, modifiers); + property.name = name; + property.questionToken = questionToken; + property.type = parseTypeAnnotation(); + // For instance properties specifically, since they are evaluated inside the constructor, + // we do *not * want to parse yield expressions, so we specifically turn the yield context + // off. The grammar would look something like this: + // + // MemberVariableDeclaration[Yield]: + // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initialiser_opt[In]; + // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initialiser_opt[In, ?Yield]; + // + // The checker may still error in the static case to explicitly disallow the yield expression. + property.initializer = modifiers && modifiers.flags & 64 /* Static */ + ? allowInAnd(parseNonParameterInitializer) + : doOutsideOfContext(2 /* Yield */ | 1 /* DisallowIn */, parseNonParameterInitializer); + parseSemicolon(); + return finishNode(property); + } + function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) { + var asteriskToken = parseOptionalToken(37 /* AsteriskToken */); + var name = parsePropertyName(); + // Note: this is not legal as per the grammar. But we allow it in the parser and + // report an error in the grammar checker. + var questionToken = parseOptionalToken(53 /* QuestionToken */); + if (asteriskToken || token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { + return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); + } + else { + return parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken); + } + } + function parseNonParameterInitializer() { + return parseInitializer(/*inParameter*/ false); + } + function parseAccessorDeclaration(kind, fullStart, decorators, modifiers) { + var node = createNode(kind, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + node.name = parsePropertyName(); + fillSignature(54 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); + node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false); return finishNode(node); } - function parseForOrForInOrForOfStatement() { - var pos = getNodePos(); - parseExpected(86 /* ForKeyword */); - parseExpected(17 /* OpenParenToken */); - var initializer = undefined; - if (token !== 23 /* SemicolonToken */) { - if (token === 102 /* VarKeyword */ || token === 108 /* LetKeyword */ || token === 74 /* ConstKeyword */) { - initializer = parseVariableDeclarationList(/*inForStatementInitializer*/ true); + function isClassMemberModifier(idToken) { + switch (idToken) { + case 112 /* PublicKeyword */: + case 110 /* PrivateKeyword */: + case 111 /* ProtectedKeyword */: + case 113 /* StaticKeyword */: + return true; + default: + return false; + } + } + function isClassMemberStart() { + var idToken; + if (token === 55 /* AtToken */) { + return true; + } + // Eat up all modifiers, but hold on to the last one in case it is actually an identifier. + while (ts.isModifier(token)) { + idToken = token; + // If the idToken is a class modifier (protected, private, public, and static), it is + // certain that we are starting to parse class member. This allows better error recovery + // Example: + // public foo() ... // true + // public @dec blah ... // true; we will then report an error later + // export public ... // true; we will then report an error later + if (isClassMemberModifier(idToken)) { + return true; } - else { - initializer = disallowInAnd(parseExpression); + nextToken(); + } + if (token === 37 /* AsteriskToken */) { + return true; + } + // Try to get the first property-like token following all modifiers. + // This can either be an identifier or the 'get' or 'set' keywords. + if (isLiteralPropertyName()) { + idToken = token; + nextToken(); + } + // Index signatures and computed properties are class members; we can parse. + if (token === 19 /* OpenBracketToken */) { + return true; + } + // If we were able to get any potential identifier... + if (idToken !== undefined) { + // If we have a non-keyword identifier, or if we have an accessor, then it's safe to parse. + if (!ts.isKeyword(idToken) || idToken === 129 /* SetKeyword */ || idToken === 123 /* GetKeyword */) { + return true; + } + // If it *is* a keyword, but not an accessor, check a little farther along + // to see if it should actually be parsed as a class member. + switch (token) { + case 17 /* OpenParenToken */: // Method declaration + case 25 /* LessThanToken */: // Generic Method declaration + case 54 /* ColonToken */: // Type Annotation for declaration + case 56 /* EqualsToken */: // Initializer for declaration + case 53 /* QuestionToken */: + return true; + default: + // Covers + // - Semicolons (declaration termination) + // - Closing braces (end-of-class, must be declaration) + // - End-of-files (not valid, but permitted so that it gets caught later on) + // - Line-breaks (enabling *automatic semicolon insertion*) + return canParseSemicolon(); } } - var forOrForInOrForOfStatement; - if (parseOptional(90 /* InKeyword */)) { - var forInStatement = createNode(200 /* ForInStatement */, pos); - forInStatement.initializer = initializer; - forInStatement.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - forOrForInOrForOfStatement = forInStatement; + return false; + } + function parseDecorators() { + var decorators; + while (true) { + var decoratorStart = getNodePos(); + if (!parseOptional(55 /* AtToken */)) { + break; + } + if (!decorators) { + decorators = []; + decorators.pos = scanner.getStartPos(); + } + var decorator = createNode(139 /* Decorator */, decoratorStart); + decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); + decorators.push(finishNode(decorator)); } - else if (parseOptional(134 /* OfKeyword */)) { - var forOfStatement = createNode(201 /* ForOfStatement */, pos); - forOfStatement.initializer = initializer; - forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(18 /* CloseParenToken */); - forOrForInOrForOfStatement = forOfStatement; + if (decorators) { + decorators.end = getNodeEnd(); } - else { - var forStatement = createNode(199 /* ForStatement */, pos); - forStatement.initializer = initializer; - parseExpected(23 /* SemicolonToken */); - if (token !== 23 /* SemicolonToken */ && token !== 18 /* CloseParenToken */) { - forStatement.condition = allowInAnd(parseExpression); + return decorators; + } + function parseModifiers() { + var flags = 0; + var modifiers; + while (true) { + var modifierStart = scanner.getStartPos(); + var modifierKind = token; + if (!parseAnyContextualModifier()) { + break; } - parseExpected(23 /* SemicolonToken */); - if (token !== 18 /* CloseParenToken */) { - forStatement.incrementor = allowInAnd(parseExpression); + if (!modifiers) { + modifiers = []; + modifiers.pos = modifierStart; } - parseExpected(18 /* CloseParenToken */); - forOrForInOrForOfStatement = forStatement; + flags |= ts.modifierToFlag(modifierKind); + modifiers.push(finishNode(createNode(modifierKind, modifierStart))); } - forOrForInOrForOfStatement.statement = parseStatement(); - return finishNode(forOrForInOrForOfStatement); + if (modifiers) { + modifiers.flags = flags; + modifiers.end = scanner.getStartPos(); + } + return modifiers; } - function parseBreakOrContinueStatement(kind) { - var node = createNode(kind); - parseExpected(kind === 203 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */); - if (!canParseSemicolon()) { - node.label = parseIdentifier(); + function parseModifiersForArrowFunction() { + var flags = 0; + var modifiers; + if (token === 118 /* AsyncKeyword */) { + var modifierStart = scanner.getStartPos(); + var modifierKind = token; + nextToken(); + modifiers = []; + modifiers.pos = modifierStart; + flags |= ts.modifierToFlag(modifierKind); + modifiers.push(finishNode(createNode(modifierKind, modifierStart))); + modifiers.flags = flags; + modifiers.end = scanner.getStartPos(); } - parseSemicolon(); - return finishNode(node); + return modifiers; } - function parseReturnStatement() { - var node = createNode(204 /* ReturnStatement */); - parseExpected(94 /* ReturnKeyword */); - if (!canParseSemicolon()) { - node.expression = allowInAnd(parseExpression); + function parseClassElement() { + if (token === 23 /* SemicolonToken */) { + var result = createNode(191 /* SemicolonClassElement */); + nextToken(); + return finishNode(result); } - parseSemicolon(); - return finishNode(node); + var fullStart = getNodePos(); + var decorators = parseDecorators(); + var modifiers = parseModifiers(); + var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); + if (accessor) { + return accessor; + } + if (token === 121 /* ConstructorKeyword */) { + return parseConstructorDeclaration(fullStart, decorators, modifiers); + } + if (isIndexSignature()) { + return parseIndexSignatureDeclaration(fullStart, decorators, modifiers); + } + // It is very important that we check this *after* checking indexers because + // the [ token can start an index signature or a computed property name + if (ts.tokenIsIdentifierOrKeyword(token) || + token === 9 /* StringLiteral */ || + token === 8 /* NumericLiteral */ || + token === 37 /* AsteriskToken */ || + token === 19 /* OpenBracketToken */) { + return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); + } + if (decorators || modifiers) { + // treat this as a property declaration with a missing name. + var name_7 = createMissingNode(69 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); + return parsePropertyDeclaration(fullStart, decorators, modifiers, name_7, /*questionToken*/ undefined); + } + // 'isClassMemberStart' should have hinted not to attempt parsing. + ts.Debug.fail("Should not have attempted to parse class member declaration."); } - function parseWithStatement() { - var node = createNode(205 /* WithStatement */); - parseExpected(105 /* WithKeyword */); - parseExpected(17 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - node.statement = parseStatement(); + function parseClassExpression() { + return parseClassDeclarationOrExpression( + /*fullStart*/ scanner.getStartPos(), + /*decorators*/ undefined, + /*modifiers*/ undefined, 186 /* ClassExpression */); + } + function parseClassDeclaration(fullStart, decorators, modifiers) { + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 214 /* ClassDeclaration */); + } + function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { + var node = createNode(kind, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(73 /* ClassKeyword */); + node.name = parseNameOfClassDeclarationOrExpression(); + node.typeParameters = parseTypeParameters(); + node.heritageClauses = parseHeritageClauses(/*isClassHeritageClause*/ true); + if (parseExpected(15 /* OpenBraceToken */)) { + // ClassTail[Yield,Await] : (Modified) See 14.5 + // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } + node.members = parseClassMembers(); + parseExpected(16 /* CloseBraceToken */); + } + else { + node.members = createMissingList(); + } return finishNode(node); } - function parseCaseClause() { - var node = createNode(241 /* CaseClause */); - parseExpected(71 /* CaseKeyword */); - node.expression = allowInAnd(parseExpression); - parseExpected(54 /* ColonToken */); - node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); - return finishNode(node); + function parseNameOfClassDeclarationOrExpression() { + // implements is a future reserved word so + // 'class implements' might mean either + // - class expression with omitted name, 'implements' starts heritage clause + // - class with name 'implements' + // 'isImplementsClause' helps to disambiguate between these two cases + return isIdentifier() && !isImplementsClause() + ? parseIdentifier() + : undefined; + } + function isImplementsClause() { + return token === 106 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); + } + function parseHeritageClauses(isClassHeritageClause) { + // ClassTail[Yield,Await] : (Modified) See 14.5 + // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } + if (isHeritageClause()) { + return parseList(20 /* HeritageClauses */, parseHeritageClause); + } + return undefined; + } + function parseHeritageClausesWorker() { + return parseList(20 /* HeritageClauses */, parseHeritageClause); + } + function parseHeritageClause() { + if (token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */) { + var node = createNode(243 /* HeritageClause */); + node.token = token; + nextToken(); + node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); + return finishNode(node); + } + return undefined; } - function parseDefaultClause() { - var node = createNode(242 /* DefaultClause */); - parseExpected(77 /* DefaultKeyword */); - parseExpected(54 /* ColonToken */); - node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); + function parseExpressionWithTypeArguments() { + var node = createNode(188 /* ExpressionWithTypeArguments */); + node.expression = parseLeftHandSideExpressionOrHigher(); + if (token === 25 /* LessThanToken */) { + node.typeArguments = parseBracketedList(18 /* TypeArguments */, parseType, 25 /* LessThanToken */, 27 /* GreaterThanToken */); + } return finishNode(node); } - function parseCaseOrDefaultClause() { - return token === 71 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); + function isHeritageClause() { + return token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */; } - function parseSwitchStatement() { - var node = createNode(206 /* SwitchStatement */); - parseExpected(96 /* SwitchKeyword */); - parseExpected(17 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(18 /* CloseParenToken */); - var caseBlock = createNode(220 /* CaseBlock */, scanner.getStartPos()); - parseExpected(15 /* OpenBraceToken */); - caseBlock.clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause); - parseExpected(16 /* CloseBraceToken */); - node.caseBlock = finishNode(caseBlock); + function parseClassMembers() { + return parseList(5 /* ClassMembers */, parseClassElement); + } + function parseInterfaceDeclaration(fullStart, decorators, modifiers) { + var node = createNode(215 /* InterfaceDeclaration */, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(107 /* InterfaceKeyword */); + node.name = parseIdentifier(); + node.typeParameters = parseTypeParameters(); + node.heritageClauses = parseHeritageClauses(/*isClassHeritageClause*/ false); + node.members = parseObjectTypeMembers(); return finishNode(node); } - function parseThrowStatement() { - // ThrowStatement[Yield] : - // throw [no LineTerminator here]Expression[In, ?Yield]; - // Because of automatic semicolon insertion, we need to report error if this - // throw could be terminated with a semicolon. Note: we can't call 'parseExpression' - // directly as that might consume an expression on the following line. - // We just return 'undefined' in that case. The actual error will be reported in the - // grammar walker. - var node = createNode(208 /* ThrowStatement */); - parseExpected(98 /* ThrowKeyword */); - node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); + function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { + var node = createNode(216 /* TypeAliasDeclaration */, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(132 /* TypeKeyword */); + node.name = parseIdentifier(); + node.typeParameters = parseTypeParameters(); + parseExpected(56 /* EqualsToken */); + node.type = parseType(); parseSemicolon(); return finishNode(node); } - // TODO: Review for error recovery - function parseTryStatement() { - var node = createNode(209 /* TryStatement */); - parseExpected(100 /* TryKeyword */); - node.tryBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); - node.catchClause = token === 72 /* CatchKeyword */ ? parseCatchClause() : undefined; - // If we don't have a catch clause, then we must have a finally clause. Try to parse - // one out no matter what. - if (!node.catchClause || token === 85 /* FinallyKeyword */) { - parseExpected(85 /* FinallyKeyword */); - node.finallyBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); - } + // In an ambient declaration, the grammar only allows integer literals as initializers. + // 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 parseEnumMember() { + var node = createNode(247 /* EnumMember */, scanner.getStartPos()); + node.name = parsePropertyName(); + node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); } - function parseCatchClause() { - var result = createNode(244 /* CatchClause */); - parseExpected(72 /* CatchKeyword */); - if (parseExpected(17 /* OpenParenToken */)) { - result.variableDeclaration = parseVariableDeclaration(); + function parseEnumDeclaration(fullStart, decorators, modifiers) { + var node = createNode(217 /* EnumDeclaration */, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + parseExpected(81 /* EnumKeyword */); + node.name = parseIdentifier(); + if (parseExpected(15 /* OpenBraceToken */)) { + node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); + parseExpected(16 /* CloseBraceToken */); + } + else { + node.members = createMissingList(); } - parseExpected(18 /* CloseParenToken */); - result.block = parseBlock(/*ignoreMissingOpenBrace*/ false); - return finishNode(result); - } - function parseDebuggerStatement() { - var node = createNode(210 /* DebuggerStatement */); - parseExpected(76 /* DebuggerKeyword */); - parseSemicolon(); return finishNode(node); } - function parseExpressionOrLabeledStatement() { - // Avoiding having to do the lookahead for a labeled statement by just trying to parse - // out an expression, seeing if it is identifier and then seeing if it is followed by - // a colon. - var fullStart = scanner.getStartPos(); - var expression = allowInAnd(parseExpression); - if (expression.kind === 69 /* Identifier */ && parseOptional(54 /* ColonToken */)) { - var labeledStatement = createNode(207 /* LabeledStatement */, fullStart); - labeledStatement.label = expression; - labeledStatement.statement = parseStatement(); - return finishNode(labeledStatement); + function parseModuleBlock() { + var node = createNode(219 /* ModuleBlock */, scanner.getStartPos()); + if (parseExpected(15 /* OpenBraceToken */)) { + node.statements = parseList(1 /* BlockStatements */, parseStatement); + parseExpected(16 /* CloseBraceToken */); } else { - var expressionStatement = createNode(195 /* ExpressionStatement */, fullStart); - expressionStatement.expression = expression; - parseSemicolon(); - return finishNode(expressionStatement); + node.statements = createMissingList(); } + return finishNode(node); } - function nextTokenIsIdentifierOrKeywordOnSameLine() { - nextToken(); - return ts.tokenIsIdentifierOrKeyword(token) && !scanner.hasPrecedingLineBreak(); - } - function nextTokenIsFunctionKeywordOnSameLine() { - nextToken(); - return token === 87 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); + function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { + var node = createNode(218 /* ModuleDeclaration */, fullStart); + // If we are parsing a dotted namespace name, we want to + // propagate the 'Namespace' flag across the names if set. + var namespaceFlag = flags & 65536 /* Namespace */; + node.decorators = decorators; + setModifiers(node, modifiers); + node.flags |= flags; + node.name = parseIdentifier(); + node.body = parseOptional(21 /* DotToken */) + ? parseModuleOrNamespaceDeclaration(getNodePos(), /*decorators*/ undefined, /*modifiers*/ undefined, 2 /* Export */ | namespaceFlag) + : parseModuleBlock(); + return finishNode(node); } - function nextTokenIsIdentifierOrKeywordOrNumberOnSameLine() { - nextToken(); - return (ts.tokenIsIdentifierOrKeyword(token) || token === 8 /* NumericLiteral */) && !scanner.hasPrecedingLineBreak(); + function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { + var node = createNode(218 /* ModuleDeclaration */, fullStart); + node.decorators = decorators; + setModifiers(node, modifiers); + node.name = parseLiteralNode(/*internName*/ true); + node.body = parseModuleBlock(); + return finishNode(node); } - function isDeclaration() { - while (true) { - switch (token) { - case 102 /* VarKeyword */: - case 108 /* LetKeyword */: - case 74 /* ConstKeyword */: - case 87 /* FunctionKeyword */: - case 73 /* ClassKeyword */: - case 81 /* EnumKeyword */: - return true; - // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; - // however, an identifier cannot be followed by another identifier on the same line. This is what we - // count on to parse out the respective declarations. For instance, we exploit this to say that - // - // namespace n - // - // can be none other than the beginning of a namespace declaration, but need to respect that JavaScript sees - // - // namespace - // n - // - // as the identifier 'namespace' on one line followed by the identifier 'n' on another. - // We need to look one token ahead to see if it permissible to try parsing a declaration. - // - // *Note*: 'interface' is actually a strict mode reserved word. So while - // - // "use strict" - // interface - // I {} - // - // could be legal, it would add complexity for very little gain. - case 107 /* InterfaceKeyword */: - case 132 /* TypeKeyword */: - return nextTokenIsIdentifierOnSameLine(); - case 125 /* ModuleKeyword */: - case 126 /* NamespaceKeyword */: - return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 115 /* AbstractKeyword */: - case 118 /* AsyncKeyword */: - case 122 /* DeclareKeyword */: - case 110 /* PrivateKeyword */: - case 111 /* ProtectedKeyword */: - case 112 /* PublicKeyword */: - nextToken(); - // ASI takes effect for this modifier. - if (scanner.hasPrecedingLineBreak()) { - return false; - } - continue; - case 89 /* ImportKeyword */: - nextToken(); - return token === 9 /* StringLiteral */ || token === 37 /* AsteriskToken */ || - token === 15 /* OpenBraceToken */ || ts.tokenIsIdentifierOrKeyword(token); - case 82 /* ExportKeyword */: - nextToken(); - if (token === 56 /* EqualsToken */ || token === 37 /* AsteriskToken */ || - token === 15 /* OpenBraceToken */ || token === 77 /* DefaultKeyword */) { - return true; - } - continue; - case 113 /* StaticKeyword */: - nextToken(); - continue; - default: - return false; - } + function parseModuleDeclaration(fullStart, decorators, modifiers) { + var flags = modifiers ? modifiers.flags : 0; + if (parseOptional(126 /* NamespaceKeyword */)) { + flags |= 65536 /* Namespace */; } - } - function isStartOfDeclaration() { - return lookAhead(isDeclaration); - } - function isStartOfStatement() { - switch (token) { - case 55 /* AtToken */: - case 23 /* SemicolonToken */: - case 15 /* OpenBraceToken */: - case 102 /* VarKeyword */: - case 108 /* LetKeyword */: - case 87 /* FunctionKeyword */: - case 73 /* ClassKeyword */: - case 81 /* EnumKeyword */: - case 88 /* IfKeyword */: - case 79 /* DoKeyword */: - case 104 /* WhileKeyword */: - case 86 /* ForKeyword */: - case 75 /* ContinueKeyword */: - case 70 /* BreakKeyword */: - case 94 /* ReturnKeyword */: - case 105 /* WithKeyword */: - case 96 /* SwitchKeyword */: - case 98 /* ThrowKeyword */: - case 100 /* TryKeyword */: - case 76 /* DebuggerKeyword */: - // 'catch' and 'finally' do not actually indicate that the code is part of a statement, - // however, we say they are here so that we may gracefully parse them and error later. - case 72 /* CatchKeyword */: - case 85 /* FinallyKeyword */: - return true; - case 74 /* ConstKeyword */: - case 82 /* ExportKeyword */: - case 89 /* ImportKeyword */: - return isStartOfDeclaration(); - case 118 /* AsyncKeyword */: - case 122 /* DeclareKeyword */: - case 107 /* InterfaceKeyword */: - case 125 /* ModuleKeyword */: - case 126 /* NamespaceKeyword */: - case 132 /* TypeKeyword */: - // When these don't start a declaration, they're an identifier in an expression statement - return true; - case 112 /* PublicKeyword */: - case 110 /* PrivateKeyword */: - case 111 /* ProtectedKeyword */: - case 113 /* StaticKeyword */: - // When these don't start a declaration, they may be the start of a class member if an identifier - // immediately follows. Otherwise they're an identifier in an expression statement. - return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); - default: - return isStartOfExpression(); + else { + parseExpected(125 /* ModuleKeyword */); + if (token === 9 /* StringLiteral */) { + return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); + } } + return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); } - function nextTokenIsIdentifierOrStartOfDestructuring() { - nextToken(); - return isIdentifier() || token === 15 /* OpenBraceToken */ || token === 19 /* OpenBracketToken */; - } - function isLetDeclaration() { - // In ES6 'let' always starts a lexical declaration if followed by an identifier or { - // or [. - return lookAhead(nextTokenIsIdentifierOrStartOfDestructuring); + function isExternalModuleReference() { + return token === 127 /* RequireKeyword */ && + lookAhead(nextTokenIsOpenParen); } - function parseStatement() { - switch (token) { - case 23 /* SemicolonToken */: - return parseEmptyStatement(); - case 15 /* OpenBraceToken */: - return parseBlock(/*ignoreMissingOpenBrace*/ false); - case 102 /* VarKeyword */: - return parseVariableStatement(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - case 108 /* LetKeyword */: - if (isLetDeclaration()) { - return parseVariableStatement(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - } - break; - case 87 /* FunctionKeyword */: - return parseFunctionDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - case 73 /* ClassKeyword */: - return parseClassDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - case 88 /* IfKeyword */: - return parseIfStatement(); - case 79 /* DoKeyword */: - return parseDoStatement(); - case 104 /* WhileKeyword */: - return parseWhileStatement(); - case 86 /* ForKeyword */: - return parseForOrForInOrForOfStatement(); - case 75 /* ContinueKeyword */: - return parseBreakOrContinueStatement(202 /* ContinueStatement */); - case 70 /* BreakKeyword */: - return parseBreakOrContinueStatement(203 /* BreakStatement */); - case 94 /* ReturnKeyword */: - return parseReturnStatement(); - case 105 /* WithKeyword */: - return parseWithStatement(); - case 96 /* SwitchKeyword */: - return parseSwitchStatement(); - case 98 /* ThrowKeyword */: - return parseThrowStatement(); - case 100 /* TryKeyword */: - // Include 'catch' and 'finally' for error recovery. - case 72 /* CatchKeyword */: - case 85 /* FinallyKeyword */: - return parseTryStatement(); - case 76 /* DebuggerKeyword */: - return parseDebuggerStatement(); - case 55 /* AtToken */: - return parseDeclaration(); - case 118 /* AsyncKeyword */: - case 107 /* InterfaceKeyword */: - case 132 /* TypeKeyword */: - case 125 /* ModuleKeyword */: - case 126 /* NamespaceKeyword */: - case 122 /* DeclareKeyword */: - case 74 /* ConstKeyword */: - case 81 /* EnumKeyword */: - case 82 /* ExportKeyword */: - case 89 /* ImportKeyword */: - case 110 /* PrivateKeyword */: - case 111 /* ProtectedKeyword */: - case 112 /* PublicKeyword */: - case 115 /* AbstractKeyword */: - case 113 /* StaticKeyword */: - if (isStartOfDeclaration()) { - return parseDeclaration(); - } - break; - } - return parseExpressionOrLabeledStatement(); + function nextTokenIsOpenParen() { + return nextToken() === 17 /* OpenParenToken */; } - function parseDeclaration() { - var fullStart = getNodePos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - switch (token) { - case 102 /* VarKeyword */: - case 108 /* LetKeyword */: - case 74 /* ConstKeyword */: - return parseVariableStatement(fullStart, decorators, modifiers); - case 87 /* FunctionKeyword */: - return parseFunctionDeclaration(fullStart, decorators, modifiers); - case 73 /* ClassKeyword */: - return parseClassDeclaration(fullStart, decorators, modifiers); - case 107 /* InterfaceKeyword */: - return parseInterfaceDeclaration(fullStart, decorators, modifiers); - case 132 /* TypeKeyword */: - return parseTypeAliasDeclaration(fullStart, decorators, modifiers); - case 81 /* EnumKeyword */: - return parseEnumDeclaration(fullStart, decorators, modifiers); - case 125 /* ModuleKeyword */: - case 126 /* NamespaceKeyword */: - return parseModuleDeclaration(fullStart, decorators, modifiers); - case 89 /* ImportKeyword */: - return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); - case 82 /* ExportKeyword */: - nextToken(); - return token === 77 /* DefaultKeyword */ || token === 56 /* EqualsToken */ ? - parseExportAssignment(fullStart, decorators, modifiers) : - parseExportDeclaration(fullStart, decorators, modifiers); - default: - if (decorators || modifiers) { - // We reached this point because we encountered decorators and/or modifiers and assumed a declaration - // would follow. For recovery and error reporting purposes, return an incomplete declaration. - var node = createMissingNode(231 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); - node.pos = fullStart; - node.decorators = decorators; - setModifiers(node, modifiers); - return finishNode(node); - } - } + function nextTokenIsSlash() { + return nextToken() === 39 /* SlashToken */; } - function nextTokenIsIdentifierOrStringLiteralOnSameLine() { + function nextTokenIsCommaOrFromKeyword() { nextToken(); - return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token === 9 /* StringLiteral */); + return token === 24 /* CommaToken */ || + token === 133 /* FromKeyword */; } - function parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage) { - if (token !== 15 /* OpenBraceToken */ && canParseSemicolon()) { - parseSemicolon(); - return; + function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { + parseExpected(89 /* ImportKeyword */); + var afterImportPos = scanner.getStartPos(); + var identifier; + if (isIdentifier()) { + identifier = parseIdentifier(); + if (token !== 24 /* CommaToken */ && token !== 133 /* FromKeyword */) { + // ImportEquals declaration of type: + // import x = require("mod"); or + // import x = M.x; + var importEqualsDeclaration = createNode(221 /* ImportEqualsDeclaration */, fullStart); + importEqualsDeclaration.decorators = decorators; + setModifiers(importEqualsDeclaration, modifiers); + importEqualsDeclaration.name = identifier; + parseExpected(56 /* EqualsToken */); + importEqualsDeclaration.moduleReference = parseModuleReference(); + parseSemicolon(); + return finishNode(importEqualsDeclaration); + } } - return parseFunctionBlock(isGenerator, isAsync, /*ignoreMissingOpenBrace*/ false, diagnosticMessage); - } - // DECLARATIONS - function parseArrayBindingElement() { - if (token === 24 /* CommaToken */) { - return createNode(187 /* OmittedExpression */); + // Import statement + var importDeclaration = createNode(222 /* ImportDeclaration */, fullStart); + importDeclaration.decorators = decorators; + setModifiers(importDeclaration, modifiers); + // ImportDeclaration: + // import ImportClause from ModuleSpecifier ; + // import ModuleSpecifier; + if (identifier || + token === 37 /* AsteriskToken */ || + token === 15 /* OpenBraceToken */) { + importDeclaration.importClause = parseImportClause(identifier, afterImportPos); + parseExpected(133 /* FromKeyword */); } - var node = createNode(163 /* BindingElement */); - node.dotDotDotToken = parseOptionalToken(22 /* DotDotDotToken */); - node.name = parseIdentifierOrPattern(); - node.initializer = parseBindingElementInitializer(/*inParameter*/ false); - return finishNode(node); + importDeclaration.moduleSpecifier = parseModuleSpecifier(); + parseSemicolon(); + return finishNode(importDeclaration); } - function parseObjectBindingElement() { - var node = createNode(163 /* BindingElement */); - // TODO(andersh): Handle computed properties - var tokenIsIdentifier = isIdentifier(); - var propertyName = parsePropertyName(); - if (tokenIsIdentifier && token !== 54 /* ColonToken */) { - node.name = propertyName; + function parseImportClause(identifier, fullStart) { + // ImportClause: + // ImportedDefaultBinding + // NameSpaceImport + // NamedImports + // ImportedDefaultBinding, NameSpaceImport + // ImportedDefaultBinding, NamedImports + var importClause = createNode(223 /* ImportClause */, fullStart); + if (identifier) { + // ImportedDefaultBinding: + // ImportedBinding + importClause.name = identifier; } - else { - parseExpected(54 /* ColonToken */); - node.propertyName = propertyName; - node.name = parseIdentifierOrPattern(); + // If there was no default import or if there is comma token after default import + // parse namespace or named imports + if (!importClause.name || + parseOptional(24 /* CommaToken */)) { + importClause.namedBindings = token === 37 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(225 /* NamedImports */); } - node.initializer = parseBindingElementInitializer(/*inParameter*/ false); - return finishNode(node); - } - function parseObjectBindingPattern() { - var node = createNode(161 /* ObjectBindingPattern */); - parseExpected(15 /* OpenBraceToken */); - node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); - parseExpected(16 /* CloseBraceToken */); - return finishNode(node); + return finishNode(importClause); } - function parseArrayBindingPattern() { - var node = createNode(162 /* ArrayBindingPattern */); - parseExpected(19 /* OpenBracketToken */); - node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); - parseExpected(20 /* CloseBracketToken */); - return finishNode(node); + function parseModuleReference() { + return isExternalModuleReference() + ? parseExternalModuleReference() + : parseEntityName(/*allowReservedWords*/ false); } - function isIdentifierOrPattern() { - return token === 15 /* OpenBraceToken */ || token === 19 /* OpenBracketToken */ || isIdentifier(); + function parseExternalModuleReference() { + var node = createNode(232 /* ExternalModuleReference */); + parseExpected(127 /* RequireKeyword */); + parseExpected(17 /* OpenParenToken */); + node.expression = parseModuleSpecifier(); + parseExpected(18 /* CloseParenToken */); + return finishNode(node); } - function parseIdentifierOrPattern() { - if (token === 19 /* OpenBracketToken */) { - return parseArrayBindingPattern(); - } - if (token === 15 /* OpenBraceToken */) { - return parseObjectBindingPattern(); + function parseModuleSpecifier() { + // We allow arbitrary expressions here, even though the grammar only allows string + // literals. We check to ensure that it is only a string literal later in the grammar + // walker. + var result = parseExpression(); + // Ensure the string being required is in our 'identifier' table. This will ensure + // that features like 'find refs' will look inside this file when search for its name. + if (result.kind === 9 /* StringLiteral */) { + internIdentifier(result.text); } - return parseIdentifier(); + return result; } - function parseVariableDeclaration() { - var node = createNode(211 /* VariableDeclaration */); - node.name = parseIdentifierOrPattern(); - node.type = parseTypeAnnotation(); - if (!isInOrOfKeyword(token)) { - node.initializer = parseInitializer(/*inParameter*/ false); - } + function parseNamespaceImport() { + // NameSpaceImport: + // * as ImportedBinding + var namespaceImport = createNode(224 /* NamespaceImport */); + parseExpected(37 /* AsteriskToken */); + parseExpected(116 /* AsKeyword */); + namespaceImport.name = parseIdentifier(); + return finishNode(namespaceImport); + } + function parseNamedImportsOrExports(kind) { + var node = createNode(kind); + // NamedImports: + // { } + // { ImportsList } + // { ImportsList, } + // ImportsList: + // ImportSpecifier + // ImportsList, ImportSpecifier + node.elements = parseBracketedList(21 /* ImportOrExportSpecifiers */, kind === 225 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 15 /* OpenBraceToken */, 16 /* CloseBraceToken */); return finishNode(node); } - function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(212 /* VariableDeclarationList */); - switch (token) { - case 102 /* VarKeyword */: - break; - case 108 /* LetKeyword */: - node.flags |= 8192 /* Let */; - break; - case 74 /* ConstKeyword */: - node.flags |= 16384 /* Const */; - break; - default: - ts.Debug.fail(); - } - nextToken(); - // The user may have written the following: - // - // for (let of X) { } - // - // In this case, we want to parse an empty declaration list, and then parse 'of' - // as a keyword. The reason this is not automatic is that 'of' is a valid identifier. - // So we need to look ahead to determine if 'of' should be treated as a keyword in - // this context. - // The checker will then give an error that there is an empty declaration list. - if (token === 134 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { - node.declarations = createMissingList(); + function parseExportSpecifier() { + return parseImportOrExportSpecifier(230 /* ExportSpecifier */); + } + function parseImportSpecifier() { + return parseImportOrExportSpecifier(226 /* ImportSpecifier */); + } + function parseImportOrExportSpecifier(kind) { + var node = createNode(kind); + // ImportSpecifier: + // BindingIdentifier + // IdentifierName as BindingIdentifier + // ExportSpecififer: + // IdentifierName + // IdentifierName as IdentifierName + var checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); + var checkIdentifierStart = scanner.getTokenPos(); + var checkIdentifierEnd = scanner.getTextPos(); + var identifierName = parseIdentifierName(); + if (token === 116 /* AsKeyword */) { + node.propertyName = identifierName; + parseExpected(116 /* AsKeyword */); + checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); + checkIdentifierStart = scanner.getTokenPos(); + checkIdentifierEnd = scanner.getTextPos(); + node.name = parseIdentifierName(); } else { - var savedDisallowIn = inDisallowInContext(); - setDisallowInContext(inForStatementInitializer); - node.declarations = parseDelimitedList(8 /* VariableDeclarations */, parseVariableDeclaration); - setDisallowInContext(savedDisallowIn); + node.name = identifierName; + } + if (kind === 226 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + // Report error identifier expected + parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } return finishNode(node); } - function canFollowContextualOfKeyword() { - return nextTokenIsIdentifier() && nextToken() === 18 /* CloseParenToken */; - } - function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(193 /* VariableStatement */, fullStart); + function parseExportDeclaration(fullStart, decorators, modifiers) { + var node = createNode(228 /* ExportDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); - node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false); + if (parseOptional(37 /* AsteriskToken */)) { + parseExpected(133 /* FromKeyword */); + node.moduleSpecifier = parseModuleSpecifier(); + } + else { + node.exportClause = parseNamedImportsOrExports(229 /* NamedExports */); + // It is not uncommon to accidentally omit the 'from' keyword. Additionally, in editing scenarios, + // the 'from' keyword can be parsed as a named export when the export clause is unterminated (i.e. `export { from "moduleName";`) + // If we don't have a 'from' keyword, see if we have a string literal such that ASI won't take effect. + if (token === 133 /* FromKeyword */ || (token === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) { + parseExpected(133 /* FromKeyword */); + node.moduleSpecifier = parseModuleSpecifier(); + } + } parseSemicolon(); return finishNode(node); } - function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(213 /* FunctionDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(87 /* FunctionKeyword */); - node.asteriskToken = parseOptionalToken(37 /* AsteriskToken */); - node.name = node.flags & 512 /* Default */ ? parseOptionalIdentifier() : parseIdentifier(); - var isGenerator = !!node.asteriskToken; - var isAsync = !!(node.flags & 256 /* Async */); - fillSignature(54 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); - node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, ts.Diagnostics.or_expected); - return finishNode(node); - } - function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(144 /* Constructor */, pos); + function parseExportAssignment(fullStart, decorators, modifiers) { + var node = createNode(227 /* ExportAssignment */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); - parseExpected(121 /* ConstructorKeyword */); - fillSignature(54 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); - node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false, ts.Diagnostics.or_expected); - return finishNode(node); - } - function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(143 /* MethodDeclaration */, fullStart); - method.decorators = decorators; - setModifiers(method, modifiers); - method.asteriskToken = asteriskToken; - method.name = name; - method.questionToken = questionToken; - var isGenerator = !!asteriskToken; - var isAsync = !!(method.flags & 256 /* Async */); - fillSignature(54 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, method); - method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); - return finishNode(method); - } - function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(141 /* PropertyDeclaration */, fullStart); - property.decorators = decorators; - setModifiers(property, modifiers); - property.name = name; - property.questionToken = questionToken; - property.type = parseTypeAnnotation(); - // For instance properties specifically, since they are evaluated inside the constructor, - // we do *not * want to parse yield expressions, so we specifically turn the yield context - // off. The grammar would look something like this: - // - // MemberVariableDeclaration[Yield]: - // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initialiser_opt[In]; - // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initialiser_opt[In, ?Yield]; - // - // The checker may still error in the static case to explicitly disallow the yield expression. - property.initializer = modifiers && modifiers.flags & 64 /* Static */ - ? allowInAnd(parseNonParameterInitializer) - : doOutsideOfContext(2 /* Yield */ | 1 /* DisallowIn */, parseNonParameterInitializer); - parseSemicolon(); - return finishNode(property); - } - function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) { - var asteriskToken = parseOptionalToken(37 /* AsteriskToken */); - var name = parsePropertyName(); - // Note: this is not legal as per the grammar. But we allow it in the parser and - // report an error in the grammar checker. - var questionToken = parseOptionalToken(53 /* QuestionToken */); - if (asteriskToken || token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { - return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); + if (parseOptional(56 /* EqualsToken */)) { + node.isExportEquals = true; } else { - return parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken); + parseExpected(77 /* DefaultKeyword */); } - } - function parseNonParameterInitializer() { - return parseInitializer(/*inParameter*/ false); - } - function parseAccessorDeclaration(kind, fullStart, decorators, modifiers) { - var node = createNode(kind, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.name = parsePropertyName(); - fillSignature(54 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); - node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false); + node.expression = parseAssignmentExpressionOrHigher(); + parseSemicolon(); return finishNode(node); } - function isClassMemberModifier(idToken) { - switch (idToken) { - case 112 /* PublicKeyword */: - case 110 /* PrivateKeyword */: - case 111 /* ProtectedKeyword */: - case 113 /* StaticKeyword */: - return true; - default: - return false; + function processReferenceComments(sourceFile) { + var triviaScanner = ts.createScanner(sourceFile.languageVersion, /*skipTrivia*/ false, 0 /* Standard */, sourceText); + var referencedFiles = []; + var amdDependencies = []; + var amdModuleName; + // Keep scanning all the leading trivia in the file until we get to something that + // isn't trivia. Any single line comment will be analyzed to see if it is a + // reference comment. + while (true) { + var kind = triviaScanner.scan(); + if (kind === 5 /* WhitespaceTrivia */ || kind === 4 /* NewLineTrivia */ || kind === 3 /* MultiLineCommentTrivia */) { + continue; + } + if (kind !== 2 /* SingleLineCommentTrivia */) { + break; + } + var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() }; + var comment = sourceText.substring(range.pos, range.end); + var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range); + if (referencePathMatchResult) { + var fileReference = referencePathMatchResult.fileReference; + sourceFile.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib; + var diagnosticMessage = referencePathMatchResult.diagnosticMessage; + if (fileReference) { + referencedFiles.push(fileReference); + } + if (diagnosticMessage) { + parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, diagnosticMessage)); + } + } + else { + var amdModuleNameRegEx = /^\/\/\/\s*".length; + return parseErrorAtPosition(start, end - start, ts.Diagnostics.Type_argument_list_cannot_be_empty); } + } + function parseQualifiedName(left) { + var result = createNode(135 /* QualifiedName */, left.pos); + result.left = left; + result.right = parseIdentifierName(); + return finishNode(result); + } + function parseJSDocRecordType() { + var result = createNode(257 /* JSDocRecordType */); nextToken(); + result.members = parseDelimitedList(24 /* JSDocRecordMembers */, parseJSDocRecordMember); + checkForTrailingComma(result.members); + parseExpected(16 /* CloseBraceToken */); + return finishNode(result); } - if (token === 37 /* AsteriskToken */) { - return true; + function parseJSDocRecordMember() { + var result = createNode(258 /* JSDocRecordMember */); + result.name = parseSimplePropertyName(); + if (token === 54 /* ColonToken */) { + nextToken(); + result.type = parseJSDocType(); + } + return finishNode(result); } - // Try to get the first property-like token following all modifiers. - // This can either be an identifier or the 'get' or 'set' keywords. - if (isLiteralPropertyName()) { - idToken = token; + function parseJSDocNonNullableType() { + var result = createNode(256 /* JSDocNonNullableType */); nextToken(); + result.type = parseJSDocType(); + return finishNode(result); } - // Index signatures and computed properties are class members; we can parse. - if (token === 19 /* OpenBracketToken */) { - return true; + function parseJSDocTupleType() { + var result = createNode(254 /* JSDocTupleType */); + nextToken(); + result.types = parseDelimitedList(25 /* JSDocTupleTypes */, parseJSDocType); + checkForTrailingComma(result.types); + parseExpected(20 /* CloseBracketToken */); + return finishNode(result); } - // If we were able to get any potential identifier... - if (idToken !== undefined) { - // If we have a non-keyword identifier, or if we have an accessor, then it's safe to parse. - if (!ts.isKeyword(idToken) || idToken === 129 /* SetKeyword */ || idToken === 123 /* GetKeyword */) { - return true; - } - // If it *is* a keyword, but not an accessor, check a little farther along - // to see if it should actually be parsed as a class member. - switch (token) { - case 17 /* OpenParenToken */: // Method declaration - case 25 /* LessThanToken */: // Generic Method declaration - case 54 /* ColonToken */: // Type Annotation for declaration - case 56 /* EqualsToken */: // Initializer for declaration - case 53 /* QuestionToken */: - return true; - default: - // Covers - // - Semicolons (declaration termination) - // - Closing braces (end-of-class, must be declaration) - // - End-of-files (not valid, but permitted so that it gets caught later on) - // - Line-breaks (enabling *automatic semicolon insertion*) - return canParseSemicolon(); + function checkForTrailingComma(list) { + if (parseDiagnostics.length === 0 && list.hasTrailingComma) { + var start = list.end - ",".length; + parseErrorAtPosition(start, ",".length, ts.Diagnostics.Trailing_comma_not_allowed); } } - return false; - } - function parseDecorators() { - var decorators; - while (true) { - var decoratorStart = getNodePos(); - if (!parseOptional(55 /* AtToken */)) { - break; - } - if (!decorators) { - decorators = []; - decorators.pos = scanner.getStartPos(); + function parseJSDocUnionType() { + var result = createNode(253 /* JSDocUnionType */); + nextToken(); + result.types = parseJSDocTypeList(parseJSDocType()); + parseExpected(18 /* CloseParenToken */); + return finishNode(result); + } + function parseJSDocTypeList(firstType) { + ts.Debug.assert(!!firstType); + var types = []; + types.pos = firstType.pos; + types.push(firstType); + while (parseOptional(47 /* BarToken */)) { + types.push(parseJSDocType()); } - var decorator = createNode(139 /* Decorator */, decoratorStart); - decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); - decorators.push(finishNode(decorator)); + types.end = scanner.getStartPos(); + return types; } - if (decorators) { - decorators.end = getNodeEnd(); + function parseJSDocAllType() { + var result = createNode(250 /* JSDocAllType */); + nextToken(); + return finishNode(result); } - return decorators; - } - function parseModifiers() { - var flags = 0; - var modifiers; - while (true) { - var modifierStart = scanner.getStartPos(); - var modifierKind = token; - if (!parseAnyContextualModifier()) { - break; + function parseJSDocUnknownOrNullableType() { + var pos = scanner.getStartPos(); + // skip the ? + nextToken(); + // Need to lookahead to decide if this is a nullable or unknown type. + // Here are cases where we'll pick the unknown type: + // + // Foo(?, + // { a: ? } + // Foo(?) + // Foo + // Foo(?= + // (?| + if (token === 24 /* CommaToken */ || + token === 16 /* CloseBraceToken */ || + token === 18 /* CloseParenToken */ || + token === 27 /* GreaterThanToken */ || + token === 56 /* EqualsToken */ || + token === 47 /* BarToken */) { + var result = createNode(251 /* JSDocUnknownType */, pos); + return finishNode(result); } - if (!modifiers) { - modifiers = []; - modifiers.pos = modifierStart; + else { + var result = createNode(255 /* JSDocNullableType */, pos); + result.type = parseJSDocType(); + return finishNode(result); } - flags |= ts.modifierToFlag(modifierKind); - modifiers.push(finishNode(createNode(modifierKind, modifierStart))); } - if (modifiers) { - modifiers.flags = flags; - modifiers.end = scanner.getStartPos(); + function parseIsolatedJSDocComment(content, start, length) { + initializeState("file.js", content, 2 /* Latest */, /*isJavaScriptFile*/ true, /*_syntaxCursor:*/ undefined); + var jsDocComment = parseJSDocComment(/*parent:*/ undefined, start, length); + var diagnostics = parseDiagnostics; + clearState(); + return jsDocComment ? { jsDocComment: jsDocComment, diagnostics: diagnostics } : undefined; } - return modifiers; - } - function parseModifiersForArrowFunction() { - var flags = 0; - var modifiers; - if (token === 118 /* AsyncKeyword */) { - var modifierStart = scanner.getStartPos(); - var modifierKind = token; - nextToken(); - modifiers = []; - modifiers.pos = modifierStart; - flags |= ts.modifierToFlag(modifierKind); - modifiers.push(finishNode(createNode(modifierKind, modifierStart))); - modifiers.flags = flags; - modifiers.end = scanner.getStartPos(); + JSDocParser.parseIsolatedJSDocComment = parseIsolatedJSDocComment; + function parseJSDocComment(parent, start, length) { + var comment = parseJSDocCommentWorker(start, length); + if (comment) { + fixupParentReferences(comment); + comment.parent = parent; + } + return comment; } - return modifiers; - } - function parseClassElement() { - if (token === 23 /* SemicolonToken */) { - var result = createNode(191 /* SemicolonClassElement */); - nextToken(); - return finishNode(result); + JSDocParser.parseJSDocComment = parseJSDocComment; + function parseJSDocCommentWorker(start, length) { + var content = sourceText; + start = start || 0; + var end = length === undefined ? content.length : start + length; + length = end - start; + ts.Debug.assert(start >= 0); + ts.Debug.assert(start <= end); + ts.Debug.assert(end <= content.length); + var tags; + var pos; + // NOTE(cyrusn): This is essentially a handwritten scanner for JSDocComments. I + // considered using an actual Scanner, but this would complicate things. The + // scanner would need to know it was in a Doc Comment. Otherwise, it would then + // produce comments *inside* the doc comment. In the end it was just easier to + // write a simple scanner rather than go that route. + if (length >= "/** */".length) { + if (content.charCodeAt(start) === 47 /* slash */ && + content.charCodeAt(start + 1) === 42 /* asterisk */ && + content.charCodeAt(start + 2) === 42 /* asterisk */ && + content.charCodeAt(start + 3) !== 42 /* asterisk */) { + // Initially we can parse out a tag. We also have seen a starting asterisk. + // This is so that /** * @type */ doesn't parse. + var canParseTag = true; + var seenAsterisk = true; + for (pos = start + "/**".length; pos < end;) { + var ch = content.charCodeAt(pos); + pos++; + if (ch === 64 /* at */ && canParseTag) { + parseTag(); + // Once we parse out a tag, we cannot keep parsing out tags on this line. + canParseTag = false; + continue; + } + if (ts.isLineBreak(ch)) { + // After a line break, we can parse a tag, and we haven't seen as asterisk + // on the next line yet. + canParseTag = true; + seenAsterisk = false; + continue; + } + if (ts.isWhiteSpace(ch)) { + // Whitespace doesn't affect any of our parsing. + continue; + } + // Ignore the first asterisk on a line. + if (ch === 42 /* asterisk */) { + if (seenAsterisk) { + // If we've already seen an asterisk, then we can no longer parse a tag + // on this line. + canParseTag = false; + } + seenAsterisk = true; + continue; + } + // Anything else is doc comment text. We can't do anything with it. Because it + // wasn't a tag, we can no longer parse a tag on this line until we hit the next + // line break. + canParseTag = false; + } + } + } + return createJSDocComment(); + function createJSDocComment() { + if (!tags) { + return undefined; + } + var result = createNode(265 /* JSDocComment */, start); + result.tags = tags; + return finishNode(result, end); + } + function skipWhitespace() { + while (pos < end && ts.isWhiteSpace(content.charCodeAt(pos))) { + pos++; + } + } + function parseTag() { + ts.Debug.assert(content.charCodeAt(pos - 1) === 64 /* at */); + var atToken = createNode(55 /* AtToken */, pos - 1); + atToken.end = pos; + var tagName = scanIdentifier(); + if (!tagName) { + return; + } + var tag = handleTag(atToken, tagName) || handleUnknownTag(atToken, tagName); + addTag(tag); + } + function handleTag(atToken, tagName) { + if (tagName) { + switch (tagName.text) { + case "param": + return handleParamTag(atToken, tagName); + case "return": + case "returns": + return handleReturnTag(atToken, tagName); + case "template": + return handleTemplateTag(atToken, tagName); + case "type": + return handleTypeTag(atToken, tagName); + } + } + return undefined; + } + function handleUnknownTag(atToken, tagName) { + var result = createNode(266 /* JSDocTag */, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + return finishNode(result, pos); + } + function addTag(tag) { + if (tag) { + if (!tags) { + tags = []; + tags.pos = tag.pos; + } + tags.push(tag); + tags.end = tag.end; + } + } + function tryParseTypeExpression() { + skipWhitespace(); + if (content.charCodeAt(pos) !== 123 /* openBrace */) { + return undefined; + } + var typeExpression = parseJSDocTypeExpression(pos, end - pos); + pos = typeExpression.end; + return typeExpression; + } + function handleParamTag(atToken, tagName) { + var typeExpression = tryParseTypeExpression(); + skipWhitespace(); + var name; + var isBracketed; + if (content.charCodeAt(pos) === 91 /* openBracket */) { + pos++; + skipWhitespace(); + name = scanIdentifier(); + isBracketed = true; + } + else { + name = scanIdentifier(); + } + if (!name) { + parseErrorAtPosition(pos, 0, ts.Diagnostics.Identifier_expected); + } + var preName, postName; + if (typeExpression) { + postName = name; + } + else { + preName = name; + } + if (!typeExpression) { + typeExpression = tryParseTypeExpression(); + } + var result = createNode(267 /* JSDocParameterTag */, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.preParameterName = preName; + result.typeExpression = typeExpression; + result.postParameterName = postName; + result.isBracketed = isBracketed; + return finishNode(result, pos); + } + function handleReturnTag(atToken, tagName) { + if (ts.forEach(tags, function (t) { return t.kind === 268 /* JSDocReturnTag */; })) { + parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } + var result = createNode(268 /* JSDocReturnTag */, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.typeExpression = tryParseTypeExpression(); + return finishNode(result, pos); + } + function handleTypeTag(atToken, tagName) { + if (ts.forEach(tags, function (t) { return t.kind === 269 /* JSDocTypeTag */; })) { + parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } + var result = createNode(269 /* JSDocTypeTag */, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.typeExpression = tryParseTypeExpression(); + return finishNode(result, pos); + } + function handleTemplateTag(atToken, tagName) { + if (ts.forEach(tags, function (t) { return t.kind === 270 /* JSDocTemplateTag */; })) { + parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } + var typeParameters = []; + typeParameters.pos = pos; + while (true) { + skipWhitespace(); + var startPos = pos; + var name_8 = scanIdentifier(); + if (!name_8) { + parseErrorAtPosition(startPos, 0, ts.Diagnostics.Identifier_expected); + return undefined; + } + var typeParameter = createNode(137 /* TypeParameter */, name_8.pos); + typeParameter.name = name_8; + finishNode(typeParameter, pos); + typeParameters.push(typeParameter); + skipWhitespace(); + if (content.charCodeAt(pos) !== 44 /* comma */) { + break; + } + pos++; + } + typeParameters.end = pos; + var result = createNode(270 /* JSDocTemplateTag */, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.typeParameters = typeParameters; + return finishNode(result, pos); + } + function scanIdentifier() { + var startPos = pos; + for (; pos < end; pos++) { + var ch = content.charCodeAt(pos); + if (pos === startPos && ts.isIdentifierStart(ch, 2 /* Latest */)) { + continue; + } + else if (pos > startPos && ts.isIdentifierPart(ch, 2 /* Latest */)) { + continue; + } + break; + } + if (startPos === pos) { + return undefined; + } + var result = createNode(69 /* Identifier */, startPos); + result.text = content.substring(startPos, pos); + return finishNode(result, pos); + } } - var fullStart = getNodePos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); - if (accessor) { - return accessor; + JSDocParser.parseJSDocCommentWorker = parseJSDocCommentWorker; + })(JSDocParser = Parser.JSDocParser || (Parser.JSDocParser = {})); + })(Parser || (Parser = {})); + var IncrementalParser; + (function (IncrementalParser) { + function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) { + aggressiveChecks = aggressiveChecks || ts.Debug.shouldAssert(2 /* Aggressive */); + checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks); + if (ts.textChangeRangeIsUnchanged(textChangeRange)) { + // if the text didn't change, then we can just return our current source file as-is. + return sourceFile; } - if (token === 121 /* ConstructorKeyword */) { - return parseConstructorDeclaration(fullStart, decorators, modifiers); + if (sourceFile.statements.length === 0) { + // If we don't have any statements in the current source file, then there's no real + // way to incrementally parse. So just do a full parse instead. + return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, /*syntaxCursor*/ undefined, /*setNodeParents*/ true); + } + // Make sure we're not trying to incrementally update a source file more than once. Once + // we do an update the original source file is considered unusbale from that point onwards. + // + // This is because we do incremental parsing in-place. i.e. we take nodes from the old + // tree and give them new positions and parents. From that point on, trusting the old + // tree at all is not possible as far too much of it may violate invariants. + var incrementalSourceFile = sourceFile; + ts.Debug.assert(!incrementalSourceFile.hasBeenIncrementallyParsed); + incrementalSourceFile.hasBeenIncrementallyParsed = true; + var oldText = sourceFile.text; + var syntaxCursor = createSyntaxCursor(sourceFile); + // Make the actual change larger so that we know to reparse anything whose lookahead + // might have intersected the change. + var changeRange = extendToAffectedRange(sourceFile, textChangeRange); + checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks); + // Ensure that extending the affected range only moved the start of the change range + // earlier in the file. + ts.Debug.assert(changeRange.span.start <= textChangeRange.span.start); + ts.Debug.assert(ts.textSpanEnd(changeRange.span) === ts.textSpanEnd(textChangeRange.span)); + ts.Debug.assert(ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)) === ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange))); + // The is the amount the nodes after the edit range need to be adjusted. It can be + // positive (if the edit added characters), negative (if the edit deleted characters) + // or zero (if this was a pure overwrite with nothing added/removed). + var delta = ts.textChangeRangeNewSpan(changeRange).length - changeRange.span.length; + // If we added or removed characters during the edit, then we need to go and adjust all + // the nodes after the edit. Those nodes may move forward (if we inserted chars) or they + // may move backward (if we deleted chars). + // + // Doing this helps us out in two ways. First, it means that any nodes/tokens we want + // to reuse are already at the appropriate position in the new text. That way when we + // reuse them, we don't have to figure out if they need to be adjusted. Second, it makes + // it very easy to determine if we can reuse a node. If the node's position is at where + // we are in the text, then we can reuse it. Otherwise we can't. If the node's position + // is ahead of us, then we'll need to rescan tokens. If the node's position is behind + // us, then we'll need to skip it or crumble it as appropriate + // + // We will also adjust the positions of nodes that intersect the change range as well. + // By doing this, we ensure that all the positions in the old tree are consistent, not + // just the positions of nodes entirely before/after the change range. By being + // consistent, we can then easily map from positions to nodes in the old tree easily. + // + // Also, mark any syntax elements that intersect the changed span. We know, up front, + // that we cannot reuse these elements. + updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, ts.textSpanEnd(changeRange.span), ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); + // Now that we've set up our internal incremental state just proceed and parse the + // source file in the normal fashion. When possible the parser will retrieve and + // reuse nodes from the old tree. + // + // Note: passing in 'true' for setNodeParents is very important. When incrementally + // parsing, we will be reusing nodes from the old tree, and placing it into new + // parents. If we don't set the parents now, we'll end up with an observably + // inconsistent tree. Setting the parents on the new tree should be very fast. We + // will immediately bail out of walking any subtrees when we can see that their parents + // are already correct. + var result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, /* setParentNode */ true); + return result; + } + IncrementalParser.updateSourceFile = updateSourceFile; + function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) { + if (isArray) { + visitArray(element); } - if (isIndexSignature()) { - return parseIndexSignatureDeclaration(fullStart, decorators, modifiers); + else { + visitNode(element); } - // It is very important that we check this *after* checking indexers because - // the [ token can start an index signature or a computed property name - if (ts.tokenIsIdentifierOrKeyword(token) || - token === 9 /* StringLiteral */ || - token === 8 /* NumericLiteral */ || - token === 37 /* AsteriskToken */ || - token === 19 /* OpenBracketToken */) { - return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); + return; + function visitNode(node) { + var text = ""; + if (aggressiveChecks && shouldCheckNode(node)) { + text = oldText.substring(node.pos, node.end); + } + // Ditch any existing LS children we may have created. This way we can avoid + // moving them forward. + if (node._children) { + node._children = undefined; + } + if (node.jsDocComment) { + node.jsDocComment = undefined; + } + node.pos += delta; + node.end += delta; + if (aggressiveChecks && shouldCheckNode(node)) { + ts.Debug.assert(text === newText.substring(node.pos, node.end)); + } + forEachChild(node, visitNode, visitArray); + checkNodePositions(node, aggressiveChecks); } - if (decorators || modifiers) { - // treat this as a property declaration with a missing name. - var name_7 = createMissingNode(69 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); - return parsePropertyDeclaration(fullStart, decorators, modifiers, name_7, /*questionToken*/ undefined); + function visitArray(array) { + array._children = undefined; + array.pos += delta; + array.end += delta; + for (var _i = 0, array_7 = array; _i < array_7.length; _i++) { + var node = array_7[_i]; + visitNode(node); + } } - // 'isClassMemberStart' should have hinted not to attempt parsing. - ts.Debug.fail("Should not have attempted to parse class member declaration."); - } - function parseClassExpression() { - return parseClassDeclarationOrExpression( - /*fullStart*/ scanner.getStartPos(), - /*decorators*/ undefined, - /*modifiers*/ undefined, 186 /* ClassExpression */); } - function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 214 /* ClassDeclaration */); + function shouldCheckNode(node) { + switch (node.kind) { + case 9 /* StringLiteral */: + case 8 /* NumericLiteral */: + case 69 /* Identifier */: + return true; + } + return false; } - function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { - var node = createNode(kind, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(73 /* ClassKeyword */); - node.name = parseNameOfClassDeclarationOrExpression(); - node.typeParameters = parseTypeParameters(); - node.heritageClauses = parseHeritageClauses(/*isClassHeritageClause*/ true); - if (parseExpected(15 /* OpenBraceToken */)) { - // ClassTail[Yield,Await] : (Modified) See 14.5 - // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } - node.members = parseClassMembers(); - parseExpected(16 /* CloseBraceToken */); + function adjustIntersectingElement(element, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta) { + ts.Debug.assert(element.end >= changeStart, "Adjusting an element that was entirely before the change range"); + ts.Debug.assert(element.pos <= changeRangeOldEnd, "Adjusting an element that was entirely after the change range"); + ts.Debug.assert(element.pos <= element.end); + // We have an element that intersects the change range in some way. It may have its + // start, or its end (or both) in the changed range. We want to adjust any part + // that intersects such that the final tree is in a consistent state. i.e. all + // chlidren have spans within the span of their parent, and all siblings are ordered + // properly. + // We may need to update both the 'pos' and the 'end' of the element. + // If the 'pos' is before the start of the change, then we don't need to touch it. + // If it isn't, then the 'pos' must be inside the change. How we update it will + // depend if delta is positive or negative. If delta is positive then we have + // something like: + // + // -------------------AAA----------------- + // -------------------BBBCCCCCCC----------------- + // + // In this case, we consider any node that started in the change range to still be + // starting at the same position. + // + // however, if the delta is negative, then we instead have something like this: + // + // -------------------XXXYYYYYYY----------------- + // -------------------ZZZ----------------- + // + // In this case, any element that started in the 'X' range will keep its position. + // However any element htat started after that will have their pos adjusted to be + // at the end of the new range. i.e. any node that started in the 'Y' range will + // be adjusted to have their start at the end of the 'Z' range. + // + // The element will keep its position if possible. Or Move backward to the new-end + // if it's in the 'Y' range. + element.pos = Math.min(element.pos, changeRangeNewEnd); + // If the 'end' is after the change range, then we always adjust it by the delta + // amount. However, if the end is in the change range, then how we adjust it + // will depend on if delta is positive or negative. If delta is positive then we + // have something like: + // + // -------------------AAA----------------- + // -------------------BBBCCCCCCC----------------- + // + // In this case, we consider any node that ended inside the change range to keep its + // end position. + // + // however, if the delta is negative, then we instead have something like this: + // + // -------------------XXXYYYYYYY----------------- + // -------------------ZZZ----------------- + // + // In this case, any element that ended in the 'X' range will keep its position. + // However any element htat ended after that will have their pos adjusted to be + // at the end of the new range. i.e. any node that ended in the 'Y' range will + // be adjusted to have their end at the end of the 'Z' range. + if (element.end >= changeRangeOldEnd) { + // Element ends after the change range. Always adjust the end pos. + element.end += delta; } else { - node.members = createMissingList(); + // Element ends in the change range. The element will keep its position if + // possible. Or Move backward to the new-end if it's in the 'Y' range. + element.end = Math.min(element.end, changeRangeNewEnd); } - return finishNode(node); - } - function parseNameOfClassDeclarationOrExpression() { - // implements is a future reserved word so - // 'class implements' might mean either - // - class expression with omitted name, 'implements' starts heritage clause - // - class with name 'implements' - // 'isImplementsClause' helps to disambiguate between these two cases - return isIdentifier() && !isImplementsClause() - ? parseIdentifier() - : undefined; - } - function isImplementsClause() { - return token === 106 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); - } - function parseHeritageClauses(isClassHeritageClause) { - // ClassTail[Yield,Await] : (Modified) See 14.5 - // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } - if (isHeritageClause()) { - return parseList(20 /* HeritageClauses */, parseHeritageClause); + ts.Debug.assert(element.pos <= element.end); + if (element.parent) { + ts.Debug.assert(element.pos >= element.parent.pos); + ts.Debug.assert(element.end <= element.parent.end); } - return undefined; - } - function parseHeritageClausesWorker() { - return parseList(20 /* HeritageClauses */, parseHeritageClause); } - function parseHeritageClause() { - if (token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */) { - var node = createNode(243 /* HeritageClause */); - node.token = token; - nextToken(); - node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); - return finishNode(node); + function checkNodePositions(node, aggressiveChecks) { + if (aggressiveChecks) { + var pos = node.pos; + forEachChild(node, function (child) { + ts.Debug.assert(child.pos >= pos); + pos = child.end; + }); + ts.Debug.assert(pos <= node.end); } - return undefined; } - function parseExpressionWithTypeArguments() { - var node = createNode(188 /* ExpressionWithTypeArguments */); - node.expression = parseLeftHandSideExpressionOrHigher(); - if (token === 25 /* LessThanToken */) { - node.typeArguments = parseBracketedList(18 /* TypeArguments */, parseType, 25 /* LessThanToken */, 27 /* GreaterThanToken */); + function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) { + visitNode(sourceFile); + return; + function visitNode(child) { + ts.Debug.assert(child.pos <= child.end); + if (child.pos > changeRangeOldEnd) { + // Node is entirely past the change range. We need to move both its pos and + // end, forward or backward appropriately. + moveElementEntirelyPastChangeRange(child, /*isArray*/ false, delta, oldText, newText, aggressiveChecks); + return; + } + // Check if the element intersects the change range. If it does, then it is not + // reusable. Also, we'll need to recurse to see what constituent portions we may + // be able to use. + var fullEnd = child.end; + if (fullEnd >= changeStart) { + child.intersectsChange = true; + child._children = undefined; + // Adjust the pos or end (or both) of the intersecting element accordingly. + adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); + forEachChild(child, visitNode, visitArray); + checkNodePositions(child, aggressiveChecks); + return; + } + // Otherwise, the node is entirely before the change range. No need to do anything with it. + ts.Debug.assert(fullEnd < changeStart); + } + function visitArray(array) { + ts.Debug.assert(array.pos <= array.end); + if (array.pos > changeRangeOldEnd) { + // Array is entirely after the change range. We need to move it, and move any of + // its children. + moveElementEntirelyPastChangeRange(array, /*isArray*/ true, delta, oldText, newText, aggressiveChecks); + return; + } + // Check if the element intersects the change range. If it does, then it is not + // reusable. Also, we'll need to recurse to see what constituent portions we may + // be able to use. + var fullEnd = array.end; + if (fullEnd >= changeStart) { + array.intersectsChange = true; + array._children = undefined; + // Adjust the pos or end (or both) of the intersecting array accordingly. + adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); + for (var _i = 0, array_8 = array; _i < array_8.length; _i++) { + var node = array_8[_i]; + visitNode(node); + } + return; + } + // Otherwise, the array is entirely before the change range. No need to do anything with it. + ts.Debug.assert(fullEnd < changeStart); } - return finishNode(node); - } - function isHeritageClause() { - return token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */; - } - function parseClassMembers() { - return parseList(5 /* ClassMembers */, parseClassElement); - } - function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(215 /* InterfaceDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(107 /* InterfaceKeyword */); - node.name = parseIdentifier(); - node.typeParameters = parseTypeParameters(); - node.heritageClauses = parseHeritageClauses(/*isClassHeritageClause*/ false); - node.members = parseObjectTypeMembers(); - return finishNode(node); - } - function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(216 /* TypeAliasDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(132 /* TypeKeyword */); - node.name = parseIdentifier(); - node.typeParameters = parseTypeParameters(); - parseExpected(56 /* EqualsToken */); - node.type = parseType(); - parseSemicolon(); - return finishNode(node); } - // In an ambient declaration, the grammar only allows integer literals as initializers. - // 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 parseEnumMember() { - var node = createNode(247 /* EnumMember */, scanner.getStartPos()); - node.name = parsePropertyName(); - node.initializer = allowInAnd(parseNonParameterInitializer); - return finishNode(node); + function extendToAffectedRange(sourceFile, changeRange) { + // Consider the following code: + // void foo() { /; } + // + // If the text changes with an insertion of / just before the semicolon then we end up with: + // void foo() { //; } + // + // If we were to just use the changeRange a is, then we would not rescan the { token + // (as it does not intersect the actual original change range). Because an edit may + // change the token touching it, we actually need to look back *at least* one token so + // that the prior token sees that change. + var maxLookahead = 1; + var start = changeRange.span.start; + // the first iteration aligns us with the change start. subsequent iteration move us to + // the left by maxLookahead tokens. We only need to do this as long as we're not at the + // start of the tree. + for (var i = 0; start > 0 && i <= maxLookahead; i++) { + var nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start); + ts.Debug.assert(nearestNode.pos <= start); + var position = nearestNode.pos; + start = Math.max(0, position - 1); + } + var finalSpan = ts.createTextSpanFromBounds(start, ts.textSpanEnd(changeRange.span)); + var finalLength = changeRange.newLength + (changeRange.span.start - start); + return ts.createTextChangeRange(finalSpan, finalLength); } - function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(217 /* EnumDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(81 /* EnumKeyword */); - node.name = parseIdentifier(); - if (parseExpected(15 /* OpenBraceToken */)) { - node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); - parseExpected(16 /* CloseBraceToken */); + function findNearestNodeStartingBeforeOrAtPosition(sourceFile, position) { + var bestResult = sourceFile; + var lastNodeEntirelyBeforePosition; + forEachChild(sourceFile, visit); + if (lastNodeEntirelyBeforePosition) { + var lastChildOfLastEntireNodeBeforePosition = getLastChild(lastNodeEntirelyBeforePosition); + if (lastChildOfLastEntireNodeBeforePosition.pos > bestResult.pos) { + bestResult = lastChildOfLastEntireNodeBeforePosition; + } } - else { - node.members = createMissingList(); + return bestResult; + function getLastChild(node) { + while (true) { + var lastChild = getLastChildWorker(node); + if (lastChild) { + node = lastChild; + } + else { + return node; + } + } } - return finishNode(node); - } - function parseModuleBlock() { - var node = createNode(219 /* ModuleBlock */, scanner.getStartPos()); - if (parseExpected(15 /* OpenBraceToken */)) { - node.statements = parseList(1 /* BlockStatements */, parseStatement); - parseExpected(16 /* CloseBraceToken */); + function getLastChildWorker(node) { + var last = undefined; + forEachChild(node, function (child) { + if (ts.nodeIsPresent(child)) { + last = child; + } + }); + return last; } - else { - node.statements = createMissingList(); + function visit(child) { + if (ts.nodeIsMissing(child)) { + // Missing nodes are effectively invisible to us. We never even consider them + // When trying to find the nearest node before us. + return; + } + // If the child intersects this position, then this node is currently the nearest + // node that starts before the position. + if (child.pos <= position) { + if (child.pos >= bestResult.pos) { + // This node starts before the position, and is closer to the position than + // the previous best node we found. It is now the new best node. + bestResult = child; + } + // Now, the node may overlap the position, or it may end entirely before the + // position. If it overlaps with the position, then either it, or one of its + // children must be the nearest node before the position. So we can just + // recurse into this child to see if we can find something better. + if (position < child.end) { + // The nearest node is either this child, or one of the children inside + // of it. We've already marked this child as the best so far. Recurse + // in case one of the children is better. + forEachChild(child, visit); + // Once we look at the children of this node, then there's no need to + // continue any further. + return true; + } + else { + ts.Debug.assert(child.end <= position); + // The child ends entirely before this position. Say you have the following + // (where $ is the position) + // + // ? $ : <...> <...> + // + // We would want to find the nearest preceding node in "complex expr 2". + // To support that, we keep track of this node, and once we're done searching + // for a best node, we recurse down this node to see if we can find a good + // result in it. + // + // This approach allows us to quickly skip over nodes that are entirely + // before the position, while still allowing us to find any nodes in the + // last one that might be what we want. + lastNodeEntirelyBeforePosition = child; + } + } + else { + ts.Debug.assert(child.pos > position); + // We're now at a node that is entirely past the position we're searching for. + // This node (and all following nodes) could never contribute to the result, + // so just skip them by returning 'true' here. + return true; + } } - return finishNode(node); - } - function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(218 /* ModuleDeclaration */, fullStart); - // If we are parsing a dotted namespace name, we want to - // propagate the 'Namespace' flag across the names if set. - var namespaceFlag = flags & 65536 /* Namespace */; - node.decorators = decorators; - setModifiers(node, modifiers); - node.flags |= flags; - node.name = parseIdentifier(); - node.body = parseOptional(21 /* DotToken */) - ? parseModuleOrNamespaceDeclaration(getNodePos(), /*decorators*/ undefined, /*modifiers*/ undefined, 2 /* Export */ | namespaceFlag) - : parseModuleBlock(); - return finishNode(node); - } - function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(218 /* ModuleDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.name = parseLiteralNode(/*internName*/ true); - node.body = parseModuleBlock(); - return finishNode(node); } - function parseModuleDeclaration(fullStart, decorators, modifiers) { - var flags = modifiers ? modifiers.flags : 0; - if (parseOptional(126 /* NamespaceKeyword */)) { - flags |= 65536 /* Namespace */; + function checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks) { + var oldText = sourceFile.text; + if (textChangeRange) { + ts.Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); + if (aggressiveChecks || ts.Debug.shouldAssert(3 /* VeryAggressive */)) { + var oldTextPrefix = oldText.substr(0, textChangeRange.span.start); + var newTextPrefix = newText.substr(0, textChangeRange.span.start); + ts.Debug.assert(oldTextPrefix === newTextPrefix); + var oldTextSuffix = oldText.substring(ts.textSpanEnd(textChangeRange.span), oldText.length); + var newTextSuffix = newText.substring(ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange)), newText.length); + ts.Debug.assert(oldTextSuffix === newTextSuffix); + } } - else { - parseExpected(125 /* ModuleKeyword */); - if (token === 9 /* StringLiteral */) { - return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); + } + function createSyntaxCursor(sourceFile) { + var currentArray = sourceFile.statements; + var currentArrayIndex = 0; + ts.Debug.assert(currentArrayIndex < currentArray.length); + var current = currentArray[currentArrayIndex]; + var lastQueriedPosition = -1 /* Value */; + return { + currentNode: function (position) { + // Only compute the current node if the position is different than the last time + // we were asked. The parser commonly asks for the node at the same position + // twice. Once to know if can read an appropriate list element at a certain point, + // and then to actually read and consume the node. + if (position !== lastQueriedPosition) { + // Much of the time the parser will need the very next node in the array that + // we just returned a node from.So just simply check for that case and move + // forward in the array instead of searching for the node again. + if (current && current.end === position && currentArrayIndex < (currentArray.length - 1)) { + currentArrayIndex++; + current = currentArray[currentArrayIndex]; + } + // If we don't have a node, or the node we have isn't in the right position, + // then try to find a viable node at the position requested. + if (!current || current.pos !== position) { + findHighestListElementThatStartsAtPosition(position); + } + } + // Cache this query so that we don't do any extra work if the parser calls back + // into us. Note: this is very common as the parser will make pairs of calls like + // 'isListElement -> parseListElement'. If we were unable to find a node when + // called with 'isListElement', we don't want to redo the work when parseListElement + // is called immediately after. + lastQueriedPosition = position; + // Either we don'd have a node, or we have a node at the position being asked for. + ts.Debug.assert(!current || current.pos === position); + return current; + } + }; + // Finds the highest element in the tree we can find that starts at the provided position. + // The element must be a direct child of some node list in the tree. This way after we + // return it, we can easily return its next sibling in the list. + function findHighestListElementThatStartsAtPosition(position) { + // Clear out any cached state about the last node we found. + currentArray = undefined; + currentArrayIndex = -1 /* Value */; + current = undefined; + // Recurse into the source file to find the highest node at this position. + forEachChild(sourceFile, visitNode, visitArray); + return; + function visitNode(node) { + if (position >= node.pos && position < node.end) { + // Position was within this node. Keep searching deeper to find the node. + forEachChild(node, visitNode, visitArray); + // don't procede any futher in the search. + return true; + } + // position wasn't in this node, have to keep searching. + return false; + } + function visitArray(array) { + if (position >= array.pos && position < array.end) { + // position was in this array. Search through this array to see if we find a + // viable element. + for (var i = 0, n = array.length; i < n; i++) { + var child = array[i]; + if (child) { + if (child.pos === position) { + // Found the right node. We're done. + currentArray = array; + currentArrayIndex = i; + current = child; + return true; + } + else { + if (child.pos < position && position < child.end) { + // Position in somewhere within this child. Search in it and + // stop searching in this array. + forEachChild(child, visitNode, visitArray); + return true; + } + } + } + } + } + // position wasn't in this array, have to keep searching. + return false; } } - return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); - } - function isExternalModuleReference() { - return token === 127 /* RequireKeyword */ && - lookAhead(nextTokenIsOpenParen); } - function nextTokenIsOpenParen() { - return nextToken() === 17 /* OpenParenToken */; + var InvalidPosition; + (function (InvalidPosition) { + InvalidPosition[InvalidPosition["Value"] = -1] = "Value"; + })(InvalidPosition || (InvalidPosition = {})); + })(IncrementalParser || (IncrementalParser = {})); +})(ts || (ts = {})); +/// +/// +/* @internal */ +var ts; +(function (ts) { + ts.bindTime = 0; + (function (ModuleInstanceState) { + ModuleInstanceState[ModuleInstanceState["NonInstantiated"] = 0] = "NonInstantiated"; + ModuleInstanceState[ModuleInstanceState["Instantiated"] = 1] = "Instantiated"; + ModuleInstanceState[ModuleInstanceState["ConstEnumOnly"] = 2] = "ConstEnumOnly"; + })(ts.ModuleInstanceState || (ts.ModuleInstanceState = {})); + var ModuleInstanceState = ts.ModuleInstanceState; + var Reachability; + (function (Reachability) { + Reachability[Reachability["Unintialized"] = 1] = "Unintialized"; + Reachability[Reachability["Reachable"] = 2] = "Reachable"; + Reachability[Reachability["Unreachable"] = 4] = "Unreachable"; + Reachability[Reachability["ReportedUnreachable"] = 8] = "ReportedUnreachable"; + })(Reachability || (Reachability = {})); + function or(state1, state2) { + return (state1 | state2) & 2 /* Reachable */ + ? 2 /* Reachable */ + : (state1 & state2) & 8 /* ReportedUnreachable */ + ? 8 /* ReportedUnreachable */ + : 4 /* Unreachable */; + } + function getModuleInstanceState(node) { + // A module is uninstantiated if it contains only + // 1. interface declarations, type alias declarations + if (node.kind === 215 /* InterfaceDeclaration */ || node.kind === 216 /* TypeAliasDeclaration */) { + return 0 /* NonInstantiated */; } - function nextTokenIsSlash() { - return nextToken() === 39 /* SlashToken */; + else if (ts.isConstEnumDeclaration(node)) { + return 2 /* ConstEnumOnly */; } - function nextTokenIsCommaOrFromKeyword() { - nextToken(); - return token === 24 /* CommaToken */ || - token === 133 /* FromKeyword */; + else if ((node.kind === 222 /* ImportDeclaration */ || node.kind === 221 /* ImportEqualsDeclaration */) && !(node.flags & 2 /* Export */)) { + return 0 /* NonInstantiated */; } - function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { - parseExpected(89 /* ImportKeyword */); - var afterImportPos = scanner.getStartPos(); - var identifier; - if (isIdentifier()) { - identifier = parseIdentifier(); - if (token !== 24 /* CommaToken */ && token !== 133 /* FromKeyword */) { - // ImportEquals declaration of type: - // import x = require("mod"); or - // import x = M.x; - var importEqualsDeclaration = createNode(221 /* ImportEqualsDeclaration */, fullStart); - importEqualsDeclaration.decorators = decorators; - setModifiers(importEqualsDeclaration, modifiers); - importEqualsDeclaration.name = identifier; - parseExpected(56 /* EqualsToken */); - importEqualsDeclaration.moduleReference = parseModuleReference(); - parseSemicolon(); - return finishNode(importEqualsDeclaration); + else if (node.kind === 219 /* ModuleBlock */) { + var state = 0 /* NonInstantiated */; + ts.forEachChild(node, function (n) { + switch (getModuleInstanceState(n)) { + case 0 /* NonInstantiated */: + // child is non-instantiated - continue searching + return false; + case 2 /* ConstEnumOnly */: + // child is const enum only - record state and continue searching + state = 2 /* ConstEnumOnly */; + return false; + case 1 /* Instantiated */: + // child is instantiated - record state and stop + state = 1 /* Instantiated */; + return true; } - } - // Import statement - var importDeclaration = createNode(222 /* ImportDeclaration */, fullStart); - importDeclaration.decorators = decorators; - setModifiers(importDeclaration, modifiers); - // ImportDeclaration: - // import ImportClause from ModuleSpecifier ; - // import ModuleSpecifier; - if (identifier || - token === 37 /* AsteriskToken */ || - token === 15 /* OpenBraceToken */) { - importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(133 /* FromKeyword */); - } - importDeclaration.moduleSpecifier = parseModuleSpecifier(); - parseSemicolon(); - return finishNode(importDeclaration); - } - function parseImportClause(identifier, fullStart) { - // ImportClause: - // ImportedDefaultBinding - // NameSpaceImport - // NamedImports - // ImportedDefaultBinding, NameSpaceImport - // ImportedDefaultBinding, NamedImports - var importClause = createNode(223 /* ImportClause */, fullStart); - if (identifier) { - // ImportedDefaultBinding: - // ImportedBinding - importClause.name = identifier; - } - // If there was no default import or if there is comma token after default import - // parse namespace or named imports - if (!importClause.name || - parseOptional(24 /* CommaToken */)) { - importClause.namedBindings = token === 37 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(225 /* NamedImports */); - } - return finishNode(importClause); + }); + return state; } - function parseModuleReference() { - return isExternalModuleReference() - ? parseExternalModuleReference() - : parseEntityName(/*allowReservedWords*/ false); + else if (node.kind === 218 /* ModuleDeclaration */) { + return getModuleInstanceState(node.body); } - function parseExternalModuleReference() { - var node = createNode(232 /* ExternalModuleReference */); - parseExpected(127 /* RequireKeyword */); - parseExpected(17 /* OpenParenToken */); - node.expression = parseModuleSpecifier(); - parseExpected(18 /* CloseParenToken */); - return finishNode(node); + else { + return 1 /* Instantiated */; } - function parseModuleSpecifier() { - // We allow arbitrary expressions here, even though the grammar only allows string - // literals. We check to ensure that it is only a string literal later in the grammar - // walker. - var result = parseExpression(); - // Ensure the string being required is in our 'identifier' table. This will ensure - // that features like 'find refs' will look inside this file when search for its name. - if (result.kind === 9 /* StringLiteral */) { - internIdentifier(result.text); + } + ts.getModuleInstanceState = getModuleInstanceState; + var ContainerFlags; + (function (ContainerFlags) { + // The current node is not a container, and no container manipulation should happen before + // recursing into it. + ContainerFlags[ContainerFlags["None"] = 0] = "None"; + // The current node is a container. It should be set as the current container (and block- + // container) before recursing into it. The current node does not have locals. Examples: + // + // Classes, ObjectLiterals, TypeLiterals, Interfaces... + ContainerFlags[ContainerFlags["IsContainer"] = 1] = "IsContainer"; + // The current node is a block-scoped-container. It should be set as the current block- + // container before recursing into it. Examples: + // + // Blocks (when not parented by functions), Catch clauses, For/For-in/For-of statements... + ContainerFlags[ContainerFlags["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer"; + ContainerFlags[ContainerFlags["HasLocals"] = 4] = "HasLocals"; + // If the current node is a container that also container that also contains locals. Examples: + // + // Functions, Methods, Modules, Source-files. + ContainerFlags[ContainerFlags["IsContainerWithLocals"] = 5] = "IsContainerWithLocals"; + })(ContainerFlags || (ContainerFlags = {})); + var binder = createBinder(); + function bindSourceFile(file, options) { + var start = new Date().getTime(); + binder(file, options); + ts.bindTime += new Date().getTime() - start; + } + ts.bindSourceFile = bindSourceFile; + function createBinder() { + var file; + var options; + var parent; + var container; + var blockScopeContainer; + var lastContainer; + var seenThisKeyword; + // state used by reachability checks + var hasExplicitReturn; + var currentReachabilityState; + var labelStack; + var labelIndexMap; + var implicitLabels; + // If this file is an external module, then it is automatically in strict-mode according to + // ES6. If it is not an external module, then we'll determine if it is in strict mode or + // not depending on if we see "use strict" in certain places (or if we hit a class/namespace). + var inStrictMode; + var symbolCount = 0; + var Symbol; + var classifiableNames; + function bindSourceFile(f, opts) { + file = f; + options = opts; + inStrictMode = !!file.externalModuleIndicator; + classifiableNames = {}; + Symbol = ts.objectAllocator.getSymbolConstructor(); + if (!file.locals) { + bind(file); + file.symbolCount = symbolCount; + file.classifiableNames = classifiableNames; } - return result; - } - function parseNamespaceImport() { - // NameSpaceImport: - // * as ImportedBinding - var namespaceImport = createNode(224 /* NamespaceImport */); - parseExpected(37 /* AsteriskToken */); - parseExpected(116 /* AsKeyword */); - namespaceImport.name = parseIdentifier(); - return finishNode(namespaceImport); - } - function parseNamedImportsOrExports(kind) { - var node = createNode(kind); - // NamedImports: - // { } - // { ImportsList } - // { ImportsList, } - // ImportsList: - // ImportSpecifier - // ImportsList, ImportSpecifier - node.elements = parseBracketedList(21 /* ImportOrExportSpecifiers */, kind === 225 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 15 /* OpenBraceToken */, 16 /* CloseBraceToken */); - return finishNode(node); - } - function parseExportSpecifier() { - return parseImportOrExportSpecifier(230 /* ExportSpecifier */); - } - function parseImportSpecifier() { - return parseImportOrExportSpecifier(226 /* ImportSpecifier */); + parent = undefined; + container = undefined; + blockScopeContainer = undefined; + lastContainer = undefined; + seenThisKeyword = false; + hasExplicitReturn = false; + labelStack = undefined; + labelIndexMap = undefined; + implicitLabels = undefined; } - function parseImportOrExportSpecifier(kind) { - var node = createNode(kind); - // ImportSpecifier: - // BindingIdentifier - // IdentifierName as BindingIdentifier - // ExportSpecififer: - // IdentifierName - // IdentifierName as IdentifierName - var checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); - var checkIdentifierStart = scanner.getTokenPos(); - var checkIdentifierEnd = scanner.getTextPos(); - var identifierName = parseIdentifierName(); - if (token === 116 /* AsKeyword */) { - node.propertyName = identifierName; - parseExpected(116 /* AsKeyword */); - checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); - checkIdentifierStart = scanner.getTokenPos(); - checkIdentifierEnd = scanner.getTextPos(); - node.name = parseIdentifierName(); - } - else { - node.name = identifierName; - } - if (kind === 226 /* ImportSpecifier */ && checkIdentifierIsKeyword) { - // Report error identifier expected - parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); - } - return finishNode(node); + return bindSourceFile; + function createSymbol(flags, name) { + symbolCount++; + return new Symbol(flags, name); } - function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(228 /* ExportDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - if (parseOptional(37 /* AsteriskToken */)) { - parseExpected(133 /* FromKeyword */); - node.moduleSpecifier = parseModuleSpecifier(); + function addDeclarationToSymbol(symbol, node, symbolFlags) { + symbol.flags |= symbolFlags; + node.symbol = symbol; + if (!symbol.declarations) { + symbol.declarations = []; } - else { - node.exportClause = parseNamedImportsOrExports(229 /* NamedExports */); - // It is not uncommon to accidentally omit the 'from' keyword. Additionally, in editing scenarios, - // the 'from' keyword can be parsed as a named export when the export clause is unterminated (i.e. `export { from "moduleName";`) - // If we don't have a 'from' keyword, see if we have a string literal such that ASI won't take effect. - if (token === 133 /* FromKeyword */ || (token === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) { - parseExpected(133 /* FromKeyword */); - node.moduleSpecifier = parseModuleSpecifier(); - } + symbol.declarations.push(node); + if (symbolFlags & 1952 /* HasExports */ && !symbol.exports) { + symbol.exports = {}; } - parseSemicolon(); - return finishNode(node); - } - function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(227 /* ExportAssignment */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - if (parseOptional(56 /* EqualsToken */)) { - node.isExportEquals = true; + if (symbolFlags & 6240 /* HasMembers */ && !symbol.members) { + symbol.members = {}; } - else { - parseExpected(77 /* DefaultKeyword */); + if (symbolFlags & 107455 /* Value */ && !symbol.valueDeclaration) { + symbol.valueDeclaration = node; } - node.expression = parseAssignmentExpressionOrHigher(); - parseSemicolon(); - return finishNode(node); } - function processReferenceComments(sourceFile) { - var triviaScanner = ts.createScanner(sourceFile.languageVersion, /*skipTrivia*/ false, 0 /* Standard */, sourceText); - var referencedFiles = []; - var amdDependencies = []; - var amdModuleName; - // Keep scanning all the leading trivia in the file until we get to something that - // isn't trivia. Any single line comment will be analyzed to see if it is a - // reference comment. - while (true) { - var kind = triviaScanner.scan(); - if (kind === 5 /* WhitespaceTrivia */ || kind === 4 /* NewLineTrivia */ || kind === 3 /* MultiLineCommentTrivia */) { - continue; - } - if (kind !== 2 /* SingleLineCommentTrivia */) { - break; - } - var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() }; - var comment = sourceText.substring(range.pos, range.end); - var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range); - if (referencePathMatchResult) { - var fileReference = referencePathMatchResult.fileReference; - sourceFile.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib; - var diagnosticMessage = referencePathMatchResult.diagnosticMessage; - if (fileReference) { - referencedFiles.push(fileReference); - } - if (diagnosticMessage) { - parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, diagnosticMessage)); - } + // Should not be called on a declaration with a computed property name, + // unless it is a well known Symbol. + function getDeclarationName(node) { + if (node.name) { + if (node.kind === 218 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { + return "\"" + node.name.text + "\""; } - else { - var amdModuleNameRegEx = /^\/\/\/\s*".length; - return parseErrorAtPosition(start, end - start, ts.Diagnostics.Type_argument_list_cannot_be_empty); - } + container = saveContainer; + parent = saveParent; + blockScopeContainer = savedBlockScopeContainer; + } + /** + * Returns true if node and its subnodes were successfully traversed. + * Returning false means that node was not examined and caller needs to dive into the node himself. + */ + function bindReachableStatement(node) { + if (checkUnreachable(node)) { + ts.forEachChild(node, bind); + return; } - function parseQualifiedName(left) { - var result = createNode(135 /* QualifiedName */, left.pos); - result.left = left; - result.right = parseIdentifierName(); - return finishNode(result); + switch (node.kind) { + case 198 /* WhileStatement */: + bindWhileStatement(node); + break; + case 197 /* DoStatement */: + bindDoStatement(node); + break; + case 199 /* ForStatement */: + bindForStatement(node); + break; + case 200 /* ForInStatement */: + case 201 /* ForOfStatement */: + bindForInOrForOfStatement(node); + break; + case 196 /* IfStatement */: + bindIfStatement(node); + break; + case 204 /* ReturnStatement */: + case 208 /* ThrowStatement */: + bindReturnOrThrow(node); + break; + case 203 /* BreakStatement */: + case 202 /* ContinueStatement */: + bindBreakOrContinueStatement(node); + break; + case 209 /* TryStatement */: + bindTryStatement(node); + break; + case 206 /* SwitchStatement */: + bindSwitchStatement(node); + break; + case 220 /* CaseBlock */: + bindCaseBlock(node); + break; + case 207 /* LabeledStatement */: + bindLabeledStatement(node); + break; + default: + ts.forEachChild(node, bind); + break; } - function parseJSDocRecordType() { - var result = createNode(257 /* JSDocRecordType */); - nextToken(); - result.members = parseDelimitedList(24 /* JSDocRecordMembers */, parseJSDocRecordMember); - checkForTrailingComma(result.members); - parseExpected(16 /* CloseBraceToken */); - return finishNode(result); + } + function bindWhileStatement(n) { + var preWhileState = n.expression.kind === 84 /* FalseKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; + var postWhileState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; + // bind expressions (don't affect reachability) + bind(n.expression); + currentReachabilityState = preWhileState; + var postWhileLabel = pushImplicitLabel(); + bind(n.statement); + popImplicitLabel(postWhileLabel, postWhileState); + } + function bindDoStatement(n) { + var preDoState = currentReachabilityState; + var postDoLabel = pushImplicitLabel(); + bind(n.statement); + var postDoState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : preDoState; + popImplicitLabel(postDoLabel, postDoState); + // bind expressions (don't affect reachability) + bind(n.expression); + } + function bindForStatement(n) { + var preForState = currentReachabilityState; + var postForLabel = pushImplicitLabel(); + // bind expressions (don't affect reachability) + bind(n.initializer); + bind(n.condition); + bind(n.incrementor); + bind(n.statement); + // for statement is considered infinite when it condition is either omitted or is true keyword + // - for(..;;..) + // - for(..;true;..) + var isInfiniteLoop = (!n.condition || n.condition.kind === 99 /* TrueKeyword */); + var postForState = isInfiniteLoop ? 4 /* Unreachable */ : preForState; + popImplicitLabel(postForLabel, postForState); + } + function bindForInOrForOfStatement(n) { + var preStatementState = currentReachabilityState; + var postStatementLabel = pushImplicitLabel(); + // bind expressions (don't affect reachability) + bind(n.initializer); + bind(n.expression); + bind(n.statement); + popImplicitLabel(postStatementLabel, preStatementState); + } + function bindIfStatement(n) { + // denotes reachability state when entering 'thenStatement' part of the if statement: + // i.e. if condition is false then thenStatement is unreachable + var ifTrueState = n.expression.kind === 84 /* FalseKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; + // denotes reachability state when entering 'elseStatement': + // i.e. if condition is true then elseStatement is unreachable + var ifFalseState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; + currentReachabilityState = ifTrueState; + // bind expression (don't affect reachability) + bind(n.expression); + bind(n.thenStatement); + if (n.elseStatement) { + var preElseState = currentReachabilityState; + currentReachabilityState = ifFalseState; + bind(n.elseStatement); + currentReachabilityState = or(currentReachabilityState, preElseState); } - function parseJSDocRecordMember() { - var result = createNode(258 /* JSDocRecordMember */); - result.name = parseSimplePropertyName(); - if (token === 54 /* ColonToken */) { - nextToken(); - result.type = parseJSDocType(); - } - return finishNode(result); + else { + currentReachabilityState = or(currentReachabilityState, ifFalseState); } - function parseJSDocNonNullableType() { - var result = createNode(256 /* JSDocNonNullableType */); - nextToken(); - result.type = parseJSDocType(); - return finishNode(result); + } + function bindReturnOrThrow(n) { + // bind expression (don't affect reachability) + bind(n.expression); + if (n.kind === 204 /* ReturnStatement */) { + hasExplicitReturn = true; } - function parseJSDocTupleType() { - var result = createNode(254 /* JSDocTupleType */); - nextToken(); - result.types = parseDelimitedList(25 /* JSDocTupleTypes */, parseJSDocType); - checkForTrailingComma(result.types); - parseExpected(20 /* CloseBracketToken */); - return finishNode(result); + currentReachabilityState = 4 /* Unreachable */; + } + function bindBreakOrContinueStatement(n) { + // call bind on label (don't affect reachability) + bind(n.label); + // for continue case touch label so it will be marked a used + var isValidJump = jumpToLabel(n.label, n.kind === 203 /* BreakStatement */ ? currentReachabilityState : 4 /* Unreachable */); + if (isValidJump) { + currentReachabilityState = 4 /* Unreachable */; } - function checkForTrailingComma(list) { - if (parseDiagnostics.length === 0 && list.hasTrailingComma) { - var start = list.end - ",".length; - parseErrorAtPosition(start, ",".length, ts.Diagnostics.Trailing_comma_not_allowed); + } + function bindTryStatement(n) { + // catch\finally blocks has the same reachability as try block + var preTryState = currentReachabilityState; + bind(n.tryBlock); + var postTryState = currentReachabilityState; + currentReachabilityState = preTryState; + bind(n.catchClause); + var postCatchState = currentReachabilityState; + currentReachabilityState = preTryState; + bind(n.finallyBlock); + // post catch/finally state is reachable if + // - post try state is reachable - control flow can fall out of try block + // - post catch state is reachable - control flow can fall out of catch block + currentReachabilityState = or(postTryState, postCatchState); + } + function bindSwitchStatement(n) { + var preSwitchState = currentReachabilityState; + var postSwitchLabel = pushImplicitLabel(); + // bind expression (don't affect reachability) + bind(n.expression); + bind(n.caseBlock); + var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 242 /* DefaultClause */; }); + // post switch state is unreachable if switch is exaustive (has a default case ) and does not have fallthrough from the last case + var postSwitchState = hasDefault && currentReachabilityState !== 2 /* Reachable */ ? 4 /* Unreachable */ : preSwitchState; + popImplicitLabel(postSwitchLabel, postSwitchState); + } + function bindCaseBlock(n) { + var startState = currentReachabilityState; + for (var _i = 0, _a = n.clauses; _i < _a.length; _i++) { + var clause = _a[_i]; + currentReachabilityState = startState; + bind(clause); + if (clause.statements.length && currentReachabilityState === 2 /* Reachable */ && options.noFallthroughCasesInSwitch) { + errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); } } - function parseJSDocUnionType() { - var result = createNode(253 /* JSDocUnionType */); - nextToken(); - result.types = parseJSDocTypeList(parseJSDocType()); - parseExpected(18 /* CloseParenToken */); - return finishNode(result); + } + function bindLabeledStatement(n) { + // call bind on label (don't affect reachability) + bind(n.label); + var ok = pushNamedLabel(n.label); + bind(n.statement); + if (ok) { + popNamedLabel(n.label, currentReachabilityState); } - function parseJSDocTypeList(firstType) { - ts.Debug.assert(!!firstType); - var types = []; - types.pos = firstType.pos; - types.push(firstType); - while (parseOptional(47 /* BarToken */)) { - types.push(parseJSDocType()); - } - types.end = scanner.getStartPos(); - return types; + } + function getContainerFlags(node) { + switch (node.kind) { + case 186 /* ClassExpression */: + case 214 /* ClassDeclaration */: + case 215 /* InterfaceDeclaration */: + case 217 /* EnumDeclaration */: + case 155 /* TypeLiteral */: + case 165 /* ObjectLiteralExpression */: + return 1 /* IsContainer */; + case 147 /* CallSignature */: + case 148 /* ConstructSignature */: + case 149 /* IndexSignature */: + case 143 /* MethodDeclaration */: + case 142 /* MethodSignature */: + case 213 /* FunctionDeclaration */: + case 144 /* Constructor */: + case 145 /* GetAccessor */: + case 146 /* SetAccessor */: + case 152 /* FunctionType */: + case 153 /* ConstructorType */: + case 173 /* FunctionExpression */: + case 174 /* ArrowFunction */: + case 218 /* ModuleDeclaration */: + case 248 /* SourceFile */: + case 216 /* TypeAliasDeclaration */: + return 5 /* IsContainerWithLocals */; + case 244 /* CatchClause */: + case 199 /* ForStatement */: + case 200 /* ForInStatement */: + case 201 /* ForOfStatement */: + case 220 /* CaseBlock */: + return 2 /* IsBlockScopedContainer */; + case 192 /* Block */: + // do not treat blocks directly inside a function as a block-scoped-container. + // Locals that reside in this block should go to the function locals. Othewise 'x' + // would not appear to be a redeclaration of a block scoped local in the following + // example: + // + // function foo() { + // var x; + // let x; + // } + // + // If we placed 'var x' into the function locals and 'let x' into the locals of + // the block, then there would be no collision. + // + // By not creating a new block-scoped-container here, we ensure that both 'var x' + // and 'let x' go into the Function-container's locals, and we do get a collision + // conflict. + return ts.isFunctionLike(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; } - function parseJSDocAllType() { - var result = createNode(250 /* JSDocAllType */); - nextToken(); - return finishNode(result); + return 0 /* None */; + } + function addToContainerChain(next) { + if (lastContainer) { + lastContainer.nextContainer = next; } - function parseJSDocUnknownOrNullableType() { - var pos = scanner.getStartPos(); - // skip the ? - nextToken(); - // Need to lookahead to decide if this is a nullable or unknown type. - // Here are cases where we'll pick the unknown type: - // - // Foo(?, - // { a: ? } - // Foo(?) - // Foo - // Foo(?= - // (?| - if (token === 24 /* CommaToken */ || - token === 16 /* CloseBraceToken */ || - token === 18 /* CloseParenToken */ || - token === 27 /* GreaterThanToken */ || - token === 56 /* EqualsToken */ || - token === 47 /* BarToken */) { - var result = createNode(251 /* JSDocUnknownType */, pos); - return finishNode(result); - } - else { - var result = createNode(255 /* JSDocNullableType */, pos); - result.type = parseJSDocType(); - return finishNode(result); + lastContainer = next; + } + function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { + // Just call this directly so that the return type of this function stays "void". + declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes); + } + function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { + switch (container.kind) { + // Modules, source files, and classes need specialized handling for how their + // members are declared (for example, a member of a class will go into a specific + // symbol table depending on if it is static or not). We defer to specialized + // handlers to take care of declaring these child members. + case 218 /* ModuleDeclaration */: + return declareModuleMember(node, symbolFlags, symbolExcludes); + case 248 /* SourceFile */: + return declareSourceFileMember(node, symbolFlags, symbolExcludes); + case 186 /* ClassExpression */: + case 214 /* ClassDeclaration */: + return declareClassMember(node, symbolFlags, symbolExcludes); + case 217 /* EnumDeclaration */: + return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); + case 155 /* TypeLiteral */: + case 165 /* ObjectLiteralExpression */: + case 215 /* InterfaceDeclaration */: + // Interface/Object-types always have their children added to the 'members' of + // their container. They are only accessible through an instance of their + // container, and are never in scope otherwise (even inside the body of the + // object / type / interface declaring them). An exception is type parameters, + // which are in scope without qualification (similar to 'locals'). + return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); + case 152 /* FunctionType */: + case 153 /* ConstructorType */: + case 147 /* CallSignature */: + case 148 /* ConstructSignature */: + case 149 /* IndexSignature */: + case 143 /* MethodDeclaration */: + case 142 /* MethodSignature */: + case 144 /* Constructor */: + case 145 /* GetAccessor */: + case 146 /* SetAccessor */: + case 213 /* FunctionDeclaration */: + case 173 /* FunctionExpression */: + case 174 /* ArrowFunction */: + case 216 /* TypeAliasDeclaration */: + // All the children of these container types are never visible through another + // symbol (i.e. through another symbol's 'exports' or 'members'). Instead, + // they're only accessed 'lexically' (i.e. from code that exists underneath + // their container in the tree. To accomplish this, we simply add their declared + // symbol to the 'locals' of the container. These symbols can then be found as + // the type checker walks up the containers, checking them for matching names. + return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); + } + } + function declareClassMember(node, symbolFlags, symbolExcludes) { + return node.flags & 64 /* Static */ + ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes) + : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); + } + function declareSourceFileMember(node, symbolFlags, symbolExcludes) { + return ts.isExternalModule(file) + ? declareModuleMember(node, symbolFlags, symbolExcludes) + : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); + } + function hasExportDeclarations(node) { + var body = node.kind === 248 /* SourceFile */ ? node : node.body; + if (body.kind === 248 /* SourceFile */ || body.kind === 219 /* ModuleBlock */) { + for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { + var stat = _a[_i]; + if (stat.kind === 228 /* ExportDeclaration */ || stat.kind === 227 /* ExportAssignment */) { + return true; + } } } - function parseIsolatedJSDocComment(content, start, length) { - initializeState("file.js", content, 2 /* Latest */, /*_syntaxCursor:*/ undefined); - var jsDocComment = parseJSDocComment(/*parent:*/ undefined, start, length); - var diagnostics = parseDiagnostics; - clearState(); - return jsDocComment ? { jsDocComment: jsDocComment, diagnostics: diagnostics } : undefined; + return false; + } + function setExportContextFlag(node) { + // A declaration source file or ambient module declaration that contains no export declarations (but possibly regular + // declarations with export modifiers) is an export context in which declarations are implicitly exported. + if (ts.isInAmbientContext(node) && !hasExportDeclarations(node)) { + node.flags |= 131072 /* ExportContext */; } - JSDocParser.parseIsolatedJSDocComment = parseIsolatedJSDocComment; - function parseJSDocComment(parent, start, length) { - var comment = parseJSDocCommentWorker(start, length); - if (comment) { - fixupParentReferences(comment); - comment.parent = parent; - } - return comment; + else { + node.flags &= ~131072 /* ExportContext */; } - JSDocParser.parseJSDocComment = parseJSDocComment; - function parseJSDocCommentWorker(start, length) { - var content = sourceText; - start = start || 0; - var end = length === undefined ? content.length : start + length; - length = end - start; - ts.Debug.assert(start >= 0); - ts.Debug.assert(start <= end); - ts.Debug.assert(end <= content.length); - var tags; - var pos; - // NOTE(cyrusn): This is essentially a handwritten scanner for JSDocComments. I - // considered using an actual Scanner, but this would complicate things. The - // scanner would need to know it was in a Doc Comment. Otherwise, it would then - // produce comments *inside* the doc comment. In the end it was just easier to - // write a simple scanner rather than go that route. - if (length >= "/** */".length) { - if (content.charCodeAt(start) === 47 /* slash */ && - content.charCodeAt(start + 1) === 42 /* asterisk */ && - content.charCodeAt(start + 2) === 42 /* asterisk */ && - content.charCodeAt(start + 3) !== 42 /* asterisk */) { - // Initially we can parse out a tag. We also have seen a starting asterisk. - // This is so that /** * @type */ doesn't parse. - var canParseTag = true; - var seenAsterisk = true; - for (pos = start + "/**".length; pos < end;) { - var ch = content.charCodeAt(pos); - pos++; - if (ch === 64 /* at */ && canParseTag) { - parseTag(); - // Once we parse out a tag, we cannot keep parsing out tags on this line. - canParseTag = false; - continue; - } - if (ts.isLineBreak(ch)) { - // After a line break, we can parse a tag, and we haven't seen as asterisk - // on the next line yet. - canParseTag = true; - seenAsterisk = false; - continue; - } - if (ts.isWhiteSpace(ch)) { - // Whitespace doesn't affect any of our parsing. - continue; - } - // Ignore the first asterisk on a line. - if (ch === 42 /* asterisk */) { - if (seenAsterisk) { - // If we've already seen an asterisk, then we can no longer parse a tag - // on this line. - canParseTag = false; - } - seenAsterisk = true; - continue; - } - // Anything else is doc comment text. We can't do anything with it. Because it - // wasn't a tag, we can no longer parse a tag on this line until we hit the next - // line break. - canParseTag = false; - } - } - } - return createJSDocComment(); - function createJSDocComment() { - if (!tags) { - return undefined; - } - var result = createNode(265 /* JSDocComment */, start); - result.tags = tags; - return finishNode(result, end); - } - function skipWhitespace() { - while (pos < end && ts.isWhiteSpace(content.charCodeAt(pos))) { - pos++; - } + } + function bindModuleDeclaration(node) { + setExportContextFlag(node); + if (node.name.kind === 9 /* StringLiteral */) { + declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); + } + else { + var state = getModuleInstanceState(node); + if (state === 0 /* NonInstantiated */) { + declareSymbolAndAddToSymbolTable(node, 1024 /* NamespaceModule */, 0 /* NamespaceModuleExcludes */); } - function parseTag() { - ts.Debug.assert(content.charCodeAt(pos - 1) === 64 /* at */); - var atToken = createNode(55 /* AtToken */, pos - 1); - atToken.end = pos; - var tagName = scanIdentifier(); - if (!tagName) { - return; + else { + declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); + if (node.symbol.flags & (16 /* Function */ | 32 /* Class */ | 256 /* RegularEnum */)) { + // if module was already merged with some function, class or non-const enum + // treat is a non-const-enum-only + node.symbol.constEnumOnlyModule = false; } - var tag = handleTag(atToken, tagName) || handleUnknownTag(atToken, tagName); - addTag(tag); - } - function handleTag(atToken, tagName) { - if (tagName) { - switch (tagName.text) { - case "param": - return handleParamTag(atToken, tagName); - case "return": - case "returns": - return handleReturnTag(atToken, tagName); - case "template": - return handleTemplateTag(atToken, tagName); - case "type": - return handleTypeTag(atToken, tagName); + else { + var currentModuleIsConstEnumOnly = state === 2 /* ConstEnumOnly */; + if (node.symbol.constEnumOnlyModule === undefined) { + // non-merged case - use the current state + node.symbol.constEnumOnlyModule = currentModuleIsConstEnumOnly; } - } - return undefined; - } - function handleUnknownTag(atToken, tagName) { - var result = createNode(266 /* JSDocTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - return finishNode(result, pos); - } - function addTag(tag) { - if (tag) { - if (!tags) { - tags = []; - tags.pos = tag.pos; + else { + // merged case: module is const enum only if all its pieces are non-instantiated or const enum + node.symbol.constEnumOnlyModule = node.symbol.constEnumOnlyModule && currentModuleIsConstEnumOnly; } - tags.push(tag); - tags.end = tag.end; - } - } - function tryParseTypeExpression() { - skipWhitespace(); - if (content.charCodeAt(pos) !== 123 /* openBrace */) { - return undefined; - } - var typeExpression = parseJSDocTypeExpression(pos, end - pos); - pos = typeExpression.end; - return typeExpression; - } - function handleParamTag(atToken, tagName) { - var typeExpression = tryParseTypeExpression(); - skipWhitespace(); - var name; - var isBracketed; - if (content.charCodeAt(pos) === 91 /* openBracket */) { - pos++; - skipWhitespace(); - name = scanIdentifier(); - isBracketed = true; - } - else { - name = scanIdentifier(); - } - if (!name) { - parseErrorAtPosition(pos, 0, ts.Diagnostics.Identifier_expected); - } - var preName, postName; - if (typeExpression) { - postName = name; - } - else { - preName = name; - } - if (!typeExpression) { - typeExpression = tryParseTypeExpression(); - } - var result = createNode(267 /* JSDocParameterTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.preParameterName = preName; - result.typeExpression = typeExpression; - result.postParameterName = postName; - result.isBracketed = isBracketed; - return finishNode(result, pos); - } - function handleReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 268 /* JSDocReturnTag */; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(268 /* JSDocReturnTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); } - function handleTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 269 /* JSDocTypeTag */; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } + } + function bindFunctionOrConstructorType(node) { + // For a given function symbol "<...>(...) => T" we want to generate a symbol identical + // to the one we would get for: { <...>(...): T } + // + // We do that by making an anonymous type literal symbol, and then setting the function + // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable + // from an actual type literal symbol you would have gotten had you used the long form. + var symbol = createSymbol(131072 /* Signature */, getDeclarationName(node)); + addDeclarationToSymbol(symbol, node, 131072 /* Signature */); + var typeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type"); + addDeclarationToSymbol(typeLiteralSymbol, node, 2048 /* TypeLiteral */); + typeLiteralSymbol.members = (_a = {}, _a[symbol.name] = symbol, _a); + var _a; + } + function bindObjectLiteralExpression(node) { + var ElementKind; + (function (ElementKind) { + ElementKind[ElementKind["Property"] = 1] = "Property"; + ElementKind[ElementKind["Accessor"] = 2] = "Accessor"; + })(ElementKind || (ElementKind = {})); + if (inStrictMode) { + var seen = {}; + for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { + var prop = _a[_i]; + if (prop.name.kind !== 69 /* Identifier */) { + continue; } - var result = createNode(269 /* JSDocTypeTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); - } - function handleTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 270 /* JSDocTemplateTag */; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + var identifier = prop.name; + // ECMA-262 11.1.5 Object Initialiser + // If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + // a.This production is contained in strict code and IsDataDescriptor(previous) is true and + // IsDataDescriptor(propId.descriptor) is true. + // b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true. + // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. + // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true + // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields + var currentKind = prop.kind === 245 /* PropertyAssignment */ || prop.kind === 246 /* ShorthandPropertyAssignment */ || prop.kind === 143 /* MethodDeclaration */ + ? 1 /* Property */ + : 2 /* Accessor */; + var existingKind = seen[identifier.text]; + if (!existingKind) { + seen[identifier.text] = currentKind; + continue; } - var typeParameters = []; - typeParameters.pos = pos; - while (true) { - skipWhitespace(); - var startPos = pos; - var name_8 = scanIdentifier(); - if (!name_8) { - parseErrorAtPosition(startPos, 0, ts.Diagnostics.Identifier_expected); - return undefined; - } - var typeParameter = createNode(137 /* TypeParameter */, name_8.pos); - typeParameter.name = name_8; - finishNode(typeParameter, pos); - typeParameters.push(typeParameter); - skipWhitespace(); - if (content.charCodeAt(pos) !== 44 /* comma */) { - break; - } - pos++; + if (currentKind === 1 /* Property */ && existingKind === 1 /* Property */) { + var span = ts.getErrorSpanForNode(file, identifier); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode)); } - typeParameters.end = pos; - var result = createNode(270 /* JSDocTemplateTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeParameters = typeParameters; - return finishNode(result, pos); } - function scanIdentifier() { - var startPos = pos; - for (; pos < end; pos++) { - var ch = content.charCodeAt(pos); - if (pos === startPos && ts.isIdentifierStart(ch, 2 /* Latest */)) { - continue; - } - else if (pos > startPos && ts.isIdentifierPart(ch, 2 /* Latest */)) { - continue; - } + } + return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, "__object"); + } + function bindAnonymousDeclaration(node, symbolFlags, name) { + var symbol = createSymbol(symbolFlags, name); + addDeclarationToSymbol(symbol, node, symbolFlags); + } + function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { + switch (blockScopeContainer.kind) { + case 218 /* ModuleDeclaration */: + declareModuleMember(node, symbolFlags, symbolExcludes); + break; + case 248 /* SourceFile */: + if (ts.isExternalModule(container)) { + declareModuleMember(node, symbolFlags, symbolExcludes); break; } - if (startPos === pos) { - return undefined; - } - var result = createNode(69 /* Identifier */, startPos); - result.text = content.substring(startPos, pos); - return finishNode(result, pos); + // fall through. + default: + if (!blockScopeContainer.locals) { + blockScopeContainer.locals = {}; + addToContainerChain(blockScopeContainer); + } + declareSymbol(blockScopeContainer.locals, undefined, node, symbolFlags, symbolExcludes); + } + } + function bindBlockScopedVariableDeclaration(node) { + bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 107455 /* BlockScopedVariableExcludes */); + } + // The binder visits every node in the syntax tree so it is a convenient place to perform a single localized + // check for reserved words used as identifiers in strict mode code. + function checkStrictModeIdentifier(node) { + if (inStrictMode && + node.originalKeywordKind >= 106 /* FirstFutureReservedWord */ && + node.originalKeywordKind <= 114 /* LastFutureReservedWord */ && + !ts.isIdentifierName(node)) { + // Report error only if there are no parse errors in file + if (!file.parseDiagnostics.length) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(node, getStrictModeIdentifierMessage(node), ts.declarationNameToString(node))); } } - JSDocParser.parseJSDocCommentWorker = parseJSDocCommentWorker; - })(JSDocParser = Parser.JSDocParser || (Parser.JSDocParser = {})); - })(Parser || (Parser = {})); - var IncrementalParser; - (function (IncrementalParser) { - function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) { - aggressiveChecks = aggressiveChecks || ts.Debug.shouldAssert(2 /* Aggressive */); - checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks); - if (ts.textChangeRangeIsUnchanged(textChangeRange)) { - // if the text didn't change, then we can just return our current source file as-is. - return sourceFile; + } + function getStrictModeIdentifierMessage(node) { + // Provide specialized messages to help the user understand why we think they're in + // strict mode. + if (ts.getContainingClass(node)) { + return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode; } - if (sourceFile.statements.length === 0) { - // If we don't have any statements in the current source file, then there's no real - // way to incrementally parse. So just do a full parse instead. - return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, /*syntaxCursor*/ undefined, /*setNodeParents*/ true); + if (file.externalModuleIndicator) { + return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode; } - // Make sure we're not trying to incrementally update a source file more than once. Once - // we do an update the original source file is considered unusbale from that point onwards. - // - // This is because we do incremental parsing in-place. i.e. we take nodes from the old - // tree and give them new positions and parents. From that point on, trusting the old - // tree at all is not possible as far too much of it may violate invariants. - var incrementalSourceFile = sourceFile; - ts.Debug.assert(!incrementalSourceFile.hasBeenIncrementallyParsed); - incrementalSourceFile.hasBeenIncrementallyParsed = true; - var oldText = sourceFile.text; - var syntaxCursor = createSyntaxCursor(sourceFile); - // Make the actual change larger so that we know to reparse anything whose lookahead - // might have intersected the change. - var changeRange = extendToAffectedRange(sourceFile, textChangeRange); - checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks); - // Ensure that extending the affected range only moved the start of the change range - // earlier in the file. - ts.Debug.assert(changeRange.span.start <= textChangeRange.span.start); - ts.Debug.assert(ts.textSpanEnd(changeRange.span) === ts.textSpanEnd(textChangeRange.span)); - ts.Debug.assert(ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)) === ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange))); - // The is the amount the nodes after the edit range need to be adjusted. It can be - // positive (if the edit added characters), negative (if the edit deleted characters) - // or zero (if this was a pure overwrite with nothing added/removed). - var delta = ts.textChangeRangeNewSpan(changeRange).length - changeRange.span.length; - // If we added or removed characters during the edit, then we need to go and adjust all - // the nodes after the edit. Those nodes may move forward (if we inserted chars) or they - // may move backward (if we deleted chars). - // - // Doing this helps us out in two ways. First, it means that any nodes/tokens we want - // to reuse are already at the appropriate position in the new text. That way when we - // reuse them, we don't have to figure out if they need to be adjusted. Second, it makes - // it very easy to determine if we can reuse a node. If the node's position is at where - // we are in the text, then we can reuse it. Otherwise we can't. If the node's position - // is ahead of us, then we'll need to rescan tokens. If the node's position is behind - // us, then we'll need to skip it or crumble it as appropriate - // - // We will also adjust the positions of nodes that intersect the change range as well. - // By doing this, we ensure that all the positions in the old tree are consistent, not - // just the positions of nodes entirely before/after the change range. By being - // consistent, we can then easily map from positions to nodes in the old tree easily. - // - // Also, mark any syntax elements that intersect the changed span. We know, up front, - // that we cannot reuse these elements. - updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, ts.textSpanEnd(changeRange.span), ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); - // Now that we've set up our internal incremental state just proceed and parse the - // source file in the normal fashion. When possible the parser will retrieve and - // reuse nodes from the old tree. - // - // Note: passing in 'true' for setNodeParents is very important. When incrementally - // parsing, we will be reusing nodes from the old tree, and placing it into new - // parents. If we don't set the parents now, we'll end up with an observably - // inconsistent tree. Setting the parents on the new tree should be very fast. We - // will immediately bail out of walking any subtrees when we can see that their parents - // are already correct. - var result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, /* setParentNode */ true); - return result; + return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode; } - IncrementalParser.updateSourceFile = updateSourceFile; - function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) { - if (isArray) { - visitArray(element); + function checkStrictModeBinaryExpression(node) { + if (inStrictMode && ts.isLeftHandSideExpression(node.left) && ts.isAssignmentOperator(node.operatorToken.kind)) { + // ECMA 262 (Annex C) The identifier eval or arguments may not appear as the LeftHandSideExpression of an + // Assignment operator(11.13) or of a PostfixExpression(11.3) + checkStrictModeEvalOrArguments(node, node.left); } - else { - visitNode(element); + } + function checkStrictModeCatchClause(node) { + // It is a SyntaxError if a TryStatement with a Catch occurs within strict code and the Identifier of the + // Catch production is eval or arguments + if (inStrictMode && node.variableDeclaration) { + checkStrictModeEvalOrArguments(node, node.variableDeclaration.name); } - return; - function visitNode(node) { - var text = ""; - if (aggressiveChecks && shouldCheckNode(node)) { - text = oldText.substring(node.pos, node.end); - } - // Ditch any existing LS children we may have created. This way we can avoid - // moving them forward. - if (node._children) { - node._children = undefined; - } - if (node.jsDocComment) { - node.jsDocComment = undefined; - } - node.pos += delta; - node.end += delta; - if (aggressiveChecks && shouldCheckNode(node)) { - ts.Debug.assert(text === newText.substring(node.pos, node.end)); - } - forEachChild(node, visitNode, visitArray); - checkNodePositions(node, aggressiveChecks); + } + function checkStrictModeDeleteExpression(node) { + // Grammar checking + if (inStrictMode && node.expression.kind === 69 /* Identifier */) { + // When a delete operator occurs within strict mode code, a SyntaxError is thrown if its + // UnaryExpression is a direct reference to a variable, function argument, or function name + var span = ts.getErrorSpanForNode(file, node.expression); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode)); } - function visitArray(array) { - array._children = undefined; - array.pos += delta; - array.end += delta; - for (var _i = 0, array_7 = array; _i < array_7.length; _i++) { - var node = array_7[_i]; - visitNode(node); + } + function isEvalOrArgumentsIdentifier(node) { + return node.kind === 69 /* Identifier */ && + (node.text === "eval" || node.text === "arguments"); + } + function checkStrictModeEvalOrArguments(contextNode, name) { + if (name && name.kind === 69 /* Identifier */) { + var identifier = name; + if (isEvalOrArgumentsIdentifier(identifier)) { + // We check first if the name is inside class declaration or class expression; if so give explicit message + // otherwise report generic error message. + var span = ts.getErrorSpanForNode(file, name); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, getStrictModeEvalOrArgumentsMessage(contextNode), identifier.text)); } } } - function shouldCheckNode(node) { - switch (node.kind) { - case 9 /* StringLiteral */: - case 8 /* NumericLiteral */: - case 69 /* Identifier */: - return true; + function getStrictModeEvalOrArgumentsMessage(node) { + // Provide specialized messages to help the user understand why we think they're in + // strict mode. + if (ts.getContainingClass(node)) { + return ts.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode; } - return false; + if (file.externalModuleIndicator) { + return ts.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode; + } + return ts.Diagnostics.Invalid_use_of_0_in_strict_mode; } - function adjustIntersectingElement(element, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta) { - ts.Debug.assert(element.end >= changeStart, "Adjusting an element that was entirely before the change range"); - ts.Debug.assert(element.pos <= changeRangeOldEnd, "Adjusting an element that was entirely after the change range"); - ts.Debug.assert(element.pos <= element.end); - // We have an element that intersects the change range in some way. It may have its - // start, or its end (or both) in the changed range. We want to adjust any part - // that intersects such that the final tree is in a consistent state. i.e. all - // chlidren have spans within the span of their parent, and all siblings are ordered - // properly. - // We may need to update both the 'pos' and the 'end' of the element. - // If the 'pos' is before the start of the change, then we don't need to touch it. - // If it isn't, then the 'pos' must be inside the change. How we update it will - // depend if delta is positive or negative. If delta is positive then we have - // something like: - // - // -------------------AAA----------------- - // -------------------BBBCCCCCCC----------------- - // - // In this case, we consider any node that started in the change range to still be - // starting at the same position. - // - // however, if the delta is negative, then we instead have something like this: - // - // -------------------XXXYYYYYYY----------------- - // -------------------ZZZ----------------- - // - // In this case, any element that started in the 'X' range will keep its position. - // However any element htat started after that will have their pos adjusted to be - // at the end of the new range. i.e. any node that started in the 'Y' range will - // be adjusted to have their start at the end of the 'Z' range. - // - // The element will keep its position if possible. Or Move backward to the new-end - // if it's in the 'Y' range. - element.pos = Math.min(element.pos, changeRangeNewEnd); - // If the 'end' is after the change range, then we always adjust it by the delta - // amount. However, if the end is in the change range, then how we adjust it - // will depend on if delta is positive or negative. If delta is positive then we - // have something like: - // - // -------------------AAA----------------- - // -------------------BBBCCCCCCC----------------- - // - // In this case, we consider any node that ended inside the change range to keep its - // end position. - // - // however, if the delta is negative, then we instead have something like this: - // - // -------------------XXXYYYYYYY----------------- - // -------------------ZZZ----------------- - // - // In this case, any element that ended in the 'X' range will keep its position. - // However any element htat ended after that will have their pos adjusted to be - // at the end of the new range. i.e. any node that ended in the 'Y' range will - // be adjusted to have their end at the end of the 'Z' range. - if (element.end >= changeRangeOldEnd) { - // Element ends after the change range. Always adjust the end pos. - element.end += delta; + function checkStrictModeFunctionName(node) { + if (inStrictMode) { + // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a strict mode FunctionDeclaration or FunctionExpression (13.1)) + checkStrictModeEvalOrArguments(node, node.name); } - else { - // Element ends in the change range. The element will keep its position if - // possible. Or Move backward to the new-end if it's in the 'Y' range. - element.end = Math.min(element.end, changeRangeNewEnd); + } + function checkStrictModeNumericLiteral(node) { + if (inStrictMode && node.flags & 32768 /* OctalLiteral */) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode)); } - ts.Debug.assert(element.pos <= element.end); - if (element.parent) { - ts.Debug.assert(element.pos >= element.parent.pos); - ts.Debug.assert(element.end <= element.parent.end); + } + function checkStrictModePostfixUnaryExpression(node) { + // Grammar checking + // The identifier eval or arguments may not appear as the LeftHandSideExpression of an + // Assignment operator(11.13) or of a PostfixExpression(11.3) or as the UnaryExpression + // operated upon by a Prefix Increment(11.4.4) or a Prefix Decrement(11.4.5) operator. + if (inStrictMode) { + checkStrictModeEvalOrArguments(node, node.operand); } } - function checkNodePositions(node, aggressiveChecks) { - if (aggressiveChecks) { - var pos = node.pos; - forEachChild(node, function (child) { - ts.Debug.assert(child.pos >= pos); - pos = child.end; - }); - ts.Debug.assert(pos <= node.end); + function checkStrictModePrefixUnaryExpression(node) { + // Grammar checking + if (inStrictMode) { + if (node.operator === 41 /* PlusPlusToken */ || node.operator === 42 /* MinusMinusToken */) { + checkStrictModeEvalOrArguments(node, node.operand); + } } } - function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) { - visitNode(sourceFile); - return; - function visitNode(child) { - ts.Debug.assert(child.pos <= child.end); - if (child.pos > changeRangeOldEnd) { - // Node is entirely past the change range. We need to move both its pos and - // end, forward or backward appropriately. - moveElementEntirelyPastChangeRange(child, /*isArray*/ false, delta, oldText, newText, aggressiveChecks); + function checkStrictModeWithStatement(node) { + // Grammar checking for withStatement + if (inStrictMode) { + errorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_strict_mode); + } + } + function errorOnFirstToken(node, message, arg0, arg1, arg2) { + var span = ts.getSpanOfTokenAtPosition(file, node.pos); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, message, arg0, arg1, arg2)); + } + function getDestructuringParameterName(node) { + return "__" + ts.indexOf(node.parent.parameters, node); + } + function bind(node) { + if (!node) { + return; + } + node.parent = parent; + var savedInStrictMode = inStrictMode; + if (!savedInStrictMode) { + updateStrictMode(node); + } + // First we bind declaration nodes to a symbol if possible. We'll both create a symbol + // and then potentially add the symbol to an appropriate symbol table. Possible + // destination symbol tables are: + // + // 1) The 'exports' table of the current container's symbol. + // 2) The 'members' table of the current container's symbol. + // 3) The 'locals' table of the current container. + // + // However, not all symbols will end up in any of these tables. 'Anonymous' symbols + // (like TypeLiterals for example) will not be put in any table. + bindWorker(node); + // Then we recurse into the children of the node to bind them as well. For certain + // symbols we do specialized work when we recurse. For example, we'll keep track of + // the current 'container' node when it changes. This helps us know which symbol table + // a local should go into for example. + bindChildren(node); + inStrictMode = savedInStrictMode; + } + function updateStrictMode(node) { + switch (node.kind) { + case 248 /* SourceFile */: + case 219 /* ModuleBlock */: + updateStrictModeStatementList(node.statements); return; - } - // Check if the element intersects the change range. If it does, then it is not - // reusable. Also, we'll need to recurse to see what constituent portions we may - // be able to use. - var fullEnd = child.end; - if (fullEnd >= changeStart) { - child.intersectsChange = true; - child._children = undefined; - // Adjust the pos or end (or both) of the intersecting element accordingly. - adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - forEachChild(child, visitNode, visitArray); - checkNodePositions(child, aggressiveChecks); + case 192 /* Block */: + if (ts.isFunctionLike(node.parent)) { + updateStrictModeStatementList(node.statements); + } + return; + case 214 /* ClassDeclaration */: + case 186 /* ClassExpression */: + // All classes are automatically in strict mode in ES6. + inStrictMode = true; return; - } - // Otherwise, the node is entirely before the change range. No need to do anything with it. - ts.Debug.assert(fullEnd < changeStart); } - function visitArray(array) { - ts.Debug.assert(array.pos <= array.end); - if (array.pos > changeRangeOldEnd) { - // Array is entirely after the change range. We need to move it, and move any of - // its children. - moveElementEntirelyPastChangeRange(array, /*isArray*/ true, delta, oldText, newText, aggressiveChecks); + } + function updateStrictModeStatementList(statements) { + for (var _i = 0, statements_1 = statements; _i < statements_1.length; _i++) { + var statement = statements_1[_i]; + if (!ts.isPrologueDirective(statement)) { return; } - // Check if the element intersects the change range. If it does, then it is not - // reusable. Also, we'll need to recurse to see what constituent portions we may - // be able to use. - var fullEnd = array.end; - if (fullEnd >= changeStart) { - array.intersectsChange = true; - array._children = undefined; - // Adjust the pos or end (or both) of the intersecting array accordingly. - adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - for (var _i = 0, array_8 = array; _i < array_8.length; _i++) { - var node = array_8[_i]; - visitNode(node); - } + if (isUseStrictPrologueDirective(statement)) { + inStrictMode = true; return; } - // Otherwise, the array is entirely before the change range. No need to do anything with it. - ts.Debug.assert(fullEnd < changeStart); } } - function extendToAffectedRange(sourceFile, changeRange) { - // Consider the following code: - // void foo() { /; } - // - // If the text changes with an insertion of / just before the semicolon then we end up with: - // void foo() { //; } - // - // If we were to just use the changeRange a is, then we would not rescan the { token - // (as it does not intersect the actual original change range). Because an edit may - // change the token touching it, we actually need to look back *at least* one token so - // that the prior token sees that change. - var maxLookahead = 1; - var start = changeRange.span.start; - // the first iteration aligns us with the change start. subsequent iteration move us to - // the left by maxLookahead tokens. We only need to do this as long as we're not at the - // start of the tree. - for (var i = 0; start > 0 && i <= maxLookahead; i++) { - var nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start); - ts.Debug.assert(nearestNode.pos <= start); - var position = nearestNode.pos; - start = Math.max(0, position - 1); + /// Should be called only on prologue directives (isPrologueDirective(node) should be true) + function isUseStrictPrologueDirective(node) { + var nodeText = ts.getTextOfNodeFromSourceText(file.text, node.expression); + // Note: the node text must be exactly "use strict" or 'use strict'. It is not ok for the + // string to contain unicode escapes (as per ES5). + return nodeText === "\"use strict\"" || nodeText === "'use strict'"; + } + function bindWorker(node) { + switch (node.kind) { + /* Strict mode checks */ + case 69 /* Identifier */: + return checkStrictModeIdentifier(node); + case 181 /* BinaryExpression */: + if (ts.isInJavaScriptFile(node)) { + if (ts.isExportsPropertyAssignment(node)) { + bindExportsPropertyAssignment(node); + } + else if (ts.isModuleExportsAssignment(node)) { + bindModuleExportsAssignment(node); + } + } + return checkStrictModeBinaryExpression(node); + case 244 /* CatchClause */: + return checkStrictModeCatchClause(node); + case 175 /* DeleteExpression */: + return checkStrictModeDeleteExpression(node); + case 8 /* NumericLiteral */: + return checkStrictModeNumericLiteral(node); + case 180 /* PostfixUnaryExpression */: + return checkStrictModePostfixUnaryExpression(node); + case 179 /* PrefixUnaryExpression */: + return checkStrictModePrefixUnaryExpression(node); + case 205 /* WithStatement */: + return checkStrictModeWithStatement(node); + case 97 /* ThisKeyword */: + seenThisKeyword = true; + return; + case 137 /* TypeParameter */: + return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530912 /* TypeParameterExcludes */); + case 138 /* Parameter */: + return bindParameter(node); + case 211 /* VariableDeclaration */: + case 163 /* BindingElement */: + return bindVariableDeclarationOrBindingElement(node); + case 141 /* PropertyDeclaration */: + case 140 /* PropertySignature */: + return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 107455 /* PropertyExcludes */); + case 245 /* PropertyAssignment */: + case 246 /* ShorthandPropertyAssignment */: + return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 107455 /* PropertyExcludes */); + case 247 /* EnumMember */: + return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 107455 /* EnumMemberExcludes */); + case 147 /* CallSignature */: + case 148 /* ConstructSignature */: + case 149 /* IndexSignature */: + return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); + case 143 /* MethodDeclaration */: + case 142 /* MethodSignature */: + // If this is an ObjectLiteralExpression method, then it sits in the same space + // as other properties in the object literal. So we use SymbolFlags.PropertyExcludes + // so that it will conflict with any other object literal members with the same + // name. + return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 107455 /* PropertyExcludes */ : 99263 /* MethodExcludes */); + case 213 /* FunctionDeclaration */: + checkStrictModeFunctionName(node); + return declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 106927 /* FunctionExcludes */); + case 144 /* Constructor */: + return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */); + case 145 /* GetAccessor */: + return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */); + case 146 /* SetAccessor */: + return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */); + case 152 /* FunctionType */: + case 153 /* ConstructorType */: + return bindFunctionOrConstructorType(node); + case 155 /* TypeLiteral */: + return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type"); + case 165 /* ObjectLiteralExpression */: + return bindObjectLiteralExpression(node); + case 173 /* FunctionExpression */: + case 174 /* ArrowFunction */: + checkStrictModeFunctionName(node); + var bindingName = node.name ? node.name.text : "__function"; + return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); + case 168 /* CallExpression */: + if (ts.isInJavaScriptFile(node)) { + bindCallExpression(node); + } + break; + // Members of classes, interfaces, and modules + case 186 /* ClassExpression */: + case 214 /* ClassDeclaration */: + return bindClassLikeDeclaration(node); + case 215 /* InterfaceDeclaration */: + return bindBlockScopedDeclaration(node, 64 /* Interface */, 792960 /* InterfaceExcludes */); + case 216 /* TypeAliasDeclaration */: + return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793056 /* TypeAliasExcludes */); + case 217 /* EnumDeclaration */: + return bindEnumDeclaration(node); + case 218 /* ModuleDeclaration */: + return bindModuleDeclaration(node); + // Imports and exports + case 221 /* ImportEqualsDeclaration */: + case 224 /* NamespaceImport */: + case 226 /* ImportSpecifier */: + case 230 /* ExportSpecifier */: + return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); + case 223 /* ImportClause */: + return bindImportClause(node); + case 228 /* ExportDeclaration */: + return bindExportDeclaration(node); + case 227 /* ExportAssignment */: + return bindExportAssignment(node); + case 248 /* SourceFile */: + return bindSourceFileIfExternalModule(); + } + } + function bindSourceFileIfExternalModule() { + setExportContextFlag(file); + if (ts.isExternalModule(file)) { + bindSourceFileAsExternalModule(); + } + } + function bindSourceFileAsExternalModule() { + bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"" + ts.removeFileExtension(file.fileName) + "\""); + } + function bindExportAssignment(node) { + var boundExpression = node.kind === 227 /* ExportAssignment */ ? node.expression : node.right; + if (!container.symbol || !container.symbol.exports) { + // Export assignment in some sort of block construct + bindAnonymousDeclaration(node, 8388608 /* Alias */, getDeclarationName(node)); + } + else if (boundExpression.kind === 69 /* Identifier */) { + // An export default clause with an identifier exports all meanings of that identifier + declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* Alias */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); + } + else { + // An export default clause with an expression exports a value + declareSymbol(container.symbol.exports, container.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); + } + } + function bindExportDeclaration(node) { + if (!container.symbol || !container.symbol.exports) { + // Export * in some sort of block construct + bindAnonymousDeclaration(node, 1073741824 /* ExportStar */, getDeclarationName(node)); + } + else if (!node.exportClause) { + // All export * declarations are collected in an __export symbol + declareSymbol(container.symbol.exports, container.symbol, node, 1073741824 /* ExportStar */, 0 /* None */); } - var finalSpan = ts.createTextSpanFromBounds(start, ts.textSpanEnd(changeRange.span)); - var finalLength = changeRange.newLength + (changeRange.span.start - start); - return ts.createTextChangeRange(finalSpan, finalLength); } - function findNearestNodeStartingBeforeOrAtPosition(sourceFile, position) { - var bestResult = sourceFile; - var lastNodeEntirelyBeforePosition; - forEachChild(sourceFile, visit); - if (lastNodeEntirelyBeforePosition) { - var lastChildOfLastEntireNodeBeforePosition = getLastChild(lastNodeEntirelyBeforePosition); - if (lastChildOfLastEntireNodeBeforePosition.pos > bestResult.pos) { - bestResult = lastChildOfLastEntireNodeBeforePosition; + function bindImportClause(node) { + if (node.name) { + declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); + } + } + function setCommonJsModuleIndicator(node) { + if (!file.commonJsModuleIndicator) { + file.commonJsModuleIndicator = node; + bindSourceFileAsExternalModule(); + } + } + function bindExportsPropertyAssignment(node) { + // When we create a property via 'exports.foo = bar', the 'exports.foo' property access + // expression is the declaration + setCommonJsModuleIndicator(node); + declareSymbol(file.symbol.exports, file.symbol, node.left, 4 /* Property */ | 7340032 /* Export */, 0 /* None */); + } + function bindModuleExportsAssignment(node) { + // 'module.exports = expr' assignment + setCommonJsModuleIndicator(node); + bindExportAssignment(node); + } + function bindCallExpression(node) { + // We're only inspecting call expressions to detect CommonJS modules, so we can skip + // this check if we've already seen the module indicator + if (!file.commonJsModuleIndicator && ts.isRequireCall(node)) { + setCommonJsModuleIndicator(node); + } + } + function bindClassLikeDeclaration(node) { + if (node.kind === 214 /* ClassDeclaration */) { + bindBlockScopedDeclaration(node, 32 /* Class */, 899519 /* ClassExcludes */); + } + else { + var bindingName = node.name ? node.name.text : "__class"; + bindAnonymousDeclaration(node, 32 /* Class */, bindingName); + // Add name of class expression into the map for semantic classifier + if (node.name) { + classifiableNames[node.name.text] = node.name.text; } } - return bestResult; - function getLastChild(node) { - while (true) { - var lastChild = getLastChildWorker(node); - if (lastChild) { - node = lastChild; - } - else { - return node; - } + var symbol = node.symbol; + // TypeScript 1.0 spec (April 2014): 8.4 + // Every class automatically contains a static property member named 'prototype', the + // type of which is an instantiation of the class type with type Any supplied as a type + // argument for each type parameter. It is an error to explicitly declare a static + // property member with the name 'prototype'. + // + // Note: we check for this here because this class may be merging into a module. The + // module might have an exported variable called 'prototype'. We can't allow that as + // that would clash with the built-in 'prototype' for the class. + var prototypeSymbol = createSymbol(4 /* Property */ | 134217728 /* Prototype */, "prototype"); + if (ts.hasProperty(symbol.exports, prototypeSymbol.name)) { + if (node.name) { + node.name.parent = node; } + file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name)); } - function getLastChildWorker(node) { - var last = undefined; - forEachChild(node, function (child) { - if (ts.nodeIsPresent(child)) { - last = child; - } - }); - return last; + symbol.exports[prototypeSymbol.name] = prototypeSymbol; + prototypeSymbol.parent = symbol; + } + function bindEnumDeclaration(node) { + return ts.isConst(node) + ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) + : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); + } + function bindVariableDeclarationOrBindingElement(node) { + if (inStrictMode) { + checkStrictModeEvalOrArguments(node, node.name); } - function visit(child) { - if (ts.nodeIsMissing(child)) { - // Missing nodes are effectively invisible to us. We never even consider them - // When trying to find the nearest node before us. - return; + if (!ts.isBindingPattern(node.name)) { + if (ts.isBlockOrCatchScoped(node)) { + bindBlockScopedVariableDeclaration(node); } - // If the child intersects this position, then this node is currently the nearest - // node that starts before the position. - if (child.pos <= position) { - if (child.pos >= bestResult.pos) { - // This node starts before the position, and is closer to the position than - // the previous best node we found. It is now the new best node. - bestResult = child; - } - // Now, the node may overlap the position, or it may end entirely before the - // position. If it overlaps with the position, then either it, or one of its - // children must be the nearest node before the position. So we can just - // recurse into this child to see if we can find something better. - if (position < child.end) { - // The nearest node is either this child, or one of the children inside - // of it. We've already marked this child as the best so far. Recurse - // in case one of the children is better. - forEachChild(child, visit); - // Once we look at the children of this node, then there's no need to - // continue any further. - return true; - } - else { - ts.Debug.assert(child.end <= position); - // The child ends entirely before this position. Say you have the following - // (where $ is the position) - // - // ? $ : <...> <...> - // - // We would want to find the nearest preceding node in "complex expr 2". - // To support that, we keep track of this node, and once we're done searching - // for a best node, we recurse down this node to see if we can find a good - // result in it. - // - // This approach allows us to quickly skip over nodes that are entirely - // before the position, while still allowing us to find any nodes in the - // last one that might be what we want. - lastNodeEntirelyBeforePosition = child; - } + else if (ts.isParameterDeclaration(node)) { + // It is safe to walk up parent chain to find whether the node is a destructing parameter declaration + // because its parent chain has already been set up, since parents are set before descending into children. + // + // If node is a binding element in parameter declaration, we need to use ParameterExcludes. + // Using ParameterExcludes flag allows the compiler to report an error on duplicate identifiers in Parameter Declaration + // For example: + // function foo([a,a]) {} // Duplicate Identifier error + // function bar(a,a) {} // Duplicate Identifier error, parameter declaration in this case is handled in bindParameter + // // which correctly set excluded symbols + declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); } else { - ts.Debug.assert(child.pos > position); - // We're now at a node that is entirely past the position we're searching for. - // This node (and all following nodes) could never contribute to the result, - // so just skip them by returning 'true' here. - return true; + declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107454 /* FunctionScopedVariableExcludes */); } } } - function checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks) { - var oldText = sourceFile.text; - if (textChangeRange) { - ts.Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); - if (aggressiveChecks || ts.Debug.shouldAssert(3 /* VeryAggressive */)) { - var oldTextPrefix = oldText.substr(0, textChangeRange.span.start); - var newTextPrefix = newText.substr(0, textChangeRange.span.start); - ts.Debug.assert(oldTextPrefix === newTextPrefix); - var oldTextSuffix = oldText.substring(ts.textSpanEnd(textChangeRange.span), oldText.length); - var newTextSuffix = newText.substring(ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange)), newText.length); - ts.Debug.assert(oldTextSuffix === newTextSuffix); - } + function bindParameter(node) { + if (inStrictMode) { + // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a + // strict mode FunctionLikeDeclaration or FunctionExpression(13.1) + checkStrictModeEvalOrArguments(node, node.name); + } + if (ts.isBindingPattern(node.name)) { + bindAnonymousDeclaration(node, 1 /* FunctionScopedVariable */, getDestructuringParameterName(node)); + } + else { + declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); + } + // If this is a property-parameter, then also declare the property symbol into the + // containing class. + if (node.flags & 56 /* AccessibilityModifier */ && + node.parent.kind === 144 /* Constructor */ && + ts.isClassLike(node.parent.parent)) { + var classDeclaration = node.parent.parent; + declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */); } } - function createSyntaxCursor(sourceFile) { - var currentArray = sourceFile.statements; - var currentArrayIndex = 0; - ts.Debug.assert(currentArrayIndex < currentArray.length); - var current = currentArray[currentArrayIndex]; - var lastQueriedPosition = -1 /* Value */; - return { - currentNode: function (position) { - // Only compute the current node if the position is different than the last time - // we were asked. The parser commonly asks for the node at the same position - // twice. Once to know if can read an appropriate list element at a certain point, - // and then to actually read and consume the node. - if (position !== lastQueriedPosition) { - // Much of the time the parser will need the very next node in the array that - // we just returned a node from.So just simply check for that case and move - // forward in the array instead of searching for the node again. - if (current && current.end === position && currentArrayIndex < (currentArray.length - 1)) { - currentArrayIndex++; - current = currentArray[currentArrayIndex]; - } - // If we don't have a node, or the node we have isn't in the right position, - // then try to find a viable node at the position requested. - if (!current || current.pos !== position) { - findHighestListElementThatStartsAtPosition(position); - } - } - // Cache this query so that we don't do any extra work if the parser calls back - // into us. Note: this is very common as the parser will make pairs of calls like - // 'isListElement -> parseListElement'. If we were unable to find a node when - // called with 'isListElement', we don't want to redo the work when parseListElement - // is called immediately after. - lastQueriedPosition = position; - // Either we don'd have a node, or we have a node at the position being asked for. - ts.Debug.assert(!current || current.pos === position); - return current; - } - }; - // Finds the highest element in the tree we can find that starts at the provided position. - // The element must be a direct child of some node list in the tree. This way after we - // return it, we can easily return its next sibling in the list. - function findHighestListElementThatStartsAtPosition(position) { - // Clear out any cached state about the last node we found. - currentArray = undefined; - currentArrayIndex = -1 /* Value */; - current = undefined; - // Recurse into the source file to find the highest node at this position. - forEachChild(sourceFile, visitNode, visitArray); - return; - function visitNode(node) { - if (position >= node.pos && position < node.end) { - // Position was within this node. Keep searching deeper to find the node. - forEachChild(node, visitNode, visitArray); - // don't procede any futher in the search. - return true; - } - // position wasn't in this node, have to keep searching. - return false; + function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { + return ts.hasDynamicName(node) + ? bindAnonymousDeclaration(node, symbolFlags, "__computed") + : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); + } + // reachability checks + function pushNamedLabel(name) { + initializeReachabilityStateIfNecessary(); + if (ts.hasProperty(labelIndexMap, name.text)) { + return false; + } + labelIndexMap[name.text] = labelStack.push(1 /* Unintialized */) - 1; + return true; + } + function pushImplicitLabel() { + initializeReachabilityStateIfNecessary(); + var index = labelStack.push(1 /* Unintialized */) - 1; + implicitLabels.push(index); + return index; + } + function popNamedLabel(label, outerState) { + var index = labelIndexMap[label.text]; + ts.Debug.assert(index !== undefined); + ts.Debug.assert(labelStack.length == index + 1); + labelIndexMap[label.text] = undefined; + setCurrentStateAtLabel(labelStack.pop(), outerState, label); + } + function popImplicitLabel(implicitLabelIndex, outerState) { + if (labelStack.length !== implicitLabelIndex + 1) { + ts.Debug.assert(false, "Label stack: " + labelStack.length + ", index:" + implicitLabelIndex); + } + var i = implicitLabels.pop(); + if (implicitLabelIndex !== i) { + ts.Debug.assert(false, "i: " + i + ", index: " + implicitLabelIndex); + } + setCurrentStateAtLabel(labelStack.pop(), outerState, /*name*/ undefined); + } + function setCurrentStateAtLabel(innerMergedState, outerState, label) { + if (innerMergedState === 1 /* Unintialized */) { + if (label && !options.allowUnusedLabels) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(label, ts.Diagnostics.Unused_label)); } - function visitArray(array) { - if (position >= array.pos && position < array.end) { - // position was in this array. Search through this array to see if we find a - // viable element. - for (var i = 0, n = array.length; i < n; i++) { - var child = array[i]; - if (child) { - if (child.pos === position) { - // Found the right node. We're done. - currentArray = array; - currentArrayIndex = i; - current = child; - return true; - } - else { - if (child.pos < position && position < child.end) { - // Position in somewhere within this child. Search in it and - // stop searching in this array. - forEachChild(child, visitNode, visitArray); - return true; - } - } - } + currentReachabilityState = outerState; + } + else { + currentReachabilityState = or(innerMergedState, outerState); + } + } + function jumpToLabel(label, outerState) { + initializeReachabilityStateIfNecessary(); + var index = label ? labelIndexMap[label.text] : ts.lastOrUndefined(implicitLabels); + if (index === undefined) { + // reference to unknown label or + // break/continue used outside of loops + return false; + } + var stateAtLabel = labelStack[index]; + labelStack[index] = stateAtLabel === 1 /* Unintialized */ ? outerState : or(stateAtLabel, outerState); + return true; + } + function checkUnreachable(node) { + switch (currentReachabilityState) { + case 4 /* Unreachable */: + var reportError = + // report error on all statements except empty ones + (ts.isStatement(node) && node.kind !== 194 /* EmptyStatement */) || + // report error on class declarations + node.kind === 214 /* ClassDeclaration */ || + // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + (node.kind === 218 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || + // report error on regular enums and const enums if preserveConstEnums is set + (node.kind === 217 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + if (reportError) { + currentReachabilityState = 8 /* ReportedUnreachable */; + // unreachable code is reported if + // - user has explicitly asked about it AND + // - statement is in not ambient context (statements in ambient context is already an error + // so we should not report extras) AND + // - node is not variable statement OR + // - node is block scoped variable statement OR + // - node is not block scoped variable statement and at least one variable declaration has initializer + // Rationale: we don't want to report errors on non-initialized var's since they are hoisted + // On the other side we do want to report errors on non-initialized 'lets' because of TDZ + var reportUnreachableCode = !options.allowUnreachableCode && + !ts.isInAmbientContext(node) && + (node.kind !== 193 /* VariableStatement */ || + ts.getCombinedNodeFlags(node.declarationList) & 24576 /* BlockScoped */ || + ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); + if (reportUnreachableCode) { + errorOnFirstToken(node, ts.Diagnostics.Unreachable_code_detected); } } - // position wasn't in this array, have to keep searching. + case 8 /* ReportedUnreachable */: + return true; + default: return false; - } + } + function shouldReportErrorOnModuleDeclaration(node) { + var instanceState = getModuleInstanceState(node); + return instanceState === 1 /* Instantiated */ || (instanceState === 2 /* ConstEnumOnly */ && options.preserveConstEnums); } } - var InvalidPosition; - (function (InvalidPosition) { - InvalidPosition[InvalidPosition["Value"] = -1] = "Value"; - })(InvalidPosition || (InvalidPosition = {})); - })(IncrementalParser || (IncrementalParser = {})); + function initializeReachabilityStateIfNecessary() { + if (labelIndexMap) { + return; + } + currentReachabilityState = 2 /* Reachable */; + labelIndexMap = {}; + labelStack = []; + implicitLabels = []; + } + } })(ts || (ts = {})); /// /* @internal */ @@ -13755,7 +13918,7 @@ var ts; symbolToString: symbolToString, getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, getRootSymbols: getRootSymbols, - getContextualType: getContextualType, + getContextualType: getApparentTypeOfContextualType, getFullyQualifiedName: getFullyQualifiedName, getResolvedSignature: getResolvedSignature, getConstantValue: getConstantValue, @@ -14025,7 +14188,7 @@ var ts; return ts.getAncestor(node, 248 /* SourceFile */); } function isGlobalSourceFile(node) { - return node.kind === 248 /* SourceFile */ && !ts.isExternalModule(node); + return node.kind === 248 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -14127,15 +14290,24 @@ var ts; } switch (location.kind) { case 248 /* SourceFile */: - if (!ts.isExternalModule(location)) + if (!ts.isExternalOrCommonJsModule(location)) break; case 218 /* ModuleDeclaration */: var moduleExports = getSymbolOfNode(location).exports; if (location.kind === 248 /* SourceFile */ || (location.kind === 218 /* ModuleDeclaration */ && location.name.kind === 9 /* StringLiteral */)) { - // It's an external module. Because of module/namespace merging, a module's exports are in scope, - // yet we never want to treat an export specifier as putting a member in scope. Therefore, - // if the name we find is purely an export specifier, it is not actually considered in scope. + // It's an external module. First see if the module has an export default and if the local + // name of that export default matches. + if (result = moduleExports["default"]) { + var localSymbol = ts.getLocalSymbolForExportDefault(result); + if (localSymbol && (result.flags & meaning) && localSymbol.name === name) { + break loop; + } + result = undefined; + } + // Because of module/namespace merging, a module's exports are in scope, + // yet we never want to treat an export specifier as putting a member in scope. + // Therefore, if the name we find is purely an export specifier, it is not actually considered in scope. // Two things to note about this: // 1. We have to check this without calling getSymbol. The problem with calling getSymbol // on an export specifier is that it might find the export specifier itself, and try to @@ -14149,12 +14321,6 @@ var ts; ts.getDeclarationOfKind(moduleExports[name], 230 /* ExportSpecifier */)) { break; } - result = moduleExports["default"]; - var localSymbol = ts.getLocalSymbolForExportDefault(result); - if (result && localSymbol && (result.flags & meaning) && localSymbol.name === name) { - break loop; - } - result = undefined; } if (result = getSymbol(moduleExports, name, meaning & 8914931 /* ModuleMember */)) { break loop; @@ -14297,7 +14463,7 @@ var ts; // declare module foo { // interface bar {} // } - // let foo/*1*/: foo/*2*/.bar; + // const foo/*1*/: foo/*2*/.bar; // The foo at /*1*/ and /*2*/ will share same symbol with two meaning // block - scope variable and namespace module. However, only when we // try to resolve name in /*1*/ which is used in variable position, @@ -14601,6 +14767,9 @@ var ts; if (moduleName === undefined) { return; } + if (moduleName.indexOf("!") >= 0) { + moduleName = moduleName.substr(0, moduleName.indexOf("!")); + } var isRelative = ts.isExternalModuleNameRelative(moduleName); if (!isRelative) { var symbol = getSymbol(globals, "\"" + moduleName + "\"", 512 /* ValueModule */); @@ -14788,7 +14957,7 @@ var ts; } switch (location_1.kind) { case 248 /* SourceFile */: - if (!ts.isExternalModule(location_1)) { + if (!ts.isExternalOrCommonJsModule(location_1)) { break; } case 218 /* ModuleDeclaration */: @@ -14910,7 +15079,7 @@ var ts; // export class c { // } // } - // let x: typeof m.c + // const 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 can't, hence the accessible is going to be undefined, but that doesn't mean m.c is inaccessible @@ -14949,7 +15118,7 @@ var ts; } function hasExternalModuleSymbol(declaration) { return (declaration.kind === 218 /* ModuleDeclaration */ && declaration.name.kind === 9 /* StringLiteral */) || - (declaration.kind === 248 /* SourceFile */ && ts.isExternalModule(declaration)); + (declaration.kind === 248 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -15100,7 +15269,7 @@ var ts; parentSymbol = symbol; appendSymbolNameOnly(symbol, writer); } - // Let the writer know we just wrote out a symbol. The declaration emitter writer uses + // const the writer know we just wrote out a symbol. The declaration emitter writer uses // this to determine if an import it has previously seen (and not written out) needs // to be written to the file once the walk of the tree is complete. // @@ -15181,7 +15350,7 @@ var ts; writeAnonymousType(type, flags); } else if (type.flags & 256 /* StringLiteral */) { - writer.writeStringLiteral(type.text); + writer.writeStringLiteral("\"" + ts.escapeString(type.text) + "\""); } else { // Should never get here @@ -15568,7 +15737,7 @@ var ts; } } else if (node.kind === 248 /* SourceFile */) { - return ts.isExternalModule(node) ? node : undefined; + return ts.isExternalOrCommonJsModule(node) ? node : undefined; } } ts.Debug.fail("getContainingModule cant reach here"); @@ -15650,7 +15819,7 @@ var ts; // Private/protected properties/methods are not visible return false; } - // Public properties/methods are visible if its parents are visible, so let it fall into next case statement + // Public properties/methods are visible if its parents are visible, so const it fall into next case statement case 144 /* Constructor */: case 148 /* ConstructSignature */: case 147 /* CallSignature */: @@ -15678,7 +15847,7 @@ var ts; // Source file is always visible case 248 /* SourceFile */: return true; - // Export assignements do not create name bindings outside the module + // Export assignments do not create name bindings outside the module case 227 /* ExportAssignment */: return false; default: @@ -15814,6 +15983,23 @@ var ts; var symbol = getSymbolOfNode(node); return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node); } + function getTextOfPropertyName(name) { + switch (name.kind) { + case 69 /* Identifier */: + return name.text; + case 9 /* StringLiteral */: + case 8 /* NumericLiteral */: + return name.text; + case 136 /* ComputedPropertyName */: + if (ts.isStringOrNumericLiteral(name.expression.kind)) { + return name.expression.text; + } + } + return undefined; + } + function isComputedNonLiteralName(name) { + return name.kind === 136 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression.kind); + } // Return the inferred type for a binding element function getTypeForBindingElement(declaration) { var pattern = declaration.parent; @@ -15835,10 +16021,15 @@ var ts; if (pattern.kind === 161 /* ObjectBindingPattern */) { // Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form) var name_10 = declaration.propertyName || declaration.name; + if (isComputedNonLiteralName(name_10)) { + // computed properties with non-literal names are treated as 'any' + return anyType; + } // Use type of the specified property, or otherwise, for a numeric name, the type of the numeric index signature, // or otherwise the type of the string index signature. - type = getTypeOfPropertyOfType(parentType, name_10.text) || - isNumericLiteralName(name_10.text) && getIndexTypeOfType(parentType, 1 /* Number */) || + var text = getTextOfPropertyName(name_10); + type = getTypeOfPropertyOfType(parentType, text) || + isNumericLiteralName(text) && getIndexTypeOfType(parentType, 1 /* Number */) || getIndexTypeOfType(parentType, 0 /* String */); if (!type) { error(name_10, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_10)); @@ -15938,10 +16129,17 @@ var ts; // Return the type implied by an object binding pattern function getTypeFromObjectBindingPattern(pattern, includePatternInType) { var members = {}; + var hasComputedProperties = false; ts.forEach(pattern.elements, function (e) { - var flags = 4 /* Property */ | 67108864 /* Transient */ | (e.initializer ? 536870912 /* Optional */ : 0); var name = e.propertyName || e.name; - var symbol = createSymbol(flags, name.text); + if (isComputedNonLiteralName(name)) { + // do not include computed properties in the implied type + hasComputedProperties = true; + return; + } + var text = getTextOfPropertyName(name); + var flags = 4 /* Property */ | 67108864 /* Transient */ | (e.initializer ? 536870912 /* Optional */ : 0); + var symbol = createSymbol(flags, text); symbol.type = getTypeFromBindingElement(e, includePatternInType); symbol.bindingElement = e; members[symbol.name] = symbol; @@ -15950,6 +16148,9 @@ var ts; if (includePatternInType) { result.pattern = pattern; } + if (hasComputedProperties) { + result.flags |= 67108864 /* ObjectLiteralPatternWithComputedProperties */; + } return result; } // Return the type implied by an array binding pattern @@ -16026,6 +16227,14 @@ var ts; if (declaration.kind === 227 /* ExportAssignment */) { return links.type = checkExpression(declaration.expression); } + // Handle module.exports = expr + if (declaration.kind === 181 /* BinaryExpression */) { + return links.type = checkExpression(declaration.right); + } + // Handle exports.p = expr + if (declaration.kind === 166 /* PropertyAccessExpression */) { + return checkExpressionCached(declaration.parent.right); + } // Handle variable, parameter or property if (!pushTypeResolution(symbol, 0 /* Type */)) { return unknownType; @@ -16304,23 +16513,25 @@ var ts; } function resolveBaseTypesOfClass(type) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; - var baseContructorType = getBaseConstructorTypeOfClass(type); - if (!(baseContructorType.flags & 80896 /* ObjectType */)) { + var baseConstructorType = getBaseConstructorTypeOfClass(type); + if (!(baseConstructorType.flags & 80896 /* ObjectType */)) { return; } var baseTypeNode = getBaseTypeNodeOfClass(type); var baseType; - if (baseContructorType.symbol && baseContructorType.symbol.flags & 32 /* Class */) { - // When base constructor type is a class we know that the constructors all have the same type parameters as the + var originalBaseType = baseConstructorType && baseConstructorType.symbol ? getDeclaredTypeOfSymbol(baseConstructorType.symbol) : undefined; + if (baseConstructorType.symbol && baseConstructorType.symbol.flags & 32 /* Class */ && + areAllOuterTypeParametersApplied(originalBaseType)) { + // When base constructor type is a class with no captured type arguments we know that the constructors all have the same type parameters as the // class and all return the instance type of the class. There is no need for further checks and we can apply the // type arguments in the same manner as a type reference to get the same error reporting experience. - baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseContructorType.symbol); + baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol); } else { // The class derives from a "class-like" constructor function, check that we have at least one construct signature // with a matching number of type parameters and use the return type of the first instantiated signature. Elsewhere // we check that all instantiated signatures return the same type. - var constructors = getInstantiatedConstructorsForTypeArguments(baseContructorType, baseTypeNode.typeArguments); + var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments); if (!constructors.length) { error(baseTypeNode.expression, ts.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments); return; @@ -16345,6 +16556,17 @@ var ts; type.resolvedBaseTypes.push(baseType); } } + function areAllOuterTypeParametersApplied(type) { + // An unapplied type parameter has its symbol still the same as the matching argument symbol. + // Since parameters are applied outer-to-inner, only the last outer parameter needs to be checked. + var outerTypeParameters = type.outerTypeParameters; + if (outerTypeParameters) { + var last = outerTypeParameters.length - 1; + var typeArguments = type.typeArguments; + return outerTypeParameters[last].symbol !== typeArguments[last].symbol; + } + return true; + } function resolveBaseTypesOfInterface(type) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { @@ -16424,7 +16646,7 @@ var ts; type.typeArguments = type.typeParameters; type.thisType = createType(512 /* TypeParameter */ | 33554432 /* ThisType */); type.thisType.symbol = symbol; - type.thisType.constraint = getTypeWithThisArgument(type); + type.thisType.constraint = type; } } return links.declaredType; @@ -16939,6 +17161,20 @@ var ts; type = getApparentType(type); return type.flags & 49152 /* UnionOrIntersection */ ? getPropertiesOfUnionOrIntersectionType(type) : getPropertiesOfObjectType(type); } + /** + * The apparent type of a type parameter is the base constraint instantiated with the type parameter + * as the type argument for the 'this' type. + */ + function getApparentTypeOfTypeParameter(type) { + if (!type.resolvedApparentType) { + var constraintType = getConstraintOfTypeParameter(type); + while (constraintType && constraintType.flags & 512 /* TypeParameter */) { + constraintType = getConstraintOfTypeParameter(constraintType); + } + type.resolvedApparentType = getTypeWithThisArgument(constraintType || emptyObjectType, type); + } + return type.resolvedApparentType; + } /** * For a type parameter, return the base constraint of the type parameter. For the string, number, * boolean, and symbol primitive types, return the corresponding object types. Otherwise return the @@ -16946,12 +17182,7 @@ var ts; */ function getApparentType(type) { if (type.flags & 512 /* TypeParameter */) { - do { - type = getConstraintOfTypeParameter(type); - } while (type && type.flags & 512 /* TypeParameter */); - if (!type) { - type = emptyObjectType; - } + type = getApparentTypeOfTypeParameter(type); } if (type.flags & 258 /* StringLike */) { type = globalStringType; @@ -17116,7 +17347,7 @@ var ts; if (node.initializer) { var signatureDeclaration = node.parent; var signature = getSignatureFromDeclaration(signatureDeclaration); - var parameterIndex = signatureDeclaration.parameters.indexOf(node); + var parameterIndex = ts.indexOf(signatureDeclaration.parameters, node); ts.Debug.assert(parameterIndex >= 0); return parameterIndex >= signature.minArgumentCount; } @@ -17217,6 +17448,16 @@ var ts; } return result; } + function resolveExternalModuleTypeByLiteral(name) { + var moduleSym = resolveExternalModuleName(name, name); + if (moduleSym) { + var resolvedModuleSymbol = resolveExternalModuleSymbol(moduleSym); + if (resolvedModuleSymbol) { + return getTypeOfSymbol(resolvedModuleSymbol); + } + } + return anyType; + } function getReturnTypeOfSignature(signature) { if (!signature.resolvedReturnType) { if (!pushTypeResolution(signature, 3 /* ResolvedReturnType */)) { @@ -17740,11 +17981,12 @@ var ts; return links.resolvedType; } function getStringLiteralType(node) { - if (ts.hasProperty(stringLiteralTypes, node.text)) { - return stringLiteralTypes[node.text]; + var text = node.text; + if (ts.hasProperty(stringLiteralTypes, text)) { + return stringLiteralTypes[text]; } - var type = stringLiteralTypes[node.text] = createType(256 /* StringLiteral */); - type.text = ts.getTextOfNode(node); + var type = stringLiteralTypes[text] = createType(256 /* StringLiteral */); + type.text = text; return type; } function getTypeFromStringLiteral(node) { @@ -18265,7 +18507,7 @@ var ts; return false; } function hasExcessProperties(source, target, reportErrors) { - if (someConstituentTypeHasKind(target, 80896 /* ObjectType */)) { + if (!(target.flags & 67108864 /* ObjectLiteralPatternWithComputedProperties */) && someConstituentTypeHasKind(target, 80896 /* ObjectType */)) { for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) { var prop = _a[_i]; if (!isKnownProperty(target, prop.name)) { @@ -18358,9 +18600,6 @@ var ts; return result; } function typeParameterIdenticalTo(source, target) { - if (source.symbol.name !== target.symbol.name) { - return 0 /* False */; - } // covers case when both type parameters does not have constraint (both equal to noConstraintType) if (source.constraint === target.constraint) { return -1 /* True */; @@ -18852,18 +19091,29 @@ var ts; } return compareTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); } + function isMatchingSignature(source, target, partialMatch) { + // A source signature matches a target signature if the two signatures have the same number of required, + // optional, and rest parameters. + if (source.parameters.length === target.parameters.length && + source.minArgumentCount === target.minArgumentCount && + source.hasRestParameter === target.hasRestParameter) { + return true; + } + // A source signature partially matches a target signature if the target signature has no fewer required + // parameters and no more overall parameters than the source signature (where a signature with a rest + // parameter is always considered to have more overall parameters than one without). + if (partialMatch && source.minArgumentCount <= target.minArgumentCount && (source.hasRestParameter && !target.hasRestParameter || + source.hasRestParameter === target.hasRestParameter && source.parameters.length >= target.parameters.length)) { + return true; + } + return false; + } function compareSignatures(source, target, partialMatch, ignoreReturnTypes, compareTypes) { if (source === target) { return -1 /* True */; } - if (source.parameters.length !== target.parameters.length || - source.minArgumentCount !== target.minArgumentCount || - source.hasRestParameter !== target.hasRestParameter) { - if (!partialMatch || - source.parameters.length < target.parameters.length && !source.hasRestParameter || - source.minArgumentCount > target.minArgumentCount) { - return 0 /* False */; - } + if (!(isMatchingSignature(source, target, partialMatch))) { + return 0 /* False */; } var result = -1 /* True */; if (source.typeParameters && target.typeParameters) { @@ -18957,6 +19207,9 @@ var ts; function isTupleLikeType(type) { return !!getPropertyOfType(type, "0"); } + function isStringLiteralType(type) { + return type.flags & 256 /* StringLiteral */; + } /** * Check if a Type was written as a tuple type literal. * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. @@ -19629,7 +19882,7 @@ var ts; } function narrowTypeByInstanceof(type, expr, assumeTrue) { // Check that type is not any, assumed result is true, and we have variable symbol on the left - if (isTypeAny(type) || !assumeTrue || expr.left.kind !== 69 /* Identifier */ || getResolvedSymbol(expr.left) !== symbol) { + if (isTypeAny(type) || expr.left.kind !== 69 /* Identifier */ || getResolvedSymbol(expr.left) !== symbol) { return type; } // Check that right operand is a function type with a prototype property @@ -19660,6 +19913,12 @@ var ts; } } if (targetType) { + if (!assumeTrue) { + if (type.flags & 16384 /* Union */) { + return getUnionType(ts.filter(type.types, function (t) { return !isTypeSubtypeOf(t, targetType); })); + } + return type; + } return getNarrowedType(type, targetType); } return type; @@ -20129,6 +20388,9 @@ var ts; function getIndexTypeOfContextualType(type, kind) { return applyToContextualType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); }); } + function contextualTypeIsStringLiteralType(type) { + return !!(type.flags & 16384 /* Union */ ? ts.forEach(type.types, isStringLiteralType) : isStringLiteralType(type)); + } // Return true if the given contextual type is a tuple-like type function contextualTypeIsTupleLikeType(type) { return !!(type.flags & 16384 /* Union */ ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type)); @@ -20150,7 +20412,7 @@ var ts; } function getContextualTypeForObjectLiteralElement(element) { var objectLiteral = element.parent; - var type = getContextualType(objectLiteral); + var type = getApparentTypeOfContextualType(objectLiteral); if (type) { if (!ts.hasDynamicName(element)) { // For a (non-symbol) computed property, there is no reason to look up the name @@ -20173,7 +20435,7 @@ var ts; // type of T. function getContextualTypeForElementExpression(node) { var arrayLiteral = node.parent; - var type = getContextualType(arrayLiteral); + var type = getApparentTypeOfContextualType(arrayLiteral); if (type) { var index = ts.indexOf(arrayLiteral.elements, node); return getTypeOfPropertyOfContextualType(type, "" + index) @@ -20206,11 +20468,28 @@ var ts; } // Return the contextual type for a given expression node. During overload resolution, a contextual type may temporarily // be "pushed" onto a node using the contextualType property. - function getContextualType(node) { - var type = getContextualTypeWorker(node); + function getApparentTypeOfContextualType(node) { + var type = getContextualType(node); return type && getApparentType(type); } - function getContextualTypeWorker(node) { + /** + * Woah! Do you really want to use this function? + * + * Unless you're trying to get the *non-apparent* type for a + * value-literal type or you're authoring relevant portions of this algorithm, + * you probably meant to use 'getApparentTypeOfContextualType'. + * Otherwise this may not be very useful. + * + * In cases where you *are* working on this function, you should understand + * when it is appropriate to use 'getContextualType' and 'getApparentTypeOfContetxualType'. + * + * - Use 'getContextualType' when you are simply going to propagate the result to the expression. + * - Use 'getApparentTypeOfContextualType' when you're going to need the members of the type. + * + * @param node the expression whose contextual type will be returned. + * @returns the contextual type of an expression. + */ + function getContextualType(node) { if (isInsideWithStatementBody(node)) { // We cannot answer semantic questions within a with block, do not proceed any further return undefined; @@ -20285,7 +20564,7 @@ var ts; ts.Debug.assert(node.kind !== 143 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var type = ts.isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) - : getContextualType(node); + : getApparentTypeOfContextualType(node); if (!type) { return undefined; } @@ -20411,7 +20690,7 @@ var ts; type.pattern = node; return type; } - var contextualType = getContextualType(node); + var contextualType = getApparentTypeOfContextualType(node); if (contextualType && contextualTypeIsTupleLikeType(contextualType)) { var pattern = contextualType.pattern; // If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting @@ -20494,10 +20773,11 @@ var ts; checkGrammarObjectLiteralExpression(node, inDestructuringPattern); var propertiesTable = {}; var propertiesArray = []; - var contextualType = getContextualType(node); + var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 161 /* ObjectBindingPattern */ || contextualType.pattern.kind === 165 /* ObjectLiteralExpression */); var typeFlags = 0; + var patternWithComputedProperties = false; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var memberDecl = _a[_i]; var member = memberDecl.symbol; @@ -20525,8 +20805,11 @@ var ts; if (isOptional) { prop.flags |= 536870912 /* Optional */; } + if (ts.hasDynamicName(memberDecl)) { + patternWithComputedProperties = true; + } } - else if (contextualTypeHasPattern) { + else if (contextualTypeHasPattern && !(contextualType.flags & 67108864 /* ObjectLiteralPatternWithComputedProperties */)) { // If object literal is contextually typed by the implied type of a binding pattern, and if the // binding pattern specifies a default value for the property, make the property optional. var impliedProp = getPropertyOfType(contextualType, member.name); @@ -20578,7 +20861,7 @@ var ts; var numberIndexType = getIndexType(1 /* Number */); var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType); var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576 /* FreshObjectLiteral */; - result.flags |= 524288 /* ObjectLiteral */ | 4194304 /* ContainsObjectLiteral */ | freshObjectLiteralFlag | (typeFlags & 14680064 /* PropagatingFlags */); + result.flags |= 524288 /* ObjectLiteral */ | 4194304 /* ContainsObjectLiteral */ | freshObjectLiteralFlag | (typeFlags & 14680064 /* PropagatingFlags */) | (patternWithComputedProperties ? 67108864 /* ObjectLiteralPatternWithComputedProperties */ : 0); if (inDestructuringPattern) { result.pattern = node; } @@ -21289,7 +21572,7 @@ var ts; // so order how inherited signatures are processed is still preserved. // interface A { (x: string): void } // interface B extends A { (x: 'foo'): string } - // let b: B; + // const b: B; // b('foo') // <- here overloads should be processed as [(x:'foo'): string, (x: string): void] function reorderCandidates(signatures, result) { var lastParent; @@ -22247,6 +22530,10 @@ var ts; return anyType; } } + // In JavaScript files, calls to any identifier 'require' are treated as external module imports + if (ts.isInJavaScriptFile(node) && ts.isRequireCall(node)) { + return resolveExternalModuleTypeByLiteral(node.arguments[0]); + } return getReturnTypeOfSignature(signature); } function checkTaggedTemplateExpression(node) { @@ -22257,7 +22544,10 @@ var ts; var targetType = getTypeFromTypeNode(node.type); if (produceDiagnostics && targetType !== unknownType) { var widenedType = getWidenedType(exprType); - if (!(isTypeAssignableTo(targetType, widenedType))) { + // Permit 'number[] | "foo"' to be asserted to 'string'. + var bothAreStringLike = someConstituentTypeHasKind(targetType, 258 /* StringLike */) && + someConstituentTypeHasKind(widenedType, 258 /* StringLike */); + if (!bothAreStringLike && !(isTypeAssignableTo(targetType, widenedType))) { checkTypeAssignableTo(exprType, targetType, node, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); } } @@ -22801,19 +23091,26 @@ var ts; for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) { var p = properties_3[_i]; if (p.kind === 245 /* PropertyAssignment */ || p.kind === 246 /* ShorthandPropertyAssignment */) { - // TODO(andersh): Computed property support var name_13 = p.name; + if (name_13.kind === 136 /* ComputedPropertyName */) { + checkComputedPropertyName(name_13); + } + if (isComputedNonLiteralName(name_13)) { + continue; + } + var text = getTextOfPropertyName(name_13); var type = isTypeAny(sourceType) ? sourceType - : getTypeOfPropertyOfType(sourceType, name_13.text) || - isNumericLiteralName(name_13.text) && getIndexTypeOfType(sourceType, 1 /* Number */) || + : getTypeOfPropertyOfType(sourceType, text) || + isNumericLiteralName(text) && getIndexTypeOfType(sourceType, 1 /* Number */) || getIndexTypeOfType(sourceType, 0 /* String */); if (type) { if (p.kind === 246 /* ShorthandPropertyAssignment */) { checkDestructuringAssignment(p, type); } else { - checkDestructuringAssignment(p.initializer || name_13, type); + // non-shorthand property assignments should always have initializers + checkDestructuringAssignment(p.initializer, type); } } else { @@ -23014,6 +23311,10 @@ var ts; case 31 /* ExclamationEqualsToken */: case 32 /* EqualsEqualsEqualsToken */: case 33 /* ExclamationEqualsEqualsToken */: + // Permit 'number[] | "foo"' to be asserted to 'string'. + if (someConstituentTypeHasKind(leftType, 258 /* StringLike */) && someConstituentTypeHasKind(rightType, 258 /* StringLike */)) { + return booleanType; + } if (!isTypeAssignableTo(leftType, rightType) && !isTypeAssignableTo(rightType, leftType)) { reportOperatorError(); } @@ -23137,6 +23438,13 @@ var ts; var type2 = checkExpression(node.whenFalse, contextualMapper); return getUnionType([type1, type2]); } + function checkStringLiteralExpression(node) { + var contextualType = getContextualType(node); + if (contextualType && contextualTypeIsStringLiteralType(contextualType)) { + return getStringLiteralType(node); + } + return stringType; + } function checkTemplateExpression(node) { // We just want to check each expressions, but we are unconcerned with // the type of each expression, as any value may be coerced into a string. @@ -23187,7 +23495,7 @@ var ts; if (isInferentialContext(contextualMapper)) { var signature = getSingleCallSignature(type); if (signature && signature.typeParameters) { - var contextualType = getContextualType(node); + var contextualType = getApparentTypeOfContextualType(node); if (contextualType) { var contextualSignature = getSingleCallSignature(contextualType); if (contextualSignature && !contextualSignature.typeParameters) { @@ -23251,6 +23559,7 @@ var ts; case 183 /* TemplateExpression */: return checkTemplateExpression(node); case 9 /* StringLiteral */: + return checkStringLiteralExpression(node); case 11 /* NoSubstitutionTemplateLiteral */: return stringType; case 10 /* RegularExpressionLiteral */: @@ -24580,7 +24889,7 @@ var ts; } // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent var parent = getDeclarationContainer(node); - if (parent.kind === 248 /* SourceFile */ && ts.isExternalModule(parent)) { + if (parent.kind === 248 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) { // If the declaration happens to be in external module, report error that require and exports are reserved keywords error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } @@ -24598,15 +24907,15 @@ var ts; // A non-initialized declaration is a no-op as the block declaration will resolve before the var // declaration. the problem is if the declaration has an initializer. this will act as a write to the // block declared value. this is fine for let, but not const. - // Only consider declarations with initializers, uninitialized let declarations will not + // Only consider declarations with initializers, uninitialized const declarations will not // step on a let/const variable. - // Do not consider let and const declarations, as duplicate block-scoped declarations + // Do not consider const and const declarations, as duplicate block-scoped declarations // are handled by the binder. - // We are only looking for let declarations that step on let\const declarations from a + // We are only looking for const declarations that step on let\const declarations from a // different scope. e.g.: // { // const x = 0; // localDeclarationSymbol obtained after name resolution will correspond to this declaration - // let x = 0; // symbol for this declaration will be 'symbol' + // const x = 0; // symbol for this declaration will be 'symbol' // } // skip block-scoped variables and parameters if ((ts.getCombinedNodeFlags(node) & 24576 /* BlockScoped */) !== 0 || ts.isParameterDeclaration(node)) { @@ -24693,6 +25002,12 @@ var ts; checkExpressionCached(node.initializer); } } + if (node.kind === 163 /* BindingElement */) { + // check computed properties inside property names of binding elements + if (node.propertyName && node.propertyName.kind === 136 /* ComputedPropertyName */) { + checkComputedPropertyName(node.propertyName); + } + } // For a binding pattern, check contained binding elements if (ts.isBindingPattern(node.name)) { ts.forEach(node.name.elements, checkSourceElement); @@ -25176,6 +25491,7 @@ var ts; var firstDefaultClause; var hasDuplicateDefaultClause = false; var expressionType = checkExpression(node.expression); + var expressionTypeIsStringLike = someConstituentTypeHasKind(expressionType, 258 /* StringLike */); ts.forEach(node.caseBlock.clauses, function (clause) { // Grammar check for duplicate default clauses, skip if we already report duplicate default clause if (clause.kind === 242 /* DefaultClause */ && !hasDuplicateDefaultClause) { @@ -25195,6 +25511,10 @@ var ts; // TypeScript 1.0 spec (April 2014):5.9 // In a 'switch' statement, each 'case' expression must be of a type that is assignable to or from the type of the 'switch' expression. var caseType = checkExpression(caseClause.expression); + // Permit 'number[] | "foo"' to be asserted to 'string'. + if (expressionTypeIsStringLike && someConstituentTypeHasKind(caseType, 258 /* StringLike */)) { + return; + } if (!isTypeAssignableTo(expressionType, caseType)) { // check 'expressionType isAssignableTo caseType' failed, try the reversed check and report errors if it fails checkTypeAssignableTo(caseType, expressionType, caseClause.expression, /*headMessage*/ undefined); @@ -25659,11 +25979,14 @@ var ts; var enumIsConst = ts.isConst(node); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.name.kind === 136 /* ComputedPropertyName */) { + if (isComputedNonLiteralName(member.name)) { error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums); } - else if (isNumericLiteralName(member.name.text)) { - error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name); + else { + var text = getTextOfPropertyName(member.name); + if (isNumericLiteralName(text)) { + error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name); + } } var previousEnumMemberIsNonConstant = autoValue === undefined; var initializer = member.initializer; @@ -26305,8 +26628,8 @@ var ts; } // Function and class expression bodies are checked after all statements in the enclosing body. This is // to ensure constructs like the following are permitted: - // let foo = function () { - // let s = foo(); + // const foo = function () { + // const s = foo(); // return "hello"; // } // Here, performing a full type check of the body of the function expression whilst in the process of @@ -26421,8 +26744,12 @@ var ts; if (!(links.flags & 1 /* TypeChecked */)) { // Check whether the file has declared it is the default lib, // and whether the user has specifically chosen to avoid checking it. - if (node.isDefaultLib && compilerOptions.skipDefaultLibCheck) { - return; + if (compilerOptions.skipDefaultLibCheck) { + // If the user specified '--noLib' and a file has a '/// ', + // then we should treat that file as a default lib. + if (node.hasNoDefaultLib) { + return; + } } // Grammar checking checkGrammarSourceFile(node); @@ -26432,7 +26759,7 @@ var ts; potentialThisCollisions.length = 0; ts.forEach(node.statements, checkSourceElement); checkFunctionAndClassExpressionBodies(node); - if (ts.isExternalModule(node)) { + if (ts.isExternalOrCommonJsModule(node)) { checkExternalModuleExports(node); } if (potentialThisCollisions.length) { @@ -26515,7 +26842,7 @@ var ts; } switch (location.kind) { case 248 /* SourceFile */: - if (!ts.isExternalModule(location)) { + if (!ts.isExternalOrCommonJsModule(location)) { break; } case 218 /* ModuleDeclaration */: @@ -27153,9 +27480,18 @@ var ts; getReferencedValueDeclaration: getReferencedValueDeclaration, getTypeReferenceSerializationKind: getTypeReferenceSerializationKind, isOptionalParameter: isOptionalParameter, - isArgumentsLocalBinding: isArgumentsLocalBinding + isArgumentsLocalBinding: isArgumentsLocalBinding, + getExternalModuleFileFromDeclaration: getExternalModuleFileFromDeclaration }; } + function getExternalModuleFileFromDeclaration(declaration) { + var specifier = ts.getExternalModuleName(declaration); + var moduleSymbol = getSymbolAtLocation(specifier); + if (!moduleSymbol) { + return undefined; + } + return ts.getDeclarationOfKind(moduleSymbol, 248 /* SourceFile */); + } function initializeTypeChecker() { // Bind all source files and propagate errors ts.forEach(host.getSourceFiles(), function (file) { @@ -27163,11 +27499,10 @@ var ts; }); // Initialize global symbol table ts.forEach(host.getSourceFiles(), function (file) { - if (!ts.isExternalModule(file)) { + if (!ts.isExternalOrCommonJsModule(file)) { mergeSymbolTable(globals, file.locals); } }); - // Initialize special symbols getSymbolLinks(undefinedSymbol).type = undefinedType; getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments"); getSymbolLinks(unknownSymbol).type = unknownType; @@ -27866,7 +28201,7 @@ var ts; } } function checkGrammarForNonSymbolComputedProperty(node, message) { - if (node.kind === 136 /* ComputedPropertyName */ && !ts.isWellKnownSymbolSyntactically(node.expression)) { + if (ts.isDynamicName(node)) { return grammarErrorOnNode(node, message); } } @@ -28225,11 +28560,15 @@ var ts; var writeTextOfNode; var writer = createAndSetNewTextWriterWithSymbolWriter(); var enclosingDeclaration; - var currentSourceFile; + var currentText; + var currentLineMap; + var currentIdentifiers; + var isCurrentFileExternalModule; var reportedDeclarationError = false; var errorNameNode; var emitJsDocComments = compilerOptions.removeComments ? function (declaration) { } : writeJsDocComments; var emit = compilerOptions.stripInternal ? stripInternal : emitNode; + var noDeclare = !root; var moduleElementDeclarationEmitInfo = []; var asynchronousSubModuleDeclarationEmitInfo; // Contains the reference paths that needs to go in the declaration file. @@ -28272,23 +28611,56 @@ var ts; else { // Emit references corresponding to this file var emittedReferencedFiles = []; + var prevModuleElementDeclarationEmitInfo = []; ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (!ts.isExternalModuleOrDeclarationFile(sourceFile)) { + if (!ts.isDeclarationFile(sourceFile)) { // Check what references need to be added if (!compilerOptions.noResolve) { ts.forEach(sourceFile.referencedFiles, function (fileReference) { var referencedFile = ts.tryResolveScriptReference(host, sourceFile, fileReference); - // If the reference file is a declaration file or an external module, emit that reference - if (referencedFile && (ts.isExternalModuleOrDeclarationFile(referencedFile) && + // If the reference file is a declaration file, emit that reference + if (referencedFile && (ts.isDeclarationFile(referencedFile) && !ts.contains(emittedReferencedFiles, referencedFile))) { writeReferencePath(referencedFile); emittedReferencedFiles.push(referencedFile); } }); } + } + if (!ts.isExternalModuleOrDeclarationFile(sourceFile)) { + noDeclare = false; + emitSourceFile(sourceFile); + } + else if (ts.isExternalModule(sourceFile)) { + noDeclare = true; + write("declare module \"" + ts.getResolvedExternalModuleName(host, sourceFile) + "\" {"); + writeLine(); + increaseIndent(); emitSourceFile(sourceFile); + decreaseIndent(); + write("}"); + writeLine(); + // create asynchronous output for the importDeclarations + if (moduleElementDeclarationEmitInfo.length) { + var oldWriter = writer; + ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { + if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { + ts.Debug.assert(aliasEmitInfo.node.kind === 222 /* ImportDeclaration */); + createAndSetNewTextWriterWithSymbolWriter(); + ts.Debug.assert(aliasEmitInfo.indent === 1); + increaseIndent(); + writeImportDeclaration(aliasEmitInfo.node); + aliasEmitInfo.asynchronousOutput = writer.getText(); + decreaseIndent(); + } + }); + setWriter(oldWriter); + } + prevModuleElementDeclarationEmitInfo = prevModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); + moduleElementDeclarationEmitInfo = []; } }); + moduleElementDeclarationEmitInfo = moduleElementDeclarationEmitInfo.concat(prevModuleElementDeclarationEmitInfo); } return { reportedDeclarationError: reportedDeclarationError, @@ -28297,13 +28669,12 @@ var ts; referencePathsOutput: referencePathsOutput }; function hasInternalAnnotation(range) { - var text = currentSourceFile.text; - var comment = text.substring(range.pos, range.end); + var comment = currentText.substring(range.pos, range.end); return comment.indexOf("@internal") >= 0; } function stripInternal(node) { if (node) { - var leadingCommentRanges = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos); + var leadingCommentRanges = ts.getLeadingCommentRanges(currentText, node.pos); if (ts.forEach(leadingCommentRanges, hasInternalAnnotation)) { return; } @@ -28395,7 +28766,7 @@ var ts; var errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccesibilityResult); if (errorInfo) { if (errorInfo.typeName) { - diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); + diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getTextOfNodeFromSourceText(currentText, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); } else { diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); @@ -28461,10 +28832,10 @@ var ts; } function writeJsDocComments(declaration) { if (declaration) { - var jsDocComments = ts.getJsDocComments(declaration, currentSourceFile); - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, declaration, jsDocComments); + var jsDocComments = ts.getJsDocCommentsFromText(declaration, currentText); + ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, declaration, jsDocComments); // jsDoc comments are emitted at /*leading comment1 */space/*leading comment*/space - ts.emitComments(currentSourceFile, writer, jsDocComments, /*trailingSeparator*/ true, newLine, ts.writeCommentRange); + ts.emitComments(currentText, currentLineMap, writer, jsDocComments, /*trailingSeparator*/ true, newLine, ts.writeCommentRange); } } function emitTypeWithNewGetSymbolAccessibilityDiagnostic(type, getSymbolAccessibilityDiagnostic) { @@ -28481,7 +28852,7 @@ var ts; case 103 /* VoidKeyword */: case 97 /* ThisKeyword */: case 9 /* StringLiteral */: - return writeTextOfNode(currentSourceFile, type); + return writeTextOfNode(currentText, type); case 188 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(type); case 151 /* TypeReference */: @@ -28512,14 +28883,14 @@ var ts; } function writeEntityName(entityName) { if (entityName.kind === 69 /* Identifier */) { - writeTextOfNode(currentSourceFile, entityName); + writeTextOfNode(currentText, entityName); } else { var left = entityName.kind === 135 /* QualifiedName */ ? entityName.left : entityName.expression; var right = entityName.kind === 135 /* QualifiedName */ ? entityName.right : entityName.name; writeEntityName(left); write("."); - writeTextOfNode(currentSourceFile, right); + writeTextOfNode(currentText, right); } } function emitEntityName(entityName) { @@ -28549,7 +28920,7 @@ var ts; } } function emitTypePredicate(type) { - writeTextOfNode(currentSourceFile, type.parameterName); + writeTextOfNode(currentText, type.parameterName); write(" is "); emitType(type.type); } @@ -28590,9 +28961,12 @@ var ts; } } function emitSourceFile(node) { - currentSourceFile = node; + currentText = node.text; + currentLineMap = ts.getLineStarts(node); + currentIdentifiers = node.identifiers; + isCurrentFileExternalModule = ts.isExternalModule(node); enclosingDeclaration = node; - ts.emitDetachedComments(currentSourceFile, writer, ts.writeCommentRange, node, newLine, true /* remove comments */); + ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, true /* remove comments */); emitLines(node.statements); } // Return a temp variable name to be used in `export default` statements. @@ -28601,13 +28975,13 @@ var ts; // do not need to keep track of created temp names. function getExportDefaultTempVariableName() { var baseName = "_default"; - if (!ts.hasProperty(currentSourceFile.identifiers, baseName)) { + if (!ts.hasProperty(currentIdentifiers, baseName)) { return baseName; } var count = 0; while (true) { var name_18 = baseName + "_" + (++count); - if (!ts.hasProperty(currentSourceFile.identifiers, name_18)) { + if (!ts.hasProperty(currentIdentifiers, name_18)) { return name_18; } } @@ -28615,7 +28989,7 @@ var ts; function emitExportAssignment(node) { if (node.expression.kind === 69 /* Identifier */) { write(node.isExportEquals ? "export = " : "export default "); - writeTextOfNode(currentSourceFile, node.expression); + writeTextOfNode(currentText, node.expression); } else { // Expression @@ -28653,7 +29027,7 @@ var ts; writeModuleElement(node); } else if (node.kind === 221 /* ImportEqualsDeclaration */ || - (node.parent.kind === 248 /* SourceFile */ && ts.isExternalModule(currentSourceFile))) { + (node.parent.kind === 248 /* SourceFile */ && isCurrentFileExternalModule)) { var isVisible; if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 248 /* SourceFile */) { // Import declaration of another module that is visited async so lets put it in right spot @@ -28707,7 +29081,7 @@ var ts; } function emitModuleElementDeclarationFlags(node) { // If the node is parented in the current source file we need to emit export declare or just export - if (node.parent === currentSourceFile) { + if (node.parent.kind === 248 /* SourceFile */) { // If the node is exported if (node.flags & 2 /* Export */) { write("export "); @@ -28715,7 +29089,7 @@ var ts; if (node.flags & 512 /* Default */) { write("default "); } - else if (node.kind !== 215 /* InterfaceDeclaration */) { + else if (node.kind !== 215 /* InterfaceDeclaration */ && !noDeclare) { write("declare "); } } @@ -28742,7 +29116,7 @@ var ts; write("export "); } write("import "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); write(" = "); if (ts.isInternalModuleImportEqualsDeclaration(node)) { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.moduleReference, getImportEntityNameVisibilityError); @@ -28750,7 +29124,7 @@ var ts; } else { write("require("); - writeTextOfNode(currentSourceFile, ts.getExternalModuleImportEqualsDeclarationExpression(node)); + writeTextOfNode(currentText, ts.getExternalModuleImportEqualsDeclarationExpression(node)); write(");"); } writer.writeLine(); @@ -28785,7 +29159,7 @@ var ts; if (node.importClause) { var currentWriterPos = writer.getTextPos(); if (node.importClause.name && resolver.isDeclarationVisible(node.importClause)) { - writeTextOfNode(currentSourceFile, node.importClause.name); + writeTextOfNode(currentText, node.importClause.name); } if (node.importClause.namedBindings && isVisibleNamedBinding(node.importClause.namedBindings)) { if (currentWriterPos !== writer.getTextPos()) { @@ -28794,7 +29168,7 @@ var ts; } if (node.importClause.namedBindings.kind === 224 /* NamespaceImport */) { write("* as "); - writeTextOfNode(currentSourceFile, node.importClause.namedBindings.name); + writeTextOfNode(currentText, node.importClause.namedBindings.name); } else { write("{ "); @@ -28804,16 +29178,28 @@ var ts; } write(" from "); } - writeTextOfNode(currentSourceFile, node.moduleSpecifier); + emitExternalModuleSpecifier(node.moduleSpecifier); write(";"); writer.writeLine(); } + function emitExternalModuleSpecifier(moduleSpecifier) { + if (moduleSpecifier.kind === 9 /* StringLiteral */ && (!root) && (compilerOptions.out || compilerOptions.outFile)) { + var moduleName = ts.getExternalModuleNameFromDeclaration(host, resolver, moduleSpecifier.parent); + if (moduleName) { + write("\""); + write(moduleName); + write("\""); + return; + } + } + writeTextOfNode(currentText, moduleSpecifier); + } function emitImportOrExportSpecifier(node) { if (node.propertyName) { - writeTextOfNode(currentSourceFile, node.propertyName); + writeTextOfNode(currentText, node.propertyName); write(" as "); } - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } function emitExportSpecifier(node) { emitImportOrExportSpecifier(node); @@ -28835,7 +29221,7 @@ var ts; } if (node.moduleSpecifier) { write(" from "); - writeTextOfNode(currentSourceFile, node.moduleSpecifier); + emitExternalModuleSpecifier(node.moduleSpecifier); } write(";"); writer.writeLine(); @@ -28849,11 +29235,11 @@ var ts; else { write("module "); } - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); while (node.body.kind !== 219 /* ModuleBlock */) { node = node.body; write("."); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; @@ -28872,7 +29258,7 @@ var ts; emitJsDocComments(node); emitModuleElementDeclarationFlags(node); write("type "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); emitTypeParameters(node.typeParameters); write(" = "); emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.type, getTypeAliasDeclarationVisibilityError); @@ -28894,7 +29280,7 @@ var ts; write("const "); } write("enum "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); write(" {"); writeLine(); increaseIndent(); @@ -28905,7 +29291,7 @@ var ts; } function emitEnumMemberDeclaration(node) { emitJsDocComments(node); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); var enumMemberValue = resolver.getConstantValue(node); if (enumMemberValue !== undefined) { write(" = "); @@ -28922,7 +29308,7 @@ var ts; increaseIndent(); emitJsDocComments(node); decreaseIndent(); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); // If there is constraint present and this is not a type parameter of the private method emit the constraint if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); @@ -29037,7 +29423,7 @@ var ts; write("abstract "); } write("class "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; emitTypeParameters(node.typeParameters); @@ -29060,7 +29446,7 @@ var ts; emitJsDocComments(node); emitModuleElementDeclarationFlags(node); write("interface "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; emitTypeParameters(node.typeParameters); @@ -29095,7 +29481,7 @@ var ts; // If this node is a computed name, it can only be a symbol, because we've already skipped // it if it's not a well known symbol. In that case, the text of the name will be exactly // what we want, namely the name expression enclosed in brackets. - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); // If optional property emit ? if ((node.kind === 141 /* PropertyDeclaration */ || node.kind === 140 /* PropertySignature */) && ts.hasQuestionToken(node)) { write("?"); @@ -29177,7 +29563,7 @@ var ts; emitBindingPattern(bindingElement.name); } else { - writeTextOfNode(currentSourceFile, bindingElement.name); + writeTextOfNode(currentText, bindingElement.name); writeTypeOfDeclaration(bindingElement, /*type*/ undefined, getBindingElementTypeVisibilityError); } } @@ -29221,7 +29607,7 @@ var ts; emitJsDocComments(accessors.getAccessor); emitJsDocComments(accessors.setAccessor); emitClassMemberDeclarationFlags(node); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); if (!(node.flags & 16 /* Private */)) { accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); @@ -29307,13 +29693,13 @@ var ts; } if (node.kind === 213 /* FunctionDeclaration */) { write("function "); - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } else if (node.kind === 144 /* Constructor */) { write("constructor"); } else { - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); if (ts.hasQuestionToken(node)) { write("?"); } @@ -29437,7 +29823,7 @@ var ts; emitBindingPattern(node.name); } else { - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); } if (resolver.isOptionalParameter(node)) { write("?"); @@ -29552,7 +29938,7 @@ var ts; // Example: // original: function foo({y: [a,b,c]}) {} // emit : declare function foo({y: [a, b, c]}: { y: [any, any, any] }) void; - writeTextOfNode(currentSourceFile, bindingElement.propertyName); + writeTextOfNode(currentText, bindingElement.propertyName); write(": "); } if (bindingElement.name) { @@ -29575,7 +29961,7 @@ var ts; if (bindingElement.dotDotDotToken) { write("..."); } - writeTextOfNode(currentSourceFile, bindingElement.name); + writeTextOfNode(currentText, bindingElement.name); } } } @@ -29667,6 +30053,18 @@ var ts; return ts.isExternalModule(sourceFile) || ts.isDeclarationFile(sourceFile); } ts.isExternalModuleOrDeclarationFile = isExternalModuleOrDeclarationFile; + function getResolvedExternalModuleName(host, file) { + return file.moduleName || ts.getExternalModuleNameFromPath(host, file.fileName); + } + ts.getResolvedExternalModuleName = getResolvedExternalModuleName; + function getExternalModuleNameFromDeclaration(host, resolver, declaration) { + var file = resolver.getExternalModuleFileFromDeclaration(declaration); + if (!file || ts.isDeclarationFile(file)) { + return undefined; + } + return getResolvedExternalModuleName(host, file); + } + ts.getExternalModuleNameFromDeclaration = getExternalModuleNameFromDeclaration; var Jump; (function (Jump) { Jump[Jump["Break"] = 2] = "Break"; @@ -29954,15 +30352,19 @@ var ts; var newLine = host.getNewLine(); var jsxDesugaring = host.getCompilerOptions().jsx !== 1 /* Preserve */; var shouldEmitJsx = function (s) { return (s.languageVariant === 1 /* JSX */ && !jsxDesugaring); }; + var outFile = compilerOptions.outFile || compilerOptions.out; + var emitJavaScript = createFileEmitter(); if (targetSourceFile === undefined) { - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (ts.shouldEmitToOwnFile(sourceFile, compilerOptions)) { - var jsFilePath = ts.getOwnEmitOutputFilePath(sourceFile, host, shouldEmitJsx(sourceFile) ? ".jsx" : ".js"); - emitFile(jsFilePath, sourceFile); - } - }); - if (compilerOptions.outFile || compilerOptions.out) { - emitFile(compilerOptions.outFile || compilerOptions.out); + if (outFile) { + emitFile(outFile); + } + else { + ts.forEach(host.getSourceFiles(), function (sourceFile) { + if (ts.shouldEmitToOwnFile(sourceFile, compilerOptions)) { + var jsFilePath = ts.getOwnEmitOutputFilePath(sourceFile, host, shouldEmitJsx(sourceFile) ? ".jsx" : ".js"); + emitFile(jsFilePath, sourceFile); + } + }); } } else { @@ -29971,8 +30373,8 @@ var ts; var jsFilePath = ts.getOwnEmitOutputFilePath(targetSourceFile, host, shouldEmitJsx(targetSourceFile) ? ".jsx" : ".js"); emitFile(jsFilePath, targetSourceFile); } - else if (!ts.isDeclarationFile(targetSourceFile) && (compilerOptions.outFile || compilerOptions.out)) { - emitFile(compilerOptions.outFile || compilerOptions.out); + else if (!ts.isDeclarationFile(targetSourceFile) && outFile) { + emitFile(outFile); } } // Sort and make the unique list of diagnostics @@ -30024,10 +30426,16 @@ var ts; } } } - function emitJavaScript(jsFilePath, root) { + function createFileEmitter() { var writer = ts.createTextWriter(newLine); var write = writer.write, writeTextOfNode = writer.writeTextOfNode, writeLine = writer.writeLine, increaseIndent = writer.increaseIndent, decreaseIndent = writer.decreaseIndent; var currentSourceFile; + var currentText; + var currentLineMap; + var currentFileIdentifiers; + var renamedDependencies; + var isEs6Module; + var isCurrentFileExternalModule; // name of an exporter function if file is a System external module // System.register([...], function () {...}) // exporting in System modules looks like: @@ -30035,15 +30443,15 @@ var ts; // => // var x;... exporter("x", x = 1) var exportFunctionForFile; - var generatedNameSet = {}; - var nodeToGeneratedName = []; + var generatedNameSet; + var nodeToGeneratedName; var computedPropertyNamesToGeneratedNames; var convertedLoopState; - var extendsEmitted = false; - var decorateEmitted = false; - var paramEmitted = false; - var awaiterEmitted = false; - var tempFlags = 0; + var extendsEmitted; + var decorateEmitted; + var paramEmitted; + var awaiterEmitted; + var tempFlags; var tempVariables; var tempParameters; var externalImports; @@ -30075,6 +30483,8 @@ var ts; var scopeEmitEnd = function () { }; /** Sourcemap data that will get encoded */ var sourceMapData; + /** The root file passed to the emit function (if present) */ + var root; /** If removeComments is true, no leading-comments needed to be emitted **/ var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfPositionWorker; var moduleEmitDelegates = (_a = {}, @@ -30085,31 +30495,77 @@ var ts; _a[1 /* CommonJS */] = emitCommonJSModule, _a ); - if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) { - initializeEmitterWithSourceMaps(); - } - if (root) { - // Do not call emit directly. It does not set the currentSourceFile. - emitSourceFile(root); - } - else { - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (!isExternalModuleOrDeclarationFile(sourceFile)) { - emitSourceFile(sourceFile); + var bundleEmitDelegates = (_b = {}, + _b[5 /* ES6 */] = function () { }, + _b[2 /* AMD */] = emitAMDModule, + _b[4 /* System */] = emitSystemModule, + _b[3 /* UMD */] = function () { }, + _b[1 /* CommonJS */] = function () { }, + _b + ); + return doEmit; + function doEmit(jsFilePath, rootFile) { + // reset the state + writer.reset(); + currentSourceFile = undefined; + currentText = undefined; + currentLineMap = undefined; + exportFunctionForFile = undefined; + generatedNameSet = {}; + nodeToGeneratedName = []; + computedPropertyNamesToGeneratedNames = undefined; + convertedLoopState = undefined; + extendsEmitted = false; + decorateEmitted = false; + paramEmitted = false; + awaiterEmitted = false; + tempFlags = 0; + tempVariables = undefined; + tempParameters = undefined; + externalImports = undefined; + exportSpecifiers = undefined; + exportEquals = undefined; + hasExportStars = undefined; + detachedCommentsInfo = undefined; + sourceMapData = undefined; + isEs6Module = false; + renamedDependencies = undefined; + isCurrentFileExternalModule = false; + root = rootFile; + if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) { + initializeEmitterWithSourceMaps(jsFilePath, root); + } + if (root) { + // Do not call emit directly. It does not set the currentSourceFile. + emitSourceFile(root); + } + else { + if (modulekind) { + ts.forEach(host.getSourceFiles(), emitEmitHelpers); } - }); + ts.forEach(host.getSourceFiles(), function (sourceFile) { + if ((!isExternalModuleOrDeclarationFile(sourceFile)) || (modulekind && ts.isExternalModule(sourceFile))) { + emitSourceFile(sourceFile); + } + }); + } + writeLine(); + writeEmittedFiles(writer.getText(), jsFilePath, /*writeByteOrderMark*/ compilerOptions.emitBOM); } - writeLine(); - writeEmittedFiles(writer.getText(), /*writeByteOrderMark*/ compilerOptions.emitBOM); - return; function emitSourceFile(sourceFile) { currentSourceFile = sourceFile; + currentText = sourceFile.text; + currentLineMap = ts.getLineStarts(sourceFile); exportFunctionForFile = undefined; + isEs6Module = sourceFile.symbol && sourceFile.symbol.exports && !!sourceFile.symbol.exports["___esModule"]; + renamedDependencies = sourceFile.renamedDependencies; + currentFileIdentifiers = sourceFile.identifiers; + isCurrentFileExternalModule = ts.isExternalModule(sourceFile); emit(sourceFile); } function isUniqueName(name) { return !resolver.hasGlobalName(name) && - !ts.hasProperty(currentSourceFile.identifiers, name) && + !ts.hasProperty(currentFileIdentifiers, name) && !ts.hasProperty(generatedNameSet, name); } // Return the next available name in the pattern _a ... _z, _0, _1, ... @@ -30192,7 +30648,7 @@ var ts; var id = ts.getNodeId(node); return nodeToGeneratedName[id] || (nodeToGeneratedName[id] = ts.unescapeIdentifier(generateNameForNode(node))); } - function initializeEmitterWithSourceMaps() { + function initializeEmitterWithSourceMaps(jsFilePath, root) { var sourceMapDir; // The directory in which sourcemap will be // Current source map file and its index in the sources list var sourceMapSourceIndex = -1; @@ -30280,7 +30736,7 @@ var ts; } } function recordSourceMapSpan(pos) { - var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos); + var sourceLinePos = ts.computeLineAndCharacterOfPosition(currentLineMap, pos); // Convert the location to be one-based. sourceLinePos.line++; sourceLinePos.character++; @@ -30314,13 +30770,13 @@ var ts; } function recordEmitNodeStartSpan(node) { // Get the token pos after skipping to the token (ignoring the leading trivia) - recordSourceMapSpan(ts.skipTrivia(currentSourceFile.text, node.pos)); + recordSourceMapSpan(ts.skipTrivia(currentText, node.pos)); } function recordEmitNodeEndSpan(node) { recordSourceMapSpan(node.end); } function writeTextWithSpanRecord(tokenKind, startPos, emitFn) { - var tokenStartPos = ts.skipTrivia(currentSourceFile.text, startPos); + var tokenStartPos = ts.skipTrivia(currentText, startPos); recordSourceMapSpan(tokenStartPos); var tokenEndPos = emitTokenText(tokenKind, tokenStartPos, emitFn); recordSourceMapSpan(tokenEndPos); @@ -30402,9 +30858,9 @@ var ts; sourceMapNameIndices.pop(); } ; - function writeCommentRangeWithMap(curentSourceFile, writer, comment, newLine) { + function writeCommentRangeWithMap(currentText, currentLineMap, writer, comment, newLine) { recordSourceMapSpan(comment.pos); - ts.writeCommentRange(currentSourceFile, writer, comment, newLine); + ts.writeCommentRange(currentText, currentLineMap, writer, comment, newLine); recordSourceMapSpan(comment.end); } function serializeSourceMapContents(version, file, sourceRoot, sources, names, mappings, sourcesContent) { @@ -30434,7 +30890,7 @@ var ts; return output; } } - function writeJavaScriptAndSourceMapFile(emitOutput, writeByteOrderMark) { + function writeJavaScriptAndSourceMapFile(emitOutput, jsFilePath, writeByteOrderMark) { encodeLastRecordedSourceMapSpan(); var sourceMapText = serializeSourceMapContents(3, sourceMapData.sourceMapFile, sourceMapData.sourceMapSourceRoot, sourceMapData.sourceMapSources, sourceMapData.sourceMapNames, sourceMapData.sourceMapMappings, sourceMapData.sourceMapSourcesContent); sourceMapDataList.push(sourceMapData); @@ -30450,7 +30906,7 @@ var ts; sourceMapUrl = "//# sourceMappingURL=" + sourceMapData.jsSourceMappingURL; } // Write sourcemap url to the js file and write the js file - writeJavaScriptFile(emitOutput + sourceMapUrl, writeByteOrderMark); + writeJavaScriptFile(emitOutput + sourceMapUrl, jsFilePath, writeByteOrderMark); } // Initialize source map data var sourceMapJsFile = ts.getBaseFileName(ts.normalizeSlashes(jsFilePath)); @@ -30522,7 +30978,7 @@ var ts; scopeEmitEnd = recordScopeNameEnd; writeComment = writeCommentRangeWithMap; } - function writeJavaScriptFile(emitOutput, writeByteOrderMark) { + function writeJavaScriptFile(emitOutput, jsFilePath, writeByteOrderMark) { ts.writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark); } // Create a temporary variable with a unique unused name. @@ -30702,7 +31158,7 @@ var ts; // If we don't need to downlevel and we can reach the original source text using // the node's parent reference, then simply get the text as it was originally written. if (node.parent) { - return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + return ts.getTextOfNodeFromSourceText(currentText, node); } // If we can't reach the original source text, use the canonical form if it's a number, // or an escaped quoted form of the original text if it's string-like. @@ -30729,7 +31185,7 @@ var ts; // Find original source text, since we need to emit the raw strings of the tagged template. // The raw strings contain the (escaped) strings of what the user wrote. // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". - var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + var text = ts.getTextOfNodeFromSourceText(currentText, node); // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), // thus we need to remove those characters. // First template piece starts with "`", others with "}" @@ -31146,7 +31602,7 @@ var ts; write(node.text); } else { - writeTextOfNode(currentSourceFile, node); + writeTextOfNode(currentText, node); } write("\""); } @@ -31246,7 +31702,7 @@ var ts; // Identifier references named import write(getGeneratedNameForNode(declaration.parent.parent.parent)); var name_23 = declaration.propertyName || declaration.name; - var identifier = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, name_23); + var identifier = ts.getTextOfNodeFromSourceText(currentText, name_23); if (languageVersion === 0 /* ES3 */ && identifier === "default") { write("[\"default\"]"); } @@ -31270,7 +31726,7 @@ var ts; write(node.text); } else { - writeTextOfNode(currentSourceFile, node); + writeTextOfNode(currentText, node); } } function isNameOfNestedRedeclaration(node) { @@ -31308,7 +31764,7 @@ var ts; write(node.text); } else { - writeTextOfNode(currentSourceFile, node); + writeTextOfNode(currentText, node); } } function emitThis(node) { @@ -31712,7 +32168,7 @@ var ts; function emitShorthandPropertyAssignment(node) { // The name property of a short-hand property assignment is considered an expression position, so here // we manually emit the identifier to avoid rewriting. - writeTextOfNode(currentSourceFile, node.name); + writeTextOfNode(currentText, node.name); // If emitting pre-ES6 code, or if the name requires rewriting when resolved as an expression identifier, // we emit a normal property assignment. For example: // module m { @@ -31722,7 +32178,7 @@ var ts; // let obj = { y }; // } // Here we need to emit obj = { y : m.y } regardless of the output target. - if (languageVersion < 2 /* ES6 */ || isNamespaceExportReference(node.name)) { + if (modulekind !== 5 /* ES6 */ || isNamespaceExportReference(node.name)) { // Emit identifier as an identifier write(": "); emit(node.name); @@ -31779,11 +32235,11 @@ var ts; var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); // 1 .toString is a valid property access, emit a space after the literal // Also emit a space if expression is a integer const enum value - it will appear in generated code as numeric literal - var shouldEmitSpace; + var shouldEmitSpace = false; if (!indentedBeforeDot) { if (node.expression.kind === 8 /* NumericLiteral */) { // check if numeric literal was originally written with a dot - var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node.expression); + var text = ts.getTextOfNodeFromSourceText(currentText, node.expression); shouldEmitSpace = text.indexOf(ts.tokenToString(21 /* DotToken */)) < 0; } else { @@ -32962,16 +33418,16 @@ var ts; emitToken(16 /* CloseBraceToken */, node.clauses.end); } function nodeStartPositionsAreOnSameLine(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node1.pos)) === - ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); + return ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node1.pos)) === + ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function nodeEndPositionsAreOnSameLine(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, node1.end) === - ts.getLineOfLocalPosition(currentSourceFile, node2.end); + return ts.getLineOfLocalPositionFromLineMap(currentLineMap, node1.end) === + ts.getLineOfLocalPositionFromLineMap(currentLineMap, node2.end); } function nodeEndIsOnSameLineAsNodeStart(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, node1.end) === - ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); + return ts.getLineOfLocalPositionFromLineMap(currentLineMap, node1.end) === + ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function emitCaseOrDefaultClause(node) { if (node.kind === 241 /* CaseClause */) { @@ -33077,7 +33533,7 @@ var ts; ts.Debug.assert(!!(node.flags & 512 /* Default */) || node.kind === 227 /* ExportAssignment */); // only allow export default at a source file level if (modulekind === 1 /* CommonJS */ || modulekind === 2 /* AMD */ || modulekind === 3 /* UMD */) { - if (!currentSourceFile.symbol.exports["___esModule"]) { + if (!isEs6Module) { if (languageVersion === 1 /* ES5 */) { // default value of configurable, enumerable, writable are `false`. write("Object.defineProperty(exports, \"__esModule\", { value: true });"); @@ -33272,14 +33728,20 @@ var ts; return node; } function createPropertyAccessForDestructuringProperty(object, propName) { - // We create a synthetic copy of the identifier in order to avoid the rewriting that might - // otherwise occur when the identifier is emitted. - var syntheticName = ts.createSynthesizedNode(propName.kind); - syntheticName.text = propName.text; - if (syntheticName.kind !== 69 /* Identifier */) { - return createElementAccessExpression(object, syntheticName); + var index; + var nameIsComputed = propName.kind === 136 /* ComputedPropertyName */; + if (nameIsComputed) { + index = ensureIdentifier(propName.expression, /* reuseIdentifierExpression */ false); + } + else { + // We create a synthetic copy of the identifier in order to avoid the rewriting that might + // otherwise occur when the identifier is emitted. + index = ts.createSynthesizedNode(propName.kind); + index.text = propName.text; } - return createPropertyAccessExpression(object, syntheticName); + return !nameIsComputed && index.kind === 69 /* Identifier */ + ? createPropertyAccessExpression(object, index) + : createElementAccessExpression(object, index); } function createSliceCall(value, sliceIndex) { var call = ts.createSynthesizedNode(168 /* CallExpression */); @@ -33742,7 +34204,6 @@ var ts; var promiseConstructor = ts.getEntityNameFromTypeNode(node.type); var isArrowFunction = node.kind === 174 /* ArrowFunction */; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 4096 /* CaptureArguments */) !== 0; - var args; // An async function is emit as an outer function that calls an inner // generator function. To preserve lexical bindings, we pass the current // `this` and `arguments` objects to `__awaiter`. The generator function @@ -35197,8 +35658,8 @@ var ts; * Here we check if alternative name was provided for a given moduleName and return it if possible. */ function tryRenameExternalModule(moduleName) { - if (currentSourceFile.renamedDependencies && ts.hasProperty(currentSourceFile.renamedDependencies, moduleName.text)) { - return "\"" + currentSourceFile.renamedDependencies[moduleName.text] + "\""; + if (renamedDependencies && ts.hasProperty(renamedDependencies, moduleName.text)) { + return "\"" + renamedDependencies[moduleName.text] + "\""; } return undefined; } @@ -35351,7 +35812,7 @@ var ts; // - current file is not external module // - import declaration is top level and target is value imported by entity name if (resolver.isReferencedAliasDeclaration(node) || - (!ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { + (!isCurrentFileExternalModule && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { emitLeadingComments(node); emitStart(node); // variable declaration for import-equals declaration can be hoisted in system modules @@ -35579,7 +36040,7 @@ var ts; function getLocalNameForExternalImport(node) { var namespaceDeclaration = getNamespaceDeclarationNode(node); if (namespaceDeclaration && !isDefaultImport(node)) { - return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, namespaceDeclaration.name); + return ts.getTextOfNodeFromSourceText(currentText, namespaceDeclaration.name); } if (node.kind === 222 /* ImportDeclaration */ && node.importClause) { return getGeneratedNameForNode(node); @@ -35884,7 +36345,7 @@ var ts; ts.getEnclosingBlockScopeContainer(node).kind === 248 /* SourceFile */; } function isCurrentFileSystemExternalModule() { - return modulekind === 4 /* System */ && ts.isExternalModule(currentSourceFile); + return modulekind === 4 /* System */ && isCurrentFileExternalModule; } function emitSystemModuleBody(node, dependencyGroups, startIndex) { // shape of the body in system modules: @@ -36054,7 +36515,13 @@ var ts; writeLine(); write("}"); // execute } - function emitSystemModule(node) { + function writeModuleName(node, emitRelativePathAsModuleName) { + var moduleName = node.moduleName; + if (moduleName || (emitRelativePathAsModuleName && (moduleName = getResolvedExternalModuleName(host, node)))) { + write("\"" + moduleName + "\", "); + } + } + function emitSystemModule(node, emitRelativePathAsModuleName) { collectExternalModuleInfo(node); // System modules has the following shape // System.register(['dep-1', ... 'dep-n'], function(exports) {/* module body function */}) @@ -36069,9 +36536,7 @@ var ts; exportFunctionForFile = makeUniqueName("exports"); writeLine(); write("System.register("); - if (node.moduleName) { - write("\"" + node.moduleName + "\", "); - } + writeModuleName(node, emitRelativePathAsModuleName); write("["); var groupIndices = {}; var dependencyGroups = []; @@ -36090,6 +36555,12 @@ var ts; if (i !== 0) { write(", "); } + if (emitRelativePathAsModuleName) { + var name_29 = getExternalModuleNameFromDeclaration(host, resolver, externalImports[i]); + if (name_29) { + text = "\"" + name_29 + "\""; + } + } write(text); } write("], function(" + exportFunctionForFile + ") {"); @@ -36103,7 +36574,7 @@ var ts; writeLine(); write("});"); } - function getAMDDependencyNames(node, includeNonAmdDependencies) { + function getAMDDependencyNames(node, includeNonAmdDependencies, emitRelativePathAsModuleName) { // names of modules with corresponding parameter in the factory function var aliasedModuleNames = []; // names of modules with no corresponding parameters in factory function @@ -36126,6 +36597,12 @@ var ts; var importNode = externalImports_4[_c]; // Find the name of the external module var externalModuleName = getExternalModuleNameText(importNode); + if (emitRelativePathAsModuleName) { + var name_30 = getExternalModuleNameFromDeclaration(host, resolver, importNode); + if (name_30) { + externalModuleName = "\"" + name_30 + "\""; + } + } // Find the name of the module alias, if there is one var importAliasName = getLocalNameForExternalImport(importNode); if (includeNonAmdDependencies && importAliasName) { @@ -36138,7 +36615,7 @@ var ts; } return { aliasedModuleNames: aliasedModuleNames, unaliasedModuleNames: unaliasedModuleNames, importAliasNames: importAliasNames }; } - function emitAMDDependencies(node, includeNonAmdDependencies) { + function emitAMDDependencies(node, includeNonAmdDependencies, emitRelativePathAsModuleName) { // An AMD define function has the following shape: // define(id?, dependencies?, factory); // @@ -36150,7 +36627,7 @@ var ts; // To ensure this is true in cases of modules with no aliases, e.g.: // `import "module"` or `` // we need to add modules without alias names to the end of the dependencies list - var dependencyNames = getAMDDependencyNames(node, includeNonAmdDependencies); + var dependencyNames = getAMDDependencyNames(node, includeNonAmdDependencies, emitRelativePathAsModuleName); emitAMDDependencyList(dependencyNames); write(", "); emitAMDFactoryHeader(dependencyNames); @@ -36177,15 +36654,13 @@ var ts; } write(") {"); } - function emitAMDModule(node) { + function emitAMDModule(node, emitRelativePathAsModuleName) { emitEmitHelpers(node); collectExternalModuleInfo(node); writeLine(); write("define("); - if (node.moduleName) { - write("\"" + node.moduleName + "\", "); - } - emitAMDDependencies(node, /*includeNonAmdDependencies*/ true); + writeModuleName(node, emitRelativePathAsModuleName); + emitAMDDependencies(node, /*includeNonAmdDependencies*/ true, emitRelativePathAsModuleName); increaseIndent(); var startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true); emitExportStarHelper(); @@ -36404,8 +36879,13 @@ var ts; emitShebang(); emitDetachedCommentsAndUpdateCommentsInfo(node); if (ts.isExternalModule(node) || compilerOptions.isolatedModules) { - var emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[1 /* CommonJS */]; - emitModule(node); + if (root || (!ts.isExternalModule(node) && compilerOptions.isolatedModules)) { + var emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[1 /* CommonJS */]; + emitModule(node); + } + else { + bundleEmitDelegates[modulekind](node, /*emitRelativePathAsModuleName*/ true); + } } else { // emit prologue directives prior to __extends @@ -36666,7 +37146,7 @@ var ts; } function getLeadingCommentsWithoutDetachedComments() { // get the leading comments from detachedPos - var leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, ts.lastOrUndefined(detachedCommentsInfo).detachedCommentEndPos); + var leadingComments = ts.getLeadingCommentRanges(currentText, ts.lastOrUndefined(detachedCommentsInfo).detachedCommentEndPos); if (detachedCommentsInfo.length - 1) { detachedCommentsInfo.pop(); } @@ -36683,10 +37163,10 @@ var ts; function isTripleSlashComment(comment) { // Verify this is /// comment, but do the regexp match only when we first can find /// in the comment text // so that we don't end up computing comment string and doing match for all // comments - if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 47 /* slash */ && + if (currentText.charCodeAt(comment.pos + 1) === 47 /* slash */ && comment.pos + 2 < comment.end && - currentSourceFile.text.charCodeAt(comment.pos + 2) === 47 /* slash */) { - var textSubStr = currentSourceFile.text.substring(comment.pos, comment.end); + currentText.charCodeAt(comment.pos + 2) === 47 /* slash */) { + var textSubStr = currentText.substring(comment.pos, comment.end); return textSubStr.match(ts.fullTripleSlashReferencePathRegEx) || textSubStr.match(ts.fullTripleSlashAMDReferencePathRegEx) ? true : false; @@ -36703,7 +37183,7 @@ var ts; } else { // get the leading comments from the node - return ts.getLeadingCommentRangesOfNode(node, currentSourceFile); + return ts.getLeadingCommentRangesOfNodeFromText(node, currentText); } } } @@ -36712,7 +37192,7 @@ var ts; // Emit the trailing comments only if the parent's pos doesn't match because parent should take care of emitting these comments if (node.parent) { if (node.parent.kind === 248 /* SourceFile */ || node.end !== node.parent.end) { - return ts.getTrailingCommentRanges(currentSourceFile.text, node.end); + return ts.getTrailingCommentRanges(currentText, node.end); } } } @@ -36746,9 +37226,9 @@ var ts; leadingComments = ts.filter(getLeadingCommentsToEmit(node), isTripleSlashComment); } } - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); + ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, node, leadingComments); // Leading comments are emitted at /*leading comment1 */space/*leading comment*/space - ts.emitComments(currentSourceFile, writer, leadingComments, /*trailingSeparator:*/ true, newLine, writeComment); + ts.emitComments(currentText, currentLineMap, writer, leadingComments, /*trailingSeparator:*/ true, newLine, writeComment); } function emitTrailingComments(node) { if (compilerOptions.removeComments) { @@ -36757,7 +37237,7 @@ var ts; // Emit the trailing comments only if the parent's end doesn't match var trailingComments = getTrailingCommentsToEmit(node); // trailing comments are emitted at space/*trailing comment1 */space/*trailing comment*/ - ts.emitComments(currentSourceFile, writer, trailingComments, /*trailingSeparator*/ false, newLine, writeComment); + ts.emitComments(currentText, currentLineMap, writer, trailingComments, /*trailingSeparator*/ false, newLine, writeComment); } /** * Emit trailing comments at the position. The term trailing comment is used here to describe following comment: @@ -36768,9 +37248,9 @@ var ts; if (compilerOptions.removeComments) { return; } - var trailingComments = ts.getTrailingCommentRanges(currentSourceFile.text, pos); + var trailingComments = ts.getTrailingCommentRanges(currentText, pos); // trailing comments are emitted at space/*trailing comment1 */space/*trailing comment*/ - ts.emitComments(currentSourceFile, writer, trailingComments, /*trailingSeparator*/ true, newLine, writeComment); + ts.emitComments(currentText, currentLineMap, writer, trailingComments, /*trailingSeparator*/ true, newLine, writeComment); } function emitLeadingCommentsOfPositionWorker(pos) { if (compilerOptions.removeComments) { @@ -36783,14 +37263,14 @@ var ts; } else { // get the leading comments from the node - leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, pos); + leadingComments = ts.getLeadingCommentRanges(currentText, pos); } - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, { pos: pos, end: pos }, leadingComments); + ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, { pos: pos, end: pos }, leadingComments); // Leading comments are emitted at /*leading comment1 */space/*leading comment*/space - ts.emitComments(currentSourceFile, writer, leadingComments, /*trailingSeparator*/ true, newLine, writeComment); + ts.emitComments(currentText, currentLineMap, writer, leadingComments, /*trailingSeparator*/ true, newLine, writeComment); } function emitDetachedCommentsAndUpdateCommentsInfo(node) { - var currentDetachedCommentInfo = ts.emitDetachedComments(currentSourceFile, writer, writeComment, node, newLine, compilerOptions.removeComments); + var currentDetachedCommentInfo = ts.emitDetachedComments(currentText, currentLineMap, writer, writeComment, node, newLine, compilerOptions.removeComments); if (currentDetachedCommentInfo) { if (detachedCommentsInfo) { detachedCommentsInfo.push(currentDetachedCommentInfo); @@ -36801,12 +37281,12 @@ var ts; } } function emitShebang() { - var shebang = ts.getShebang(currentSourceFile.text); + var shebang = ts.getShebang(currentText); if (shebang) { write(shebang); } } - var _a; + var _a, _b; } function emitFile(jsFilePath, sourceFile) { emitJavaScript(jsFilePath, sourceFile); @@ -36866,11 +37346,11 @@ var ts; if (ts.getRootLength(moduleName) !== 0 || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { var failedLookupLocations = []; var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName)); - var resolvedFileName = loadNodeModuleFromFile(candidate, failedLookupLocations, host); + var resolvedFileName = loadNodeModuleFromFile(ts.supportedJsExtensions, candidate, failedLookupLocations, host); if (resolvedFileName) { return { resolvedModule: { resolvedFileName: resolvedFileName }, failedLookupLocations: failedLookupLocations }; } - resolvedFileName = loadNodeModuleFromDirectory(candidate, failedLookupLocations, host); + resolvedFileName = loadNodeModuleFromDirectory(ts.supportedJsExtensions, candidate, failedLookupLocations, host); return resolvedFileName ? { resolvedModule: { resolvedFileName: resolvedFileName }, failedLookupLocations: failedLookupLocations } : { resolvedModule: undefined, failedLookupLocations: failedLookupLocations }; @@ -36880,8 +37360,8 @@ var ts; } } ts.nodeModuleNameResolver = nodeModuleNameResolver; - function loadNodeModuleFromFile(candidate, failedLookupLocation, host) { - return ts.forEach(ts.moduleFileExtensions, tryLoad); + function loadNodeModuleFromFile(extensions, candidate, failedLookupLocation, host) { + return ts.forEach(extensions, tryLoad); function tryLoad(ext) { var fileName = ts.fileExtensionIs(candidate, ext) ? candidate : candidate + ext; if (host.fileExists(fileName)) { @@ -36893,7 +37373,7 @@ var ts; } } } - function loadNodeModuleFromDirectory(candidate, failedLookupLocation, host) { + function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocation, host) { var packageJsonPath = ts.combinePaths(candidate, "package.json"); if (host.fileExists(packageJsonPath)) { var jsonContent; @@ -36906,7 +37386,7 @@ var ts; jsonContent = { typings: undefined }; } if (jsonContent.typings) { - var result = loadNodeModuleFromFile(ts.normalizePath(ts.combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host); + var result = loadNodeModuleFromFile(extensions, ts.normalizePath(ts.combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host); if (result) { return result; } @@ -36916,7 +37396,7 @@ var ts; // record package json as one of failed lookup locations - in the future if this file will appear it will invalidate resolution results failedLookupLocation.push(packageJsonPath); } - return loadNodeModuleFromFile(ts.combinePaths(candidate, "index"), failedLookupLocation, host); + return loadNodeModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocation, host); } function loadModuleFromNodeModules(moduleName, directory, host) { var failedLookupLocations = []; @@ -36926,11 +37406,11 @@ var ts; if (baseName !== "node_modules") { var nodeModulesFolder = ts.combinePaths(directory, "node_modules"); var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName)); - var result = loadNodeModuleFromFile(candidate, failedLookupLocations, host); + var result = loadNodeModuleFromFile(ts.supportedExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations: failedLookupLocations }; } - result = loadNodeModuleFromDirectory(candidate, failedLookupLocations, host); + result = loadNodeModuleFromDirectory(ts.supportedExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations: failedLookupLocations }; } @@ -36956,9 +37436,10 @@ var ts; var searchName; var failedLookupLocations = []; var referencedSourceFile; + var extensions = compilerOptions.allowNonTsExtensions ? ts.supportedJsExtensions : ts.supportedExtensions; while (true) { searchName = ts.normalizePath(ts.combinePaths(searchPath, moduleName)); - referencedSourceFile = ts.forEach(ts.supportedExtensions, function (extension) { + referencedSourceFile = ts.forEach(extensions, function (extension) { if (extension === ".tsx" && !compilerOptions.jsx) { // resolve .tsx files only if jsx support is enabled // 'logical not' handles both undefined and None cases @@ -36989,10 +37470,8 @@ var ts; /* @internal */ ts.defaultInitCompilerOptions = { module: 1 /* CommonJS */, - target: 0 /* ES3 */, + target: 1 /* ES5 */, noImplicitAny: false, - outDir: "built", - rootDir: ".", sourceMap: false }; function createCompilerHost(options, setParentNodes) { @@ -37397,43 +37876,55 @@ var ts; if (file.imports) { return; } + var isJavaScriptFile = ts.isSourceFileJavaScript(file); var imports; for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var node = _a[_i]; - collect(node, /* allowRelativeModuleNames */ true); + collect(node, /* allowRelativeModuleNames */ true, /* collectOnlyRequireCalls */ false); } file.imports = imports || emptyArray; - function collect(node, allowRelativeModuleNames) { - switch (node.kind) { - case 222 /* ImportDeclaration */: - case 221 /* ImportEqualsDeclaration */: - case 228 /* ExportDeclaration */: - var moduleNameExpr = ts.getExternalModuleName(node); - if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) { - break; - } - if (!moduleNameExpr.text) { + return; + function collect(node, allowRelativeModuleNames, collectOnlyRequireCalls) { + if (!collectOnlyRequireCalls) { + switch (node.kind) { + case 222 /* ImportDeclaration */: + case 221 /* ImportEqualsDeclaration */: + case 228 /* ExportDeclaration */: + var moduleNameExpr = ts.getExternalModuleName(node); + if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) { + break; + } + if (!moduleNameExpr.text) { + break; + } + if (allowRelativeModuleNames || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { + (imports || (imports = [])).push(moduleNameExpr); + } break; - } - if (allowRelativeModuleNames || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { - (imports || (imports = [])).push(moduleNameExpr); - } - break; - case 218 /* ModuleDeclaration */: - if (node.name.kind === 9 /* StringLiteral */ && (node.flags & 4 /* Ambient */ || ts.isDeclarationFile(file))) { - // TypeScript 1.0 spec (April 2014): 12.1.6 - // An AmbientExternalModuleDeclaration declares an external module. - // This type of declaration is permitted only in the global module. - // The StringLiteral must specify a top - level external module name. - // Relative external module names are not permitted - ts.forEachChild(node.body, function (node) { + case 218 /* ModuleDeclaration */: + if (node.name.kind === 9 /* StringLiteral */ && (node.flags & 4 /* Ambient */ || ts.isDeclarationFile(file))) { // TypeScript 1.0 spec (April 2014): 12.1.6 - // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules - // only through top - level external module names. Relative external module names are not permitted. - collect(node, /* allowRelativeModuleNames */ false); - }); - } - break; + // An AmbientExternalModuleDeclaration declares an external module. + // This type of declaration is permitted only in the global module. + // The StringLiteral must specify a top - level external module name. + // Relative external module names are not permitted + ts.forEachChild(node.body, function (node) { + // TypeScript 1.0 spec (April 2014): 12.1.6 + // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules + // only through top - level external module names. Relative external module names are not permitted. + collect(node, /* allowRelativeModuleNames */ false, collectOnlyRequireCalls); + }); + } + break; + } + } + if (isJavaScriptFile) { + if (ts.isRequireCall(node)) { + (imports || (imports = [])).push(node.arguments[0]); + } + else { + ts.forEachChild(node, function (node) { return collect(node, allowRelativeModuleNames, /* collectOnlyRequireCalls */ true); }); + } } } } @@ -37526,7 +38017,6 @@ var ts; // always process imported modules to record module name resolutions processImportedModules(file, basePath); if (isDefaultLib) { - file.isDefaultLib = true; files.unshift(file); } else { @@ -37604,6 +38094,9 @@ var ts; commonPathComponents.length = sourcePathComponents.length; } }); + if (!commonPathComponents) { + return currentDirectory; + } return ts.getNormalizedPathFromPathComponents(commonPathComponents); } function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) { @@ -37689,12 +38182,15 @@ var ts; if (options.module === 5 /* ES6 */ && languageVersion < 2 /* ES6 */) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_compile_modules_into_es2015_when_targeting_ES5_or_lower)); } + // Cannot specify module gen that isn't amd or system with --out + if (outFile && options.module && !(options.module === 2 /* AMD */ || options.module === 4 /* System */)) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, options.out ? "out" : "outFile")); + } // there has to be common source directory if user specified --outdir || --sourceRoot // if user specified --mapRoot, there needs to be common source directory if there would be multiple files being emitted if (options.outDir || options.sourceRoot || - (options.mapRoot && - (!outFile || firstExternalModuleSourceFile !== undefined))) { + options.mapRoot) { if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) { // If a rootDir is specified and is valid use it as the commonSourceDirectory commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, currentDirectory); @@ -38212,20 +38708,20 @@ var ts; var exclude = json["exclude"] instanceof Array ? ts.map(json["exclude"], ts.normalizeSlashes) : undefined; var sysFiles = host.readDirectory(basePath, ".ts", exclude).concat(host.readDirectory(basePath, ".tsx", exclude)); for (var i = 0; i < sysFiles.length; i++) { - var name_29 = sysFiles[i]; - if (ts.fileExtensionIs(name_29, ".d.ts")) { - var baseName = name_29.substr(0, name_29.length - ".d.ts".length); + var name_31 = sysFiles[i]; + if (ts.fileExtensionIs(name_31, ".d.ts")) { + var baseName = name_31.substr(0, name_31.length - ".d.ts".length); if (!ts.contains(sysFiles, baseName + ".tsx") && !ts.contains(sysFiles, baseName + ".ts")) { - fileNames.push(name_29); + fileNames.push(name_31); } } - else if (ts.fileExtensionIs(name_29, ".ts")) { - if (!ts.contains(sysFiles, name_29 + "x")) { - fileNames.push(name_29); + else if (ts.fileExtensionIs(name_31, ".ts")) { + if (!ts.contains(sysFiles, name_31 + "x")) { + fileNames.push(name_31); } } else { - fileNames.push(name_29); + fileNames.push(name_31); } } } @@ -38453,12 +38949,12 @@ var ts; ts.forEach(program.getSourceFiles(), function (sourceFile) { cancellationToken.throwIfCancellationRequested(); var nameToDeclarations = sourceFile.getNamedDeclarations(); - for (var name_30 in nameToDeclarations) { - var declarations = ts.getProperty(nameToDeclarations, name_30); + for (var name_32 in nameToDeclarations) { + var declarations = ts.getProperty(nameToDeclarations, name_32); if (declarations) { // First do a quick check to see if the name of the declaration matches the // last portion of the (possibly) dotted name they're searching for. - var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_30); + var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_32); if (!matches) { continue; } @@ -38471,14 +38967,14 @@ var ts; if (!containers) { return undefined; } - matches = patternMatcher.getMatches(containers, name_30); + matches = patternMatcher.getMatches(containers, name_32); if (!matches) { continue; } } var fileName = sourceFile.fileName; var matchKind = bestMatchKind(matches); - rawItems.push({ name: name_30, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); + rawItems.push({ name: name_32, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); } } } @@ -38859,9 +39355,9 @@ var ts; case 211 /* VariableDeclaration */: case 163 /* BindingElement */: var variableDeclarationNode; - var name_31; + var name_33; if (node.kind === 163 /* BindingElement */) { - name_31 = node.name; + name_33 = node.name; variableDeclarationNode = node; // binding elements are added only for variable declarations // bubble up to the containing variable declaration @@ -38873,16 +39369,16 @@ var ts; else { ts.Debug.assert(!ts.isBindingPattern(node.name)); variableDeclarationNode = node; - name_31 = node.name; + name_33 = node.name; } if (ts.isConst(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_31), ts.ScriptElementKind.constElement); + return createItem(node, getTextOfNode(name_33), ts.ScriptElementKind.constElement); } else if (ts.isLet(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_31), ts.ScriptElementKind.letElement); + return createItem(node, getTextOfNode(name_33), ts.ScriptElementKind.letElement); } else { - return createItem(node, getTextOfNode(name_31), ts.ScriptElementKind.variableElement); + return createItem(node, getTextOfNode(name_33), ts.ScriptElementKind.variableElement); } case 144 /* Constructor */: return createItem(node, "constructor", ts.ScriptElementKind.constructorImplementationElement); @@ -39802,7 +40298,7 @@ var ts; if (!candidates.length) { // We didn't have any sig help items produced by the TS compiler. If this is a JS // file, then see if we can figure out anything better. - if (ts.isJavaScript(sourceFile.fileName)) { + if (ts.isSourceFileJavaScript(sourceFile)) { return createJavaScriptSignatureHelpItems(argumentInfo); } return undefined; @@ -41662,9 +42158,9 @@ var ts; } Rules.prototype.getRuleName = function (rule) { var o = this; - for (var name_32 in o) { - if (o[name_32] === rule) { - return name_32; + for (var name_34 in o) { + if (o[name_34] === rule) { + return name_34; } } throw new Error("Unknown rule"); @@ -42096,7 +42592,7 @@ var ts; function TokenRangeAccess(from, to, except) { this.tokens = []; for (var token = from; token <= to; token++) { - if (except.indexOf(token) < 0) { + if (ts.indexOf(except, token) < 0) { this.tokens.push(token); } } @@ -43709,13 +44205,18 @@ var ts; ]; var jsDocCompletionEntries; function createNode(kind, pos, end, flags, parent) { - var node = new (ts.getNodeConstructor(kind))(pos, end); + var node = new NodeObject(kind, pos, end); node.flags = flags; node.parent = parent; return node; } var NodeObject = (function () { - function NodeObject() { + function NodeObject(kind, pos, end) { + this.kind = kind; + this.pos = pos; + this.end = end; + this.flags = 0 /* None */; + this.parent = undefined; } NodeObject.prototype.getSourceFile = function () { return ts.getSourceFileOfNode(this); @@ -44198,8 +44699,8 @@ var ts; })(); var SourceFileObject = (function (_super) { __extends(SourceFileObject, _super); - function SourceFileObject() { - _super.apply(this, arguments); + function SourceFileObject(kind, pos, end) { + _super.call(this, kind, pos, end); } SourceFileObject.prototype.update = function (newText, textChangeRange) { return ts.updateSourceFile(this, newText, textChangeRange); @@ -44521,6 +45022,9 @@ var ts; ClassificationTypeNames.typeAliasName = "type alias name"; ClassificationTypeNames.parameterName = "parameter name"; ClassificationTypeNames.docCommentTagName = "doc comment tag name"; + ClassificationTypeNames.jsxOpenTagName = "jsx open tag name"; + ClassificationTypeNames.jsxCloseTagName = "jsx close tag name"; + ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name"; return ClassificationTypeNames; })(); ts.ClassificationTypeNames = ClassificationTypeNames; @@ -44543,6 +45047,9 @@ var ts; ClassificationType[ClassificationType["typeAliasName"] = 16] = "typeAliasName"; ClassificationType[ClassificationType["parameterName"] = 17] = "parameterName"; ClassificationType[ClassificationType["docCommentTagName"] = 18] = "docCommentTagName"; + ClassificationType[ClassificationType["jsxOpenTagName"] = 19] = "jsxOpenTagName"; + ClassificationType[ClassificationType["jsxCloseTagName"] = 20] = "jsxCloseTagName"; + ClassificationType[ClassificationType["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName"; })(ts.ClassificationType || (ts.ClassificationType = {})); var ClassificationType = ts.ClassificationType; function displayPartsToString(displayParts) { @@ -44922,8 +45429,9 @@ var ts; }; } ts.createDocumentRegistry = createDocumentRegistry; - function preProcessFile(sourceText, readImportFiles) { + function preProcessFile(sourceText, readImportFiles, detectJavaScriptImports) { if (readImportFiles === void 0) { readImportFiles = true; } + if (detectJavaScriptImports === void 0) { detectJavaScriptImports = false; } var referencedFiles = []; var importedFiles = []; var ambientExternalModules; @@ -44957,116 +45465,66 @@ var ts; end: pos + importPath.length }); } - function processImport() { - scanner.setText(sourceText); - var token = scanner.scan(); - // Look for: - // import "mod"; - // import d from "mod" - // import {a as A } from "mod"; - // import * as NS from "mod" - // import d, {a, b as B} from "mod" - // import i = require("mod"); - // - // export * from "mod" - // export {a as b} from "mod" - // export import i = require("mod") - while (token !== 1 /* EndOfFileToken */) { - if (token === 122 /* DeclareKeyword */) { - // declare module "mod" - token = scanner.scan(); - if (token === 125 /* ModuleKeyword */) { - token = scanner.scan(); - if (token === 9 /* StringLiteral */) { - recordAmbientExternalModule(); - continue; - } - } - } - else if (token === 89 /* ImportKeyword */) { + /** + * Returns true if at least one token was consumed from the stream + */ + function tryConsumeDeclare() { + var token = scanner.getToken(); + if (token === 122 /* DeclareKeyword */) { + // declare module "mod" + token = scanner.scan(); + if (token === 125 /* ModuleKeyword */) { token = scanner.scan(); if (token === 9 /* StringLiteral */) { - // import "mod"; - recordModuleName(); - continue; + recordAmbientExternalModule(); } - else { - if (token === 69 /* Identifier */ || ts.isKeyword(token)) { + } + return true; + } + return false; + } + /** + * Returns true if at least one token was consumed from the stream + */ + function tryConsumeImport() { + var token = scanner.getToken(); + if (token === 89 /* ImportKeyword */) { + token = scanner.scan(); + if (token === 9 /* StringLiteral */) { + // import "mod"; + recordModuleName(); + return true; + } + else { + if (token === 69 /* Identifier */ || ts.isKeyword(token)) { + token = scanner.scan(); + if (token === 133 /* FromKeyword */) { token = scanner.scan(); - if (token === 133 /* FromKeyword */) { - token = scanner.scan(); - if (token === 9 /* StringLiteral */) { - // import d from "mod"; - recordModuleName(); - continue; - } - } - else if (token === 56 /* EqualsToken */) { - token = scanner.scan(); - if (token === 127 /* RequireKeyword */) { - token = scanner.scan(); - if (token === 17 /* OpenParenToken */) { - token = scanner.scan(); - if (token === 9 /* StringLiteral */) { - // import i = require("mod"); - recordModuleName(); - continue; - } - } - } - } - else if (token === 24 /* CommaToken */) { - // consume comma and keep going - token = scanner.scan(); - } - else { - // unknown syntax - continue; + if (token === 9 /* StringLiteral */) { + // import d from "mod"; + recordModuleName(); + return true; } } - if (token === 15 /* OpenBraceToken */) { - token = scanner.scan(); - // consume "{ a as B, c, d as D}" clauses - while (token !== 16 /* CloseBraceToken */) { - token = scanner.scan(); - } - if (token === 16 /* CloseBraceToken */) { - token = scanner.scan(); - if (token === 133 /* FromKeyword */) { - token = scanner.scan(); - if (token === 9 /* StringLiteral */) { - // import {a as A} from "mod"; - // import d, {a, b as B} from "mod" - recordModuleName(); - } - } + else if (token === 56 /* EqualsToken */) { + if (tryConsumeRequireCall(/* skipCurrentToken */ true)) { + return true; } } - else if (token === 37 /* AsteriskToken */) { + else if (token === 24 /* CommaToken */) { + // consume comma and keep going token = scanner.scan(); - if (token === 116 /* AsKeyword */) { - token = scanner.scan(); - if (token === 69 /* Identifier */ || ts.isKeyword(token)) { - token = scanner.scan(); - if (token === 133 /* FromKeyword */) { - token = scanner.scan(); - if (token === 9 /* StringLiteral */) { - // import * as NS from "mod" - // import d, * as NS from "mod" - recordModuleName(); - } - } - } - } + } + else { + // unknown syntax + return true; } } - } - else if (token === 82 /* ExportKeyword */) { - token = scanner.scan(); if (token === 15 /* OpenBraceToken */) { token = scanner.scan(); // consume "{ a as B, c, d as D}" clauses - while (token !== 16 /* CloseBraceToken */) { + // make sure that it stops on EOF + while (token !== 16 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { token = scanner.scan(); } if (token === 16 /* CloseBraceToken */) { @@ -45074,49 +45532,171 @@ var ts; if (token === 133 /* FromKeyword */) { token = scanner.scan(); if (token === 9 /* StringLiteral */) { - // export {a as A} from "mod"; - // export {a, b as B} from "mod" + // import {a as A} from "mod"; + // import d, {a, b as B} from "mod" recordModuleName(); } } } } else if (token === 37 /* AsteriskToken */) { + token = scanner.scan(); + if (token === 116 /* AsKeyword */) { + token = scanner.scan(); + if (token === 69 /* Identifier */ || ts.isKeyword(token)) { + token = scanner.scan(); + if (token === 133 /* FromKeyword */) { + token = scanner.scan(); + if (token === 9 /* StringLiteral */) { + // import * as NS from "mod" + // import d, * as NS from "mod" + recordModuleName(); + } + } + } + } + } + } + return true; + } + return false; + } + function tryConsumeExport() { + var token = scanner.getToken(); + if (token === 82 /* ExportKeyword */) { + token = scanner.scan(); + if (token === 15 /* OpenBraceToken */) { + token = scanner.scan(); + // consume "{ a as B, c, d as D}" clauses + // make sure it stops on EOF + while (token !== 16 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { + token = scanner.scan(); + } + if (token === 16 /* CloseBraceToken */) { token = scanner.scan(); if (token === 133 /* FromKeyword */) { token = scanner.scan(); if (token === 9 /* StringLiteral */) { - // export * from "mod" + // export {a as A} from "mod"; + // export {a, b as B} from "mod" recordModuleName(); } } } - else if (token === 89 /* ImportKeyword */) { + } + else if (token === 37 /* AsteriskToken */) { + token = scanner.scan(); + if (token === 133 /* FromKeyword */) { token = scanner.scan(); - if (token === 69 /* Identifier */ || ts.isKeyword(token)) { - token = scanner.scan(); - if (token === 56 /* EqualsToken */) { - token = scanner.scan(); - if (token === 127 /* RequireKeyword */) { - token = scanner.scan(); - if (token === 17 /* OpenParenToken */) { - token = scanner.scan(); - if (token === 9 /* StringLiteral */) { - // export import i = require("mod"); - recordModuleName(); - } - } - } + if (token === 9 /* StringLiteral */) { + // export * from "mod" + recordModuleName(); + } + } + } + else if (token === 89 /* ImportKeyword */) { + token = scanner.scan(); + if (token === 69 /* Identifier */ || ts.isKeyword(token)) { + token = scanner.scan(); + if (token === 56 /* EqualsToken */) { + if (tryConsumeRequireCall(/* skipCurrentToken */ true)) { + return true; } } } } + return true; + } + return false; + } + function tryConsumeRequireCall(skipCurrentToken) { + var token = skipCurrentToken ? scanner.scan() : scanner.getToken(); + if (token === 127 /* RequireKeyword */) { + token = scanner.scan(); + if (token === 17 /* OpenParenToken */) { + token = scanner.scan(); + if (token === 9 /* StringLiteral */) { + // require("mod"); + recordModuleName(); + } + } + return true; + } + return false; + } + function tryConsumeDefine() { + var token = scanner.getToken(); + if (token === 69 /* Identifier */ && scanner.getTokenValue() === "define") { + token = scanner.scan(); + if (token !== 17 /* OpenParenToken */) { + return true; + } token = scanner.scan(); + if (token === 9 /* StringLiteral */) { + // looks like define ("modname", ... - skip string literal and comma + token = scanner.scan(); + if (token === 24 /* CommaToken */) { + token = scanner.scan(); + } + else { + // unexpected token + return true; + } + } + // should be start of dependency list + if (token !== 19 /* OpenBracketToken */) { + return true; + } + // skip open bracket + token = scanner.scan(); + var i = 0; + // scan until ']' or EOF + while (token !== 20 /* CloseBracketToken */ && token !== 1 /* EndOfFileToken */) { + // record string literals as module names + if (token === 9 /* StringLiteral */) { + recordModuleName(); + i++; + } + token = scanner.scan(); + } + return true; + } + return false; + } + function processImports() { + scanner.setText(sourceText); + scanner.scan(); + // Look for: + // import "mod"; + // import d from "mod" + // import {a as A } from "mod"; + // import * as NS from "mod" + // import d, {a, b as B} from "mod" + // import i = require("mod"); + // + // export * from "mod" + // export {a as b} from "mod" + // export import i = require("mod") + // (for JavaScript files) require("mod") + while (true) { + if (scanner.getToken() === 1 /* EndOfFileToken */) { + break; + } + // check if at least one of alternative have moved scanner forward + if (tryConsumeDeclare() || + tryConsumeImport() || + tryConsumeExport() || + (detectJavaScriptImports && (tryConsumeRequireCall(/* skipCurrentToken */ false) || tryConsumeDefine()))) { + continue; + } + else { + scanner.scan(); + } } scanner.setText(undefined); } if (readImportFiles) { - processImport(); + processImports(); } processTripleSlashDirectives(); return { referencedFiles: referencedFiles, importedFiles: importedFiles, isLibFile: isNoDefaultLib, ambientExternalModules: ambientExternalModules }; @@ -45547,7 +46127,7 @@ var ts; // For JavaScript files, we don't want to report the normal typescript semantic errors. // Instead, we just report errors for using TypeScript-only constructs from within a // JavaScript file. - if (ts.isJavaScript(fileName)) { + if (ts.isSourceFileJavaScript(targetSourceFile)) { return getJavaScriptSemanticDiagnostics(targetSourceFile); } // Only perform the action per file regardless of '-out' flag as LanguageServiceHost is expected to call this function per file. @@ -45759,7 +46339,7 @@ var ts; var typeChecker = program.getTypeChecker(); var syntacticStart = new Date().getTime(); var sourceFile = getValidSourceFile(fileName); - var isJavaScriptFile = ts.isJavaScript(fileName); + var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile); var isJsDocTagName = false; var start = new Date().getTime(); var currentToken = ts.getTokenAtPosition(sourceFile, position); @@ -46393,8 +46973,8 @@ var ts; if (element.getStart() <= position && position <= element.getEnd()) { continue; } - var name_33 = element.propertyName || element.name; - exisingImportsOrExports[name_33.text] = true; + var name_35 = element.propertyName || element.name; + exisingImportsOrExports[name_35.text] = true; } if (ts.isEmpty(exisingImportsOrExports)) { return exportsOfModule; @@ -46426,7 +47006,10 @@ var ts; } var existingName = void 0; if (m.kind === 163 /* BindingElement */ && m.propertyName) { - existingName = m.propertyName.text; + // include only identifiers in completion list + if (m.propertyName.kind === 69 /* Identifier */) { + existingName = m.propertyName.text; + } } else { // TODO(jfreeman): Account for computed property name @@ -46466,46 +47049,43 @@ var ts; return undefined; } var symbols = completionData.symbols, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, isRightOfDot = completionData.isRightOfDot, isJsDocTagName = completionData.isJsDocTagName; - var entries; if (isJsDocTagName) { // If the current position is a jsDoc tag name, only tag names should be provided for completion return { isMemberCompletion: false, isNewIdentifierLocation: false, entries: getAllJsDocCompletionEntries() }; } - if (isRightOfDot && ts.isJavaScript(fileName)) { - entries = getCompletionEntriesFromSymbols(symbols); - ts.addRange(entries, getJavaScriptCompletionEntries()); + var sourceFile = getValidSourceFile(fileName); + var entries = []; + if (isRightOfDot && ts.isSourceFileJavaScript(sourceFile)) { + var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries); + ts.addRange(entries, getJavaScriptCompletionEntries(sourceFile, uniqueNames)); } else { if (!symbols || symbols.length === 0) { return undefined; } - entries = getCompletionEntriesFromSymbols(symbols); + getCompletionEntriesFromSymbols(symbols, entries); } // Add keywords if this is not a member completion list if (!isMemberCompletion && !isJsDocTagName) { ts.addRange(entries, keywordCompletions); } return { isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries }; - function getJavaScriptCompletionEntries() { + function getJavaScriptCompletionEntries(sourceFile, uniqueNames) { var entries = []; - var allNames = {}; var target = program.getCompilerOptions().target; - for (var _i = 0, _a = program.getSourceFiles(); _i < _a.length; _i++) { - var sourceFile = _a[_i]; - var nameTable = getNameTable(sourceFile); - for (var name_34 in nameTable) { - if (!allNames[name_34]) { - allNames[name_34] = name_34; - var displayName = getCompletionEntryDisplayName(name_34, target, /*performCharacterChecks:*/ true); - if (displayName) { - var entry = { - name: displayName, - kind: ScriptElementKind.warning, - kindModifiers: "", - sortText: "1" - }; - entries.push(entry); - } + var nameTable = getNameTable(sourceFile); + for (var name_36 in nameTable) { + if (!uniqueNames[name_36]) { + uniqueNames[name_36] = name_36; + var displayName = getCompletionEntryDisplayName(name_36, target, /*performCharacterChecks:*/ true); + if (displayName) { + var entry = { + name: displayName, + kind: ScriptElementKind.warning, + kindModifiers: "", + sortText: "1" + }; + entries.push(entry); } } } @@ -46543,25 +47123,24 @@ var ts; sortText: "0" }; } - function getCompletionEntriesFromSymbols(symbols) { + function getCompletionEntriesFromSymbols(symbols, entries) { var start = new Date().getTime(); - var entries = []; + var uniqueNames = {}; if (symbols) { - var nameToSymbol = {}; for (var _i = 0, symbols_3 = symbols; _i < symbols_3.length; _i++) { var symbol = symbols_3[_i]; var entry = createCompletionEntry(symbol, location); if (entry) { var id = ts.escapeIdentifier(entry.name); - if (!ts.lookUp(nameToSymbol, id)) { + if (!ts.lookUp(uniqueNames, id)) { entries.push(entry); - nameToSymbol[id] = symbol; + uniqueNames[id] = id; } } } } log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - start)); - return entries; + return uniqueNames; } } function getCompletionEntryDetails(fileName, position, entryName) { @@ -46762,16 +47341,16 @@ var ts; case ScriptElementKind.parameterElement: case ScriptElementKind.localVariableElement: // If it is call or construct signature of lambda's write type name - displayParts.push(ts.punctuationPart(54 /* ColonToken */)); + displayParts.push(ts.punctuationPart(ts.SyntaxKind.ColonToken)); displayParts.push(ts.spacePart()); if (useConstructSignatures) { - displayParts.push(ts.keywordPart(92 /* NewKeyword */)); + displayParts.push(ts.keywordPart(ts.SyntaxKind.NewKeyword)); displayParts.push(ts.spacePart()); } - if (!(type.flags & 65536 /* Anonymous */)) { - ts.addRange(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, /*meaning*/ undefined, 1 /* WriteTypeParametersOrArguments */)); + if (!(type.flags & ts.TypeFlags.Anonymous)) { + ts.addRange(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, /*meaning*/ undefined, ts.SymbolFormatFlags.WriteTypeParametersOrArguments)); } - addSignatureDisplayParts(signature, allSignatures, 8 /* WriteArrowStyleSignature */); + addSignatureDisplayParts(signature, allSignatures, ts.TypeFormatFlags.WriteArrowStyleSignature); break; default: // Just signature @@ -48396,19 +48975,19 @@ var ts; if (isNameOfPropertyAssignment(node)) { var objectLiteral = node.parent.parent; var contextualType = typeChecker.getContextualType(objectLiteral); - var name_35 = node.text; + var name_37 = node.text; if (contextualType) { if (contextualType.flags & 16384 /* Union */) { // This is a union type, first see if the property we are looking for is a union property (i.e. exists in all types) // if not, search the constituent types for the property - var unionProperty = contextualType.getProperty(name_35); + var unionProperty = contextualType.getProperty(name_37); if (unionProperty) { return [unionProperty]; } else { var result_4 = []; ts.forEach(contextualType.types, function (t) { - var symbol = t.getProperty(name_35); + var symbol = t.getProperty(name_37); if (symbol) { result_4.push(symbol); } @@ -48417,7 +48996,7 @@ var ts; } } else { - var symbol_1 = contextualType.getProperty(name_35); + var symbol_1 = contextualType.getProperty(name_37); if (symbol_1) { return [symbol_1]; } @@ -48828,6 +49407,9 @@ var ts; case 16 /* typeAliasName */: return ClassificationTypeNames.typeAliasName; case 17 /* parameterName */: return ClassificationTypeNames.parameterName; case 18 /* docCommentTagName */: return ClassificationTypeNames.docCommentTagName; + case 19 /* jsxOpenTagName */: return ClassificationTypeNames.jsxOpenTagName; + case 20 /* jsxCloseTagName */: return ClassificationTypeNames.jsxCloseTagName; + case 21 /* jsxSelfClosingTagName */: return ClassificationTypeNames.jsxSelfClosingTagName; } } function convertClassifications(classifications) { @@ -49097,6 +49679,21 @@ var ts; return 17 /* parameterName */; } return; + case 235 /* JsxOpeningElement */: + if (token.parent.tagName === token) { + return 19 /* jsxOpenTagName */; + } + return; + case 237 /* JsxClosingElement */: + if (token.parent.tagName === token) { + return 20 /* jsxCloseTagName */; + } + return; + case 234 /* JsxSelfClosingElement */: + if (token.parent.tagName === token) { + return 21 /* jsxSelfClosingTagName */; + } + return; } } return 2 /* identifier */; @@ -50021,18 +50618,8 @@ var ts; ts.getDefaultLibFilePath = getDefaultLibFilePath; function initializeServices() { ts.objectAllocator = { - getNodeConstructor: function (kind) { - function Node(pos, end) { - this.pos = pos; - this.end = end; - this.flags = 0 /* None */; - this.parent = undefined; - } - var proto = kind === 248 /* SourceFile */ ? new SourceFileObject() : new NodeObject(); - proto.kind = kind; - Node.prototype = proto; - return Node; - }, + getNodeConstructor: function () { return NodeObject; }, + getSourceFileConstructor: function () { return SourceFileObject; }, getSymbolConstructor: function () { return SymbolObject; }, getTypeConstructor: function () { return TypeObject; }, getSignatureConstructor: function () { return SignatureObject; } @@ -51102,7 +51689,8 @@ var ts; }; CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) { return this.forwardJSONCall("getPreProcessedFileInfo('" + fileName + "')", function () { - var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength())); + // for now treat files as JavaScript + var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()), /* readImportFiles */ true, /* detectJavaScriptImports */ true); var convertResult = { referencedFiles: [], importedFiles: [], @@ -51166,7 +51754,7 @@ var ts; TypeScriptServicesFactory.prototype.createLanguageServiceShim = function (host) { try { if (this.documentRegistry === undefined) { - this.documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames()); + this.documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); } var hostAdapter = new LanguageServiceShimHostAdapter(host); var languageService = ts.createLanguageService(hostAdapter, this.documentRegistry); @@ -51199,7 +51787,7 @@ var ts; TypeScriptServicesFactory.prototype.close = function () { // Forget all the registered shims this._shims = []; - this.documentRegistry = ts.createDocumentRegistry(); + this.documentRegistry = undefined; }; TypeScriptServicesFactory.prototype.registerShim = function (shim) { this._shims.push(shim); diff --git a/package.json b/package.json index 7b8abfaae43f7..261cdfa64b7d1 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,8 @@ "browserify": "latest", "istanbul": "latest", "mocha-fivemat-progress-reporter": "latest", - "tslint": "latest", + "tslint": "next", + "typescript": "next", "tsd": "latest" }, "scripts": { diff --git a/scripts/tslint/booleanTriviaRule.ts b/scripts/tslint/booleanTriviaRule.ts index be32a870ff4b2..93c312ab8708a 100644 --- a/scripts/tslint/booleanTriviaRule.ts +++ b/scripts/tslint/booleanTriviaRule.ts @@ -1,6 +1,5 @@ -/// -/// - +import * as Lint from "tslint/lib/lint"; +import * as ts from "typescript"; export class Rule extends Lint.Rules.AbstractRule { public static FAILURE_STRING_FACTORY = (name: string, currently: string) => `Tag boolean argument as '${name}' (currently '${currently}')`; @@ -19,7 +18,7 @@ class BooleanTriviaWalker extends Lint.RuleWalker { visitCallExpression(node: ts.CallExpression) { super.visitCallExpression(node); - if (node.arguments) { + if (node.arguments) { const targetCallSignature = this.checker.getResolvedSignature(node); if (!!targetCallSignature) { const targetParameters = targetCallSignature.getParameters(); @@ -37,7 +36,7 @@ class BooleanTriviaWalker extends Lint.RuleWalker { let triviaContent: string; const ranges = ts.getLeadingCommentRanges(arg.getFullText(), 0); if (ranges && ranges.length === 1 && ranges[0].kind === ts.SyntaxKind.MultiLineCommentTrivia) { - triviaContent = arg.getFullText().slice(ranges[0].pos + 2, ranges[0].end - 2); //+/-2 to remove /**/ + triviaContent = arg.getFullText().slice(ranges[0].pos + 2, ranges[0].end - 2); // +/-2 to remove /**/ } if (triviaContent !== param.getName()) { this.addFailure(this.createFailure(arg.getStart(source), arg.getWidth(source), Rule.FAILURE_STRING_FACTORY(param.getName(), triviaContent))); @@ -45,6 +44,6 @@ class BooleanTriviaWalker extends Lint.RuleWalker { } } } - } + } } } diff --git a/scripts/tslint/nextLineRule.ts b/scripts/tslint/nextLineRule.ts index 6d803fc7f8810..d25652f7bce6e 100644 --- a/scripts/tslint/nextLineRule.ts +++ b/scripts/tslint/nextLineRule.ts @@ -1,5 +1,5 @@ -/// -/// +import * as Lint from "tslint/lib/lint"; +import * as ts from "typescript"; const OPTION_CATCH = "check-catch"; const OPTION_ELSE = "check-else"; diff --git a/scripts/tslint/noNullRule.ts b/scripts/tslint/noNullRule.ts index 2a2c5bc371778..8e9deca996b5e 100644 --- a/scripts/tslint/noNullRule.ts +++ b/scripts/tslint/noNullRule.ts @@ -1,5 +1,5 @@ -/// -/// +import * as Lint from "tslint/lib/lint"; +import * as ts from "typescript"; export class Rule extends Lint.Rules.AbstractRule { diff --git a/scripts/tslint/preferConstRule.ts b/scripts/tslint/preferConstRule.ts index 29160a9c634f5..aaa1b0e53d5b8 100644 --- a/scripts/tslint/preferConstRule.ts +++ b/scripts/tslint/preferConstRule.ts @@ -1,5 +1,5 @@ -/// -/// +import * as Lint from "tslint/lib/lint"; +import * as ts from "typescript"; export class Rule extends Lint.Rules.AbstractRule { @@ -85,12 +85,12 @@ class PreferConstWalker extends Lint.RuleWalker { visitBinaryExpression(node: ts.BinaryExpression) { if (isAssignmentOperator(node.operatorToken.kind)) { - this.visitLHSExpressions(node.left); + this.visitLeftHandSideExpression(node.left); } super.visitBinaryExpression(node); } - private visitLHSExpressions(node: ts.Expression) { + private visitLeftHandSideExpression(node: ts.Expression) { while (node.kind === ts.SyntaxKind.ParenthesizedExpression) { node = (node as ts.ParenthesizedExpression).expression; } @@ -101,23 +101,25 @@ class PreferConstWalker extends Lint.RuleWalker { this.visitBindingLiteralExpression(node as (ts.ArrayLiteralExpression | ts.ObjectLiteralExpression)); } } - + private visitBindingLiteralExpression(node: ts.ArrayLiteralExpression | ts.ObjectLiteralExpression) { if (node.kind === ts.SyntaxKind.ObjectLiteralExpression) { const pattern = node as ts.ObjectLiteralExpression; for (const element of pattern.properties) { - if (element.name.kind === ts.SyntaxKind.Identifier) { - this.markAssignment(element.name as ts.Identifier) + const kind = element.kind; + + if (kind === ts.SyntaxKind.ShorthandPropertyAssignment) { + this.markAssignment((element as ts.ShorthandPropertyAssignment).name); } - else if (isBindingPattern(element.name)) { - this.visitBindingPatternIdentifiers(element.name as ts.BindingPattern); + else if (kind === ts.SyntaxKind.PropertyAssignment) { + this.visitLeftHandSideExpression((element as ts.PropertyAssignment).initializer); } } } else if (node.kind === ts.SyntaxKind.ArrayLiteralExpression) { const pattern = node as ts.ArrayLiteralExpression; for (const element of pattern.elements) { - this.visitLHSExpressions(element); + this.visitLeftHandSideExpression(element); } } } @@ -145,7 +147,7 @@ class PreferConstWalker extends Lint.RuleWalker { private visitAnyUnaryExpression(node: ts.PrefixUnaryExpression | ts.PostfixUnaryExpression) { if (node.operator === ts.SyntaxKind.PlusPlusToken || node.operator === ts.SyntaxKind.MinusMinusToken) { - this.visitLHSExpressions(node.operand); + this.visitLeftHandSideExpression(node.operand); } } @@ -211,12 +213,12 @@ class PreferConstWalker extends Lint.RuleWalker { } } - private collectNameIdentifiers(value: ts.VariableDeclaration, node: ts.Identifier | ts.BindingPattern, table: ts.Map) { + private collectNameIdentifiers(declaration: ts.VariableDeclaration, node: ts.Identifier | ts.BindingPattern, table: ts.Map) { if (node.kind === ts.SyntaxKind.Identifier) { - table[(node as ts.Identifier).text] = {declaration: value, usages: 0}; + table[(node as ts.Identifier).text] = { declaration, usages: 0 }; } else { - this.collectBindingPatternIdentifiers(value, node as ts.BindingPattern, table); + this.collectBindingPatternIdentifiers(declaration, node as ts.BindingPattern, table); } } diff --git a/scripts/tslint/typeOperatorSpacingRule.ts b/scripts/tslint/typeOperatorSpacingRule.ts index 239254933400a..7ceef2372bf87 100644 --- a/scripts/tslint/typeOperatorSpacingRule.ts +++ b/scripts/tslint/typeOperatorSpacingRule.ts @@ -1,5 +1,5 @@ -/// -/// +import * as Lint from "tslint/lib/lint"; +import * as ts from "typescript"; export class Rule extends Lint.Rules.AbstractRule { @@ -13,10 +13,10 @@ export class Rule extends Lint.Rules.AbstractRule { class TypeOperatorSpacingWalker extends Lint.RuleWalker { public visitNode(node: ts.Node) { if (node.kind === ts.SyntaxKind.UnionType || node.kind === ts.SyntaxKind.IntersectionType) { - let types = (node).types; + const types = (node).types; let expectedStart = types[0].end + 2; // space, | or & for (let i = 1; i < types.length; i++) { - let currentType = types[i]; + const currentType = types[i]; if (expectedStart !== currentType.pos || currentType.getLeadingTriviaWidth() !== 1) { const failure = this.createFailure(currentType.pos, currentType.getWidth(), Rule.FAILURE_STRING); this.addFailure(failure); diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 49b259ea695b9..86fcc809d5850 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -139,6 +139,8 @@ namespace ts { file.classifiableNames = classifiableNames; } + file = undefined; + options = undefined; parent = undefined; container = undefined; blockScopeContainer = undefined; @@ -175,9 +177,14 @@ namespace ts { symbol.members = {}; } - if (symbolFlags & SymbolFlags.Value && !symbol.valueDeclaration) { - symbol.valueDeclaration = node; - } + if (symbolFlags & SymbolFlags.Value) { + const valueDeclaration = symbol.valueDeclaration; + if (!valueDeclaration || + (valueDeclaration.kind !== node.kind && valueDeclaration.kind === SyntaxKind.ModuleDeclaration)) { + // other kinds of value declarations take precedence over modules + symbol.valueDeclaration = node; + } + } } // Should not be called on a declaration with a computed property name, @@ -189,6 +196,11 @@ namespace ts { } if (node.name.kind === SyntaxKind.ComputedPropertyName) { const nameExpression = (node.name).expression; + // treat computed property names where expression is string/numeric literal as just string/numeric literal + if (isStringOrNumericLiteral(nameExpression.kind)) { + return (nameExpression).text; + } + Debug.assert(isWellKnownSymbolSyntactically(nameExpression)); return getPropertyNameForKnownSymbolName((nameExpression).name.text); } @@ -210,8 +222,21 @@ namespace ts { case SyntaxKind.ExportAssignment: return (node).isExportEquals ? "export=" : "default"; case SyntaxKind.BinaryExpression: - // Binary expression case is for JS module 'module.exports = expr' - return "export="; + switch (getSpecialPropertyAssignmentKind(node)) { + case SpecialPropertyAssignmentKind.ModuleExports: + // module.exports = ... + return "export="; + case SpecialPropertyAssignmentKind.ExportsProperty: + case SpecialPropertyAssignmentKind.ThisProperty: + // exports.x = ... or this.y = ... + return ((node as BinaryExpression).left as PropertyAccessExpression).name.text; + case SpecialPropertyAssignmentKind.PrototypeProperty: + // className.prototype.methodName = ... + return (((node as BinaryExpression).left as PropertyAccessExpression).expression as PropertyAccessExpression).name.text; + } + Debug.fail("Unknown binary declaration kind"); + break; + case SyntaxKind.FunctionDeclaration: case SyntaxKind.ClassDeclaration: return node.flags & NodeFlags.Default ? "default" : undefined; @@ -445,7 +470,7 @@ namespace ts { /** * Returns true if node and its subnodes were successfully traversed. - * Returning false means that node was not examined and caller needs to dive into the node himself. + * Returning false means that node was not examined and caller needs to dive into the node himself. */ function bindReachableStatement(node: Node): void { if (checkUnreachable(node)) { @@ -555,7 +580,7 @@ namespace ts { } function bindIfStatement(n: IfStatement): void { - // denotes reachability state when entering 'thenStatement' part of the if statement: + // denotes reachability state when entering 'thenStatement' part of the if statement: // i.e. if condition is false then thenStatement is unreachable const ifTrueState = n.expression.kind === SyntaxKind.FalseKeyword ? Reachability.Unreachable : currentReachabilityState; // denotes reachability state when entering 'elseStatement': @@ -1154,11 +1179,25 @@ namespace ts { return checkStrictModeIdentifier(node); case SyntaxKind.BinaryExpression: if (isInJavaScriptFile(node)) { - if (isExportsPropertyAssignment(node)) { - bindExportsPropertyAssignment(node); - } - else if (isModuleExportsAssignment(node)) { - bindModuleExportsAssignment(node); + const specialKind = getSpecialPropertyAssignmentKind(node); + switch (specialKind) { + case SpecialPropertyAssignmentKind.ExportsProperty: + bindExportsPropertyAssignment(node); + break; + case SpecialPropertyAssignmentKind.ModuleExports: + bindModuleExportsAssignment(node); + break; + case SpecialPropertyAssignmentKind.PrototypeProperty: + bindPrototypePropertyAssignment(node); + break; + case SpecialPropertyAssignmentKind.ThisProperty: + bindThisPropertyAssignment(node); + break; + case SpecialPropertyAssignmentKind.None: + // Nothing to do + break; + default: + Debug.fail("Unknown special property assignment kind"); } } return checkStrictModeBinaryExpression(node); @@ -1174,7 +1213,7 @@ namespace ts { return checkStrictModePrefixUnaryExpression(node); case SyntaxKind.WithStatement: return checkStrictModeWithStatement(node); - case SyntaxKind.ThisKeyword: + case SyntaxKind.ThisType: seenThisKeyword = true; return; @@ -1327,6 +1366,45 @@ namespace ts { bindExportAssignment(node); } + function bindThisPropertyAssignment(node: BinaryExpression) { + if (container.kind === SyntaxKind.FunctionExpression || container.kind === SyntaxKind.FunctionDeclaration) { + container.symbol.members = container.symbol.members || {}; + declareClassMember(node, SymbolFlags.Property, SymbolFlags.PropertyExcludes); + } + } + + function bindPrototypePropertyAssignment(node: BinaryExpression) { + // We saw a node of the form 'x.prototype.y = z'. + // This does two things: turns 'x' into a constructor function, and + // adds a member 'y' to the result of that constructor function + // Get 'x', the class + const classId = ((node.left).expression).expression; + + // Look up the function in the local scope, since prototype assignments should immediately + // follow the function declaration + const funcSymbol = container.locals[classId.text]; + if (!funcSymbol) { + return; + } + + // The function is now a constructor rather than a normal function + if (!funcSymbol.inferredConstructor) { + // Have the binder set up all the related class symbols for us + declareSymbol(container.locals, funcSymbol, funcSymbol.valueDeclaration, SymbolFlags.Class, SymbolFlags.None); + // funcSymbol.members = funcSymbol.members || {}; + funcSymbol.members["__constructor"] = funcSymbol; + funcSymbol.inferredConstructor = true; + } + + // Get the exports of the class so we can add the method to it + const funcExports = declareSymbol(funcSymbol.exports, funcSymbol, (node.left).expression, SymbolFlags.ObjectLiteral | SymbolFlags.Property, SymbolFlags.None); + + // Declare the method + declareSymbol(funcExports.members, funcExports, node.left, SymbolFlags.Method, SymbolFlags.None); + // and on the members of the function so it appears in 'prototype' + declareSymbol(funcSymbol.members, funcSymbol, node.left, SymbolFlags.Method, SymbolFlags.PropertyExcludes); + } + function bindCallExpression(node: CallExpression) { // We're only inspecting call expressions to detect CommonJS modules, so we can skip // this check if we've already seen the module indicator @@ -1523,7 +1601,7 @@ namespace ts { // unreachable code is reported if // - user has explicitly asked about it AND - // - statement is in not ambient context (statements in ambient context is already an error + // - statement is in not ambient context (statements in ambient context is already an error // so we should not report extras) AND // - node is not variable statement OR // - node is block scoped variable statement OR diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b73543e14de99..94c13fd1f3f77 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -46,6 +46,7 @@ namespace ts { const compilerOptions = host.getCompilerOptions(); const languageVersion = compilerOptions.target || ScriptTarget.ES3; const modulekind = compilerOptions.module ? compilerOptions.module : languageVersion === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.None; + const allowSyntheticDefaultImports = typeof compilerOptions.allowSyntheticDefaultImports !== "undefined" ? compilerOptions.allowSyntheticDefaultImports : modulekind === ModuleKind.System; const emitResolver = createResolver(); @@ -109,9 +110,9 @@ namespace ts { const undefinedType = createIntrinsicType(TypeFlags.Undefined | TypeFlags.ContainsUndefinedOrNull, "undefined"); const nullType = createIntrinsicType(TypeFlags.Null | TypeFlags.ContainsUndefinedOrNull, "null"); const unknownType = createIntrinsicType(TypeFlags.Any, "unknown"); - const circularType = createIntrinsicType(TypeFlags.Any, "__circular__"); const emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); + const emptyUnionType = emptyObjectType; const emptyGenericType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); emptyGenericType.instantiations = {}; @@ -122,8 +123,8 @@ namespace ts { const noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - const anySignature = createSignature(undefined, undefined, emptyArray, anyType, undefined, 0, false, false); - const unknownSignature = createSignature(undefined, undefined, emptyArray, unknownType, undefined, 0, false, false); + const anySignature = createSignature(undefined, undefined, emptyArray, undefined, anyType, undefined, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false); + const unknownSignature = createSignature(undefined, undefined, emptyArray, undefined, unknownType, undefined, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false); const globals: SymbolTable = {}; @@ -200,6 +201,10 @@ namespace ts { "symbol": { type: esSymbolType, flags: TypeFlags.ESSymbol + }, + "undefined": { + type: undefinedType, + flags: TypeFlags.ContainsUndefinedOrNull } }; @@ -295,7 +300,12 @@ namespace ts { target.constEnumOnlyModule = false; } target.flags |= source.flags; - if (!target.valueDeclaration && source.valueDeclaration) target.valueDeclaration = source.valueDeclaration; + if (source.valueDeclaration && + (!target.valueDeclaration || + (target.valueDeclaration.kind === SyntaxKind.ModuleDeclaration && source.valueDeclaration.kind !== SyntaxKind.ModuleDeclaration))) { + // other kinds of value declarations take precedence over modules + target.valueDeclaration = source.valueDeclaration; + } forEach(source.declarations, node => { target.declarations.push(node); }); @@ -467,15 +477,41 @@ namespace ts { // Locals of a source file are not in scope (because they get merged into the global symbol table) if (location.locals && !isGlobalSourceFile(location)) { if (result = getSymbol(location.locals, name, meaning)) { - // Type parameters of a function are in scope in the entire function declaration, including the parameter - // list and return type. However, local types are only in scope in the function body. - if (!(meaning & SymbolFlags.Type) || - !(result.flags & (SymbolFlags.Type & ~SymbolFlags.TypeParameter)) || - !isFunctionLike(location) || - lastLocation === (location).body) { + let useResult = true; + if (isFunctionLike(location) && lastLocation && lastLocation !== (location).body) { + // symbol lookup restrictions for function-like declarations + // - Type parameters of a function are in scope in the entire function declaration, including the parameter + // list and return type. However, local types are only in scope in the function body. + // - parameters are only in the scope of function body + if (meaning & result.flags & SymbolFlags.Type) { + useResult = result.flags & SymbolFlags.TypeParameter + // type parameters are visible in parameter list, return type and type parameter list + ? lastLocation === (location).type || + lastLocation.kind === SyntaxKind.Parameter || + lastLocation.kind === SyntaxKind.TypeParameter + // local types not visible outside the function body + : false; + } + if (meaning & SymbolFlags.Value && result.flags & SymbolFlags.FunctionScopedVariable) { + // parameters are visible only inside function body, parameter list and return type + // technically for parameter list case here we might mix parameters and variables declared in function, + // however it is detected separately when checking initializers of parameters + // to make sure that they reference no variables declared after them. + useResult = + lastLocation.kind === SyntaxKind.Parameter || + ( + lastLocation === (location).type && + result.valueDeclaration.kind === SyntaxKind.Parameter + ); + } + } + + if (useResult) { break loop; } - result = undefined; + else { + result = undefined; + } } } switch (location.kind) { @@ -486,9 +522,19 @@ namespace ts { if (location.kind === SyntaxKind.SourceFile || (location.kind === SyntaxKind.ModuleDeclaration && (location).name.kind === SyntaxKind.StringLiteral)) { - // It's an external module. Because of module/namespace merging, a module's exports are in scope, - // yet we never want to treat an export specifier as putting a member in scope. Therefore, - // if the name we find is purely an export specifier, it is not actually considered in scope. + // It's an external module. First see if the module has an export default and if the local + // name of that export default matches. + if (result = moduleExports["default"]) { + const localSymbol = getLocalSymbolForExportDefault(result); + if (localSymbol && (result.flags & meaning) && localSymbol.name === name) { + break loop; + } + result = undefined; + } + + // Because of module/namespace merging, a module's exports are in scope, + // yet we never want to treat an export specifier as putting a member in scope. + // Therefore, if the name we find is purely an export specifier, it is not actually considered in scope. // Two things to note about this: // 1. We have to check this without calling getSymbol. The problem with calling getSymbol // on an export specifier is that it might find the export specifier itself, and try to @@ -502,13 +548,6 @@ namespace ts { getDeclarationOfKind(moduleExports[name], SyntaxKind.ExportSpecifier)) { break; } - - result = moduleExports["default"]; - const localSymbol = getLocalSymbolForExportDefault(result); - if (result && localSymbol && (result.flags & meaning) && localSymbol.name === name) { - break loop; - } - result = undefined; } if (result = getSymbol(moduleExports, name, meaning & SymbolFlags.ModuleMember)) { @@ -730,9 +769,12 @@ namespace ts { const moduleSymbol = resolveExternalModuleName(node, (node.parent).moduleSpecifier); if (moduleSymbol) { const exportDefaultSymbol = resolveSymbol(moduleSymbol.exports["default"]); - if (!exportDefaultSymbol) { + if (!exportDefaultSymbol && !allowSyntheticDefaultImports) { error(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); } + else if (!exportDefaultSymbol && allowSyntheticDefaultImports) { + return resolveSymbol(moduleSymbol.exports["export="]) || resolveSymbol(moduleSymbol); + } return exportDefaultSymbol; } } @@ -990,16 +1032,12 @@ namespace ts { // Module names are escaped in our symbol table. However, string literal values aren't. // Escape the name in the "require(...)" clause to ensure we find the right symbol. - let moduleName = escapeIdentifier(moduleReferenceLiteral.text); + const moduleName = escapeIdentifier(moduleReferenceLiteral.text); if (moduleName === undefined) { return; } - if (moduleName.indexOf("!") >= 0) { - moduleName = moduleName.substr(0, moduleName.indexOf("!")); - } - const isRelative = isExternalModuleNameRelative(moduleName); if (!isRelative) { const symbol = getSymbol(globals, "\"" + moduleName + "\"", SymbolFlags.ValueModule); @@ -1658,7 +1696,7 @@ namespace ts { writeAnonymousType(type, flags); } else if (type.flags & TypeFlags.StringLiteral) { - writer.writeStringLiteral((type).text); + writer.writeStringLiteral(`"${escapeString((type).text)}"`); } else { // Should never get here @@ -2264,7 +2302,7 @@ namespace ts { return false; } resolutionTargets.push(target); - resolutionResults.push(true); + resolutionResults.push(/*items*/ true); resolutionPropertyNames.push(propertyName); return true; } @@ -2342,6 +2380,26 @@ namespace ts { return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node); } + function getTextOfPropertyName(name: PropertyName): string { + switch (name.kind) { + case SyntaxKind.Identifier: + return (name).text; + case SyntaxKind.StringLiteral: + case SyntaxKind.NumericLiteral: + return (name).text; + case SyntaxKind.ComputedPropertyName: + if (isStringOrNumericLiteral((name).expression.kind)) { + return ((name).expression).text; + } + } + + return undefined; + } + + function isComputedNonLiteralName(name: PropertyName): boolean { + return name.kind === SyntaxKind.ComputedPropertyName && !isStringOrNumericLiteral((name).expression.kind); + } + // Return the inferred type for a binding element function getTypeForBindingElement(declaration: BindingElement): Type { const pattern = declaration.parent; @@ -2364,10 +2422,17 @@ namespace ts { if (pattern.kind === SyntaxKind.ObjectBindingPattern) { // Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form) const name = declaration.propertyName || declaration.name; + if (isComputedNonLiteralName(name)) { + // computed properties with non-literal names are treated as 'any' + return anyType; + } + // Use type of the specified property, or otherwise, for a numeric name, the type of the numeric index signature, // or otherwise the type of the string index signature. - type = getTypeOfPropertyOfType(parentType, name.text) || - isNumericLiteralName(name.text) && getIndexTypeOfType(parentType, IndexKind.Number) || + const text = getTextOfPropertyName(name); + + type = getTypeOfPropertyOfType(parentType, text) || + isNumericLiteralName(text) && getIndexTypeOfType(parentType, IndexKind.Number) || getIndexTypeOfType(parentType, IndexKind.String); if (!type) { error(name, Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), declarationNameToString(name)); @@ -2478,10 +2543,18 @@ namespace ts { // Return the type implied by an object binding pattern function getTypeFromObjectBindingPattern(pattern: BindingPattern, includePatternInType: boolean): Type { const members: SymbolTable = {}; + let hasComputedProperties = false; forEach(pattern.elements, e => { - const flags = SymbolFlags.Property | SymbolFlags.Transient | (e.initializer ? SymbolFlags.Optional : 0); const name = e.propertyName || e.name; - const symbol = createSymbol(flags, name.text); + if (isComputedNonLiteralName(name)) { + // do not include computed properties in the implied type + hasComputedProperties = true; + return; + } + + const text = getTextOfPropertyName(name); + const flags = SymbolFlags.Property | SymbolFlags.Transient | (e.initializer ? SymbolFlags.Optional : 0); + const symbol = createSymbol(flags, text); symbol.type = getTypeFromBindingElement(e, includePatternInType); symbol.bindingElement = e; members[symbol.name] = symbol; @@ -2490,6 +2563,9 @@ namespace ts { if (includePatternInType) { result.pattern = pattern; } + if (hasComputedProperties) { + result.flags |= TypeFlags.ObjectLiteralPatternWithComputedProperties; + } return result; } @@ -2576,9 +2652,18 @@ namespace ts { if (declaration.kind === SyntaxKind.BinaryExpression) { return links.type = checkExpression((declaration).right); } - // Handle exports.p = expr if (declaration.kind === SyntaxKind.PropertyAccessExpression) { - return checkExpressionCached((declaration.parent).right); + // Declarations only exist for property access expressions for certain + // special assignment kinds + if (declaration.parent.kind === SyntaxKind.BinaryExpression) { + // Handle exports.p = expr or this.p = expr or className.prototype.method = expr + return links.type = checkExpressionCached((declaration.parent).right); + } + else { + // Declaration for className.prototype in inferred JS class + const type = createAnonymousType(symbol, symbol.members, emptyArray, emptyArray, undefined, undefined); + return links.type = type; + } } // Handle variable, parameter or property if (!pushTypeResolution(symbol, TypeSystemPropertyName.Type)) { @@ -2883,23 +2968,25 @@ namespace ts { function resolveBaseTypesOfClass(type: InterfaceType): void { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; - const baseContructorType = getBaseConstructorTypeOfClass(type); - if (!(baseContructorType.flags & TypeFlags.ObjectType)) { + const baseConstructorType = getBaseConstructorTypeOfClass(type); + if (!(baseConstructorType.flags & TypeFlags.ObjectType)) { return; } const baseTypeNode = getBaseTypeNodeOfClass(type); let baseType: Type; - if (baseContructorType.symbol && baseContructorType.symbol.flags & SymbolFlags.Class) { - // When base constructor type is a class we know that the constructors all have the same type parameters as the + const originalBaseType = baseConstructorType && baseConstructorType.symbol ? getDeclaredTypeOfSymbol(baseConstructorType.symbol) : undefined; + if (baseConstructorType.symbol && baseConstructorType.symbol.flags & SymbolFlags.Class && + areAllOuterTypeParametersApplied(originalBaseType)) { + // When base constructor type is a class with no captured type arguments we know that the constructors all have the same type parameters as the // class and all return the instance type of the class. There is no need for further checks and we can apply the // type arguments in the same manner as a type reference to get the same error reporting experience. - baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseContructorType.symbol); + baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol); } else { // The class derives from a "class-like" constructor function, check that we have at least one construct signature // with a matching number of type parameters and use the return type of the first instantiated signature. Elsewhere // we check that all instantiated signatures return the same type. - const constructors = getInstantiatedConstructorsForTypeArguments(baseContructorType, baseTypeNode.typeArguments); + const constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments); if (!constructors.length) { error(baseTypeNode.expression, Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments); return; @@ -2926,6 +3013,18 @@ namespace ts { } } + function areAllOuterTypeParametersApplied(type: Type): boolean { + // An unapplied type parameter has its symbol still the same as the matching argument symbol. + // Since parameters are applied outer-to-inner, only the last outer parameter needs to be checked. + const outerTypeParameters = (type).outerTypeParameters; + if (outerTypeParameters) { + const last = outerTypeParameters.length - 1; + const typeArguments = (type).typeArguments; + return outerTypeParameters[last].symbol !== typeArguments[last].symbol; + } + return true; + } + function resolveBaseTypesOfInterface(type: InterfaceType): void { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (const declaration of type.symbol.declarations) { @@ -3111,7 +3210,7 @@ namespace ts { case SyntaxKind.BooleanKeyword: case SyntaxKind.SymbolKeyword: case SyntaxKind.VoidKeyword: - case SyntaxKind.StringLiteral: + case SyntaxKind.StringLiteralType: return true; case SyntaxKind.ArrayType: return isIndependentType((node).elementType); @@ -3263,12 +3362,13 @@ namespace ts { resolveObjectTypeMembers(type, source, typeParameters, typeArguments); } - function createSignature(declaration: SignatureDeclaration, typeParameters: TypeParameter[], parameters: Symbol[], + function createSignature(declaration: SignatureDeclaration, typeParameters: TypeParameter[], parameters: Symbol[], kind: SignatureKind, resolvedReturnType: Type, typePredicate: TypePredicate, minArgumentCount: number, hasRestParameter: boolean, hasStringLiterals: boolean): Signature { const sig = new Signature(checker); sig.declaration = declaration; sig.typeParameters = typeParameters; sig.parameters = parameters; + sig.kind = kind; sig.resolvedReturnType = resolvedReturnType; sig.typePredicate = typePredicate; sig.minArgumentCount = minArgumentCount; @@ -3278,13 +3378,13 @@ namespace ts { } function cloneSignature(sig: Signature): Signature { - return createSignature(sig.declaration, sig.typeParameters, sig.parameters, sig.resolvedReturnType, sig.typePredicate, + return createSignature(sig.declaration, sig.typeParameters, sig.parameters, sig.kind, sig.resolvedReturnType, sig.typePredicate, sig.minArgumentCount, sig.hasRestParameter, sig.hasStringLiterals); } function getDefaultConstructSignatures(classType: InterfaceType): Signature[] { if (!hasClassBaseType(classType)) { - return [createSignature(undefined, classType.localTypeParameters, emptyArray, classType, undefined, 0, false, false)]; + return [createSignature(undefined, classType.localTypeParameters, emptyArray, SignatureKind.Construct, classType, undefined, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false)]; } const baseConstructorType = getBaseConstructorTypeOfClass(classType); const baseSignatures = getSignaturesOfType(baseConstructorType, SignatureKind.Construct); @@ -3744,7 +3844,7 @@ namespace ts { if (node.initializer) { const signatureDeclaration = node.parent; const signature = getSignatureFromDeclaration(signatureDeclaration); - const parameterIndex = signatureDeclaration.parameters.indexOf(node); + const parameterIndex = ts.indexOf(signatureDeclaration.parameters, node); Debug.assert(parameterIndex >= 0); return parameterIndex >= signature.minArgumentCount; } @@ -3765,8 +3865,14 @@ namespace ts { let minArgumentCount = -1; for (let i = 0, n = declaration.parameters.length; i < n; i++) { const param = declaration.parameters[i]; - parameters.push(param.symbol); - if (param.type && param.type.kind === SyntaxKind.StringLiteral) { + let paramSymbol = param.symbol; + // Include parameter symbol instead of property symbol in the signature + if (paramSymbol && !!(paramSymbol.flags & SymbolFlags.Property) && !isBindingPattern(param.name)) { + const resolvedSymbol = resolveName(param, paramSymbol.name, SymbolFlags.Value, undefined, undefined); + paramSymbol = resolvedSymbol; + } + parameters.push(paramSymbol); + if (param.type && param.type.kind === SyntaxKind.StringLiteralType) { hasStringLiterals = true; } @@ -3814,7 +3920,33 @@ namespace ts { } } - links.resolvedSignature = createSignature(declaration, typeParameters, parameters, returnType, typePredicate, + let kind: SignatureKind; + switch (declaration.kind) { + case SyntaxKind.Constructor: + case SyntaxKind.ConstructSignature: + case SyntaxKind.ConstructorType: + kind = SignatureKind.Construct; + break; + default: + if (declaration.symbol.inferredConstructor) { + kind = SignatureKind.Construct; + const members = createSymbolTable(emptyArray); + // Collect methods declared with className.protoype.methodName = ... + const proto = declaration.symbol.exports["prototype"]; + if (proto) { + mergeSymbolTable(members, proto.members); + } + // Collect properties defined in the constructor by this.propName = ... + mergeSymbolTable(members, declaration.symbol.members); + returnType = createAnonymousType(declaration.symbol, members, emptyArray, emptyArray, undefined, undefined); + } + else { + kind = SignatureKind.Call; + } + break; + } + + links.resolvedSignature = createSignature(declaration, typeParameters, parameters, kind, returnType, typePredicate, minArgumentCount, hasRestParameter(declaration), hasStringLiterals); } return links.resolvedSignature; @@ -3822,7 +3954,7 @@ namespace ts { function getSignaturesOfSymbol(symbol: Symbol): Signature[] { if (!symbol) return emptyArray; - const result: Signature[] = []; + let result: Signature[] = []; for (let i = 0, len = symbol.declarations.length; i < len; i++) { const node = symbol.declarations[i]; switch (node.kind) { @@ -3849,6 +3981,12 @@ namespace ts { } } result.push(getSignatureFromDeclaration(node)); + break; + + case SyntaxKind.PropertyAccessExpression: + // Inferred class method + result = getSignaturesOfType(checkExpressionCached((node.parent).right), SignatureKind.Call); + break; } } return result; @@ -3909,7 +4047,7 @@ namespace ts { } function getSignatureInstantiation(signature: Signature, typeArguments: Type[]): Signature { - return instantiateSignature(signature, createTypeMapper(signature.typeParameters, typeArguments), true); + return instantiateSignature(signature, createTypeMapper(signature.typeParameters, typeArguments), /*eraseTypeParameters*/ true); } function getErasedSignature(signature: Signature): Signature { @@ -3919,7 +4057,7 @@ namespace ts { signature.erasedSignatureCache = instantiateSignature(getErasedSignature(signature.target), signature.mapper); } else { - signature.erasedSignatureCache = instantiateSignature(signature, createTypeEraser(signature.typeParameters), true); + signature.erasedSignatureCache = instantiateSignature(signature, createTypeEraser(signature.typeParameters), /*eraseTypeParameters*/ true); } } return signature.erasedSignatureCache; @@ -3931,7 +4069,7 @@ namespace ts { // object type literal or interface (using the new keyword). Each way of declaring a constructor // will result in a different declaration kind. if (!signature.isolatedSignatureType) { - const isConstructor = signature.declaration.kind === SyntaxKind.Constructor || signature.declaration.kind === SyntaxKind.ConstructSignature; + const isConstructor = signature.kind === SignatureKind.Construct; const type = createObjectType(TypeFlags.Anonymous | TypeFlags.FromSignature); type.members = emptySymbols; type.properties = emptyArray; @@ -4149,12 +4287,12 @@ namespace ts { // We only support expressions that are simple qualified names. For other expressions this produces undefined. const typeNameOrExpression = node.kind === SyntaxKind.TypeReference ? (node).typeName : isSupportedExpressionWithTypeArguments(node) ? (node).expression : - undefined; + undefined; const symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, SymbolFlags.Type) || unknownSymbol; const type = symbol === unknownSymbol ? unknownType : symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface) ? getTypeFromClassOrInterfaceReference(node, symbol) : - symbol.flags & SymbolFlags.TypeAlias ? getTypeFromTypeAliasReference(node, symbol) : - getTypeFromNonGenericTypeReference(node, symbol); + symbol.flags & SymbolFlags.TypeAlias ? getTypeFromTypeAliasReference(node, symbol) : + getTypeFromNonGenericTypeReference(node, symbol); // Cache both the resolved symbol and the resolved type. The resolved symbol is needed in when we check the // type reference in checkTypeReferenceOrExpressionWithTypeArguments. links.resolvedSymbol = symbol; @@ -4358,7 +4496,7 @@ namespace ts { // a named type that circularly references itself. function getUnionType(types: Type[], noSubtypeReduction?: boolean): Type { if (types.length === 0) { - return emptyObjectType; + return emptyUnionType; } const typeSet: Type[] = []; addTypesToSet(typeSet, types, TypeFlags.Union); @@ -4435,20 +4573,20 @@ namespace ts { return links.resolvedType; } - function getStringLiteralType(node: StringLiteral): StringLiteralType { - if (hasProperty(stringLiteralTypes, node.text)) { - return stringLiteralTypes[node.text]; + function getStringLiteralTypeForText(text: string): StringLiteralType { + if (hasProperty(stringLiteralTypes, text)) { + return stringLiteralTypes[text]; } - const type = stringLiteralTypes[node.text] = createType(TypeFlags.StringLiteral); - type.text = getTextOfNode(node); + const type = stringLiteralTypes[text] = createType(TypeFlags.StringLiteral); + type.text = text; return type; } - function getTypeFromStringLiteral(node: StringLiteral): Type { + function getTypeFromStringLiteralTypeNode(node: StringLiteralTypeNode): Type { const links = getNodeLinks(node); if (!links.resolvedType) { - links.resolvedType = getStringLiteralType(node); + links.resolvedType = getStringLiteralTypeForText(node.text); } return links.resolvedType; } @@ -4488,10 +4626,10 @@ namespace ts { return esSymbolType; case SyntaxKind.VoidKeyword: return voidType; - case SyntaxKind.ThisKeyword: + case SyntaxKind.ThisType: return getTypeFromThisTypeNode(node); - case SyntaxKind.StringLiteral: - return getTypeFromStringLiteral(node); + case SyntaxKind.StringLiteralType: + return getTypeFromStringLiteralTypeNode(node); case SyntaxKind.TypeReference: return getTypeFromTypeReference(node); case SyntaxKind.TypePredicate: @@ -4634,6 +4772,7 @@ namespace ts { } const result = createSignature(signature.declaration, freshTypeParameters, instantiateList(signature.parameters, mapper, instantiateSymbol), + signature.kind, instantiateType(signature.resolvedReturnType, mapper), freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasStringLiterals); @@ -5012,7 +5151,7 @@ namespace ts { } function hasExcessProperties(source: FreshObjectLiteralType, target: Type, reportErrors: boolean): boolean { - if (someConstituentTypeHasKind(target, TypeFlags.ObjectType)) { + if (!(target.flags & TypeFlags.ObjectLiteralPatternWithComputedProperties) && someConstituentTypeHasKind(target, TypeFlags.ObjectType)) { for (const prop of getPropertiesOfObjectType(source)) { if (!isKnownProperty(target, prop.name)) { if (reportErrors) { @@ -5034,7 +5173,7 @@ namespace ts { let result = Ternary.True; const sourceTypes = source.types; for (const sourceType of sourceTypes) { - const related = typeRelatedToSomeType(sourceType, target, false); + const related = typeRelatedToSomeType(sourceType, target, /*reportErrors*/ false); if (!related) { return Ternary.False; } @@ -5131,9 +5270,12 @@ namespace ts { const id = relation !== identityRelation || apparentSource.id < target.id ? apparentSource.id + "," + target.id : target.id + "," + apparentSource.id; const related = relation[id]; if (related !== undefined) { - // If we computed this relation already and it was failed and reported, or if we're not being asked to elaborate - // errors, we can use the cached value. Otherwise, recompute the relation - if (!elaborateErrors || (related === RelationComparisonResult.FailedAndReported)) { + if (elaborateErrors && related === RelationComparisonResult.Failed) { + // We are elaborating errors and the cached result is an unreported failure. Record the result as a reported + // failure and continue computing the relation such that errors get reported. + relation[id] = RelationComparisonResult.FailedAndReported; + } + else { return related === RelationComparisonResult.Succeeded ? Ternary.True : Ternary.False; } } @@ -5432,7 +5574,7 @@ namespace ts { const saveErrorInfo = errorInfo; let related = isRelatedTo(s, t, reportErrors); if (!related) { - related = isRelatedTo(t, s, false); + related = isRelatedTo(t, s, /*reportErrors*/ false); if (!related) { if (reportErrors) { reportError(Diagnostics.Types_of_parameters_0_and_1_are_incompatible, @@ -5559,7 +5701,7 @@ namespace ts { let related: Ternary; if (sourceStringType && sourceNumberType) { // If we know for sure we're testing both string and numeric index types then only report errors from the second one - related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType, targetType, /*reportErrors*/ false) || isRelatedTo(sourceNumberType, targetType, reportErrors); } else { related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); @@ -5769,6 +5911,10 @@ namespace ts { return !!getPropertyOfType(type, "0"); } + function isStringLiteralType(type: Type) { + return type.flags & TypeFlags.StringLiteral; + } + /** * Check if a Type was written as a tuple type literal. * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. @@ -5985,6 +6131,17 @@ namespace ts { } function inferFromTypes(source: Type, target: Type) { + if (source.flags & TypeFlags.Union && target.flags & TypeFlags.Union || + source.flags & TypeFlags.Intersection && target.flags & TypeFlags.Intersection) { + // Source and target are both unions or both intersections. To improve the quality of + // inferences we first reduce the types by removing constituents that are identically + // matched by a constituent in the other type. For example, when inferring from + // 'string | string[]' to 'string | T', we reduce the types to 'string[]' and 'T'. + const reducedSource = reduceUnionOrIntersectionType(source, target); + const reducedTarget = reduceUnionOrIntersectionType(target, source); + source = reducedSource; + target = reducedTarget; + } if (target.flags & TypeFlags.TypeParameter) { // If target is a type parameter, make an inference, unless the source type contains // the anyFunctionType (the wildcard type that's used to avoid contextually typing functions). @@ -5995,7 +6152,6 @@ namespace ts { if (source.flags & TypeFlags.ContainsAnyFunctionType) { return; } - const typeParameters = context.typeParameters; for (let i = 0; i < typeParameters.length; i++) { if (target === typeParameters[i]) { @@ -6143,6 +6299,41 @@ namespace ts { } } + function typeIdenticalToSomeType(source: Type, target: UnionOrIntersectionType): boolean { + for (const t of target.types) { + if (isTypeIdenticalTo(source, t)) { + return true; + } + } + return false; + } + + /** + * Return the reduced form of the source type. This type is computed by by removing all source + * constituents that have an identical match in the target type. + */ + function reduceUnionOrIntersectionType(source: UnionOrIntersectionType, target: UnionOrIntersectionType) { + let sourceTypes = source.types; + let sourceIndex = 0; + let modified = false; + while (sourceIndex < sourceTypes.length) { + if (typeIdenticalToSomeType(sourceTypes[sourceIndex], target)) { + if (!modified) { + sourceTypes = sourceTypes.slice(0); + modified = true; + } + sourceTypes.splice(sourceIndex, 1); + } + else { + sourceIndex++; + } + } + if (modified) { + return source.flags & TypeFlags.Union ? getUnionType(sourceTypes, /*noSubtypeReduction*/ true) : getIntersectionType(sourceTypes); + } + return source; + } + function getInferenceCandidates(context: InferenceContext, index: number): Type[] { const inferences = context.inferences[index]; return inferences.primary || inferences.secondary || emptyArray; @@ -6225,27 +6416,6 @@ namespace ts { Debug.fail("should not get here"); } - // For a union type, remove all constituent types that are of the given type kind (when isOfTypeKind is true) - // or not of the given type kind (when isOfTypeKind is false) - function removeTypesFromUnionType(type: Type, typeKind: TypeFlags, isOfTypeKind: boolean, allowEmptyUnionResult: boolean): Type { - if (type.flags & TypeFlags.Union) { - const types = (type).types; - if (forEach(types, t => !!(t.flags & typeKind) === isOfTypeKind)) { - // Above we checked if we have anything to remove, now use the opposite test to do the removal - const narrowedType = getUnionType(filter(types, t => !(t.flags & typeKind) === isOfTypeKind)); - if (allowEmptyUnionResult || narrowedType !== emptyObjectType) { - return narrowedType; - } - } - } - else if (allowEmptyUnionResult && !!(type.flags & typeKind) === isOfTypeKind) { - // Use getUnionType(emptyArray) instead of emptyObjectType in case the way empty union types - // are represented ever changes. - return getUnionType(emptyArray); - } - return type; - } - function hasInitializer(node: VariableLikeDeclaration): boolean { return !!(node.initializer || isBindingPattern(node.parent) && hasInitializer(node.parent.parent)); } @@ -6347,53 +6517,70 @@ namespace ts { // Only narrow when symbol is variable of type any or an object, union, or type parameter type if (node && symbol.flags & SymbolFlags.Variable) { if (isTypeAny(type) || type.flags & (TypeFlags.ObjectType | TypeFlags.Union | TypeFlags.TypeParameter)) { + const declaration = getDeclarationOfKind(symbol, SyntaxKind.VariableDeclaration); + const top = declaration && getDeclarationContainer(declaration); + const originalType = type; + const nodeStack: {node: Node, child: Node}[] = []; loop: while (node.parent) { const child = node; node = node.parent; - let narrowedType = type; + switch (node.kind) { + case SyntaxKind.IfStatement: + case SyntaxKind.ConditionalExpression: + case SyntaxKind.BinaryExpression: + nodeStack.push({node, child}); + break; + case SyntaxKind.SourceFile: + case SyntaxKind.ModuleDeclaration: + // Stop at the first containing file or module declaration + break loop; + } + if (node === top) { + break; + } + } + + let nodes: {node: Node, child: Node}; + while (nodes = nodeStack.pop()) { + const {node, child} = nodes; switch (node.kind) { case SyntaxKind.IfStatement: // In a branch of an if statement, narrow based on controlling expression if (child !== (node).expression) { - narrowedType = narrowType(type, (node).expression, /*assumeTrue*/ child === (node).thenStatement); + type = narrowType(type, (node).expression, /*assumeTrue*/ child === (node).thenStatement); } break; case SyntaxKind.ConditionalExpression: // In a branch of a conditional expression, narrow based on controlling condition if (child !== (node).condition) { - narrowedType = narrowType(type, (node).condition, /*assumeTrue*/ child === (node).whenTrue); + type = narrowType(type, (node).condition, /*assumeTrue*/ child === (node).whenTrue); } break; case SyntaxKind.BinaryExpression: // In the right operand of an && or ||, narrow based on left operand if (child === (node).right) { if ((node).operatorToken.kind === SyntaxKind.AmpersandAmpersandToken) { - narrowedType = narrowType(type, (node).left, /*assumeTrue*/ true); + type = narrowType(type, (node).left, /*assumeTrue*/ true); } else if ((node).operatorToken.kind === SyntaxKind.BarBarToken) { - narrowedType = narrowType(type, (node).left, /*assumeTrue*/ false); + type = narrowType(type, (node).left, /*assumeTrue*/ false); } } break; - case SyntaxKind.SourceFile: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.MethodSignature: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.Constructor: - // Stop at the first containing function or module declaration - break loop; + default: + Debug.fail("Unreachable!"); } - // Use narrowed type if construct contains no assignments to variable - if (narrowedType !== type) { - if (isVariableAssignedWithin(symbol, node)) { - break; - } - type = narrowedType; + + // Use original type if construct contains assignments to variable + if (type !== originalType && isVariableAssignedWithin(symbol, node)) { + type = originalType; } } + + // Preserve old top-level behavior - if the branch is really an empty set, revert to prior type + if (type === emptyUnionType) { + type = originalType; + } } } @@ -6409,31 +6596,35 @@ namespace ts { if (left.expression.kind !== SyntaxKind.Identifier || getResolvedSymbol(left.expression) !== symbol) { return type; } - const typeInfo = primitiveTypeInfo[right.text]; if (expr.operatorToken.kind === SyntaxKind.ExclamationEqualsEqualsToken) { assumeTrue = !assumeTrue; } - if (assumeTrue) { - // Assumed result is true. If check was not for a primitive type, remove all primitive types - if (!typeInfo) { - return removeTypesFromUnionType(type, /*typeKind*/ TypeFlags.StringLike | TypeFlags.NumberLike | TypeFlags.Boolean | TypeFlags.ESSymbol, - /*isOfTypeKind*/ true, /*allowEmptyUnionResult*/ false); - } - // Check was for a primitive type, return that primitive type if it is a subtype - if (isTypeSubtypeOf(typeInfo.type, type)) { - return typeInfo.type; - } - // Otherwise, remove all types that aren't of the primitive type kind. This can happen when the type is - // union of enum types and other types. - return removeTypesFromUnionType(type, /*typeKind*/ typeInfo.flags, /*isOfTypeKind*/ false, /*allowEmptyUnionResult*/ false); + const typeInfo = primitiveTypeInfo[right.text]; + // Don't narrow `undefined` + if (typeInfo && typeInfo.type === undefinedType) { + return type; + } + // If the type to be narrowed is any and we're checking a primitive with assumeTrue=true, return the primitive + if (!!(type.flags & TypeFlags.Any) && typeInfo && assumeTrue) { + return typeInfo.type; + } + let flags: TypeFlags; + if (typeInfo) { + flags = typeInfo.flags; } else { - // Assumed result is false. If check was for a primitive type, remove that primitive type - if (typeInfo) { - return removeTypesFromUnionType(type, /*typeKind*/ typeInfo.flags, /*isOfTypeKind*/ true, /*allowEmptyUnionResult*/ false); - } - // Otherwise we don't have enough information to do anything. - return type; + assumeTrue = !assumeTrue; + flags = TypeFlags.NumberLike | TypeFlags.StringLike | TypeFlags.ESSymbol | TypeFlags.Boolean; + } + // At this point we can bail if it's not a union + if (!(type.flags & TypeFlags.Union)) { + // If the active non-union type would be removed from a union by this type guard, return an empty union + return filterUnion(type) ? type : emptyUnionType; + } + return getUnionType(filter((type as UnionType).types, filterUnion), /*noSubtypeReduction*/ true); + + function filterUnion(type: Type) { + return assumeTrue === !!(type.flags & flags); } } @@ -6447,7 +6638,7 @@ namespace ts { // and the second operand was false. We narrow with those assumptions and union the two resulting types. return getUnionType([ narrowType(type, expr.left, /*assumeTrue*/ false), - narrowType(narrowType(type, expr.left, /*assumeTrue*/ true), expr.right, /*assumeTrue*/ false) + narrowType(type, expr.right, /*assumeTrue*/ false) ]); } } @@ -6458,7 +6649,7 @@ namespace ts { // and the second operand was true. We narrow with those assumptions and union the two resulting types. return getUnionType([ narrowType(type, expr.left, /*assumeTrue*/ true), - narrowType(narrowType(type, expr.left, /*assumeTrue*/ false), expr.right, /*assumeTrue*/ true) + narrowType(type, expr.right, /*assumeTrue*/ true) ]); } else { @@ -6650,7 +6841,14 @@ namespace ts { let container: Node; if (symbol.flags & SymbolFlags.Class) { // get parent of class declaration - container = getClassLikeDeclarationOfSymbol(symbol).parent; + const classDeclaration = getClassLikeDeclarationOfSymbol(symbol); + if (classDeclaration) { + container = classDeclaration.parent; + } + else { + // JS-inferred class; do nothing + return; + } } else { // nesting structure: @@ -6994,7 +7192,10 @@ namespace ts { const operator = binaryExpression.operatorToken.kind; if (operator >= SyntaxKind.FirstAssignment && operator <= SyntaxKind.LastAssignment) { // In an assignment expression, the right operand is contextually typed by the type of the left operand. - if (node === binaryExpression.right) { + // In JS files where a special assignment is taking place, don't contextually type the RHS to avoid + // incorrectly assuming a circular 'any' (the type of the LHS is determined by the RHS) + if (node === binaryExpression.right && + !(node.parserContextFlags & ParserContextFlags.JavaScriptFile && getSpecialPropertyAssignmentKind(binaryExpression))) { return checkExpression(binaryExpression.left); } } @@ -7048,6 +7249,10 @@ namespace ts { return applyToContextualType(type, t => getIndexTypeOfStructuredType(t, kind)); } + function contextualTypeIsStringLiteralType(type: Type): boolean { + return !!(type.flags & TypeFlags.Union ? forEach((type).types, isStringLiteralType) : isStringLiteralType(type)); + } + // Return true if the given contextual type is a tuple-like type function contextualTypeIsTupleLikeType(type: Type): boolean { return !!(type.flags & TypeFlags.Union ? forEach((type).types, isTupleLikeType) : isTupleLikeType(type)); @@ -7073,7 +7278,7 @@ namespace ts { function getContextualTypeForObjectLiteralElement(element: ObjectLiteralElement) { const objectLiteral = element.parent; - const type = getContextualType(objectLiteral); + const type = getApparentTypeOfContextualType(objectLiteral); if (type) { if (!hasDynamicName(element)) { // For a (non-symbol) computed property, there is no reason to look up the name @@ -7099,7 +7304,7 @@ namespace ts { // type of T. function getContextualTypeForElementExpression(node: Expression): Type { const arrayLiteral = node.parent; - const type = getContextualType(arrayLiteral); + const type = getApparentTypeOfContextualType(arrayLiteral); if (type) { const index = indexOf(arrayLiteral.elements, node); return getTypeOfPropertyOfContextualType(type, "" + index) @@ -7137,12 +7342,29 @@ namespace ts { // Return the contextual type for a given expression node. During overload resolution, a contextual type may temporarily // be "pushed" onto a node using the contextualType property. - function getContextualType(node: Expression): Type { - const type = getContextualTypeWorker(node); + function getApparentTypeOfContextualType(node: Expression): Type { + const type = getContextualType(node); return type && getApparentType(type); } - function getContextualTypeWorker(node: Expression): Type { + /** + * Woah! Do you really want to use this function? + * + * Unless you're trying to get the *non-apparent* type for a + * value-literal type or you're authoring relevant portions of this algorithm, + * you probably meant to use 'getApparentTypeOfContextualType'. + * Otherwise this may not be very useful. + * + * In cases where you *are* working on this function, you should understand + * when it is appropriate to use 'getContextualType' and 'getApparentTypeOfContetxualType'. + * + * - Use 'getContextualType' when you are simply going to propagate the result to the expression. + * - Use 'getApparentTypeOfContextualType' when you're going to need the members of the type. + * + * @param node the expression whose contextual type will be returned. + * @returns the contextual type of an expression. + */ + function getContextualType(node: Expression): Type { if (isInsideWithStatementBody(node)) { // We cannot answer semantic questions within a with block, do not proceed any further return undefined; @@ -7221,7 +7443,7 @@ namespace ts { Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node)); const type = isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) - : getContextualType(node); + : getApparentTypeOfContextualType(node); if (!type) { return undefined; } @@ -7351,7 +7573,7 @@ namespace ts { type.pattern = node; return type; } - const contextualType = getContextualType(node); + const contextualType = getApparentTypeOfContextualType(node); if (contextualType && contextualTypeIsTupleLikeType(contextualType)) { const pattern = contextualType.pattern; // If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting @@ -7443,11 +7665,12 @@ namespace ts { const propertiesTable: SymbolTable = {}; const propertiesArray: Symbol[] = []; - const contextualType = getContextualType(node); + const contextualType = getApparentTypeOfContextualType(node); const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === SyntaxKind.ObjectBindingPattern || contextualType.pattern.kind === SyntaxKind.ObjectLiteralExpression); let typeFlags: TypeFlags = 0; + let patternWithComputedProperties = false; for (const memberDecl of node.properties) { let member = memberDecl.symbol; if (memberDecl.kind === SyntaxKind.PropertyAssignment || @@ -7475,8 +7698,11 @@ namespace ts { if (isOptional) { prop.flags |= SymbolFlags.Optional; } + if (hasDynamicName(memberDecl)) { + patternWithComputedProperties = true; + } } - else if (contextualTypeHasPattern) { + else if (contextualTypeHasPattern && !(contextualType.flags & TypeFlags.ObjectLiteralPatternWithComputedProperties)) { // If object literal is contextually typed by the implied type of a binding pattern, and if the // binding pattern specifies a default value for the property, make the property optional. const impliedProp = getPropertyOfType(contextualType, member.name); @@ -7533,7 +7759,7 @@ namespace ts { const numberIndexType = getIndexType(IndexKind.Number); const result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType); const freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : TypeFlags.FreshObjectLiteral; - result.flags |= TypeFlags.ObjectLiteral | TypeFlags.ContainsObjectLiteral | freshObjectLiteralFlag | (typeFlags & TypeFlags.PropagatingFlags); + result.flags |= TypeFlags.ObjectLiteral | TypeFlags.ContainsObjectLiteral | freshObjectLiteralFlag | (typeFlags & TypeFlags.PropagatingFlags) | (patternWithComputedProperties ? TypeFlags.ObjectLiteralPatternWithComputedProperties : 0); if (inDestructuringPattern) { result.pattern = node; } @@ -8621,7 +8847,7 @@ namespace ts { // for the argument. In that case, we should check the argument. if (argType === undefined) { argType = arg.kind === SyntaxKind.StringLiteral && !reportErrors - ? getStringLiteralType(arg) + ? getStringLiteralTypeForText((arg).text) : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); } @@ -8816,7 +9042,7 @@ namespace ts { case SyntaxKind.Identifier: case SyntaxKind.NumericLiteral: case SyntaxKind.StringLiteral: - return getStringLiteralType(element.name); + return getStringLiteralTypeForText((element.name).text); case SyntaxKind.ComputedPropertyName: const nameType = checkComputedPropertyName(element.name); @@ -9418,13 +9644,7 @@ namespace ts { return voidType; } if (node.kind === SyntaxKind.NewExpression) { - const declaration = signature.declaration; - - if (declaration && - declaration.kind !== SyntaxKind.Constructor && - declaration.kind !== SyntaxKind.ConstructSignature && - declaration.kind !== SyntaxKind.ConstructorType) { - + if (signature.kind === SignatureKind.Call) { // When resolved signature is a call signature (and not a construct signature) the result type is any if (compilerOptions.noImplicitAny) { error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); @@ -9450,7 +9670,12 @@ namespace ts { const targetType = getTypeFromTypeNode(node.type); if (produceDiagnostics && targetType !== unknownType) { const widenedType = getWidenedType(exprType); - if (!(isTypeAssignableTo(targetType, widenedType))) { + + // Permit 'number[] | "foo"' to be asserted to 'string'. + const bothAreStringLike = + someConstituentTypeHasKind(targetType, TypeFlags.StringLike) && + someConstituentTypeHasKind(widenedType, TypeFlags.StringLike); + if (!bothAreStringLike && !(isTypeAssignableTo(targetType, widenedType))) { checkTypeAssignableTo(exprType, targetType, node, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); } } @@ -9680,35 +9905,52 @@ namespace ts { return aggregatedTypes; } - // TypeScript Specification 1.0 (6.3) - July 2014 - // An explicitly typed function whose return type isn't the Void or the Any type - // must have at least one return statement somewhere in its body. - // An exception to this rule is if the function implementation consists of a single 'throw' statement. + /* + *TypeScript Specification 1.0 (6.3) - July 2014 + * An explicitly typed function whose return type isn't the Void or the Any type + * must have at least one return statement somewhere in its body. + * An exception to this rule is if the function implementation consists of a single 'throw' statement. + * @param returnType - return type of the function, can be undefined if return type is not explicitly specified + */ function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func: FunctionLikeDeclaration, returnType: Type): void { if (!produceDiagnostics) { return; } - // Functions that return 'void' or 'any' don't need any return expressions. + // Functions with with an explicitly specified 'void' or 'any' return type don't need any return expressions. if (returnType === voidType || isTypeAny(returnType)) { return; } // If all we have is a function signature, or an arrow function with an expression body, then there is nothing to check. - // also if HasImplicitReturnValue flags is not set this means that all codepaths in function body end with return of throw + // also if HasImplicitReturn flag is not set this means that all codepaths in function body end with return or throw if (nodeIsMissing(func.body) || func.body.kind !== SyntaxKind.Block || !(func.flags & NodeFlags.HasImplicitReturn)) { return; } - if (func.flags & NodeFlags.HasExplicitReturn) { - if (compilerOptions.noImplicitReturns) { - error(func.type, Diagnostics.Not_all_code_paths_return_a_value); - } - } - else { - // This function does not conform to the specification. + const hasExplicitReturn = func.flags & NodeFlags.HasExplicitReturn; + + if (returnType && !hasExplicitReturn) { + // minimal check: function has syntactic return type annotation and no explicit return statements in the body + // this function does not conform to the specification. + // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present error(func.type, Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value); } + else if (compilerOptions.noImplicitReturns) { + if (!returnType) { + // If return type annotation is omitted check if function has any explicit return statements. + // If it does not have any - its inferred return type is void - don't do any checks. + // Otherwise get inferred return type from function body and report error only if it is not void / anytype + const inferredReturnType = hasExplicitReturn + ? getReturnTypeOfSignature(getSignatureFromDeclaration(func)) + : voidType; + + if (inferredReturnType === voidType || isTypeAny(inferredReturnType)) { + return; + } + } + error(func.type || func, Diagnostics.Not_all_code_paths_return_a_value); + } } function checkFunctionExpressionOrObjectLiteralMethod(node: FunctionExpression | MethodDeclaration, contextualMapper?: TypeMapper): Type { @@ -9773,7 +10015,7 @@ namespace ts { return type; } - function checkFunctionExpressionOrObjectLiteralMethodBody(node: FunctionExpression | MethodDeclaration) { + function checkFunctionExpressionOrObjectLiteralMethodBody(node: ArrowFunction | FunctionExpression | MethodDeclaration) { Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node)); const isAsync = isAsyncFunctionLike(node); @@ -9781,14 +10023,10 @@ namespace ts { emitAwaiter = true; } - const returnType = node.type && getTypeFromTypeNode(node.type); - let promisedType: Type; - if (returnType && isAsync) { - promisedType = checkAsyncFunctionReturnType(node); - } - - if (returnType && !node.asteriskToken) { - checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, isAsync ? promisedType : returnType); + const returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type)); + if (!node.asteriskToken) { + // return is not necessary in the body of generators + checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType); } if (node.body) { @@ -9811,13 +10049,13 @@ namespace ts { // check assignability of the awaited type of the expression body against the promised type of // its return type annotation. const exprType = checkExpression(node.body); - if (returnType) { + if (returnOrPromisedType) { if (isAsync) { const awaitedType = checkAwaitedType(exprType, node.body, Diagnostics.Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member); - checkTypeAssignableTo(awaitedType, promisedType, node.body); + checkTypeAssignableTo(awaitedType, returnOrPromisedType, node.body); } else { - checkTypeAssignableTo(exprType, returnType, node.body); + checkTypeAssignableTo(exprType, returnOrPromisedType, node.body); } } @@ -10058,19 +10296,27 @@ namespace ts { const properties = node.properties; for (const p of properties) { if (p.kind === SyntaxKind.PropertyAssignment || p.kind === SyntaxKind.ShorthandPropertyAssignment) { - // TODO(andersh): Computed property support - const name = (p).name; + const name = (p).name; + if (name.kind === SyntaxKind.ComputedPropertyName) { + checkComputedPropertyName(name); + } + if (isComputedNonLiteralName(name)) { + continue; + } + + const text = getTextOfPropertyName(name); const type = isTypeAny(sourceType) ? sourceType - : getTypeOfPropertyOfType(sourceType, name.text) || - isNumericLiteralName(name.text) && getIndexTypeOfType(sourceType, IndexKind.Number) || + : getTypeOfPropertyOfType(sourceType, text) || + isNumericLiteralName(text) && getIndexTypeOfType(sourceType, IndexKind.Number) || getIndexTypeOfType(sourceType, IndexKind.String); if (type) { if (p.kind === SyntaxKind.ShorthandPropertyAssignment) { checkDestructuringAssignment(p, type); } else { - checkDestructuringAssignment((p).initializer || name, type); + // non-shorthand property assignments should always have initializers + checkDestructuringAssignment((p).initializer, type); } } else { @@ -10280,6 +10526,10 @@ namespace ts { case SyntaxKind.ExclamationEqualsToken: case SyntaxKind.EqualsEqualsEqualsToken: case SyntaxKind.ExclamationEqualsEqualsToken: + // Permit 'number[] | "foo"' to be asserted to 'string'. + if (someConstituentTypeHasKind(leftType, TypeFlags.StringLike) && someConstituentTypeHasKind(rightType, TypeFlags.StringLike)) { + return booleanType; + } if (!isTypeAssignableTo(leftType, rightType) && !isTypeAssignableTo(rightType, leftType)) { reportOperatorError(); } @@ -10418,6 +10668,15 @@ namespace ts { return getUnionType([type1, type2]); } + function checkStringLiteralExpression(node: StringLiteral): Type { + const contextualType = getContextualType(node); + if (contextualType && contextualTypeIsStringLiteralType(contextualType)) { + return getStringLiteralTypeForText(node.text); + } + + return stringType; + } + function checkTemplateExpression(node: TemplateExpression): Type { // We just want to check each expressions, but we are unconcerned with // the type of each expression, as any value may be coerced into a string. @@ -10477,7 +10736,7 @@ namespace ts { if (isInferentialContext(contextualMapper)) { const signature = getSingleCallSignature(type); if (signature && signature.typeParameters) { - const contextualType = getContextualType(node); + const contextualType = getApparentTypeOfContextualType(node); if (contextualType) { const contextualSignature = getSingleCallSignature(contextualType); if (contextualSignature && !contextualSignature.typeParameters) { @@ -10548,6 +10807,7 @@ namespace ts { case SyntaxKind.TemplateExpression: return checkTemplateExpression(node); case SyntaxKind.StringLiteral: + return checkStringLiteralExpression(node); case SyntaxKind.NoSubstitutionTemplateLiteral: return stringType; case SyntaxKind.RegularExpressionLiteral: @@ -10881,6 +11141,7 @@ namespace ts { const symbol = getSymbolOfNode(node); const firstDeclaration = getDeclarationOfKind(symbol, node.kind); + // Only type check the symbol once if (node === firstDeclaration) { checkFunctionOrConstructorSymbol(symbol); @@ -11233,16 +11494,24 @@ namespace ts { seen = c === node; } }); - if (subsequentNode) { + // We may be here because of some extra junk between overloads that could not be parsed into a valid node. + // In this case the subsequent node is not really consecutive (.pos !== node.end), and we must ignore it here. + if (subsequentNode && subsequentNode.pos === node.end) { if (subsequentNode.kind === node.kind) { const errorNode: Node = (subsequentNode).name || subsequentNode; // TODO(jfreeman): These are methods, so handle computed name case if (node.name && (subsequentNode).name && (node.name).text === ((subsequentNode).name).text) { - // the only situation when this is possible (same kind\same name but different symbol) - mixed static and instance class members - Debug.assert(node.kind === SyntaxKind.MethodDeclaration || node.kind === SyntaxKind.MethodSignature); - Debug.assert((node.flags & NodeFlags.Static) !== (subsequentNode.flags & NodeFlags.Static)); - const diagnostic = node.flags & NodeFlags.Static ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; - error(errorNode, diagnostic); + const reportError = + (node.kind === SyntaxKind.MethodDeclaration || node.kind === SyntaxKind.MethodSignature) && + (node.flags & NodeFlags.Static) !== (subsequentNode.flags & NodeFlags.Static); + // we can get here in two cases + // 1. mixed static and instance class members + // 2. something with the same name was defined before the set of overloads that prevents them from merging + // here we'll report error only for the first case since for second we should already report error in binder + if (reportError) { + const diagnostic = node.flags & NodeFlags.Static ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; + error(errorNode, diagnostic); + } return; } else if (nodeIsPresent((subsequentNode).body)) { @@ -11337,7 +11606,7 @@ namespace ts { // Abstract methods can't have an implementation -- in particular, they don't need one. if (!isExportSymbolInsideModule && lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && - !(lastSeenNonAmbientDeclaration.flags & NodeFlags.Abstract) ) { + !(lastSeenNonAmbientDeclaration.flags & NodeFlags.Abstract)) { reportImplementationExpectedError(lastSeenNonAmbientDeclaration); } @@ -11905,7 +12174,14 @@ namespace ts { const symbol = getSymbolOfNode(node); const localSymbol = node.localSymbol || symbol; - const firstDeclaration = getDeclarationOfKind(localSymbol, node.kind); + // Since the javascript won't do semantic analysis like typescript, + // if the javascript file comes before the typescript file and both contain same name functions, + // checkFunctionOrConstructorSymbol wouldn't be called if we didnt ignore javascript function. + const firstDeclaration = forEach(localSymbol.declarations, + // Get first non javascript function declaration + declaration => declaration.kind === node.kind && !isSourceFileJavaScript(getSourceFile(declaration)) ? + declaration : undefined); + // Only type check the symbol once if (node === firstDeclaration) { checkFunctionOrConstructorSymbol(localSymbol); @@ -11921,14 +12197,9 @@ namespace ts { } checkSourceElement(node.body); - if (node.type && !isAccessor(node.kind) && !node.asteriskToken) { - const returnType = getTypeFromTypeNode(node.type); - let promisedType: Type; - if (isAsync) { - promisedType = checkAsyncFunctionReturnType(node); - } - - checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, isAsync ? promisedType : returnType); + if (!isAccessor(node.kind) && !node.asteriskToken) { + const returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type)); + checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType); } if (produceDiagnostics && !node.type) { @@ -12189,6 +12460,14 @@ namespace ts { checkExpressionCached(node.initializer); } } + + if (node.kind === SyntaxKind.BindingElement) { + // check computed properties inside property names of binding elements + if (node.propertyName && node.propertyName.kind === SyntaxKind.ComputedPropertyName) { + checkComputedPropertyName(node.propertyName); + } + } + // For a binding pattern, check contained binding elements if (isBindingPattern(node.name)) { forEach((node.name).elements, checkSourceElement); @@ -12616,9 +12895,14 @@ namespace ts { // After we remove all types that are StringLike, we will know if there was a string constituent // based on whether the remaining type is the same as the initial type. - const arrayType = removeTypesFromUnionType(arrayOrStringType, TypeFlags.StringLike, /*isTypeOfKind*/ true, /*allowEmptyUnionResult*/ true); + let arrayType = arrayOrStringType; + if (arrayOrStringType.flags & TypeFlags.Union) { + arrayType = getUnionType(filter((arrayOrStringType as UnionType).types, t => !(t.flags & TypeFlags.StringLike))); + } + else if (arrayOrStringType.flags & TypeFlags.StringLike) { + arrayType = emptyUnionType; + } const hasStringConstituent = arrayOrStringType !== arrayType; - let reportedError = false; if (hasStringConstituent) { if (languageVersion < ScriptTarget.ES5) { @@ -12742,6 +13026,7 @@ namespace ts { let hasDuplicateDefaultClause = false; const expressionType = checkExpression(node.expression); + const expressionTypeIsStringLike = someConstituentTypeHasKind(expressionType, TypeFlags.StringLike); forEach(node.caseBlock.clauses, clause => { // Grammar check for duplicate default clauses, skip if we already report duplicate default clause if (clause.kind === SyntaxKind.DefaultClause && !hasDuplicateDefaultClause) { @@ -12762,8 +13047,14 @@ namespace ts { // TypeScript 1.0 spec (April 2014):5.9 // In a 'switch' statement, each 'case' expression must be of a type that is assignable to or from the type of the 'switch' expression. const caseType = checkExpression(caseClause.expression); - if (!isTypeAssignableTo(expressionType, caseType)) { - // check 'expressionType isAssignableTo caseType' failed, try the reversed check and report errors if it fails + + const expressionTypeIsAssignableToCaseType = + // Permit 'number[] | "foo"' to be asserted to 'string'. + (expressionTypeIsStringLike && someConstituentTypeHasKind(caseType, TypeFlags.StringLike)) || + isTypeAssignableTo(expressionType, caseType); + + if (!expressionTypeIsAssignableToCaseType) { + // 'expressionType is not assignable to caseType', try the reversed check and report errors if it fails checkTypeAssignableTo(caseType, expressionType, caseClause.expression, /*headMessage*/ undefined); } } @@ -13293,11 +13584,14 @@ namespace ts { const enumIsConst = isConst(node); for (const member of node.members) { - if (member.name.kind === SyntaxKind.ComputedPropertyName) { + if (isComputedNonLiteralName(member.name)) { error(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums); } - else if (isNumericLiteralName((member.name).text)) { - error(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name); + else { + const text = getTextOfPropertyName(member.name); + if (isNumericLiteralName(text)) { + error(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name); + } } const previousEnumMemberIsNonConstant = autoValue === undefined; @@ -14117,8 +14411,12 @@ namespace ts { if (!(links.flags & NodeCheckFlags.TypeChecked)) { // Check whether the file has declared it is the default lib, // and whether the user has specifically chosen to avoid checking it. - if (node.isDefaultLib && compilerOptions.skipDefaultLibCheck) { - return; + if (compilerOptions.skipDefaultLibCheck) { + // If the user specified '--noLib' and a file has a '/// ', + // then we should treat that file as a default lib. + if (node.hasNoDefaultLib) { + return; + } } // Grammar checking @@ -14127,6 +14425,7 @@ namespace ts { emitExtends = false; emitDecorate = false; emitParam = false; + emitAwaiter = false; potentialThisCollisions.length = 0; forEach(node.statements, checkSourceElement); @@ -14249,8 +14548,8 @@ namespace ts { if (className) { copySymbol(location.symbol, meaning); } - // fall through; this fall-through is necessary because we would like to handle - // type parameter inside class expression similar to how we handle it in classDeclaration and interface Declaration + // fall through; this fall-through is necessary because we would like to handle + // type parameter inside class expression similar to how we handle it in classDeclaration and interface Declaration case SyntaxKind.ClassDeclaration: case SyntaxKind.InterfaceDeclaration: // If we didn't come from static member of class or interface, @@ -14406,8 +14705,8 @@ namespace ts { return resolveEntityName(entityName, meaning); } else if ((entityName.parent.kind === SyntaxKind.JsxOpeningElement) || - (entityName.parent.kind === SyntaxKind.JsxSelfClosingElement) || - (entityName.parent.kind === SyntaxKind.JsxClosingElement)) { + (entityName.parent.kind === SyntaxKind.JsxSelfClosingElement) || + (entityName.parent.kind === SyntaxKind.JsxClosingElement)) { return getJsxElementTagSymbol(entityName.parent); } else if (isExpression(entityName)) { @@ -14474,8 +14773,8 @@ namespace ts { : getSymbolOfPartOfRightHandSideOfImportEquals(node); } else if (node.parent.kind === SyntaxKind.BindingElement && - node.parent.parent.kind === SyntaxKind.ObjectBindingPattern && - node === (node.parent).propertyName) { + node.parent.parent.kind === SyntaxKind.ObjectBindingPattern && + node === (node.parent).propertyName) { const typeOfPattern = getTypeOfNode(node.parent.parent); const propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, (node).text); @@ -14496,6 +14795,9 @@ namespace ts { const type = isExpression(node) ? checkExpression(node) : getTypeFromTypeNode(node); return type.symbol; + case SyntaxKind.ThisType: + return getTypeFromTypeNode(node).symbol; + case SyntaxKind.ConstructorKeyword: // constructor keyword for an overload, should take us to the definition if it exist const constructorDeclaration = node.parent; @@ -14512,7 +14814,7 @@ namespace ts { (node.parent).moduleSpecifier === node)) { return resolveExternalModuleName(node, node); } - // Fall through + // Fall through case SyntaxKind.NumericLiteral: // index access @@ -14708,7 +15010,7 @@ namespace ts { if (links.isNestedRedeclaration === undefined) { const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); links.isNestedRedeclaration = isStatementWithLocals(container) && - !!resolveName(container.parent, symbol.name, SymbolFlags.Value, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); + !!resolveName(container.parent, symbol.name, SymbolFlags.Value, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); } return links.isNestedRedeclaration; } @@ -15751,7 +16053,7 @@ namespace ts { } function checkGrammarForNonSymbolComputedProperty(node: DeclarationName, message: DiagnosticMessage) { - if (node.kind === SyntaxKind.ComputedPropertyName && !isWellKnownSymbolSyntactically((node).expression)) { + if (isDynamicName(node)) { return grammarErrorOnNode(node, message); } } @@ -16030,11 +16332,17 @@ namespace ts { if (checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { return true; } + if (node.initializer) { + return grammarErrorOnNode(node.initializer, Diagnostics.An_interface_property_cannot_have_an_initializer); + } } else if (node.parent.kind === SyntaxKind.TypeLiteral) { if (checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { return true; } + if (node.initializer) { + return grammarErrorOnNode(node.initializer, Diagnostics.A_type_literal_property_cannot_have_an_initializer); + } } if (isInAmbientContext(node) && node.initializer) { diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 3fca97c045021..034b7022e8232 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -279,6 +279,16 @@ namespace ts { name: "forceConsistentCasingInFileNames", type: "boolean", description: Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file + }, + { + name: "allowSyntheticDefaultImports", + type: "boolean", + description: Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking + }, + { + name: "allowJs", + type: "boolean", + description: Diagnostics.Allow_javascript_files_to_be_compiled } ]; @@ -474,9 +484,10 @@ namespace ts { * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ - export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine { - const { options, errors } = convertCompilerOptionsFromJson(json["compilerOptions"], basePath); + export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions: CompilerOptions = {}): ParsedCommandLine { + const { options: optionsFromJsonConfigFile, errors } = convertCompilerOptionsFromJson(json["compilerOptions"], basePath); + const options = extend(existingOptions, optionsFromJsonConfigFile); return { options, fileNames: getFileNames(), @@ -494,23 +505,32 @@ namespace ts { } } else { + const filesSeen: Map = {}; const exclude = json["exclude"] instanceof Array ? map(json["exclude"], normalizeSlashes) : undefined; - const sysFiles = host.readDirectory(basePath, ".ts", exclude).concat(host.readDirectory(basePath, ".tsx", exclude)); - for (let i = 0; i < sysFiles.length; i++) { - const name = sysFiles[i]; - if (fileExtensionIs(name, ".d.ts")) { - const baseName = name.substr(0, name.length - ".d.ts".length); - if (!contains(sysFiles, baseName + ".tsx") && !contains(sysFiles, baseName + ".ts")) { - fileNames.push(name); + const supportedExtensions = getSupportedExtensions(options); + Debug.assert(indexOf(supportedExtensions, ".ts") < indexOf(supportedExtensions, ".d.ts"), "Changed priority of extensions to pick"); + + // Get files of supported extensions in their order of resolution + for (const extension of supportedExtensions) { + const filesInDirWithExtension = host.readDirectory(basePath, extension, exclude); + for (const fileName of filesInDirWithExtension) { + // .ts extension would read the .d.ts extension files too but since .d.ts is lower priority extension, + // lets pick them when its turn comes up + if (extension === ".ts" && fileExtensionIs(fileName, ".d.ts")) { + continue; } - } - else if (fileExtensionIs(name, ".ts")) { - if (!contains(sysFiles, name + "x")) { - fileNames.push(name); + + // If this is one of the output extension (which would be .d.ts and .js if we are allowing compilation of js files) + // do not include this file if we included .ts or .tsx file with same base name as it could be output of the earlier compilation + if (extension === ".d.ts" || (options.allowJs && contains(supportedJavascriptExtensions, extension))) { + const baseName = fileName.substr(0, fileName.length - extension.length); + if (hasProperty(filesSeen, baseName + ".ts") || hasProperty(filesSeen, baseName + ".tsx")) { + continue; + } } - } - else { - fileNames.push(name); + + filesSeen[fileName] = true; + fileNames.push(fileName); } } } diff --git a/src/compiler/core.ts b/src/compiler/core.ts index c866cf41a928a..cae7bd8210341 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -297,8 +297,8 @@ namespace ts { return result; } - export function extend(first: Map, second: Map): Map { - const result: Map = {}; + export function extend, T2 extends Map<{}>>(first: T1 , second: T2): T1 & T2 { + const result: T1 & T2 = {}; for (const id in first) { (result as any)[id] = first[id]; } @@ -356,6 +356,33 @@ namespace ts { return result; } + /** + * Reduce the properties of a map. + * + * @param map The map to reduce + * @param callback An aggregation function that is called for each entry in the map + * @param initial The initial value for the reduction. + */ + export function reduceProperties(map: Map, callback: (aggregate: U, value: T, key: string) => U, initial: U): U { + let result = initial; + if (map) { + for (const key in map) { + if (hasProperty(map, key)) { + result = callback(result, map[key], String(key)); + } + } + } + + return result; + } + + /** + * Tests whether a value is an array. + */ + export function isArray(value: any): value is any[] { + return Array.isArray ? Array.isArray(value) : value instanceof Array; + } + export function memoize(callback: () => T): () => T { let value: T; return () => { @@ -714,7 +741,7 @@ namespace ts { } export function getBaseFileName(path: string) { - if (!path) { + if (path === undefined) { return undefined; } const i = path.lastIndexOf(directorySeparator); @@ -738,13 +765,18 @@ namespace ts { /** * List of supported extensions in order of file resolution precedence. */ - export const supportedExtensions = [".ts", ".tsx", ".d.ts"]; - export const supportedJsExtensions = supportedExtensions.concat(".js", ".jsx"); + export const supportedTypeScriptExtensions = [".ts", ".tsx", ".d.ts"]; + export const supportedJavascriptExtensions = [".js", ".jsx"]; + const allSupportedExtensions = supportedTypeScriptExtensions.concat(supportedJavascriptExtensions); + + export function getSupportedExtensions(options?: CompilerOptions): string[] { + return options && options.allowJs ? allSupportedExtensions : supportedTypeScriptExtensions; + } - export function isSupportedSourceFileName(fileName: string) { + export function isSupportedSourceFileName(fileName: string, compilerOptions?: CompilerOptions) { if (!fileName) { return false; } - for (const extension of supportedExtensions) { + for (const extension of getSupportedExtensions(compilerOptions)) { if (fileExtensionIs(fileName, extension)) { return true; } @@ -842,7 +874,7 @@ namespace ts { } export function fail(message?: string): void { - Debug.assert(false, message); + Debug.assert(/*expression*/ false, message); } } diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 669cbcbcf0cde..0e0b121bf3c20 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -31,13 +31,17 @@ namespace ts { } export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, targetSourceFile: SourceFile): Diagnostic[] { - const diagnostics: Diagnostic[] = []; - const jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, ".js"); - emitDeclarations(host, resolver, diagnostics, jsFilePath, targetSourceFile); - return diagnostics; + const declarationDiagnostics = createDiagnosticCollection(); + forEachExpectedEmitFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile); + return declarationDiagnostics.getDiagnostics(targetSourceFile.fileName); + + function getDeclarationDiagnosticsFromFile({ declarationFilePath }, sources: SourceFile[], isBundledEmit: boolean) { + emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sources, isBundledEmit); + } } - function emitDeclarations(host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[], jsFilePath: string, root?: SourceFile): DeclarationEmit { + function emitDeclarations(host: EmitHost, resolver: EmitResolver, emitterDiagnostics: DiagnosticCollection, declarationFilePath: string, + sourceFiles: SourceFile[], isBundledEmit: boolean): DeclarationEmit { const newLine = host.getNewLine(); const compilerOptions = host.getCompilerOptions(); @@ -58,7 +62,7 @@ namespace ts { let errorNameNode: DeclarationName; const emitJsDocComments = compilerOptions.removeComments ? function (declaration: Node) { } : writeJsDocComments; const emit = compilerOptions.stripInternal ? stripInternal : emitNode; - let noDeclare = !root; + let noDeclare: boolean; let moduleElementDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[] = []; let asynchronousSubModuleDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[]; @@ -68,105 +72,78 @@ namespace ts { // and we could be collecting these paths from multiple files into single one with --out option let referencePathsOutput = ""; - if (root) { - // Emitting just a single file, so emit references in this file only - if (!compilerOptions.noResolve) { - let addedGlobalFileReference = false; - forEach(root.referencedFiles, fileReference => { - const referencedFile = tryResolveScriptReference(host, root, fileReference); - - // All the references that are not going to be part of same file - if (referencedFile && ((referencedFile.flags & NodeFlags.DeclarationFile) || // This is a declare file reference - shouldEmitToOwnFile(referencedFile, compilerOptions) || // This is referenced file is emitting its own js file - !addedGlobalFileReference)) { // Or the global out file corresponding to this reference was not added + // Emit references corresponding to each file + const emittedReferencedFiles: SourceFile[] = []; + let addedGlobalFileReference = false; + let allSourcesModuleElementDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[] = []; + forEach(sourceFiles, sourceFile => { + // Dont emit for javascript file + if (isSourceFileJavaScript(sourceFile)) { + return; + } - writeReferencePath(referencedFile); - if (!isExternalModuleOrDeclarationFile(referencedFile)) { + // Check what references need to be added + if (!compilerOptions.noResolve) { + forEach(sourceFile.referencedFiles, fileReference => { + const referencedFile = tryResolveScriptReference(host, sourceFile, fileReference); + + // Emit reference in dts, if the file reference was not already emitted + if (referencedFile && !contains(emittedReferencedFiles, referencedFile)) { + // Add a reference to generated dts file, + // global file reference is added only + // - if it is not bundled emit (because otherwise it would be self reference) + // - and it is not already added + if (writeReferencePath(referencedFile, !isBundledEmit && !addedGlobalFileReference)) { addedGlobalFileReference = true; } + emittedReferencedFiles.push(referencedFile); } }); } - emitSourceFile(root); + if (!isBundledEmit || !isExternalModule(sourceFile)) { + noDeclare = false; + emitSourceFile(sourceFile); + } + else if (isExternalModule(sourceFile)) { + noDeclare = true; + write(`declare module "${getResolvedExternalModuleName(host, sourceFile)}" {`); + writeLine(); + increaseIndent(); + emitSourceFile(sourceFile); + decreaseIndent(); + write("}"); + writeLine(); + } // create asynchronous output for the importDeclarations if (moduleElementDeclarationEmitInfo.length) { const oldWriter = writer; forEach(moduleElementDeclarationEmitInfo, aliasEmitInfo => { - if (aliasEmitInfo.isVisible) { + if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { Debug.assert(aliasEmitInfo.node.kind === SyntaxKind.ImportDeclaration); createAndSetNewTextWriterWithSymbolWriter(); - Debug.assert(aliasEmitInfo.indent === 0); + Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); + for (let i = 0; i < aliasEmitInfo.indent; i++) { + increaseIndent(); + } writeImportDeclaration(aliasEmitInfo.node); aliasEmitInfo.asynchronousOutput = writer.getText(); + for (let i = 0; i < aliasEmitInfo.indent; i++) { + decreaseIndent(); + } } }); setWriter(oldWriter); - } - } - else { - // Emit references corresponding to this file - const emittedReferencedFiles: SourceFile[] = []; - let prevModuleElementDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[] = []; - forEach(host.getSourceFiles(), sourceFile => { - if (!isDeclarationFile(sourceFile)) { - // Check what references need to be added - if (!compilerOptions.noResolve) { - forEach(sourceFile.referencedFiles, fileReference => { - const referencedFile = tryResolveScriptReference(host, sourceFile, fileReference); - - // If the reference file is a declaration file, emit that reference - if (referencedFile && (isDeclarationFile(referencedFile) && - !contains(emittedReferencedFiles, referencedFile))) { // If the file reference was not already emitted - - writeReferencePath(referencedFile); - emittedReferencedFiles.push(referencedFile); - } - }); - } - } - - if (!isExternalModuleOrDeclarationFile(sourceFile)) { - noDeclare = false; - emitSourceFile(sourceFile); - } - else if (isExternalModule(sourceFile)) { - noDeclare = true; - write(`declare module "${getResolvedExternalModuleName(host, sourceFile)}" {`); - writeLine(); - increaseIndent(); - emitSourceFile(sourceFile); - decreaseIndent(); - write("}"); - writeLine(); - // create asynchronous output for the importDeclarations - if (moduleElementDeclarationEmitInfo.length) { - const oldWriter = writer; - forEach(moduleElementDeclarationEmitInfo, aliasEmitInfo => { - if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { - Debug.assert(aliasEmitInfo.node.kind === SyntaxKind.ImportDeclaration); - createAndSetNewTextWriterWithSymbolWriter(); - Debug.assert(aliasEmitInfo.indent === 1); - increaseIndent(); - writeImportDeclaration(aliasEmitInfo.node); - aliasEmitInfo.asynchronousOutput = writer.getText(); - decreaseIndent(); - } - }); - setWriter(oldWriter); - } - prevModuleElementDeclarationEmitInfo = prevModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); - moduleElementDeclarationEmitInfo = []; - } - }); - moduleElementDeclarationEmitInfo = moduleElementDeclarationEmitInfo.concat(prevModuleElementDeclarationEmitInfo); - } + allSourcesModuleElementDeclarationEmitInfo = allSourcesModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); + moduleElementDeclarationEmitInfo = []; + } + }); return { reportedDeclarationError, - moduleElementDeclarationEmitInfo, + moduleElementDeclarationEmitInfo: allSourcesModuleElementDeclarationEmitInfo, synchronousDeclarationOutput: writer.getText(), referencePathsOutput, }; @@ -278,14 +255,14 @@ namespace ts { const errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccesibilityResult); if (errorInfo) { if (errorInfo.typeName) { - diagnostics.push(createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, + emitterDiagnostics.add(createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, getTextOfNodeFromSourceText(currentText, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); } else { - diagnostics.push(createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, + emitterDiagnostics.add(createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); @@ -300,7 +277,8 @@ namespace ts { function reportInaccessibleThisError() { if (errorNameNode) { - diagnostics.push(createDiagnosticForNode(errorNameNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary, + reportedDeclarationError = true; + emitterDiagnostics.add(createDiagnosticForNode(errorNameNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary, declarationNameToString(errorNameNode))); } } @@ -378,8 +356,8 @@ namespace ts { case SyntaxKind.BooleanKeyword: case SyntaxKind.SymbolKeyword: case SyntaxKind.VoidKeyword: - case SyntaxKind.ThisKeyword: - case SyntaxKind.StringLiteral: + case SyntaxKind.ThisType: + case SyntaxKind.StringLiteralType: return writeTextOfNode(currentText, type); case SyntaxKind.ExpressionWithTypeArguments: return emitExpressionWithTypeArguments(type); @@ -680,7 +658,7 @@ namespace ts { } else { write("require("); - writeTextOfNode(currentText, getExternalModuleImportEqualsDeclarationExpression(node)); + emitExternalModuleSpecifier(node); write(");"); } writer.writeLine(); @@ -737,14 +715,23 @@ namespace ts { } write(" from "); } - emitExternalModuleSpecifier(node.moduleSpecifier); + emitExternalModuleSpecifier(node); write(";"); writer.writeLine(); } - function emitExternalModuleSpecifier(moduleSpecifier: Expression) { - if (moduleSpecifier.kind === SyntaxKind.StringLiteral && (!root) && (compilerOptions.out || compilerOptions.outFile)) { - const moduleName = getExternalModuleNameFromDeclaration(host, resolver, moduleSpecifier.parent as (ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration)); + function emitExternalModuleSpecifier(parent: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration) { + let moduleSpecifier: Node; + if (parent.kind === SyntaxKind.ImportEqualsDeclaration) { + const node = parent as ImportEqualsDeclaration; + moduleSpecifier = getExternalModuleImportEqualsDeclarationExpression(node); + } + else { + const node = parent as (ImportDeclaration | ExportDeclaration); + moduleSpecifier = node.moduleSpecifier; + } + if (moduleSpecifier.kind === SyntaxKind.StringLiteral && isBundledEmit && (compilerOptions.out || compilerOptions.outFile)) { + const moduleName = getExternalModuleNameFromDeclaration(host, resolver, parent); if (moduleName) { write("\""); write(moduleName); @@ -787,7 +774,7 @@ namespace ts { } if (node.moduleSpecifier) { write(" from "); - emitExternalModuleSpecifier(node.moduleSpecifier); + emitExternalModuleSpecifier(node); } write(";"); writer.writeLine(); @@ -1643,34 +1630,58 @@ namespace ts { } } - function writeReferencePath(referencedFile: SourceFile) { - let declFileName = referencedFile.flags & NodeFlags.DeclarationFile - ? referencedFile.fileName // Declaration file, use declaration file name - : shouldEmitToOwnFile(referencedFile, compilerOptions) - ? getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") // Own output file so get the .d.ts file - : removeFileExtension(compilerOptions.outFile || compilerOptions.out) + ".d.ts"; // Global out file - - declFileName = getRelativePathToDirectoryOrUrl( - getDirectoryPath(normalizeSlashes(jsFilePath)), - declFileName, - host.getCurrentDirectory(), - host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ false); - - referencePathsOutput += "/// " + newLine; + /** + * Adds the reference to referenced file, returns true if global file reference was emitted + * @param referencedFile + * @param addBundledFileReference Determines if global file reference corresponding to bundled file should be emitted or not + */ + function writeReferencePath(referencedFile: SourceFile, addBundledFileReference: boolean): boolean { + let declFileName: string; + let addedBundledEmitReference = false; + if (isDeclarationFile(referencedFile)) { + // Declaration file, use declaration file name + declFileName = referencedFile.fileName; + } + else { + // Get the declaration file path + forEachExpectedEmitFile(host, getDeclFileName, referencedFile); + } + + if (declFileName) { + declFileName = getRelativePathToDirectoryOrUrl( + getDirectoryPath(normalizeSlashes(declarationFilePath)), + declFileName, + host.getCurrentDirectory(), + host.getCanonicalFileName, + /*isAbsolutePathAnUrl*/ false); + + referencePathsOutput += "/// " + newLine; + } + return addedBundledEmitReference; + + function getDeclFileName(emitFileNames: EmitFileNames, sourceFiles: SourceFile[], isBundledEmit: boolean) { + // Dont add reference path to this file if it is a bundled emit and caller asked not emit bundled file path + if (isBundledEmit && !addBundledFileReference) { + return; + } + + Debug.assert(!!emitFileNames.declarationFilePath || isSourceFileJavaScript(referencedFile), "Declaration file is not present only for javascript files"); + declFileName = emitFileNames.declarationFilePath || emitFileNames.jsFilePath; + addedBundledEmitReference = isBundledEmit; + } } } /* @internal */ - export function writeDeclarationFile(jsFilePath: string, sourceFile: SourceFile, host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[]) { - const emitDeclarationResult = emitDeclarations(host, resolver, diagnostics, jsFilePath, sourceFile); - // TODO(shkamat): Should we not write any declaration file if any of them can produce error, - // or should we just not write this file like we are doing now - if (!emitDeclarationResult.reportedDeclarationError) { + export function writeDeclarationFile(declarationFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean, host: EmitHost, resolver: EmitResolver, emitterDiagnostics: DiagnosticCollection) { + const emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit); + const emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath); + if (!emitSkipped) { const declarationOutput = emitDeclarationResult.referencePathsOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); - writeFile(host, diagnostics, removeFileExtension(jsFilePath) + ".d.ts", declarationOutput, host.getCompilerOptions().emitBOM); + writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM); } + return emitSkipped; function getDeclarationOutput(synchronousDeclarationOutput: string, moduleElementDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[]) { let appliedSyncOutputPos = 0; diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index ad71d646b7b6a..0c19f6d8247a0 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -783,6 +783,14 @@ "category": "Error", "code": 1245 }, + "An interface property cannot have an initializer.": { + "category": "Error", + "code": 1246 + }, + "A type literal property cannot have an initializer.": { + "category": "Error", + "code": 1247 + }, "'with' statements are not allowed in an async function block.": { "category": "Error", @@ -1622,7 +1630,7 @@ }, "Cannot assign an abstract constructor type to a non-abstract constructor type.": { "category": "Error", - "code":2517 + "code": 2517 }, "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.": { "category": "Error", @@ -2060,6 +2068,22 @@ "category": "Error", "code": 5054 }, + "Cannot write file '{0}' because it would overwrite input file.": { + "category": "Error", + "code": 5055 + }, + "Cannot write file '{0}' because it would be overwritten by multiple input files.": { + "category": "Error", + "code": 5056 + }, + "Cannot find a tsconfig.json file at the specified directory: '{0}'": { + "category": "Error", + "code": 5057 + }, + "The specified path does not exist: '{0}'": { + "category": "Error", + "code": 5058 + }, "Concatenate and emit output to single file.": { "category": "Message", @@ -2101,6 +2125,10 @@ "category": "Message", "code": 6010 }, + "Allow default imports from modules with no default export. This does not affect code emit, just typechecking.": { + "category": "Message", + "code": 6011 + }, "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015' (experimental)": { "category": "Message", "code": 6015 @@ -2322,6 +2350,11 @@ "category": "Error", "code": 6082 }, + "Allow javascript files to be compiled.": { + "category": "Message", + "code": 6083 + }, + "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", "code": 7005 @@ -2405,7 +2438,7 @@ "Not all code paths return a value.": { "category": "Error", "code": 7030 - }, + }, "You cannot rename this element.": { "category": "Error", "code": 8000 diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index ce92150f9fd59..88847999a4b55 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1,12 +1,9 @@ /// +/// /// /* @internal */ namespace ts { - export function isExternalModuleOrDeclarationFile(sourceFile: SourceFile) { - return isExternalModule(sourceFile) || isDeclarationFile(sourceFile); - } - export function getResolvedExternalModuleName(host: EmitHost, file: SourceFile): string { return file.moduleName || getExternalModuleNameFromPath(host, file.fileName); } @@ -337,47 +334,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi };`; const compilerOptions = host.getCompilerOptions(); - const languageVersion = compilerOptions.target || ScriptTarget.ES3; - const modulekind = compilerOptions.module ? compilerOptions.module : languageVersion === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.None; + const languageVersion = getEmitScriptTarget(compilerOptions); + const modulekind = getEmitModuleKind(compilerOptions); const sourceMapDataList: SourceMapData[] = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined; - let diagnostics: Diagnostic[] = []; + const emitterDiagnostics = createDiagnosticCollection(); + let emitSkipped = false; const newLine = host.getNewLine(); - const jsxDesugaring = host.getCompilerOptions().jsx !== JsxEmit.Preserve; - const shouldEmitJsx = (s: SourceFile) => (s.languageVariant === LanguageVariant.JSX && !jsxDesugaring); - const outFile = compilerOptions.outFile || compilerOptions.out; const emitJavaScript = createFileEmitter(); - - if (targetSourceFile === undefined) { - if (outFile) { - emitFile(outFile); - } - else { - forEach(host.getSourceFiles(), sourceFile => { - if (shouldEmitToOwnFile(sourceFile, compilerOptions)) { - const jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, shouldEmitJsx(sourceFile) ? ".jsx" : ".js"); - emitFile(jsFilePath, sourceFile); - } - }); - } - } - else { - // targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service) - if (shouldEmitToOwnFile(targetSourceFile, compilerOptions)) { - const jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, shouldEmitJsx(targetSourceFile) ? ".jsx" : ".js"); - emitFile(jsFilePath, targetSourceFile); - } - else if (!isDeclarationFile(targetSourceFile) && outFile) { - emitFile(outFile); - } - } - - // Sort and make the unique list of diagnostics - diagnostics = sortAndDeduplicateDiagnostics(diagnostics); + forEachExpectedEmitFile(host, emitFile, targetSourceFile); return { - emitSkipped: false, - diagnostics, + emitSkipped, + diagnostics: emitterDiagnostics.getDiagnostics(), sourceMaps: sourceMapDataList }; @@ -428,18 +397,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi * var loop = function(x) { } * var arguments_1 = arguments * for (var x;;) loop(x); - * otherwise semantics of the code will be different since 'arguments' inside converted loop body + * otherwise semantics of the code will be different since 'arguments' inside converted loop body * will refer to function that holds converted loop. * This value is set on demand. */ argumentsName?: string; + /* + * alias for 'this' from the calling code stack frame in case if this was used inside the converted loop + */ + thisName?: string; + /* * list of non-block scoped variable declarations that appear inside converted loop - * such variable declarations should be moved outside the loop body + * such variable declarations should be moved outside the loop body * for (let x;;) { * var y = 1; - * ... + * ... * } * should be converted to * var loop = function(x) { @@ -486,10 +460,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - function createFileEmitter(): (jsFilePath: string, root?: SourceFile) => void { - const writer: EmitTextWriter = createTextWriter(newLine); + function createFileEmitter(): (jsFilePath: string, sourceMapFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean) => void { + const writer = createTextWriter(newLine); const { write, writeTextOfNode, writeLine, increaseIndent, decreaseIndent } = writer; + const sourceMap = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? createSourceMapWriter(host, writer) : getNullSourceMapWriter(); + const { setSourceFile, emitStart, emitEnd, emitPos } = sourceMap; + let currentSourceFile: SourceFile; let currentText: string; let currentLineMap: number[]; @@ -516,7 +493,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi let decorateEmitted: boolean; let paramEmitted: boolean; let awaiterEmitted: boolean; - let tempFlags: TempFlags; + let tempFlags: TempFlags = 0; let tempVariables: Identifier[]; let tempParameters: Identifier[]; let externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]; @@ -524,43 +501,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi let exportEquals: ExportAssignment; let hasExportStars: boolean; - /** Write emitted output to disk */ - let writeEmittedFiles = writeJavaScriptFile; - let detachedCommentsInfo: { nodePos: number; detachedCommentEndPos: number }[]; - let writeComment = writeCommentRange; - - /** Emit a node */ - let emit = emitNodeWithCommentsAndWithoutSourcemap; - - /** Called just before starting emit of a node */ - let emitStart = function (node: Node) { }; - - /** Called once the emit of the node is done */ - let emitEnd = function (node: Node) { }; - - /** Emit the text for the given token that comes after startPos - * This by default writes the text provided with the given tokenKind - * but if optional emitFn callback is provided the text is emitted using the callback instead of default text - * @param tokenKind the kind of the token to search and emit - * @param startPos the position in the source to start searching for the token - * @param emitFn if given will be invoked to emit the text instead of actual token emit */ - let emitToken = emitTokenText; - - /** Called to before starting the lexical scopes as in function/class in the emitted code because of node - * @param scopeDeclaration node that starts the lexical scope - * @param scopeName Optional name of this scope instead of deducing one from the declaration node */ - let scopeEmitStart = function(scopeDeclaration: Node, scopeName?: string) { }; - - /** Called after coming out of the scope */ - let scopeEmitEnd = function() { }; - /** Sourcemap data that will get encoded */ let sourceMapData: SourceMapData; - /** The root file passed to the emit function (if present) */ - let root: SourceFile; + /** Is the file being emitted into its own file */ + let isOwnFileEmit: boolean; /** If removeComments is true, no leading-comments needed to be emitted **/ const emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos: number) { } : emitLeadingCommentsOfPositionWorker; @@ -583,18 +530,40 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return doEmit; - function doEmit(jsFilePath: string, rootFile?: SourceFile) { + function doEmit(jsFilePath: string, sourceMapFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean) { + sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit); + generatedNameSet = {}; + nodeToGeneratedName = []; + isOwnFileEmit = !isBundledEmit; + + // Emit helpers from all the files + if (isBundledEmit && modulekind) { + forEach(sourceFiles, emitEmitHelpers); + } + + // Do not call emit directly. It does not set the currentSourceFile. + forEach(sourceFiles, emitSourceFile); + + writeLine(); + + const sourceMappingURL = sourceMap.getSourceMappingURL(); + if (sourceMappingURL) { + write(`//# sourceMappingURL=${sourceMappingURL}`); + } + + writeEmittedFiles(writer.getText(), jsFilePath, sourceMapFilePath, /*writeByteOrderMark*/ compilerOptions.emitBOM); + // reset the state + sourceMap.reset(); writer.reset(); currentSourceFile = undefined; currentText = undefined; currentLineMap = undefined; exportFunctionForFile = undefined; - generatedNameSet = {}; - nodeToGeneratedName = []; + generatedNameSet = undefined; + nodeToGeneratedName = undefined; computedPropertyNamesToGeneratedNames = undefined; convertedLoopState = undefined; - extendsEmitted = false; decorateEmitted = false; paramEmitted = false; @@ -611,29 +580,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi isEs6Module = false; renamedDependencies = undefined; isCurrentFileExternalModule = false; - root = rootFile; - - if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) { - initializeEmitterWithSourceMaps(jsFilePath, root); - } - - if (root) { - // Do not call emit directly. It does not set the currentSourceFile. - emitSourceFile(root); - } - else { - if (modulekind) { - forEach(host.getSourceFiles(), emitEmitHelpers); - } - forEach(host.getSourceFiles(), sourceFile => { - if ((!isExternalModuleOrDeclarationFile(sourceFile)) || (modulekind && isExternalModule(sourceFile))) { - emitSourceFile(sourceFile); - } - }); - } - - writeLine(); - writeEmittedFiles(writer.getText(), jsFilePath, /*writeByteOrderMark*/ compilerOptions.emitBOM); } function emitSourceFile(sourceFile: SourceFile): void { @@ -647,7 +593,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi currentFileIdentifiers = sourceFile.identifiers; isCurrentFileExternalModule = isExternalModule(sourceFile); - emit(sourceFile); + setSourceFile(sourceFile); + emitNodeWithCommentsAndWithoutSourcemap(sourceFile); } function isUniqueName(name: string): boolean { @@ -744,400 +691,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return nodeToGeneratedName[id] || (nodeToGeneratedName[id] = unescapeIdentifier(generateNameForNode(node))); } - function initializeEmitterWithSourceMaps(jsFilePath: string, root?: SourceFile) { - let sourceMapDir: string; // The directory in which sourcemap will be - - // Current source map file and its index in the sources list - let sourceMapSourceIndex = -1; - - // Names and its index map - const sourceMapNameIndexMap: Map = {}; - const sourceMapNameIndices: number[] = []; - function getSourceMapNameIndex() { - return sourceMapNameIndices.length ? lastOrUndefined(sourceMapNameIndices) : -1; - } - - // Last recorded and encoded spans - let lastRecordedSourceMapSpan: SourceMapSpan; - let lastEncodedSourceMapSpan: SourceMapSpan = { - emittedLine: 1, - emittedColumn: 1, - sourceLine: 1, - sourceColumn: 1, - sourceIndex: 0 - }; - let lastEncodedNameIndex = 0; - - // Encoding for sourcemap span - function encodeLastRecordedSourceMapSpan() { - if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) { - return; - } - - let prevEncodedEmittedColumn = lastEncodedSourceMapSpan.emittedColumn; - // Line/Comma delimiters - if (lastEncodedSourceMapSpan.emittedLine === lastRecordedSourceMapSpan.emittedLine) { - // Emit comma to separate the entry - if (sourceMapData.sourceMapMappings) { - sourceMapData.sourceMapMappings += ","; - } - } - else { - // Emit line delimiters - for (let encodedLine = lastEncodedSourceMapSpan.emittedLine; encodedLine < lastRecordedSourceMapSpan.emittedLine; encodedLine++) { - sourceMapData.sourceMapMappings += ";"; - } - prevEncodedEmittedColumn = 1; - } - - // 1. Relative Column 0 based - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.emittedColumn - prevEncodedEmittedColumn); - - // 2. Relative sourceIndex - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceIndex - lastEncodedSourceMapSpan.sourceIndex); - - // 3. Relative sourceLine 0 based - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceLine - lastEncodedSourceMapSpan.sourceLine); - - // 4. Relative sourceColumn 0 based - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceColumn - lastEncodedSourceMapSpan.sourceColumn); - - // 5. Relative namePosition 0 based - if (lastRecordedSourceMapSpan.nameIndex >= 0) { - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.nameIndex - lastEncodedNameIndex); - lastEncodedNameIndex = lastRecordedSourceMapSpan.nameIndex; - } - - lastEncodedSourceMapSpan = lastRecordedSourceMapSpan; - sourceMapData.sourceMapDecodedMappings.push(lastEncodedSourceMapSpan); - - function base64VLQFormatEncode(inValue: number) { - function base64FormatEncode(inValue: number) { - if (inValue < 64) { - return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(inValue); - } - throw TypeError(inValue + ": not a 64 based value"); - } - - // Add a new least significant bit that has the sign of the value. - // if negative number the least significant bit that gets added to the number has value 1 - // else least significant bit value that gets added is 0 - // eg. -1 changes to binary : 01 [1] => 3 - // +1 changes to binary : 01 [0] => 2 - if (inValue < 0) { - inValue = ((-inValue) << 1) + 1; - } - else { - inValue = inValue << 1; - } - - // Encode 5 bits at a time starting from least significant bits - let encodedStr = ""; - do { - let currentDigit = inValue & 31; // 11111 - inValue = inValue >> 5; - if (inValue > 0) { - // There are still more digits to decode, set the msb (6th bit) - currentDigit = currentDigit | 32; - } - encodedStr = encodedStr + base64FormatEncode(currentDigit); - } while (inValue > 0); - - return encodedStr; - } - } - - function recordSourceMapSpan(pos: number) { - const sourceLinePos = computeLineAndCharacterOfPosition(currentLineMap, pos); - - // Convert the location to be one-based. - sourceLinePos.line++; - sourceLinePos.character++; - - const emittedLine = writer.getLine(); - const emittedColumn = writer.getColumn(); - - // 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 || - (lastRecordedSourceMapSpan.sourceIndex === sourceMapSourceIndex && - (lastRecordedSourceMapSpan.sourceLine > sourceLinePos.line || - (lastRecordedSourceMapSpan.sourceLine === sourceLinePos.line && lastRecordedSourceMapSpan.sourceColumn > sourceLinePos.character)))) { - // Encode the last recordedSpan before assigning new - encodeLastRecordedSourceMapSpan(); - - // New span - lastRecordedSourceMapSpan = { - emittedLine: emittedLine, - emittedColumn: emittedColumn, - sourceLine: sourceLinePos.line, - sourceColumn: sourceLinePos.character, - nameIndex: getSourceMapNameIndex(), - sourceIndex: sourceMapSourceIndex - }; - } - else { - // Take the new pos instead since there is no change in emittedLine and column since last location - lastRecordedSourceMapSpan.sourceLine = sourceLinePos.line; - lastRecordedSourceMapSpan.sourceColumn = sourceLinePos.character; - lastRecordedSourceMapSpan.sourceIndex = sourceMapSourceIndex; - } - } - - function recordEmitNodeStartSpan(node: Node) { - // Get the token pos after skipping to the token (ignoring the leading trivia) - recordSourceMapSpan(skipTrivia(currentText, node.pos)); - } - - function recordEmitNodeEndSpan(node: Node) { - recordSourceMapSpan(node.end); - } - - function writeTextWithSpanRecord(tokenKind: SyntaxKind, startPos: number, emitFn?: () => void) { - const tokenStartPos = ts.skipTrivia(currentText, startPos); - recordSourceMapSpan(tokenStartPos); - const tokenEndPos = emitTokenText(tokenKind, tokenStartPos, emitFn); - recordSourceMapSpan(tokenEndPos); - return tokenEndPos; - } - - function recordNewSourceFileStart(node: SourceFile) { - // 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 - const sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir; - - sourceMapData.sourceMapSources.push(getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, - node.fileName, - host.getCurrentDirectory(), - host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ true)); - sourceMapSourceIndex = sourceMapData.sourceMapSources.length - 1; - - // The one that can be used from program to get the actual source file - sourceMapData.inputSourceFileNames.push(node.fileName); - - if (compilerOptions.inlineSources) { - if (!sourceMapData.sourceMapSourcesContent) { - sourceMapData.sourceMapSourcesContent = []; - } - sourceMapData.sourceMapSourcesContent.push(node.text); - } - } - - function recordScopeNameOfNode(node: Node, scopeName?: string) { - function recordScopeNameIndex(scopeNameIndex: number) { - sourceMapNameIndices.push(scopeNameIndex); - } - - function recordScopeNameStart(scopeName: string) { - let scopeNameIndex = -1; - if (scopeName) { - const parentIndex = getSourceMapNameIndex(); - if (parentIndex !== -1) { - // Child scopes are always shown with a dot (even if they have no name), - // unless it is a computed property. Then it is shown with brackets, - // but the brackets are included in the name. - const name = (node).name; - if (!name || name.kind !== SyntaxKind.ComputedPropertyName) { - scopeName = "." + scopeName; - } - scopeName = sourceMapData.sourceMapNames[parentIndex] + scopeName; - } - - scopeNameIndex = getProperty(sourceMapNameIndexMap, scopeName); - if (scopeNameIndex === undefined) { - scopeNameIndex = sourceMapData.sourceMapNames.length; - sourceMapData.sourceMapNames.push(scopeName); - sourceMapNameIndexMap[scopeName] = scopeNameIndex; - } - } - recordScopeNameIndex(scopeNameIndex); - } - - if (scopeName) { - // The scope was already given a name use it - recordScopeNameStart(scopeName); - } - else if (node.kind === SyntaxKind.FunctionDeclaration || - node.kind === SyntaxKind.FunctionExpression || - node.kind === SyntaxKind.MethodDeclaration || - node.kind === SyntaxKind.MethodSignature || - node.kind === SyntaxKind.GetAccessor || - node.kind === SyntaxKind.SetAccessor || - node.kind === SyntaxKind.ModuleDeclaration || - node.kind === SyntaxKind.ClassDeclaration || - node.kind === SyntaxKind.EnumDeclaration) { - // Declaration and has associated name use it - if ((node).name) { - const name = (node).name; - // For computed property names, the text will include the brackets - scopeName = name.kind === SyntaxKind.ComputedPropertyName - ? getTextOfNode(name) - : ((node).name).text; - } - recordScopeNameStart(scopeName); - } - else { - // Block just use the name from upper level scope - recordScopeNameIndex(getSourceMapNameIndex()); - } - } - - function recordScopeNameEnd() { - sourceMapNameIndices.pop(); - }; - - function writeCommentRangeWithMap(currentText: string, currentLineMap: number[], writer: EmitTextWriter, comment: CommentRange, newLine: string) { - recordSourceMapSpan(comment.pos); - writeCommentRange(currentText, currentLineMap, writer, comment, newLine); - recordSourceMapSpan(comment.end); - } - - function serializeSourceMapContents(version: number, file: string, sourceRoot: string, sources: string[], names: string[], mappings: string, sourcesContent?: string[]) { - if (typeof JSON !== "undefined") { - const map: any = { - version, - file, - sourceRoot, - sources, - names, - mappings - }; - - if (sourcesContent !== undefined) { - map.sourcesContent = sourcesContent; - } - - return JSON.stringify(map); - } - - return "{\"version\":" + version + ",\"file\":\"" + escapeString(file) + "\",\"sourceRoot\":\"" + escapeString(sourceRoot) + "\",\"sources\":[" + serializeStringArray(sources) + "],\"names\":[" + serializeStringArray(names) + "],\"mappings\":\"" + escapeString(mappings) + "\" " + (sourcesContent !== undefined ? ",\"sourcesContent\":[" + serializeStringArray(sourcesContent) + "]" : "") + "}"; - - function serializeStringArray(list: string[]): string { - let output = ""; - for (let i = 0, n = list.length; i < n; i++) { - if (i) { - output += ","; - } - output += "\"" + escapeString(list[i]) + "\""; - } - return output; - } - } - - function writeJavaScriptAndSourceMapFile(emitOutput: string, jsFilePath: string, writeByteOrderMark: boolean) { - encodeLastRecordedSourceMapSpan(); - - const sourceMapText = serializeSourceMapContents( - 3, - sourceMapData.sourceMapFile, - sourceMapData.sourceMapSourceRoot, - sourceMapData.sourceMapSources, - sourceMapData.sourceMapNames, - sourceMapData.sourceMapMappings, - sourceMapData.sourceMapSourcesContent); - - sourceMapDataList.push(sourceMapData); - - let sourceMapUrl: string; - if (compilerOptions.inlineSourceMap) { - // Encode the sourceMap into the sourceMap url - const base64SourceMapText = convertToBase64(sourceMapText); - sourceMapUrl = `//# sourceMappingURL=data:application/json;base64,${base64SourceMapText}`; - } - else { - // Write source map file - writeFile(host, diagnostics, sourceMapData.sourceMapFilePath, sourceMapText, /*writeByteOrderMark*/ false); - sourceMapUrl = `//# sourceMappingURL=${sourceMapData.jsSourceMappingURL}`; - } - - // Write sourcemap url to the js file and write the js file - writeJavaScriptFile(emitOutput + sourceMapUrl, jsFilePath, writeByteOrderMark); - } - - // Initialize source map data - const sourceMapJsFile = getBaseFileName(normalizeSlashes(jsFilePath)); - sourceMapData = { - sourceMapFilePath: jsFilePath + ".map", - jsSourceMappingURL: sourceMapJsFile + ".map", - sourceMapFile: sourceMapJsFile, - sourceMapSourceRoot: compilerOptions.sourceRoot || "", - sourceMapSources: [], - inputSourceFileNames: [], - sourceMapNames: [], - sourceMapMappings: "", - sourceMapSourcesContent: undefined, - sourceMapDecodedMappings: [] - }; - - // Normalize source root and make sure it has trailing "/" so that it can be used to combine paths with the - // relative paths of the sources list in the sourcemap - sourceMapData.sourceMapSourceRoot = ts.normalizeSlashes(sourceMapData.sourceMapSourceRoot); - if (sourceMapData.sourceMapSourceRoot.length && sourceMapData.sourceMapSourceRoot.charCodeAt(sourceMapData.sourceMapSourceRoot.length - 1) !== CharacterCodes.slash) { - sourceMapData.sourceMapSourceRoot += directorySeparator; - } - - if (compilerOptions.mapRoot) { - sourceMapDir = normalizeSlashes(compilerOptions.mapRoot); - if (root) { // emitting single module file - // For modules or multiple emit files the mapRoot will have directory structure like the sources - // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map - sourceMapDir = getDirectoryPath(getSourceFilePathInNewDir(root, host, sourceMapDir)); - } - - if (!isRootedDiskPath(sourceMapDir) && !isUrl(sourceMapDir)) { - // The relative paths are relative to the common directory - sourceMapDir = combinePaths(host.getCommonSourceDirectory(), sourceMapDir); - sourceMapData.jsSourceMappingURL = getRelativePathToDirectoryOrUrl( - getDirectoryPath(normalizePath(jsFilePath)), // get the relative sourceMapDir path based on jsFilePath - combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), // this is where user expects to see sourceMap - host.getCurrentDirectory(), - host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ true); - } - else { - sourceMapData.jsSourceMappingURL = combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL); - } - } - else { - sourceMapDir = getDirectoryPath(normalizePath(jsFilePath)); - } - - function emitNodeWithSourceMap(node: Node) { - if (node) { - if (nodeIsSynthesized(node)) { - return emitNodeWithoutSourceMap(node); - } - if (node.kind !== SyntaxKind.SourceFile) { - recordEmitNodeStartSpan(node); - emitNodeWithoutSourceMap(node); - recordEmitNodeEndSpan(node); - } - else { - recordNewSourceFileStart(node); - emitNodeWithoutSourceMap(node); - } - } + /** Write emitted output to disk */ + function writeEmittedFiles(emitOutput: string, jsFilePath: string, sourceMapFilePath: string, writeByteOrderMark: boolean) { + if (compilerOptions.sourceMap && !compilerOptions.inlineSourceMap) { + writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap.getText(), /*writeByteOrderMark*/ false); } - function emitNodeWithCommentsAndWithSourcemap(node: Node) { - emitNodeConsideringCommentsOption(node, emitNodeWithSourceMap); + if (sourceMapDataList) { + sourceMapDataList.push(sourceMap.getSourceMapData()); } - writeEmittedFiles = writeJavaScriptAndSourceMapFile; - emit = emitNodeWithCommentsAndWithSourcemap; - emitStart = recordEmitNodeStartSpan; - emitEnd = recordEmitNodeEndSpan; - emitToken = writeTextWithSpanRecord; - scopeEmitStart = recordScopeNameOfNode; - scopeEmitEnd = recordScopeNameEnd; - writeComment = writeCommentRangeWithMap; - } - - function writeJavaScriptFile(emitOutput: string, jsFilePath: string, writeByteOrderMark: boolean) { - writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark); + writeFile(host, emitterDiagnostics, jsFilePath, emitOutput, writeByteOrderMark); } // Create a temporary variable with a unique unused name. @@ -1175,7 +739,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - function emitTokenText(tokenKind: SyntaxKind, startPos: number, emitFn?: () => void) { + /** Emit the text for the given token that comes after startPos + * This by default writes the text provided with the given tokenKind + * but if optional emitFn callback is provided the text is emitted using the callback instead of default text + * @param tokenKind the kind of the token to search and emit + * @param startPos the position in the source to start searching for the token + * @param emitFn if given will be invoked to emit the text instead of actual token emit */ + function emitToken(tokenKind: SyntaxKind, startPos: number, emitFn?: () => void) { + const tokenStartPos = skipTrivia(currentText, startPos); + emitPos(tokenStartPos); + const tokenString = tokenToString(tokenKind); if (emitFn) { emitFn(); @@ -1183,7 +756,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi else { write(tokenString); } - return startPos + tokenString.length; + + const tokenEndPos = tokenStartPos + tokenString.length; + emitPos(tokenEndPos); + return tokenEndPos; } function emitOptional(prefix: string, node: Node) { @@ -1292,7 +868,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi function emitCommaList(nodes: Node[]) { if (nodes) { - emitList(nodes, 0, nodes.length, /*multiline*/ false, /*trailingComma*/ false); + emitList(nodes, 0, nodes.length, /*multiLine*/ false, /*trailingComma*/ false); } } @@ -1307,7 +883,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - function isBinaryOrOctalIntegerLiteral(node: LiteralExpression, text: string): boolean { + function isBinaryOrOctalIntegerLiteral(node: LiteralLikeNode, text: string): boolean { if (node.kind === SyntaxKind.NumericLiteral && text.length > 1) { switch (text.charCodeAt(1)) { case CharacterCodes.b: @@ -1321,7 +897,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return false; } - function emitLiteral(node: LiteralExpression) { + function emitLiteral(node: LiteralExpression | TemplateLiteralFragment) { const text = getLiteralText(node); if ((compilerOptions.sourceMap || compilerOptions.inlineSourceMap) && (node.kind === SyntaxKind.StringLiteral || isTemplateLiteralKind(node.kind))) { @@ -1336,7 +912,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - function getLiteralText(node: LiteralExpression) { + function getLiteralText(node: LiteralExpression | TemplateLiteralFragment) { // Any template literal or string literal with an extended escape // (e.g. "\u{0067}") will need to be downleveled as a escaped string literal. if (languageVersion < ScriptTarget.ES6 && (isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) { @@ -1395,7 +971,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(`"${text}"`); } - function emitDownlevelTaggedTemplateArray(node: TaggedTemplateExpression, literalEmitter: (literal: LiteralExpression) => void) { + function emitDownlevelTaggedTemplateArray(node: TaggedTemplateExpression, literalEmitter: (literal: LiteralExpression | TemplateLiteralFragment) => void) { write("["); if (node.template.kind === SyntaxKind.NoSubstitutionTemplateLiteral) { literalEmitter(node.template); @@ -1592,13 +1168,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi /// these emit into an object literal property name, we don't need to be worried /// about keywords, just non-identifier characters function emitAttributeName(name: Identifier) { - if (/[A-Za-z_]+[\w*]/.test(name.text)) { - write("\""); + if (/^[A-Za-z_]\w*$/.test(name.text)) { emit(name); - write("\""); } else { + write("\""); emit(name); + write("\""); } } @@ -2028,6 +1604,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.LexicalThis) { write("_this"); } + else if (convertedLoopState) { + write(convertedLoopState.thisName || (convertedLoopState.thisName = makeUniqueName("this"))); + } else { write("this"); } @@ -2191,7 +1770,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } else if (languageVersion >= ScriptTarget.ES6 || !forEach(elements, isSpreadElementExpression)) { write("["); - emitLinePreservingList(node, node.elements, elements.hasTrailingComma, /*spacesBetweenBraces:*/ false); + emitLinePreservingList(node, node.elements, elements.hasTrailingComma, /*spacesBetweenBraces*/ false); write("]"); } else { @@ -2215,7 +1794,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // then try to preserve the original shape of the object literal. // Otherwise just try to preserve the formatting. if (numElements === properties.length) { - emitLinePreservingList(node, properties, /* allowTrailingComma */ languageVersion >= ScriptTarget.ES5, /* spacesBetweenBraces */ true); + emitLinePreservingList(node, properties, /*allowTrailingComma*/ languageVersion >= ScriptTarget.ES5, /*spacesBetweenBraces*/ true); } else { const multiLine = (node.flags & NodeFlags.MultiLine) !== 0; @@ -2490,7 +2069,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // let obj = { y }; // } // Here we need to emit obj = { y : m.y } regardless of the output target. - if (languageVersion < ScriptTarget.ES6 || isNamespaceExportReference(node.name)) { + if (modulekind !== ModuleKind.ES6 || isNamespaceExportReference(node.name)) { // Emit identifier as an identifier write(": "); emit(node.name); @@ -2765,7 +2344,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(".bind.apply("); emit(target); write(", [void 0].concat("); - emitListWithSpread(node.arguments, /*needsUniqueCopy*/ false, /*multiline*/ false, /*trailingComma*/ false, /*useConcat*/ false); + emitListWithSpread(node.arguments, /*needsUniqueCopy*/ false, /*multiLine*/ false, /*trailingComma*/ false, /*useConcat*/ false); write(")))"); write("()"); } @@ -2982,7 +2561,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi synthesizedLHS = createSynthesizedNode(SyntaxKind.ElementAccessExpression, /*startsOnNewLine*/ false); - const identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefinedTempVariablesInPlaces*/ false, /*shouldEmitCommaBeforeAssignment*/ false); + const identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefineTempVariablesInPlace*/ false, /*shouldEmitCommaBeforeAssignment*/ false); synthesizedLHS.expression = identifier; if (leftHandSideExpression.argumentExpression.kind !== SyntaxKind.NumericLiteral && @@ -3001,7 +2580,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write("("); synthesizedLHS = createSynthesizedNode(SyntaxKind.PropertyAccessExpression, /*startsOnNewLine*/ false); - const identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefinedTempVariablesInPlaces*/ false, /*shouldemitCommaBeforeAssignment*/ false); + const identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefineTempVariablesInPlace*/ false, /*shouldEmitCommaBeforeAssignment*/ false); synthesizedLHS.expression = identifier; (synthesizedLHS).dotToken = leftHandSideExpression.dotToken; @@ -3121,7 +2700,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitToken(SyntaxKind.OpenBraceToken, node.pos); increaseIndent(); - scopeEmitStart(node.parent); if (node.kind === SyntaxKind.ModuleBlock) { Debug.assert(node.parent.kind === SyntaxKind.ModuleDeclaration); emitCaptureThisForNodeIfNecessary(node.parent); @@ -3133,7 +2711,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi decreaseIndent(); writeLine(); emitToken(SyntaxKind.CloseBraceToken, node.statements.end); - scopeEmitEnd(); } function emitEmbeddedStatement(node: Node) { @@ -3181,10 +2758,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi function emitDoStatementWorker(node: DoStatement, loop: ConvertedLoop) { write("do"); if (loop) { - emitConvertedLoopCall(loop, /* emitAsBlock */ true); + emitConvertedLoopCall(loop, /*emitAsBlock*/ true); } else { - emitNormalLoopBody(node, /* emitAsEmbeddedStatement */ true); + emitNormalLoopBody(node, /*emitAsEmbeddedStatement*/ true); } if (node.statement.kind === SyntaxKind.Block) { write(" "); @@ -3207,10 +2784,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(")"); if (loop) { - emitConvertedLoopCall(loop, /* emitAsBlock */ true); + emitConvertedLoopCall(loop, /*emitAsBlock*/ true); } else { - emitNormalLoopBody(node, /* emitAsEmbeddedStatement */ true); + emitNormalLoopBody(node, /*emitAsEmbeddedStatement*/ true); } } @@ -3226,7 +2803,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } if (convertedLoopState && (getCombinedNodeFlags(decl) & NodeFlags.BlockScoped) === 0) { - // we are inside a converted loop - this can only happen in downlevel scenarios + // we are inside a converted loop - this can only happen in downlevel scenarios // record names for all variable declarations for (const varDecl of decl.declarations) { hoistVariableDeclarationFromLoop(convertedLoopState, varDecl); @@ -3358,6 +2935,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi convertedLoopState.argumentsName = convertedOuterLoopState.argumentsName; } + if (convertedOuterLoopState.thisName) { + // outer loop has already used 'this' so we've already have some name to alias it + // use the same name in all nested loops + convertedLoopState.thisName = convertedOuterLoopState.thisName; + } + if (convertedOuterLoopState.hoistedLocalVariables) { // we've already collected some non-block scoped variable declarations in enclosing loop // use the same storage in nested loop @@ -3387,6 +2970,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi writeLine(); } } + if (convertedLoopState.thisName) { + // if alias for this is set + if (convertedOuterLoopState) { + // pass it to outer converted loop + convertedOuterLoopState.thisName = convertedLoopState.thisName; + } + else { + // this is top level converted loop so we need to create an alias for 'this' here + // NOTE: + // if converted loops were all nested in arrow function then we'll always emit '_this' so convertedLoopState.thisName will not be set. + // If it is set this means that all nested loops are not nested in arrow function and it is safe to capture 'this'. + write(`var ${convertedLoopState.thisName} = this;`); + writeLine(); + } + } if (convertedLoopState.hoistedLocalVariables) { // if hoistedLocalVariables !== undefined this means that we've possibly collected some variable declarations to be hoisted later @@ -3532,8 +3130,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(`switch(${loopResultVariable}) {`); increaseIndent(); - emitDispatchEntriesForLabeledJumps(currentLoop.labeledNonLocalBreaks, /* isBreak */ true, loopResultVariable, outerLoop); - emitDispatchEntriesForLabeledJumps(currentLoop.labeledNonLocalContinues, /* isBreak */ false, loopResultVariable, outerLoop); + emitDispatchEntriesForLabeledJumps(currentLoop.labeledNonLocalBreaks, /*isBreak*/ true, loopResultVariable, outerLoop); + emitDispatchEntriesForLabeledJumps(currentLoop.labeledNonLocalContinues, /*isBreak*/ false, loopResultVariable, outerLoop); decreaseIndent(); writeLine(); @@ -3551,7 +3149,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(`case "${labelMarker}": `); // if there are no outer converted loop or outer label in question is located inside outer converted loop // then emit labeled break\continue - // otherwise propagate pair 'label -> marker' to outer converted loop and emit 'return labelMarker' so outer loop can later decide what to do + // otherwise propagate pair 'label -> marker' to outer converted loop and emit 'return labelMarker' so outer loop can later decide what to do if (!outerLoop || (outerLoop.labels && outerLoop.labels[labelText])) { if (isBreak) { write("break "); @@ -3597,10 +3195,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(")"); if (loop) { - emitConvertedLoopCall(loop, /* emitAsBlock */ true); + emitConvertedLoopCall(loop, /*emitAsBlock*/ true); } else { - emitNormalLoopBody(node, /* emitAsEmbeddedStatement */ true); + emitNormalLoopBody(node, /*emitAsEmbeddedStatement*/ true); } } @@ -3638,10 +3236,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitToken(SyntaxKind.CloseParenToken, node.expression.end); if (loop) { - emitConvertedLoopCall(loop, /* emitAsBlock */ true); + emitConvertedLoopCall(loop, /*emitAsBlock*/ true); } else { - emitNormalLoopBody(node, /* emitAsEmbeddedStatement */ true); + emitNormalLoopBody(node, /*emitAsEmbeddedStatement*/ true); } } @@ -3781,10 +3379,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (loop) { writeLine(); - emitConvertedLoopCall(loop, /* emitAsBlock */ false); + emitConvertedLoopCall(loop, /*emitAsBlock*/ false); } else { - emitNormalLoopBody(node, /* emitAsEmbeddedStatement */ false); + emitNormalLoopBody(node, /*emitAsEmbeddedStatement*/ false); } writeLine(); @@ -3818,11 +3416,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi let labelMarker: string; if (node.kind === SyntaxKind.BreakStatement) { labelMarker = `break-${node.label.text}`; - setLabeledJump(convertedLoopState, /* isBreak */ true, node.label.text, labelMarker); + setLabeledJump(convertedLoopState, /*isBreak*/ true, node.label.text, labelMarker); } else { labelMarker = `continue-${node.label.text}`; - setLabeledJump(convertedLoopState, /* isBreak */ false, node.label.text, labelMarker); + setLabeledJump(convertedLoopState, /*isBreak*/ false, node.label.text, labelMarker); } write(`return "${labelMarker}";`); } @@ -4244,15 +3842,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return node; } - function createPropertyAccessForDestructuringProperty(object: Expression, propName: Identifier | LiteralExpression): Expression { - // We create a synthetic copy of the identifier in order to avoid the rewriting that might - // otherwise occur when the identifier is emitted. - const syntheticName = createSynthesizedNode(propName.kind); - syntheticName.text = propName.text; - if (syntheticName.kind !== SyntaxKind.Identifier) { - return createElementAccessExpression(object, syntheticName); + function createPropertyAccessForDestructuringProperty(object: Expression, propName: PropertyName): Expression { + let index: Expression; + const nameIsComputed = propName.kind === SyntaxKind.ComputedPropertyName; + if (nameIsComputed) { + index = ensureIdentifier((propName).expression, /*reuseIdentifierExpressions*/ false); } - return createPropertyAccessExpression(object, syntheticName); + else { + // We create a synthetic copy of the identifier in order to avoid the rewriting that might + // otherwise occur when the identifier is emitted. + index = createSynthesizedNode(propName.kind); + (index).text = (propName).text; + } + + return !nameIsComputed && index.kind === SyntaxKind.Identifier + ? createPropertyAccessExpression(object, index) + : createElementAccessExpression(object, index); } function createSliceCall(value: Expression, sliceIndex: number): CallExpression { @@ -4971,8 +4576,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi function emitDownLevelExpressionFunctionBody(node: FunctionLikeDeclaration, body: Expression) { write(" {"); - scopeEmitStart(node); - increaseIndent(); const outPos = writer.getTextPos(); emitDetachedCommentsAndUpdateCommentsInfo(node.body); @@ -4996,8 +4599,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi increaseIndent(); writeLine(); emitLeadingComments(node.body); + emitStart(body); write("return "); emit(body); + emitEnd(body); write(";"); emitTrailingComments(node.body); @@ -5009,14 +4614,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitStart(node.body); write("}"); emitEnd(node.body); - - scopeEmitEnd(); } function emitBlockFunctionBody(node: FunctionLikeDeclaration, body: Block) { write(" {"); - scopeEmitStart(node); - const initialTextPos = writer.getTextPos(); increaseIndent(); @@ -5050,7 +4651,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } emitToken(SyntaxKind.CloseBraceToken, body.statements.end); - scopeEmitEnd(); } function findInitialSuperCall(ctor: ConstructorDeclaration): ExpressionStatement { @@ -5336,7 +4936,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi let startIndex = 0; write(" {"); - scopeEmitStart(node, "constructor"); increaseIndent(); if (ctor) { // Emit all the directive prologues (like "use strict"). These have to come before @@ -5371,7 +4970,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitEnd(baseTypeElement); } } - emitPropertyDeclarations(node, getInitializedProperties(node, /*static:*/ false)); + emitPropertyDeclarations(node, getInitializedProperties(node, /*isStatic*/ false)); if (ctor) { let statements: Node[] = (ctor.body).statements; if (superCall) { @@ -5386,7 +4985,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } decreaseIndent(); emitToken(SyntaxKind.CloseBraceToken, ctor ? (ctor.body).statements.end : node.members.end); - scopeEmitEnd(); emitEnd(ctor || node); if (ctor) { emitTrailingComments(ctor); @@ -5493,7 +5091,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // // This keeps the expression as an expression, while ensuring that the static parts // of it have been initialized by the time it is used. - const staticProperties = getInitializedProperties(node, /*static:*/ true); + const staticProperties = getInitializedProperties(node, /*isStatic*/ true); const isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === SyntaxKind.ClassExpression; let tempVariable: Identifier; @@ -5523,14 +5121,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(" {"); increaseIndent(); - scopeEmitStart(node); writeLine(); emitConstructor(node, baseTypeNode); emitMemberFunctionsForES6AndHigher(node); decreaseIndent(); writeLine(); emitToken(SyntaxKind.CloseBraceToken, node.members.end); - scopeEmitEnd(); // TODO(rbuckton): Need to go back to `let _a = class C {}` approach, removing the defineProperty call for now. @@ -5555,7 +5151,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi for (var property of staticProperties) { write(","); writeLine(); - emitPropertyDeclaration(node, property, /*receiver:*/ tempVariable, /*isExpression:*/ true); + emitPropertyDeclaration(node, property, /*receiver*/ tempVariable, /*isExpression*/ true); } write(","); writeLine(); @@ -5569,9 +5165,31 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitDecoratorsOfClass(node); } + if (!(node.flags & NodeFlags.Export)) { + return; + } // If this is an exported class, but not on the top level (i.e. on an internal // module), export it - if (!isES6ExportedDeclaration(node) && (node.flags & NodeFlags.Export)) { + if (node.flags & NodeFlags.Default) { + // if this is a top level default export of decorated class, write the export after the declaration. + writeLine(); + if (thisNodeIsDecorated && modulekind === ModuleKind.ES6) { + write("export default "); + emitDeclarationName(node); + write(";"); + } + else if (modulekind === ModuleKind.System) { + write(`${exportFunctionForFile}("default", `); + emitDeclarationName(node); + write(");"); + } + else if (modulekind !== ModuleKind.ES6) { + write(`exports.default = `); + emitDeclarationName(node); + write(";"); + } + } + else if (node.parent.kind !== SyntaxKind.SourceFile || (modulekind !== ModuleKind.ES6 && !(node.flags & NodeFlags.Default))) { writeLine(); emitStart(node); emitModuleMemberName(node); @@ -5580,13 +5198,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitEnd(node); write(";"); } - else if (isES6ExportedDeclaration(node) && (node.flags & NodeFlags.Default) && thisNodeIsDecorated) { - // if this is a top level default export of decorated class, write the export after the declaration. - writeLine(); - write("export default "); - emitDeclarationName(node); - write(";"); - } } function emitClassLikeDeclarationBelowES6(node: ClassLikeDeclaration) { @@ -5617,7 +5228,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi tempParameters = undefined; computedPropertyNamesToGeneratedNames = undefined; increaseIndent(); - scopeEmitStart(node); if (baseTypeNode) { writeLine(); emitStart(baseTypeNode); @@ -5629,7 +5239,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi writeLine(); emitConstructor(node, baseTypeNode); emitMemberFunctionsForES5AndLower(node); - emitPropertyDeclarations(node, getInitializedProperties(node, /*static:*/ true)); + emitPropertyDeclarations(node, getInitializedProperties(node, /*isStatic*/ true)); writeLine(); emitDecoratorsOfClass(node); writeLine(); @@ -5650,7 +5260,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi decreaseIndent(); writeLine(); emitToken(SyntaxKind.CloseBraceToken, node.members.end); - scopeEmitEnd(); emitStart(node); write(")("); if (baseTypeNode) { @@ -5683,10 +5292,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi function emitDecoratorsOfConstructor(node: ClassLikeDeclaration) { const decorators = node.decorators; const constructor = getFirstConstructorWithBody(node); - const hasDecoratedParameters = constructor && forEach(constructor.parameters, nodeIsDecorated); + const firstParameterDecorator = constructor && forEach(constructor.parameters, parameter => parameter.decorators); // skip decoration of the constructor if neither it nor its parameters are decorated - if (!decorators && !hasDecoratedParameters) { + if (!decorators && !firstParameterDecorator) { return; } @@ -5702,28 +5311,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // writeLine(); - emitStart(node); + emitStart(node.decorators || firstParameterDecorator); emitDeclarationName(node); write(" = __decorate(["); increaseIndent(); writeLine(); const decoratorCount = decorators ? decorators.length : 0; - let argumentsWritten = emitList(decorators, 0, decoratorCount, /*multiLine*/ true, /*trailingComma*/ false, /*leadingComma*/ false, /*noTrailingNewLine*/ true, decorator => { - emitStart(decorator); - emit(decorator.expression); - emitEnd(decorator); - }); - - argumentsWritten += emitDecoratorsOfParameters(constructor, /*leadingComma*/ argumentsWritten > 0); + let argumentsWritten = emitList(decorators, 0, decoratorCount, /*multiLine*/ true, /*trailingComma*/ false, /*leadingComma*/ false, /*noTrailingNewLine*/ true, + decorator => emit(decorator.expression)); + if (firstParameterDecorator) { + argumentsWritten += emitDecoratorsOfParameters(constructor, /*leadingComma*/ argumentsWritten > 0); + } emitSerializedTypeMetadata(node, /*leadingComma*/ argumentsWritten >= 0); decreaseIndent(); writeLine(); write("], "); emitDeclarationName(node); - write(");"); - emitEnd(node); + write(")"); + emitEnd(node.decorators || firstParameterDecorator); + write(";"); writeLine(); } @@ -5739,11 +5347,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi continue; } - // skip a member if it or any of its parameters are not decorated - if (!nodeOrChildIsDecorated(member)) { - continue; - } - // skip an accessor declaration if it is not the first accessor let decorators: NodeArray; let functionLikeMember: FunctionLikeDeclaration; @@ -5770,6 +5373,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi functionLikeMember = member; } } + const firstParameterDecorator = functionLikeMember && forEach(functionLikeMember.parameters, parameter => parameter.decorators); + + // skip a member if it or any of its parameters are not decorated + if (!decorators && !firstParameterDecorator) { + continue; + } // Emit the call to __decorate. Given the following: // @@ -5803,29 +5412,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // writeLine(); - emitStart(member); + emitStart(decorators || firstParameterDecorator); write("__decorate(["); increaseIndent(); writeLine(); const decoratorCount = decorators ? decorators.length : 0; - let argumentsWritten = emitList(decorators, 0, decoratorCount, /*multiLine*/ true, /*trailingComma*/ false, /*leadingComma*/ false, /*noTrailingNewLine*/ true, decorator => { - emitStart(decorator); - emit(decorator.expression); - emitEnd(decorator); - }); + let argumentsWritten = emitList(decorators, 0, decoratorCount, /*multiLine*/ true, /*trailingComma*/ false, /*leadingComma*/ false, /*noTrailingNewLine*/ true, + decorator => emit(decorator.expression)); - argumentsWritten += emitDecoratorsOfParameters(functionLikeMember, argumentsWritten > 0); + if (firstParameterDecorator) { + argumentsWritten += emitDecoratorsOfParameters(functionLikeMember, argumentsWritten > 0); + } emitSerializedTypeMetadata(member, argumentsWritten > 0); decreaseIndent(); writeLine(); write("], "); - emitStart(member.name); emitClassMemberPrefix(node, member); write(", "); emitExpressionForPropertyName(member.name); - emitEnd(member.name); if (languageVersion > ScriptTarget.ES3) { if (member.kind !== SyntaxKind.PropertyDeclaration) { @@ -5840,8 +5446,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - write(");"); - emitEnd(member); + write(")"); + emitEnd(decorators || firstParameterDecorator); + write(";"); writeLine(); } } @@ -5854,11 +5461,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (nodeIsDecorated(parameter)) { const decorators = parameter.decorators; argumentsWritten += emitList(decorators, 0, decorators.length, /*multiLine*/ true, /*trailingComma*/ false, /*leadingComma*/ leadingComma, /*noTrailingNewLine*/ true, decorator => { - emitStart(decorator); write(`__param(${parameterIndex}, `); emit(decorator.expression); write(")"); - emitEnd(decorator); }); leadingComma = true; } @@ -5952,7 +5557,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi function emitSerializedTypeNode(node: TypeNode) { if (node) { - switch (node.kind) { case SyntaxKind.VoidKeyword: write("void 0"); @@ -5978,7 +5582,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return; case SyntaxKind.StringKeyword: - case SyntaxKind.StringLiteral: + case SyntaxKind.StringLiteralType: write("String"); return; @@ -5999,6 +5603,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi case SyntaxKind.UnionType: case SyntaxKind.IntersectionType: case SyntaxKind.AnyKeyword: + case SyntaxKind.ThisType: break; default: @@ -6017,9 +5622,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } // Clone the type name and parent it to a location outside of the current declaration. - const typeName = cloneEntityName(node.typeName); - typeName.parent = location; - + const typeName = cloneEntityName(node.typeName, location); const result = resolver.getTypeReferenceSerializationKind(typeName); switch (result) { case TypeReferenceSerializationKind.Unknown: @@ -6213,12 +5816,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitEnd(node.name); write(") {"); increaseIndent(); - scopeEmitStart(node); emitLines(node.members); decreaseIndent(); writeLine(); emitToken(SyntaxKind.CloseBraceToken, node.members.end); - scopeEmitEnd(); write(")("); emitModuleMemberName(node); write(" || ("); @@ -6342,7 +5943,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi else { write("{"); increaseIndent(); - scopeEmitStart(node); emitCaptureThisForNodeIfNecessary(node); writeLine(); emit(node.body); @@ -6350,7 +5950,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi writeLine(); const moduleBlock = getInnerMostModuleDeclarationFromDottedModule(node).body; emitToken(SyntaxKind.CloseBraceToken, moduleBlock.statements.end); - scopeEmitEnd(); } write(")("); // write moduleDecl = containingModule.m only if it is not exported es6 module member @@ -6795,7 +6394,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - function getExternalModuleNameText(importNode: ImportDeclaration | ExportDeclaration | ImportEqualsDeclaration): string { + function getExternalModuleNameText(importNode: ImportDeclaration | ExportDeclaration | ImportEqualsDeclaration, emitRelativePathAsModuleName: boolean): string { + if (emitRelativePathAsModuleName) { + const name = getExternalModuleNameFromDeclaration(host, resolver, importNode); + if (name) { + return `"${name}"`; + } + } const moduleName = getExternalModuleName(importNode); if (moduleName.kind === SyntaxKind.StringLiteral) { return tryRenameExternalModule(moduleName) || getLiteralText(moduleName); @@ -7355,7 +6960,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi const dependencyGroups: DependencyGroup[] = []; for (let i = 0; i < externalImports.length; ++i) { - let text = getExternalModuleNameText(externalImports[i]); + const text = getExternalModuleNameText(externalImports[i], emitRelativePathAsModuleName); if (hasProperty(groupIndices, text)) { // deduplicate/group entries in dependency list by the dependency name const groupIndex = groupIndices[text]; @@ -7371,18 +6976,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(", "); } - if (emitRelativePathAsModuleName) { - const name = getExternalModuleNameFromDeclaration(host, resolver, externalImports[i]); - if (name) { - text = `"${name}"`; - } - } write(text); } write(`], function(${exportFunctionForFile}) {`); writeLine(); increaseIndent(); - const startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true); + const startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true, /*ensureUseStrict*/ true); emitEmitHelpers(node); emitCaptureThisForNodeIfNecessary(node); emitSystemModuleBody(node, dependencyGroups, startIndex); @@ -7419,14 +7018,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi for (const importNode of externalImports) { // Find the name of the external module - let externalModuleName = getExternalModuleNameText(importNode); - - if (emitRelativePathAsModuleName) { - const name = getExternalModuleNameFromDeclaration(host, resolver, importNode); - if (name) { - externalModuleName = `"${name}"`; - } - } + const externalModuleName = getExternalModuleNameText(importNode, emitRelativePathAsModuleName); // Find the name of the module alias, if there is one const importAliasName = getLocalNameForExternalImport(importNode); @@ -7492,7 +7084,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi writeModuleName(node, emitRelativePathAsModuleName); emitAMDDependencies(node, /*includeNonAmdDependencies*/ true, emitRelativePathAsModuleName); increaseIndent(); - const startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true); + const startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true, /*ensureUseStrict*/ true); emitExportStarHelper(); emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); @@ -7504,7 +7096,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } function emitCommonJSModule(node: SourceFile) { - const startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ false); + const startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ false, /*ensureUseStrict*/ true); emitEmitHelpers(node); collectExternalModuleInfo(node); emitExportStarHelper(); @@ -7533,7 +7125,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi })(`); emitAMDFactoryHeader(dependencyNames); increaseIndent(); - const startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true); + const startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true, /*ensureUseStrict*/ true); emitExportStarHelper(); emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); @@ -7675,19 +7267,38 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - function emitDirectivePrologues(statements: Node[], startWithNewLine: boolean): number { + function isUseStrictPrologue(node: ExpressionStatement): boolean { + return !!(node.expression as StringLiteral).text.match(/use strict/); + } + + function ensureUseStrictPrologue(startWithNewLine: boolean, writeUseStrict: boolean) { + if (writeUseStrict) { + if (startWithNewLine) { + writeLine(); + } + write("\"use strict\";"); + } + } + + function emitDirectivePrologues(statements: Node[], startWithNewLine: boolean, ensureUseStrict?: boolean): number { + let foundUseStrict = false; for (let i = 0; i < statements.length; ++i) { if (isPrologueDirective(statements[i])) { + if (isUseStrictPrologue(statements[i] as ExpressionStatement)) { + foundUseStrict = true; + } if (startWithNewLine || i > 0) { writeLine(); } emit(statements[i]); } else { + ensureUseStrictPrologue(startWithNewLine || i > 0, !foundUseStrict && ensureUseStrict); // return index of the first non prologue directive return i; } } + ensureUseStrictPrologue(startWithNewLine, !foundUseStrict && ensureUseStrict); return statements.length; } @@ -7739,7 +7350,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitDetachedCommentsAndUpdateCommentsInfo(node); if (isExternalModule(node) || compilerOptions.isolatedModules) { - if (root || (!isExternalModule(node) && compilerOptions.isolatedModules)) { + if (isOwnFileEmit || (!isExternalModule(node) && compilerOptions.isolatedModules)) { const emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[ModuleKind.CommonJS]; emitModule(node); } @@ -7763,6 +7374,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitLeadingComments(node.endOfFileToken); } + function emit(node: Node): void { + emitNodeConsideringCommentsOption(node, emitNodeWithSourceMap); + } + function emitNodeWithCommentsAndWithoutSourcemap(node: Node): void { emitNodeConsideringCommentsOption(node, emitNodeWithoutSourceMap); } @@ -7791,6 +7406,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } + function emitNodeWithSourceMap(node: Node): void { + if (node) { + emitStart(node); + emitNodeWithoutSourceMap(node); + emitEnd(node); + } + } + function emitNodeWithoutSourceMap(node: Node): void { if (node) { emitJavaScriptWorker(node); @@ -8085,11 +7708,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi * Emit comments associated with node that will not be emitted into JS file */ function emitCommentsOnNotEmittedNode(node: Node) { - emitLeadingCommentsWorker(node, /*isEmittedNode:*/ false); + emitLeadingCommentsWorker(node, /*isEmittedNode*/ false); } function emitLeadingComments(node: Node) { - return emitLeadingCommentsWorker(node, /*isEmittedNode:*/ true); + return emitLeadingCommentsWorker(node, /*isEmittedNode*/ true); } function emitLeadingCommentsWorker(node: Node, isEmittedNode: boolean) { @@ -8118,7 +7741,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitNewLineBeforeLeadingComments(currentLineMap, writer, node, leadingComments); // Leading comments are emitted at /*leading comment1 */space/*leading comment*/space - emitComments(currentText, currentLineMap, writer, leadingComments, /*trailingSeparator:*/ true, newLine, writeComment); + emitComments(currentText, currentLineMap, writer, leadingComments, /*trailingSeparator*/ true, newLine, writeComment); } function emitTrailingComments(node: Node) { @@ -8183,6 +7806,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } + function writeComment(text: string, lineMap: number[], writer: EmitTextWriter, comment: CommentRange, newLine: string) { + emitPos(comment.pos); + writeCommentRange(text, lineMap, writer, comment, newLine); + emitPos(comment.end); + } + function emitShebang() { const shebang = getShebang(currentText); if (shebang) { @@ -8191,11 +7820,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - function emitFile(jsFilePath: string, sourceFile?: SourceFile) { - emitJavaScript(jsFilePath, sourceFile); + function emitFile({ jsFilePath, sourceMapFilePath, declarationFilePath}: { jsFilePath: string, sourceMapFilePath: string, declarationFilePath: string }, + sourceFiles: SourceFile[], isBundledEmit: boolean) { + // Make sure not to write js File and source map file if any of them cannot be written + if (!host.isEmitBlocked(jsFilePath)) { + emitJavaScript(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit); + } + else { + emitSkipped = true; + } - if (compilerOptions.declaration) { - writeDeclarationFile(jsFilePath, sourceFile, host, resolver, diagnostics); + if (declarationFilePath) { + emitSkipped = writeDeclarationFile(declarationFilePath, sourceFiles, isBundledEmit, host, resolver, emitterDiagnostics) || emitSkipped; } } } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index ea7fec65b5b99..3a3350f2166a8 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -544,6 +544,11 @@ namespace ts { return result; } + function getLanguageVariant(fileName: string) { + // .tsx and .jsx files are treated as jsx language variant. + return fileExtensionIs(fileName, ".tsx") || fileExtensionIs(fileName, ".jsx") ? LanguageVariant.JSX : LanguageVariant.Standard; + } + function initializeState(fileName: string, _sourceText: string, languageVersion: ScriptTarget, isJavaScriptFile: boolean, _syntaxCursor: IncrementalParser.SyntaxCursor) { NodeConstructor = objectAllocator.getNodeConstructor(); SourceFileConstructor = objectAllocator.getSourceFileConstructor(); @@ -564,7 +569,7 @@ namespace ts { scanner.setText(sourceText); scanner.setOnError(scanError); scanner.setScriptTarget(languageVersion); - scanner.setLanguageVariant(allowsJsxExpressions(fileName) ? LanguageVariant.JSX : LanguageVariant.Standard); + scanner.setLanguageVariant(getLanguageVariant(fileName)); } function clearState() { @@ -682,7 +687,7 @@ namespace ts { sourceFile.languageVersion = languageVersion; sourceFile.fileName = normalizePath(fileName); sourceFile.flags = fileExtensionIs(sourceFile.fileName, ".d.ts") ? NodeFlags.DeclarationFile : 0; - sourceFile.languageVariant = allowsJsxExpressions(sourceFile.fileName) ? LanguageVariant.JSX : LanguageVariant.Standard; + sourceFile.languageVariant = getLanguageVariant(sourceFile.fileName); return sourceFile; } @@ -722,10 +727,10 @@ namespace ts { const contextFlagsToClear = context & contextFlags; if (contextFlagsToClear) { // clear the requested context flags - setContextFlag(false, contextFlagsToClear); + setContextFlag(/*val*/ false, contextFlagsToClear); const result = func(); // restore the context flags we just cleared - setContextFlag(true, contextFlagsToClear); + setContextFlag(/*val*/ true, contextFlagsToClear); return result; } @@ -743,10 +748,10 @@ namespace ts { const contextFlagsToSet = context & ~contextFlags; if (contextFlagsToSet) { // set the requested context flags - setContextFlag(true, contextFlagsToSet); + setContextFlag(/*val*/ true, contextFlagsToSet); const result = func(); // reset the context flags we just set - setContextFlag(false, contextFlagsToSet); + setContextFlag(/*val*/ false, contextFlagsToSet); return result; } @@ -1087,7 +1092,7 @@ namespace ts { token === SyntaxKind.NumericLiteral; } - function parsePropertyNameWorker(allowComputedPropertyNames: boolean): DeclarationName { + function parsePropertyNameWorker(allowComputedPropertyNames: boolean): PropertyName { if (token === SyntaxKind.StringLiteral || token === SyntaxKind.NumericLiteral) { return parseLiteralNode(/*internName*/ true); } @@ -1097,12 +1102,12 @@ namespace ts { return parseIdentifierName(); } - function parsePropertyName(): DeclarationName { - return parsePropertyNameWorker(/*allowComputedPropertyNames:*/ true); + function parsePropertyName(): PropertyName { + return parsePropertyNameWorker(/*allowComputedPropertyNames*/ true); } function parseSimplePropertyName(): Identifier | LiteralExpression { - return parsePropertyNameWorker(/*allowComputedPropertyNames:*/ false); + return parsePropertyNameWorker(/*allowComputedPropertyNames*/ false); } function isSimplePropertyName() { @@ -1157,7 +1162,7 @@ namespace ts { } function parseAnyContextualModifier(): boolean { - return isModifier(token) && tryParse(nextTokenCanFollowModifier); + return isModifierKind(token) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier(): boolean { @@ -1207,7 +1212,7 @@ namespace ts { case ParsingContext.ObjectLiteralMembers: return token === SyntaxKind.OpenBracketToken || token === SyntaxKind.AsteriskToken || isLiteralPropertyName(); case ParsingContext.ObjectBindingElements: - return isLiteralPropertyName(); + return token === SyntaxKind.OpenBracketToken || isLiteralPropertyName(); case ParsingContext.HeritageClauseElement: // If we see { } then only consume it as an expression if it is followed by , or { // That way we won't consume the body of a class in its heritage clause. @@ -1385,7 +1390,7 @@ namespace ts { function isInSomeParsingContext(): boolean { for (let kind = 0; kind < ParsingContext.Count; kind++) { if (parsingContext & (1 << kind)) { - if (isListElement(kind, /* inErrorRecovery */ true) || isListTerminator(kind)) { + if (isListElement(kind, /*inErrorRecovery*/ true) || isListTerminator(kind)) { return true; } } @@ -1402,7 +1407,7 @@ namespace ts { result.pos = getNodePos(); while (!isListTerminator(kind)) { - if (isListElement(kind, /* inErrorRecovery */ false)) { + if (isListElement(kind, /*inErrorRecovery*/ false)) { const element = parseListElement(kind, parseElement); result.push(element); @@ -1751,7 +1756,7 @@ namespace ts { let commaStart = -1; // Meaning the previous token was not a comma while (true) { - if (isListElement(kind, /* inErrorRecovery */ false)) { + if (isListElement(kind, /*inErrorRecovery*/ false)) { result.push(parseListElement(kind, parseElement)); commaStart = scanner.getTokenPos(); if (parseOptional(SyntaxKind.CommaToken)) { @@ -1859,7 +1864,7 @@ namespace ts { // Report that we need an identifier. However, report it right after the dot, // and not on the next token. This is because the next token might actually // be an identifier and the error would be quite confusing. - return createMissingNode(SyntaxKind.Identifier, /*reportAtCurrentToken*/ true, Diagnostics.Identifier_expected); + return createMissingNode(SyntaxKind.Identifier, /*reportAtCurrentPosition*/ true, Diagnostics.Identifier_expected); } } @@ -1869,7 +1874,7 @@ namespace ts { function parseTemplateExpression(): TemplateExpression { const template = createNode(SyntaxKind.TemplateExpression); - template.head = parseLiteralNode(); + template.head = parseTemplateLiteralFragment(); Debug.assert(template.head.kind === SyntaxKind.TemplateHead, "Template head has wrong token kind"); const templateSpans = >[]; @@ -1890,22 +1895,34 @@ namespace ts { const span = createNode(SyntaxKind.TemplateSpan); span.expression = allowInAnd(parseExpression); - let literal: LiteralExpression; + let literal: TemplateLiteralFragment; if (token === SyntaxKind.CloseBraceToken) { reScanTemplateToken(); - literal = parseLiteralNode(); + literal = parseTemplateLiteralFragment(); } else { - literal = parseExpectedToken(SyntaxKind.TemplateTail, /*reportAtCurrentPosition*/ false, Diagnostics._0_expected, tokenToString(SyntaxKind.CloseBraceToken)); + literal = parseExpectedToken(SyntaxKind.TemplateTail, /*reportAtCurrentPosition*/ false, Diagnostics._0_expected, tokenToString(SyntaxKind.CloseBraceToken)); } span.literal = literal; return finishNode(span); } + function parseStringLiteralTypeNode(): StringLiteralTypeNode { + return parseLiteralLikeNode(SyntaxKind.StringLiteralType, /*internName*/ true); + } + function parseLiteralNode(internName?: boolean): LiteralExpression { - const node = createNode(token); + return parseLiteralLikeNode(token, internName); + } + + function parseTemplateLiteralFragment(): TemplateLiteralFragment { + return parseLiteralLikeNode(token, /*internName*/ false); + } + + function parseLiteralLikeNode(kind: SyntaxKind, internName: boolean): LiteralLikeNode { + const node = createNode(kind); const text = scanner.getTokenValue(); node.text = internName ? internIdentifier(text) : text; @@ -1956,6 +1973,12 @@ namespace ts { return finishNode(node); } + function parseThisTypeNode(): TypeNode { + const node = createNode(SyntaxKind.ThisType); + nextToken(); + return finishNode(node); + } + function parseTypeQuery(): TypeQueryNode { const node = createNode(SyntaxKind.TypeQuery); parseExpected(SyntaxKind.TypeOfKeyword); @@ -1997,16 +2020,14 @@ namespace ts { function parseParameterType(): TypeNode { if (parseOptional(SyntaxKind.ColonToken)) { - return token === SyntaxKind.StringLiteral - ? parseLiteralNode(/*internName*/ true) - : parseType(); + return parseType(); } return undefined; } function isStartOfParameter(): boolean { - return token === SyntaxKind.DotDotDotToken || isIdentifierOrPattern() || isModifier(token) || token === SyntaxKind.AtToken; + return token === SyntaxKind.DotDotDotToken || isIdentifierOrPattern() || isModifierKind(token) || token === SyntaxKind.AtToken; } function setModifiers(node: Node, modifiers: ModifiersArray) { @@ -2027,7 +2048,7 @@ namespace ts { node.name = parseIdentifierOrPattern(); - if (getFullWidth(node.name) === 0 && node.flags === 0 && isModifier(token)) { + if (getFullWidth(node.name) === 0 && node.flags === 0 && isModifierKind(token)) { // in cases like // 'use strict' // function foo(static) @@ -2134,8 +2155,8 @@ namespace ts { parseSemicolon(); } - function parseSignatureMember(kind: SyntaxKind): SignatureDeclaration { - const node = createNode(kind); + function parseSignatureMember(kind: SyntaxKind): CallSignatureDeclaration | ConstructSignatureDeclaration { + const node = createNode(kind); if (kind === SyntaxKind.ConstructSignature) { parseExpected(SyntaxKind.NewKeyword); } @@ -2174,7 +2195,7 @@ namespace ts { return true; } - if (isModifier(token)) { + if (isModifierKind(token)) { nextToken(); if (isIdentifier()) { return true; @@ -2217,13 +2238,13 @@ namespace ts { return finishNode(node); } - function parsePropertyOrMethodSignature(): Declaration { + function parsePropertyOrMethodSignature(): PropertySignature | MethodSignature { const fullStart = scanner.getStartPos(); const name = parsePropertyName(); const questionToken = parseOptionalToken(SyntaxKind.QuestionToken); if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { - const method = createNode(SyntaxKind.MethodSignature, fullStart); + const method = createNode(SyntaxKind.MethodSignature, fullStart); method.name = name; method.questionToken = questionToken; @@ -2234,10 +2255,18 @@ namespace ts { return finishNode(method); } else { - const property = createNode(SyntaxKind.PropertySignature, fullStart); + const property = createNode(SyntaxKind.PropertySignature, fullStart); property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); + + if (token === SyntaxKind.EqualsToken) { + // Although type literal properties cannot not have initializers, we attempt + // to parse an initializer so we can report in the checker that an interface + // property or type literal property cannot have an initializer. + property.initializer = parseNonParameterInitializer(); + } + parseTypeMemberSemicolon(); return finishNode(property); } @@ -2250,7 +2279,7 @@ namespace ts { case SyntaxKind.OpenBracketToken: // Both for indexers and computed properties return true; default: - if (isModifier(token)) { + if (isModifierKind(token)) { const result = lookAhead(isStartOfIndexSignatureDeclaration); if (result) { return result; @@ -2262,7 +2291,7 @@ namespace ts { } function isStartOfIndexSignatureDeclaration() { - while (isModifier(token)) { + while (isModifierKind(token)) { nextToken(); } @@ -2278,7 +2307,7 @@ namespace ts { canParseSemicolon(); } - function parseTypeMember(): Declaration { + function parseTypeMember(): TypeElement { switch (token) { case SyntaxKind.OpenParenToken: case SyntaxKind.LessThanToken: @@ -2303,7 +2332,7 @@ namespace ts { // when incrementally parsing as the parser will produce the Index declaration // if it has the same text regardless of whether it is inside a class or an // object type. - if (isModifier(token)) { + if (isModifierKind(token)) { const result = tryParse(parseIndexSignatureWithModifiers); if (result) { return result; @@ -2336,14 +2365,14 @@ namespace ts { return finishNode(node); } - function parseObjectTypeMembers(): NodeArray { - let members: NodeArray; + function parseObjectTypeMembers(): NodeArray { + let members: NodeArray; if (parseExpected(SyntaxKind.OpenBraceToken)) { members = parseList(ParsingContext.TypeMembers, parseTypeMember); parseExpected(SyntaxKind.CloseBraceToken); } else { - members = createMissingList(); + members = createMissingList(); } return members; @@ -2387,9 +2416,12 @@ namespace ts { // If these are followed by a dot, then parse these out as a dotted type reference instead. const node = tryParse(parseKeywordAndNoDot); return node || parseTypeReferenceOrTypePredicate(); + case SyntaxKind.StringLiteral: + return parseStringLiteralTypeNode(); case SyntaxKind.VoidKeyword: - case SyntaxKind.ThisKeyword: return parseTokenNode(); + case SyntaxKind.ThisKeyword: + return parseThisTypeNode(); case SyntaxKind.TypeOfKeyword: return parseTypeQuery(); case SyntaxKind.OpenBraceToken: @@ -2417,6 +2449,7 @@ namespace ts { case SyntaxKind.OpenBracketToken: case SyntaxKind.LessThanToken: case SyntaxKind.NewKeyword: + case SyntaxKind.StringLiteral: return true; case SyntaxKind.OpenParenToken: // Only consider '(' the start of a type if followed by ')', '...', an identifier, a modifier, @@ -2482,11 +2515,11 @@ namespace ts { // ( ... return true; } - if (isIdentifier() || isModifier(token)) { + if (isIdentifier() || isModifierKind(token)) { nextToken(); if (token === SyntaxKind.ColonToken || token === SyntaxKind.CommaToken || token === SyntaxKind.QuestionToken || token === SyntaxKind.EqualsToken || - isIdentifier() || isModifier(token)) { + isIdentifier() || isModifierKind(token)) { // ( id : // ( id , // ( id ? @@ -2608,7 +2641,7 @@ namespace ts { // clear the decorator context when parsing Expression, as it should be unambiguous when parsing a decorator const saveDecoratorContext = inDecoratorContext(); if (saveDecoratorContext) { - setDecoratorContext(false); + setDecoratorContext(/*val*/ false); } let expr = parseAssignmentExpressionOrHigher(); @@ -2618,7 +2651,7 @@ namespace ts { } if (saveDecoratorContext) { - setDecoratorContext(true); + setDecoratorContext(/*val*/ true); } return expr; } @@ -2772,7 +2805,7 @@ namespace ts { node.parameters.pos = parameter.pos; node.parameters.end = parameter.end; - node.equalsGreaterThanToken = parseExpectedToken(SyntaxKind.EqualsGreaterThanToken, false, Diagnostics._0_expected, "=>"); + node.equalsGreaterThanToken = parseExpectedToken(SyntaxKind.EqualsGreaterThanToken, /*reportAtCurrentPosition*/ false, Diagnostics._0_expected, "=>"); node.body = parseArrowFunctionExpressionBody(/*isAsync*/ false); return finishNode(node); @@ -2893,7 +2926,7 @@ namespace ts { } // This *could* be a parenthesized arrow function. - // Return Unknown to const the caller know. + // Return Unknown to let the caller know. return Tristate.Unknown; } else { @@ -2992,7 +3025,7 @@ namespace ts { // user meant to supply a block. For example, if the user wrote: // // a => - // const v = 0; + // let v = 0; // } // // they may be missing an open brace. Check to see if that's the case so we can @@ -3219,7 +3252,7 @@ namespace ts { /** * Parse ES7 unary expression and await expression - * + * * ES7 UnaryExpression: * 1) SimpleUnaryExpression[?yield] * 2) IncrementExpression[?yield] ** UnaryExpression[?yield] @@ -3572,7 +3605,7 @@ namespace ts { parseExpected(SyntaxKind.GreaterThanToken); } else { - parseExpected(SyntaxKind.GreaterThanToken, /*diagnostic*/ undefined, /*advance*/ false); + parseExpected(SyntaxKind.GreaterThanToken, /*diagnostic*/ undefined, /*shouldAdvance*/ false); scanJsxText(); } node = createNode(SyntaxKind.JsxSelfClosingElement, fullStart); @@ -3608,7 +3641,7 @@ namespace ts { parseExpected(SyntaxKind.CloseBraceToken); } else { - parseExpected(SyntaxKind.CloseBraceToken, /*message*/ undefined, /*advance*/ false); + parseExpected(SyntaxKind.CloseBraceToken, /*message*/ undefined, /*shouldAdvance*/ false); scanJsxText(); } @@ -3653,7 +3686,7 @@ namespace ts { parseExpected(SyntaxKind.GreaterThanToken); } else { - parseExpected(SyntaxKind.GreaterThanToken, /*diagnostic*/ undefined, /*advance*/ false); + parseExpected(SyntaxKind.GreaterThanToken, /*diagnostic*/ undefined, /*shouldAdvance*/ false); scanJsxText(); } return finishNode(node); @@ -3972,7 +4005,7 @@ namespace ts { // function BindingIdentifier[opt](FormalParameters){ FunctionBody } const saveDecoratorContext = inDecoratorContext(); if (saveDecoratorContext) { - setDecoratorContext(false); + setDecoratorContext(/*val*/ false); } const node = createNode(SyntaxKind.FunctionExpression); @@ -3992,7 +4025,7 @@ namespace ts { node.body = parseFunctionBlock(/*allowYield*/ isGenerator, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); if (saveDecoratorContext) { - setDecoratorContext(true); + setDecoratorContext(/*val*/ true); } return finishNode(node); @@ -4038,13 +4071,13 @@ namespace ts { // arrow function. The body of the function is not in [Decorator] context. const saveDecoratorContext = inDecoratorContext(); if (saveDecoratorContext) { - setDecoratorContext(false); + setDecoratorContext(/*val*/ false); } const block = parseBlock(ignoreMissingOpenBrace, diagnosticMessage); if (saveDecoratorContext) { - setDecoratorContext(true); + setDecoratorContext(/*val*/ true); } setYieldContext(savedYieldContext); @@ -4586,7 +4619,6 @@ namespace ts { function parseObjectBindingElement(): BindingElement { const node = createNode(SyntaxKind.BindingElement); - // TODO(andersh): Handle computed properties const tokenIsIdentifier = isIdentifier(); const propertyName = parsePropertyName(); if (tokenIsIdentifier && token !== SyntaxKind.ColonToken) { @@ -4594,7 +4626,7 @@ namespace ts { } else { parseExpected(SyntaxKind.ColonToken); - node.propertyName = propertyName; + node.propertyName = propertyName; node.name = parseIdentifierOrPattern(); } node.initializer = parseBindingElementInitializer(/*inParameter*/ false); @@ -4720,7 +4752,7 @@ namespace ts { return finishNode(node); } - function parseMethodDeclaration(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray, asteriskToken: Node, name: DeclarationName, questionToken: Node, diagnosticMessage?: DiagnosticMessage): MethodDeclaration { + function parseMethodDeclaration(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray, asteriskToken: Node, name: PropertyName, questionToken: Node, diagnosticMessage?: DiagnosticMessage): MethodDeclaration { const method = createNode(SyntaxKind.MethodDeclaration, fullStart); method.decorators = decorators; setModifiers(method, modifiers); @@ -4734,7 +4766,7 @@ namespace ts { return finishNode(method); } - function parsePropertyDeclaration(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray, name: DeclarationName, questionToken: Node): ClassElement { + function parsePropertyDeclaration(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray, name: PropertyName, questionToken: Node): ClassElement { const property = createNode(SyntaxKind.PropertyDeclaration, fullStart); property.decorators = decorators; setModifiers(property, modifiers); @@ -4808,7 +4840,7 @@ namespace ts { } // Eat up all modifiers, but hold on to the last one in case it is actually an identifier. - while (isModifier(token)) { + while (isModifierKind(token)) { idToken = token; // If the idToken is a class modifier (protected, private, public, and static), it is // certain that we are starting to parse class member. This allows better error recovery @@ -4878,7 +4910,7 @@ namespace ts { if (!decorators) { decorators = >[]; - decorators.pos = scanner.getStartPos(); + decorators.pos = decoratorStart; } const decorator = createNode(SyntaxKind.Decorator, decoratorStart); @@ -5018,8 +5050,8 @@ namespace ts { // implements is a future reserved word so // 'class implements' might mean either // - class expression with omitted name, 'implements' starts heritage clause - // - class with name 'implements' - // 'isImplementsClause' helps to disambiguate between these two cases + // - class with name 'implements' + // 'isImplementsClause' helps to disambiguate between these two cases return isIdentifier() && !isImplementsClause() ? parseIdentifier() : undefined; @@ -5404,11 +5436,13 @@ namespace ts { // reference comment. while (true) { const kind = triviaScanner.scan(); - if (kind === SyntaxKind.WhitespaceTrivia || kind === SyntaxKind.NewLineTrivia || kind === SyntaxKind.MultiLineCommentTrivia) { - continue; - } if (kind !== SyntaxKind.SingleLineCommentTrivia) { - break; + if (isTrivia(kind)) { + continue; + } + else { + break; + } } const range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() }; @@ -5634,6 +5668,7 @@ namespace ts { return parseTokenNode(); } + // TODO (drosen): Parse string literal types in JSDoc as well. return parseJSDocTypeReference(); } @@ -6161,7 +6196,7 @@ namespace ts { if (sourceFile.statements.length === 0) { // If we don't have any statements in the current source file, then there's no real // way to incrementally parse. So just do a full parse instead. - return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, /*syntaxCursor*/ undefined, /*setNodeParents*/ true); + return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, /*syntaxCursor*/ undefined, /*setParentNodes*/ true); } // Make sure we're not trying to incrementally update a source file more than once. Once @@ -6225,7 +6260,7 @@ namespace ts { // inconsistent tree. Setting the parents on the new tree should be very fast. We // will immediately bail out of walking any subtrees when we can see that their parents // are already correct. - const result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, /* setParentNode */ true); + const result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, /*setParentNodes*/ true); return result; } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index a72e41521e627..6139dda0013d6 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -14,10 +14,10 @@ namespace ts { export const version = "1.8.0"; - export function findConfigFile(searchPath: string): string { + export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean): string { let fileName = "tsconfig.json"; while (true) { - if (sys.fileExists(fileName)) { + if (fileExists(fileName)) { return fileName; } const parentPath = getDirectoryPath(searchPath); @@ -42,24 +42,24 @@ namespace ts { : compilerOptions.module === ModuleKind.CommonJS ? ModuleResolutionKind.NodeJs : ModuleResolutionKind.Classic; switch (moduleResolution) { - case ModuleResolutionKind.NodeJs: return nodeModuleNameResolver(moduleName, containingFile, host); + case ModuleResolutionKind.NodeJs: return nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host); case ModuleResolutionKind.Classic: return classicNameResolver(moduleName, containingFile, compilerOptions, host); } } - export function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + export function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { const containingDirectory = getDirectoryPath(containingFile); - + const supportedExtensions = getSupportedExtensions(compilerOptions); if (getRootLength(moduleName) !== 0 || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { const failedLookupLocations: string[] = []; const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - let resolvedFileName = loadNodeModuleFromFile(supportedJsExtensions, candidate, failedLookupLocations, host); + let resolvedFileName = loadNodeModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host); if (resolvedFileName) { return { resolvedModule: { resolvedFileName }, failedLookupLocations }; } - resolvedFileName = loadNodeModuleFromDirectory(supportedJsExtensions, candidate, failedLookupLocations, host); + resolvedFileName = loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, host); return resolvedFileName ? { resolvedModule: { resolvedFileName }, failedLookupLocations } : { resolvedModule: undefined, failedLookupLocations }; @@ -122,12 +122,13 @@ namespace ts { if (baseName !== "node_modules") { const nodeModulesFolder = combinePaths(directory, "node_modules"); const candidate = normalizePath(combinePaths(nodeModulesFolder, moduleName)); - let result = loadNodeModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host); + // Load only typescript files irrespective of allowJs option if loading from node modules + let result = loadNodeModuleFromFile(supportedTypeScriptExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; } - result = loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, host); + result = loadNodeModuleFromDirectory(supportedTypeScriptExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; } @@ -162,10 +163,10 @@ namespace ts { const failedLookupLocations: string[] = []; let referencedSourceFile: string; - const extensions = compilerOptions.allowNonTsExtensions ? supportedJsExtensions : supportedExtensions; + const supportedExtensions = getSupportedExtensions(compilerOptions); while (true) { searchName = normalizePath(combinePaths(searchPath, moduleName)); - referencedSourceFile = forEach(extensions, extension => { + referencedSourceFile = forEach(supportedExtensions, extension => { if (extension === ".tsx" && !compilerOptions.jsx) { // resolve .tsx files only if jsx support is enabled // 'logical not' handles both undefined and None cases @@ -285,13 +286,13 @@ namespace ts { } export function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[] { - const diagnostics = program.getOptionsDiagnostics(cancellationToken).concat( + let diagnostics = program.getOptionsDiagnostics(cancellationToken).concat( program.getSyntacticDiagnostics(sourceFile, cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSemanticDiagnostics(sourceFile, cancellationToken)); if (program.getCompilerOptions().declaration) { - diagnostics.concat(program.getDeclarationDiagnostics(sourceFile, cancellationToken)); + diagnostics = diagnostics.concat(program.getDeclarationDiagnostics(sourceFile, cancellationToken)); } return sortAndDeduplicateDiagnostics(diagnostics); @@ -335,10 +336,13 @@ namespace ts { let classifiableNames: Map; let skipDefaultLib = options.noLib; + const supportedExtensions = getSupportedExtensions(options); const start = new Date().getTime(); host = host || createCompilerHost(options); + // Map storing if there is emit blocking diagnostics for given input + const hasEmitBlockingDiagnostics = createFileMap(getCanonicalFileName); const currentDirectory = host.getCurrentDirectory(); const resolveModuleNamesWorker = host.resolveModuleNames @@ -358,29 +362,26 @@ namespace ts { (oldOptions.noResolve !== options.noResolve) || (oldOptions.target !== options.target) || (oldOptions.noLib !== options.noLib) || - (oldOptions.jsx !== options.jsx)) { + (oldOptions.jsx !== options.jsx) || + (oldOptions.allowJs !== options.allowJs)) { oldProgram = undefined; } } if (!tryReuseStructureFromOldProgram()) { - forEach(rootNames, name => processRootFile(name, false)); + forEach(rootNames, name => processRootFile(name, /*isDefaultLib*/ false)); // Do not process the default library if: // - The '--noLib' flag is used. // - A 'no-default-lib' reference comment is encountered in // processing the root files. if (!skipDefaultLib) { - processRootFile(host.getDefaultLibFileName(options), true); + processRootFile(host.getDefaultLibFileName(options), /*isDefaultLib*/ true); } } - verifyCompilerOptions(); - // unconditionally set oldProgram to undefined to prevent it from being captured in closure oldProgram = undefined; - programTime += new Date().getTime() - start; - program = { getRootFileNames: () => rootNames, getSourceFile, @@ -394,7 +395,7 @@ namespace ts { getTypeChecker, getClassifiableNames, getDiagnosticsProducingTypeChecker, - getCommonSourceDirectory: () => commonSourceDirectory, + getCommonSourceDirectory, emit, getCurrentDirectory: () => currentDirectory, getNodeCount: () => getDiagnosticsProducingTypeChecker().getNodeCount(), @@ -403,8 +404,32 @@ namespace ts { getTypeCount: () => getDiagnosticsProducingTypeChecker().getTypeCount(), getFileProcessingDiagnostics: () => fileProcessingDiagnostics }; + + verifyCompilerOptions(); + + programTime += new Date().getTime() - start; + return program; + function getCommonSourceDirectory() { + if (typeof commonSourceDirectory === "undefined") { + if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) { + // If a rootDir is specified and is valid use it as the commonSourceDirectory + commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory); + } + else { + commonSourceDirectory = computeCommonSourceDirectory(files); + } + if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) { + // 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 doesn't + // start with / making it rooted path + commonSourceDirectory += directorySeparator; + } + } + return commonSourceDirectory; + } + function getClassifiableNames() { if (!classifiableNames) { // Initialize a checker so that all our files are bound. @@ -524,6 +549,7 @@ namespace ts { getSourceFiles: program.getSourceFiles, writeFile: writeFileCallback || ( (fileName, data, writeByteOrderMark, onError) => host.writeFile(fileName, data, writeByteOrderMark, onError)), + isEmitBlocked, }; } @@ -539,6 +565,10 @@ namespace ts { return runWithCancellationToken(() => emitWorker(this, sourceFile, writeFileCallback, cancellationToken)); } + function isEmitBlocked(emitFileName: string): boolean { + return hasEmitBlockingDiagnostics.contains(toPath(emitFileName, currentDirectory, getCanonicalFileName)); + } + function emitWorker(program: Program, sourceFile: SourceFile, writeFileCallback: WriteFileCallback, cancellationToken: CancellationToken): EmitResult { // If the noEmitOnError flag is set, then check if we have any errors so far. If so, // immediately bail out. Note that we pass 'undefined' for 'sourceFile' so that we @@ -631,6 +661,13 @@ namespace ts { } function getSemanticDiagnosticsForFile(sourceFile: SourceFile, cancellationToken: CancellationToken): Diagnostic[] { + // For JavaScript files, we don't want to report the normal typescript semantic errors. + // Instead, we just report errors for using TypeScript-only constructs from within a + // JavaScript file. + if (isSourceFileJavaScript(sourceFile)) { + return getJavaScriptSemanticDiagnosticsForFile(sourceFile, cancellationToken); + } + return runWithCancellationToken(() => { const typeChecker = getDiagnosticsProducingTypeChecker(); @@ -644,6 +681,165 @@ namespace ts { }); } + function getJavaScriptSemanticDiagnosticsForFile(sourceFile: SourceFile, cancellationToken: CancellationToken): Diagnostic[] { + return runWithCancellationToken(() => { + const diagnostics: Diagnostic[] = []; + walk(sourceFile); + + return diagnostics; + + function walk(node: Node): boolean { + if (!node) { + return false; + } + + switch (node.kind) { + case SyntaxKind.ImportEqualsDeclaration: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.import_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.ExportAssignment: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.ClassDeclaration: + let classDeclaration = node; + if (checkModifiers(classDeclaration.modifiers) || + checkTypeParameters(classDeclaration.typeParameters)) { + return true; + } + break; + case SyntaxKind.HeritageClause: + let heritageClause = node; + if (heritageClause.token === SyntaxKind.ImplementsKeyword) { + diagnostics.push(createDiagnosticForNode(node, Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); + return true; + } + break; + case SyntaxKind.InterfaceDeclaration: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.ModuleDeclaration: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.TypeAliasDeclaration: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.MethodDeclaration: + case SyntaxKind.MethodSignature: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.ArrowFunction: + case SyntaxKind.FunctionDeclaration: + const functionDeclaration = node; + if (checkModifiers(functionDeclaration.modifiers) || + checkTypeParameters(functionDeclaration.typeParameters) || + checkTypeAnnotation(functionDeclaration.type)) { + return true; + } + break; + case SyntaxKind.VariableStatement: + const variableStatement = node; + if (checkModifiers(variableStatement.modifiers)) { + return true; + } + break; + case SyntaxKind.VariableDeclaration: + const variableDeclaration = node; + if (checkTypeAnnotation(variableDeclaration.type)) { + return true; + } + break; + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + const expression = node; + if (expression.typeArguments && expression.typeArguments.length > 0) { + const start = expression.typeArguments.pos; + diagnostics.push(createFileDiagnostic(sourceFile, start, expression.typeArguments.end - start, + Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); + return true; + } + break; + case SyntaxKind.Parameter: + const parameter = node; + if (parameter.modifiers) { + const start = parameter.modifiers.pos; + diagnostics.push(createFileDiagnostic(sourceFile, start, parameter.modifiers.end - start, + Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); + return true; + } + if (parameter.questionToken) { + diagnostics.push(createDiagnosticForNode(parameter.questionToken, Diagnostics._0_can_only_be_used_in_a_ts_file, "?")); + return true; + } + if (parameter.type) { + diagnostics.push(createDiagnosticForNode(parameter.type, Diagnostics.types_can_only_be_used_in_a_ts_file)); + return true; + } + break; + case SyntaxKind.PropertyDeclaration: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.property_declarations_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.EnumDeclaration: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.TypeAssertionExpression: + let typeAssertionExpression = node; + diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); + return true; + case SyntaxKind.Decorator: + diagnostics.push(createDiagnosticForNode(node, Diagnostics.decorators_can_only_be_used_in_a_ts_file)); + return true; + } + + return forEachChild(node, walk); + } + + function checkTypeParameters(typeParameters: NodeArray): boolean { + if (typeParameters) { + const start = typeParameters.pos; + diagnostics.push(createFileDiagnostic(sourceFile, start, typeParameters.end - start, Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); + return true; + } + return false; + } + + function checkTypeAnnotation(type: TypeNode): boolean { + if (type) { + diagnostics.push(createDiagnosticForNode(type, Diagnostics.types_can_only_be_used_in_a_ts_file)); + return true; + } + + return false; + } + + function checkModifiers(modifiers: ModifiersArray): boolean { + if (modifiers) { + for (const modifier of modifiers) { + switch (modifier.kind) { + case SyntaxKind.PublicKeyword: + case SyntaxKind.PrivateKeyword: + case SyntaxKind.ProtectedKeyword: + case SyntaxKind.DeclareKeyword: + diagnostics.push(createDiagnosticForNode(modifier, Diagnostics._0_can_only_be_used_in_a_ts_file, tokenToString(modifier.kind))); + return true; + + // These are all legal modifiers. + case SyntaxKind.StaticKeyword: + case SyntaxKind.ExportKeyword: + case SyntaxKind.ConstKeyword: + case SyntaxKind.DefaultKeyword: + case SyntaxKind.AbstractKeyword: + } + } + } + + return false; + } + }); + } + function getDeclarationDiagnosticsForFile(sourceFile: SourceFile, cancellationToken: CancellationToken): Diagnostic[] { return runWithCancellationToken(() => { if (!isDeclarationFile(sourceFile)) { @@ -693,7 +889,7 @@ namespace ts { let imports: LiteralExpression[]; for (const node of file.statements) { - collect(node, /* allowRelativeModuleNames */ true, /* collectOnlyRequireCalls */ false); + collect(node, /*allowRelativeModuleNames*/ true, /*collectOnlyRequireCalls*/ false); } file.imports = imports || emptyArray; @@ -729,7 +925,7 @@ namespace ts { // TypeScript 1.0 spec (April 2014): 12.1.6 // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules // only through top - level external module names. Relative external module names are not permitted. - collect(node, /* allowRelativeModuleNames */ false, collectOnlyRequireCalls); + collect(node, /*allowRelativeModuleNames*/ false, collectOnlyRequireCalls); }); } break; @@ -741,7 +937,7 @@ namespace ts { (imports || (imports = [])).push((node).arguments[0]); } else { - forEachChild(node, node => collect(node, allowRelativeModuleNames, /* collectOnlyRequireCalls */ true)); + forEachChild(node, node => collect(node, allowRelativeModuleNames, /*collectOnlyRequireCalls*/ true)); } } } @@ -800,12 +996,12 @@ namespace ts { } // Get source file from normalized fileName - function findSourceFile(fileName: string, normalizedAbsolutePath: Path, isDefaultLib: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number): SourceFile { - if (filesByName.contains(normalizedAbsolutePath)) { - const file = filesByName.get(normalizedAbsolutePath); + function findSourceFile(fileName: string, path: Path, isDefaultLib: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number): SourceFile { + if (filesByName.contains(path)) { + const file = filesByName.get(path); // try to check if we've already seen this file but with a different casing in path // NOTE: this only makes sense for case-insensitive file systems - if (file && options.forceConsistentCasingInFileNames && getNormalizedAbsolutePath(file.fileName, currentDirectory) !== normalizedAbsolutePath) { + if (file && options.forceConsistentCasingInFileNames && getNormalizedAbsolutePath(file.fileName, currentDirectory) !== getNormalizedAbsolutePath(fileName, currentDirectory)) { reportFileNamesDifferOnlyInCasingError(fileName, file.fileName, refFile, refPos, refEnd); } @@ -823,18 +1019,18 @@ namespace ts { } }); - filesByName.set(normalizedAbsolutePath, file); + filesByName.set(path, file); if (file) { - file.path = normalizedAbsolutePath; + file.path = path; if (host.useCaseSensitiveFileNames()) { // for case-sensitive file systems check if we've already seen some file with similar filename ignoring case - const existingFile = filesByNameIgnoreCase.get(normalizedAbsolutePath); + const existingFile = filesByNameIgnoreCase.get(path); if (existingFile) { reportFileNamesDifferOnlyInCasingError(fileName, existingFile.fileName, refFile, refPos, refEnd); } else { - filesByNameIgnoreCase.set(normalizedAbsolutePath, file); + filesByNameIgnoreCase.set(path, file); } } @@ -849,7 +1045,6 @@ namespace ts { processImportedModules(file, basePath); if (isDefaultLib) { - file.isDefaultLib = true; files.unshift(file); } else { @@ -863,7 +1058,7 @@ namespace ts { function processReferencedFiles(file: SourceFile, basePath: string) { forEach(file.referencedFiles, ref => { const referencedFileName = resolveTripleslashReference(ref.fileName, file.fileName); - processSourceFile(referencedFileName, /* isDefaultLib */ false, file, ref.pos, ref.end); + processSourceFile(referencedFileName, /*isDefaultLib*/ false, file, ref.pos, ref.end); }); } @@ -881,7 +1076,7 @@ namespace ts { const resolution = resolutions[i]; setResolvedModule(file, moduleNames[i], resolution); if (resolution && !options.noResolve) { - const importedFile = findSourceFile(resolution.resolvedFileName, toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), /* isDefaultLib */ false, file, skipTrivia(file.text, file.imports[i].pos), file.imports[i].end); + const importedFile = findSourceFile(resolution.resolvedFileName, toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), /*isDefaultLib*/ false, file, skipTrivia(file.text, file.imports[i].pos), file.imports[i].end); if (importedFile && resolution.isExternalLibraryImport) { if (!isExternalModule(importedFile)) { @@ -905,7 +1100,7 @@ namespace ts { function computeCommonSourceDirectory(sourceFiles: SourceFile[]): string { let commonPathComponents: string[]; - forEach(files, sourceFile => { + const failed = forEach(files, sourceFile => { // Each file contributes into common source file path if (isDeclarationFile(sourceFile)) { return; @@ -921,10 +1116,10 @@ namespace ts { } for (let i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) { - if (commonPathComponents[i] !== sourcePathComponents[i]) { + if (getCanonicalFileName(commonPathComponents[i]) !== getCanonicalFileName(sourcePathComponents[i])) { if (i === 0) { - programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files)); - return; + // Failed to find any common path component + return true; } // New common path found that is 0 -> i-1 @@ -939,6 +1134,11 @@ namespace ts { } }); + // A common path can not be found when paths span multiple drives on windows, for example + if (failed) { + return ""; + } + if (!commonPathComponents) { // Can happen when all input files are .d.ts files return currentDirectory; } @@ -991,16 +1191,15 @@ namespace ts { if (options.mapRoot) { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "mapRoot", "inlineSourceMap")); } - if (options.sourceRoot) { - programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "sourceRoot", "inlineSourceMap")); - } } - if (options.inlineSources) { if (!options.sourceMap && !options.inlineSourceMap) { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided)); } + if (options.sourceRoot) { + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "sourceRoot", "inlineSources")); + } } if (options.out && options.outFile) { @@ -1012,10 +1211,9 @@ namespace ts { if (options.mapRoot) { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "mapRoot", "sourceMap")); } - if (options.sourceRoot) { + if (options.sourceRoot && !options.inlineSourceMap) { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "sourceRoot", "sourceMap")); } - return; } const languageVersion = options.target || ScriptTarget.ES3; @@ -1055,20 +1253,12 @@ namespace ts { options.sourceRoot || // there is --sourceRoot specified options.mapRoot) { // there is --mapRoot specified - if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) { - // If a rootDir is specified and is valid use it as the commonSourceDirectory - commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory); - } - else { - // Compute the commonSourceDirectory from the input files - commonSourceDirectory = computeCommonSourceDirectory(files); - } + // Precalculate and cache the common source directory + const dir = getCommonSourceDirectory(); - if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) { - // 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 doesn't - // start with / making it rooted path - commonSourceDirectory += directorySeparator; + // If we failed to find a good common directory, but outDir is specified and at least one of our files is on a windows drive/URL/other resource, add a failure + if (options.outDir && dir === "" && forEach(files, file => getRootLength(file.fileName) > 1)) { + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files)); } } @@ -1089,11 +1279,49 @@ namespace ts { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "declaration")); } } + else if (options.allowJs && options.declaration) { + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration")); + } if (options.emitDecoratorMetadata && !options.experimentalDecorators) { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators")); } + + // If the emit is enabled make sure that every output file is unique and not overwriting any of the input files + if (!options.noEmit) { + const emitHost = getEmitHost(); + const emitFilesSeen = createFileMap(!host.useCaseSensitiveFileNames() ? key => key.toLocaleLowerCase() : undefined); + forEachExpectedEmitFile(emitHost, (emitFileNames, sourceFiles, isBundledEmit) => { + verifyEmitFilePath(emitFileNames.jsFilePath, emitFilesSeen); + verifyEmitFilePath(emitFileNames.declarationFilePath, emitFilesSeen); + }); + } + + // Verify that all the emit files are unique and don't overwrite input files + function verifyEmitFilePath(emitFileName: string, emitFilesSeen: FileMap) { + if (emitFileName) { + const emitFilePath = toPath(emitFileName, currentDirectory, getCanonicalFileName); + // Report error if the output overwrites input file + if (filesByName.contains(emitFilePath)) { + createEmitBlockingDiagnostics(emitFileName, emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file); + } + + // Report error if multiple files write into same file + if (emitFilesSeen.contains(emitFilePath)) { + // Already seen the same emit file - report error + createEmitBlockingDiagnostics(emitFileName, emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files); + } + else { + emitFilesSeen.set(emitFilePath, true); + } + } + } + } + + function createEmitBlockingDiagnostics(emitFileName: string, emitFilePath: Path, message: DiagnosticMessage) { + hasEmitBlockingDiagnostics.set(toPath(emitFileName, currentDirectory, getCanonicalFileName), true); + programDiagnostics.add(createCompilerDiagnostic(message, emitFileName)); } } } diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 9703ef8517b7b..022d63fbe9dc3 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -425,6 +425,12 @@ namespace ts { /* @internal */ export function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number { + // Using ! with a greater than test is a fast way of testing the following conditions: + // pos === undefined || pos === null || isNaN(pos) || pos < 0; + if (!(pos >= 0)) { + return pos; + } + // Keep in sync with couldStartTrivia while (true) { const ch = text.charCodeAt(pos); @@ -567,12 +573,12 @@ namespace ts { } /** - * Extract comments from text prefixing the token closest following `pos`. + * Extract comments from text prefixing the token closest following `pos`. * The return value is an array containing a TextRange for each 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. - * @param trailing + * @param trailing * If false, whitespace is skipped until the first line break and comments between that location * and the next token are returned. * If true, comments occurring between the given position and the next line break are returned. @@ -1634,11 +1640,11 @@ namespace ts { } function lookAhead(callback: () => T): T { - return speculationHelper(callback, /*isLookahead:*/ true); + return speculationHelper(callback, /*isLookahead*/ true); } function tryScan(callback: () => T): T { - return speculationHelper(callback, /*isLookahead:*/ false); + return speculationHelper(callback, /*isLookahead*/ false); } function setText(newText: string, start: number, length: number) { diff --git a/src/compiler/sourcemap.ts b/src/compiler/sourcemap.ts new file mode 100644 index 0000000000000..d98dc233c1629 --- /dev/null +++ b/src/compiler/sourcemap.ts @@ -0,0 +1,332 @@ +/// + +/* @internal */ +namespace ts { + export interface SourceMapWriter { + getSourceMapData(): SourceMapData; + setSourceFile(sourceFile: SourceFile): void; + emitPos(pos: number): void; + emitStart(range: TextRange): void; + emitEnd(range: TextRange): void; + getText(): string; + getSourceMappingURL(): string; + initialize(filePath: string, sourceMapFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean): void; + reset(): void; + } + + const nop = <(...args: any[]) => any>Function.prototype; + let nullSourceMapWriter: SourceMapWriter; + + export function getNullSourceMapWriter(): SourceMapWriter { + if (nullSourceMapWriter === undefined) { + nullSourceMapWriter = { + getSourceMapData(): SourceMapData { return undefined; }, + setSourceFile(sourceFile: SourceFile): void { }, + emitStart(range: TextRange): void { }, + emitEnd(range: TextRange): void { }, + emitPos(pos: number): void { }, + getText(): string { return undefined; }, + getSourceMappingURL(): string { return undefined; }, + initialize(filePath: string, sourceMapFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean): void { }, + reset(): void { }, + }; + } + + return nullSourceMapWriter; + } + + export function createSourceMapWriter(host: EmitHost, writer: EmitTextWriter): SourceMapWriter { + const compilerOptions = host.getCompilerOptions(); + let currentSourceFile: SourceFile; + let sourceMapDir: string; // The directory in which sourcemap will be + + // Current source map file and its index in the sources list + let sourceMapSourceIndex: number; + + // Last recorded and encoded spans + let lastRecordedSourceMapSpan: SourceMapSpan; + let lastEncodedSourceMapSpan: SourceMapSpan; + let lastEncodedNameIndex: number; + + // Source map data + let sourceMapData: SourceMapData; + + return { + getSourceMapData: () => sourceMapData, + setSourceFile, + emitPos, + emitStart, + emitEnd, + getText, + getSourceMappingURL, + initialize, + reset, + }; + + function initialize(filePath: string, sourceMapFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean) { + if (sourceMapData) { + reset(); + } + + currentSourceFile = undefined; + + // Current source map file and its index in the sources list + sourceMapSourceIndex = -1; + + // Last recorded and encoded spans + lastRecordedSourceMapSpan = undefined; + lastEncodedSourceMapSpan = { + emittedLine: 1, + emittedColumn: 1, + sourceLine: 1, + sourceColumn: 1, + sourceIndex: 0 + }; + lastEncodedNameIndex = 0; + + // Initialize source map data + sourceMapData = { + sourceMapFilePath: sourceMapFilePath, + jsSourceMappingURL: !compilerOptions.inlineSourceMap ? getBaseFileName(normalizeSlashes(sourceMapFilePath)) : undefined, + sourceMapFile: getBaseFileName(normalizeSlashes(filePath)), + sourceMapSourceRoot: compilerOptions.sourceRoot || "", + sourceMapSources: [], + inputSourceFileNames: [], + sourceMapNames: [], + sourceMapMappings: "", + sourceMapSourcesContent: compilerOptions.inlineSources ? [] : undefined, + sourceMapDecodedMappings: [] + }; + + // Normalize source root and make sure it has trailing "/" so that it can be used to combine paths with the + // relative paths of the sources list in the sourcemap + sourceMapData.sourceMapSourceRoot = ts.normalizeSlashes(sourceMapData.sourceMapSourceRoot); + if (sourceMapData.sourceMapSourceRoot.length && sourceMapData.sourceMapSourceRoot.charCodeAt(sourceMapData.sourceMapSourceRoot.length - 1) !== CharacterCodes.slash) { + sourceMapData.sourceMapSourceRoot += directorySeparator; + } + + if (compilerOptions.mapRoot) { + sourceMapDir = normalizeSlashes(compilerOptions.mapRoot); + if (!isBundledEmit) { // emitting single module file + Debug.assert(sourceFiles.length === 1); + // For modules or multiple emit files the mapRoot will have directory structure like the sources + // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map + sourceMapDir = getDirectoryPath(getSourceFilePathInNewDir(sourceFiles[0], host, sourceMapDir)); + } + + if (!isRootedDiskPath(sourceMapDir) && !isUrl(sourceMapDir)) { + // The relative paths are relative to the common directory + sourceMapDir = combinePaths(host.getCommonSourceDirectory(), sourceMapDir); + sourceMapData.jsSourceMappingURL = getRelativePathToDirectoryOrUrl( + getDirectoryPath(normalizePath(filePath)), // get the relative sourceMapDir path based on jsFilePath + combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), // this is where user expects to see sourceMap + host.getCurrentDirectory(), + host.getCanonicalFileName, + /*isAbsolutePathAnUrl*/ true); + } + else { + sourceMapData.jsSourceMappingURL = combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL); + } + } + else { + sourceMapDir = getDirectoryPath(normalizePath(filePath)); + } + } + + function reset() { + currentSourceFile = undefined; + sourceMapDir = undefined; + sourceMapSourceIndex = undefined; + lastRecordedSourceMapSpan = undefined; + lastEncodedSourceMapSpan = undefined; + lastEncodedNameIndex = undefined; + sourceMapData = undefined; + } + + // Encoding for sourcemap span + function encodeLastRecordedSourceMapSpan() { + if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) { + return; + } + + let prevEncodedEmittedColumn = lastEncodedSourceMapSpan.emittedColumn; + // Line/Comma delimiters + if (lastEncodedSourceMapSpan.emittedLine === lastRecordedSourceMapSpan.emittedLine) { + // Emit comma to separate the entry + if (sourceMapData.sourceMapMappings) { + sourceMapData.sourceMapMappings += ","; + } + } + else { + // Emit line delimiters + for (let encodedLine = lastEncodedSourceMapSpan.emittedLine; encodedLine < lastRecordedSourceMapSpan.emittedLine; encodedLine++) { + sourceMapData.sourceMapMappings += ";"; + } + prevEncodedEmittedColumn = 1; + } + + // 1. Relative Column 0 based + sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.emittedColumn - prevEncodedEmittedColumn); + + // 2. Relative sourceIndex + sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceIndex - lastEncodedSourceMapSpan.sourceIndex); + + // 3. Relative sourceLine 0 based + sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceLine - lastEncodedSourceMapSpan.sourceLine); + + // 4. Relative sourceColumn 0 based + sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceColumn - lastEncodedSourceMapSpan.sourceColumn); + + // 5. Relative namePosition 0 based + if (lastRecordedSourceMapSpan.nameIndex >= 0) { + sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.nameIndex - lastEncodedNameIndex); + lastEncodedNameIndex = lastRecordedSourceMapSpan.nameIndex; + } + + lastEncodedSourceMapSpan = lastRecordedSourceMapSpan; + sourceMapData.sourceMapDecodedMappings.push(lastEncodedSourceMapSpan); + } + + function emitPos(pos: number) { + if (pos === -1) { + return; + } + + const sourceLinePos = getLineAndCharacterOfPosition(currentSourceFile, pos); + + // Convert the location to be one-based. + sourceLinePos.line++; + sourceLinePos.character++; + + const emittedLine = writer.getLine(); + const emittedColumn = writer.getColumn(); + + // 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 || + (lastRecordedSourceMapSpan.sourceIndex === sourceMapSourceIndex && + (lastRecordedSourceMapSpan.sourceLine > sourceLinePos.line || + (lastRecordedSourceMapSpan.sourceLine === sourceLinePos.line && lastRecordedSourceMapSpan.sourceColumn > sourceLinePos.character)))) { + + // Encode the last recordedSpan before assigning new + encodeLastRecordedSourceMapSpan(); + + // New span + lastRecordedSourceMapSpan = { + emittedLine: emittedLine, + emittedColumn: emittedColumn, + sourceLine: sourceLinePos.line, + sourceColumn: sourceLinePos.character, + sourceIndex: sourceMapSourceIndex + }; + } + else { + // Take the new pos instead since there is no change in emittedLine and column since last location + lastRecordedSourceMapSpan.sourceLine = sourceLinePos.line; + lastRecordedSourceMapSpan.sourceColumn = sourceLinePos.character; + lastRecordedSourceMapSpan.sourceIndex = sourceMapSourceIndex; + } + } + + function emitStart(range: TextRange) { + const rangeHasDecorators = !!(range as Node).decorators; + emitPos(range.pos !== -1 ? skipTrivia(currentSourceFile.text, rangeHasDecorators ? (range as Node).decorators.end : range.pos) : -1); + } + + function emitEnd(range: TextRange) { + emitPos(range.end); + } + + function setSourceFile(sourceFile: SourceFile) { + currentSourceFile = sourceFile; + + // 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 + const sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir; + + const source = getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, + currentSourceFile.fileName, + host.getCurrentDirectory(), + host.getCanonicalFileName, + /*isAbsolutePathAnUrl*/ true); + + sourceMapSourceIndex = indexOf(sourceMapData.sourceMapSources, source); + if (sourceMapSourceIndex === -1) { + sourceMapSourceIndex = sourceMapData.sourceMapSources.length; + sourceMapData.sourceMapSources.push(source); + + // The one that can be used from program to get the actual source file + sourceMapData.inputSourceFileNames.push(sourceFile.fileName); + + if (compilerOptions.inlineSources) { + sourceMapData.sourceMapSourcesContent.push(sourceFile.text); + } + } + } + + function getText() { + encodeLastRecordedSourceMapSpan(); + + return stringify({ + version: 3, + file: sourceMapData.sourceMapFile, + sourceRoot: sourceMapData.sourceMapSourceRoot, + sources: sourceMapData.sourceMapSources, + names: sourceMapData.sourceMapNames, + mappings: sourceMapData.sourceMapMappings, + sourcesContent: sourceMapData.sourceMapSourcesContent, + }); + } + + function getSourceMappingURL() { + if (compilerOptions.inlineSourceMap) { + // Encode the sourceMap into the sourceMap url + const base64SourceMapText = convertToBase64(getText()); + return sourceMapData.jsSourceMappingURL = `data:application/json;base64,${base64SourceMapText}`; + } + else { + return sourceMapData.jsSourceMappingURL; + } + } + } + + const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + function base64FormatEncode(inValue: number) { + if (inValue < 64) { + return base64Chars.charAt(inValue); + } + + throw TypeError(inValue + ": not a 64 based value"); + } + + function base64VLQFormatEncode(inValue: number) { + // Add a new least significant bit that has the sign of the value. + // if negative number the least significant bit that gets added to the number has value 1 + // else least significant bit value that gets added is 0 + // eg. -1 changes to binary : 01 [1] => 3 + // +1 changes to binary : 01 [0] => 2 + if (inValue < 0) { + inValue = ((-inValue) << 1) + 1; + } + else { + inValue = inValue << 1; + } + + // Encode 5 bits at a time starting from least significant bits + let encodedStr = ""; + do { + let currentDigit = inValue & 31; // 11111 + inValue = inValue >> 5; + if (inValue > 0) { + // There are still more digits to decode, set the msb (6th bit) + currentDigit = currentDigit | 32; + } + encodedStr = encodedStr + base64FormatEncode(currentDigit); + } while (inValue > 0); + + return encodedStr; + } +} \ No newline at end of file diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 79158cf4e9dd2..d064ec54c9ce6 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -280,7 +280,7 @@ namespace ts { } if (commandLine.options.version) { - reportDiagnostic(createCompilerDiagnostic(Diagnostics.Version_0, ts.version), /* compilerHost */ undefined); + printVersion(); return sys.exit(ExitStatus.Success); } @@ -295,15 +295,30 @@ namespace ts { reportDiagnostic(createCompilerDiagnostic(Diagnostics.The_current_host_does_not_support_the_0_option, "--project"), /* compilerHost */ undefined); return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); } - configFileName = normalizePath(combinePaths(commandLine.options.project, "tsconfig.json")); if (commandLine.fileNames.length !== 0) { reportDiagnostic(createCompilerDiagnostic(Diagnostics.Option_project_cannot_be_mixed_with_source_files_on_a_command_line), /* compilerHost */ undefined); return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); } + + const fileOrDirectory = normalizePath(commandLine.options.project); + if (!fileOrDirectory /* current directory "." */ || sys.directoryExists(fileOrDirectory)) { + configFileName = combinePaths(fileOrDirectory, "tsconfig.json"); + if (!sys.fileExists(configFileName)) { + reportDiagnostic(createCompilerDiagnostic(Diagnostics.Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0, commandLine.options.project), /* compilerHost */ undefined); + return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + } + } + else { + configFileName = fileOrDirectory; + if (!sys.fileExists(configFileName)) { + reportDiagnostic(createCompilerDiagnostic(Diagnostics.The_specified_path_does_not_exist_Colon_0, commandLine.options.project), /* compilerHost */ undefined); + return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + } + } } else if (commandLine.fileNames.length === 0 && isJSONSupported()) { const searchPath = normalizePath(sys.getCurrentDirectory()); - configFileName = findConfigFile(searchPath); + configFileName = findConfigFile(searchPath, sys.fileExists); } if (commandLine.fileNames.length === 0 && !configFileName) { @@ -346,10 +361,21 @@ namespace ts { return; } } + if (!cachedConfigFileText) { + const error = createCompilerDiagnostic(Diagnostics.File_0_not_found, configFileName); + reportDiagnostics([error], /* compilerHost */ undefined); + sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + return; + } const result = parseConfigFileTextToJson(configFileName, cachedConfigFileText); const configObject = result.config; - const configParseResult = parseJsonConfigFileContent(configObject, sys, getDirectoryPath(configFileName)); + if (!configObject) { + reportDiagnostics([result.error], /* compilerHost */ undefined); + sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + return; + } + const configParseResult = parseJsonConfigFileContent(configObject, sys, getDirectoryPath(configFileName), commandLine.options); if (configParseResult.errors.length > 0) { reportDiagnostics(configParseResult.errors, /* compilerHost */ undefined); sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); @@ -365,7 +391,7 @@ namespace ts { if (configFileName) { const configParseResult = parseConfigFile(); rootFileNames = configParseResult.fileNames; - compilerOptions = extend(commandLine.options, configParseResult.options); + compilerOptions = configParseResult.options; } else { rootFileNames = commandLine.fileNames; @@ -458,7 +484,7 @@ namespace ts { } function watchedDirectoryChanged(fileName: string) { - if (fileName && !ts.isSupportedSourceFileName(fileName)) { + if (fileName && !ts.isSupportedSourceFileName(fileName, commandLine.options)) { return; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f722783976a47..daec64c0dac07 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -204,6 +204,8 @@ namespace ts { UnionType, IntersectionType, ParenthesizedType, + ThisType, + StringLiteralType, // Binding patterns ObjectBindingPattern, ArrayBindingPattern, @@ -348,8 +350,8 @@ namespace ts { LastKeyword = OfKeyword, FirstFutureReservedWord = ImplementsKeyword, LastFutureReservedWord = YieldKeyword, - FirstTypeNode = TypeReference, - LastTypeNode = ParenthesizedType, + FirstTypeNode = TypePredicate, + LastTypeNode = StringLiteralType, FirstPunctuation = OpenBraceToken, LastPunctuation = CaretEqualsToken, FirstToken = Unknown, @@ -474,15 +476,29 @@ namespace ts { hasTrailingComma?: boolean; } - export interface ModifiersArray extends NodeArray { + export interface ModifiersArray extends NodeArray { flags: number; } + // @kind(SyntaxKind.AbstractKeyword) + // @kind(SyntaxKind.AsyncKeyword) + // @kind(SyntaxKind.ConstKeyword) + // @kind(SyntaxKind.DeclareKeyword) + // @kind(SyntaxKind.DefaultKeyword) + // @kind(SyntaxKind.ExportKeyword) + // @kind(SyntaxKind.PublicKeyword) + // @kind(SyntaxKind.PrivateKeyword) + // @kind(SyntaxKind.ProtectedKeyword) + // @kind(SyntaxKind.StaticKeyword) + export interface Modifier extends Node { } + + // @kind(SyntaxKind.Identifier) export interface Identifier extends PrimaryExpression { text: string; // Text of identifier (with escapes converted to characters) originalKeywordKind?: SyntaxKind; // Original syntaxKind which get set so that we can report an error later } + // @kind(SyntaxKind.QualifiedName) export interface QualifiedName extends Node { // Must have same layout as PropertyAccess left: EntityName; @@ -491,6 +507,8 @@ namespace ts { export type EntityName = Identifier | QualifiedName; + export type PropertyName = Identifier | LiteralExpression | ComputedPropertyName; + export type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; export interface Declaration extends Node { @@ -498,14 +516,21 @@ namespace ts { name?: DeclarationName; } + export interface DeclarationStatement extends Declaration, Statement { + name?: Identifier; + } + + // @kind(SyntaxKind.ComputedPropertyName) export interface ComputedPropertyName extends Node { expression: Expression; } + // @kind(SyntaxKind.Decorator) export interface Decorator extends Node { expression: LeftHandSideExpression; } + // @kind(SyntaxKind.TypeParameter) export interface TypeParameterDeclaration extends Declaration { name: Identifier; constraint?: TypeNode; @@ -515,12 +540,19 @@ namespace ts { } export interface SignatureDeclaration extends Declaration { + name?: PropertyName; typeParameters?: NodeArray; parameters: NodeArray; type?: TypeNode; } - // SyntaxKind.VariableDeclaration + // @kind(SyntaxKind.CallSignature) + export interface CallSignatureDeclaration extends SignatureDeclaration, TypeElement { } + + // @kind(SyntaxKind.ConstructSignature) + export interface ConstructSignatureDeclaration extends SignatureDeclaration, TypeElement { } + + // @kind(SyntaxKind.VariableDeclaration) export interface VariableDeclaration extends Declaration { parent?: VariableDeclarationList; name: Identifier | BindingPattern; // Declared variable name @@ -528,11 +560,12 @@ namespace ts { initializer?: Expression; // Optional initializer } + // @kind(SyntaxKind.VariableDeclarationList) export interface VariableDeclarationList extends Node { declarations: NodeArray; } - // SyntaxKind.Parameter + // @kind(SyntaxKind.Parameter) export interface ParameterDeclaration extends Declaration { dotDotDotToken?: Node; // Present on rest parameter name: Identifier | BindingPattern; // Declared parameter name @@ -541,35 +574,44 @@ namespace ts { initializer?: Expression; // Optional initializer } - // SyntaxKind.BindingElement + // @kind(SyntaxKind.BindingElement) export interface BindingElement extends Declaration { - propertyName?: Identifier; // Binding property name (in object binding pattern) + propertyName?: PropertyName; // Binding property name (in object binding pattern) dotDotDotToken?: Node; // Present on rest binding element name: Identifier | BindingPattern; // Declared binding element name initializer?: Expression; // Optional initializer } - // SyntaxKind.Property - export interface PropertyDeclaration extends Declaration, ClassElement { - name: DeclarationName; // Declared property name + // @kind(SyntaxKind.PropertySignature) + export interface PropertySignature extends TypeElement { + name: PropertyName; // Declared property name questionToken?: Node; // Present on optional property type?: TypeNode; // Optional type annotation initializer?: Expression; // Optional initializer } + // @kind(SyntaxKind.PropertyDeclaration) + export interface PropertyDeclaration extends ClassElement { + questionToken?: Node; // Present for use with reporting a grammar error + name: PropertyName; + type?: TypeNode; + initializer?: Expression; // Optional initializer + } + export interface ObjectLiteralElement extends Declaration { _objectLiteralBrandBrand: any; - } + name?: PropertyName; + } - // SyntaxKind.PropertyAssignment + // @kind(SyntaxKind.PropertyAssignment) export interface PropertyAssignment extends ObjectLiteralElement { _propertyAssignmentBrand: any; - name: DeclarationName; + name: PropertyName; questionToken?: Node; initializer: Expression; } - // SyntaxKind.ShorthandPropertyAssignment + // @kind(SyntaxKind.ShorthandPropertyAssignment) export interface ShorthandPropertyAssignment extends ObjectLiteralElement { name: Identifier; questionToken?: Node; @@ -587,7 +629,7 @@ namespace ts { // SyntaxKind.ShorthandPropertyAssignment // SyntaxKind.EnumMember export interface VariableLikeDeclaration extends Declaration { - propertyName?: Identifier; + propertyName?: PropertyName; dotDotDotToken?: Node; name: DeclarationName; questionToken?: Node; @@ -595,10 +637,20 @@ namespace ts { initializer?: Expression; } + export interface PropertyLikeDeclaration extends Declaration { + name: PropertyName; + } + export interface BindingPattern extends Node { elements: NodeArray; } + // @kind(SyntaxKind.ObjectBindingPattern) + export interface ObjectBindingPattern extends BindingPattern { } + + // @kind(SyntaxKind.ArrayBindingPattern) + export interface ArrayBindingPattern extends BindingPattern { } + /** * Several node kinds share function-like features such as a signature, * a name, and a body. These nodes should extend FunctionLikeDeclaration. @@ -615,9 +667,15 @@ namespace ts { body?: Block | Expression; } - export interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { + // @kind(SyntaxKind.FunctionDeclaration) + export interface FunctionDeclaration extends FunctionLikeDeclaration, DeclarationStatement { name?: Identifier; - body?: Block; + body?: FunctionBody; + } + + // @kind(SyntaxKind.MethodSignature) + export interface MethodSignature extends SignatureDeclaration, TypeElement { + name: PropertyName; } // Note that a MethodDeclaration is considered both a ClassElement and an ObjectLiteralElement. @@ -629,15 +687,19 @@ namespace ts { // Because of this, it may be necessary to determine what sort of MethodDeclaration you have // at later stages of the compiler pipeline. In that case, you can either check the parent kind // of the method, or use helpers like isObjectLiteralMethodDeclaration + // @kind(SyntaxKind.MethodDeclaration) export interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - body?: Block; + name: PropertyName; + body?: FunctionBody; } + // @kind(SyntaxKind.Constructor) export interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; + body?: FunctionBody; } // For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. + // @kind(SyntaxKind.SemicolonClassElement) export interface SemicolonClassElement extends ClassElement { _semicolonClassElementBrand: any; } @@ -646,13 +708,28 @@ namespace ts { // ClassElement and an ObjectLiteralElement. export interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { _accessorDeclarationBrand: any; - body: Block; + name: PropertyName; + body: FunctionBody; } - export interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { + // @kind(SyntaxKind.GetAccessor) + export interface GetAccessorDeclaration extends AccessorDeclaration { } + + // @kind(SyntaxKind.SetAccessor) + export interface SetAccessorDeclaration extends AccessorDeclaration { } + + // @kind(SyntaxKind.IndexSignature) + export interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement, TypeElement { _indexSignatureDeclarationBrand: any; } + // @kind(SyntaxKind.AnyKeyword) + // @kind(SyntaxKind.NumberKeyword) + // @kind(SyntaxKind.BooleanKeyword) + // @kind(SyntaxKind.StringKeyword) + // @kind(SyntaxKind.SymbolKeyword) + // @kind(SyntaxKind.VoidKeyword) + // @kind(SyntaxKind.ThisType) export interface TypeNode extends Node { _typeNodeBrand: any; } @@ -661,29 +738,41 @@ namespace ts { _functionOrConstructorTypeNodeBrand: any; } + // @kind(SyntaxKind.FunctionType) + export interface FunctionTypeNode extends FunctionOrConstructorTypeNode { } + + // @kind(SyntaxKind.ConstructorType) + export interface ConstructorTypeNode extends FunctionOrConstructorTypeNode { } + + // @kind(SyntaxKind.TypeReference) export interface TypeReferenceNode extends TypeNode { typeName: EntityName; typeArguments?: NodeArray; } + // @kind(SyntaxKind.TypePredicate) export interface TypePredicateNode extends TypeNode { parameterName: Identifier; type: TypeNode; } + // @kind(SyntaxKind.TypeQuery) export interface TypeQueryNode extends TypeNode { exprName: EntityName; } // A TypeLiteral is the declaration node for an anonymous symbol. + // @kind(SyntaxKind.TypeLiteral) export interface TypeLiteralNode extends TypeNode, Declaration { - members: NodeArray; + members: NodeArray; } + // @kind(SyntaxKind.ArrayType) export interface ArrayTypeNode extends TypeNode { elementType: TypeNode; } + // @kind(SyntaxKind.TupleType) export interface TupleTypeNode extends TypeNode { elementTypes: NodeArray; } @@ -692,17 +781,24 @@ namespace ts { types: NodeArray; } + // @kind(SyntaxKind.UnionType) export interface UnionTypeNode extends UnionOrIntersectionTypeNode { } + // @kind(SyntaxKind.IntersectionType) export interface IntersectionTypeNode extends UnionOrIntersectionTypeNode { } + // @kind(SyntaxKind.ParenthesizedType) export interface ParenthesizedTypeNode extends TypeNode { type: TypeNode; } - // Note that a StringLiteral AST node is both an Expression and a TypeNode. The latter is - // because string literals can appear in the type annotation of a parameter node. - export interface StringLiteral extends LiteralExpression, TypeNode { + // @kind(SyntaxKind.StringLiteralType) + export interface StringLiteralTypeNode extends LiteralLikeNode, TypeNode { + _stringLiteralTypeBrand: any; + } + + // @kind(SyntaxKind.StringLiteral) + export interface StringLiteral extends LiteralExpression { _stringLiteralBrand: any; } @@ -718,6 +814,9 @@ namespace ts { contextualType?: Type; // Used to temporarily assign a contextual type during overload resolution } + // @kind(SyntaxKind.OmittedExpression) + export interface OmittedExpression extends Expression { } + export interface UnaryExpression extends Expression { _unaryExpressionBrand: any; } @@ -726,11 +825,13 @@ namespace ts { _incrementExpressionBrand: any; } + // @kind(SyntaxKind.PrefixUnaryExpression) export interface PrefixUnaryExpression extends IncrementExpression { operator: SyntaxKind; operand: UnaryExpression; } + // @kind(SyntaxKind.PostfixUnaryExpression) export interface PostfixUnaryExpression extends IncrementExpression { operand: LeftHandSideExpression; operator: SyntaxKind; @@ -748,31 +849,42 @@ namespace ts { _memberExpressionBrand: any; } + // @kind(SyntaxKind.TrueKeyword) + // @kind(SyntaxKind.FalseKeyword) + // @kind(SyntaxKind.NullKeyword) + // @kind(SyntaxKind.ThisKeyword) + // @kind(SyntaxKind.SuperKeyword) export interface PrimaryExpression extends MemberExpression { _primaryExpressionBrand: any; } + // @kind(SyntaxKind.DeleteExpression) export interface DeleteExpression extends UnaryExpression { expression: UnaryExpression; } + // @kind(SyntaxKind.TypeOfExpression) export interface TypeOfExpression extends UnaryExpression { expression: UnaryExpression; } + // @kind(SyntaxKind.VoidExpression) export interface VoidExpression extends UnaryExpression { expression: UnaryExpression; } + // @kind(SyntaxKind.AwaitExpression) export interface AwaitExpression extends UnaryExpression { expression: UnaryExpression; } + // @kind(SyntaxKind.YieldExpression) export interface YieldExpression extends Expression { asteriskToken?: Node; expression?: Expression; } + // @kind(SyntaxKind.BinaryExpression) // Binary expressions can be declarations if they are 'exports.foo = bar' expressions in JS files export interface BinaryExpression extends Expression, Declaration { left: Expression; @@ -780,6 +892,7 @@ namespace ts { right: Expression; } + // @kind(SyntaxKind.ConditionalExpression) export interface ConditionalExpression extends Expression { condition: Expression; questionToken: Node; @@ -788,77 +901,109 @@ namespace ts { whenFalse: Expression; } + export type FunctionBody = Block; + export type ConciseBody = FunctionBody | Expression; + + // @kind(SyntaxKind.FunctionExpression) export interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { name?: Identifier; - body: Block | Expression; // Required, whereas the member inherited from FunctionDeclaration is optional + body: FunctionBody; // Required, whereas the member inherited from FunctionDeclaration is optional } + // @kind(SyntaxKind.ArrowFunction) export interface ArrowFunction extends Expression, FunctionLikeDeclaration { equalsGreaterThanToken: Node; + body: ConciseBody; } - // The text property of a LiteralExpression stores the interpreted value of the literal in text form. For a StringLiteral, - // or any literal of a template, this means quotes have been removed and escapes have been converted to actual characters. - // For a NumericLiteral, the stored value is the toString() representation of the number. For example 1, 1.00, and 1e0 are all stored as just "1". - export interface LiteralExpression extends PrimaryExpression { + export interface LiteralLikeNode extends Node { text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; } + // The text property of a LiteralExpression stores the interpreted value of the literal in text form. For a StringLiteral, + // or any literal of a template, this means quotes have been removed and escapes have been converted to actual characters. + // For a NumericLiteral, the stored value is the toString() representation of the number. For example 1, 1.00, and 1e0 are all stored as just "1". + // @kind(SyntaxKind.NumericLiteral) + // @kind(SyntaxKind.RegularExpressionLiteral) + // @kind(SyntaxKind.NoSubstitutionTemplateLiteral) + export interface LiteralExpression extends LiteralLikeNode, PrimaryExpression { + _literalExpressionBrand: any; + } + + // @kind(SyntaxKind.TemplateHead) + // @kind(SyntaxKind.TemplateMiddle) + // @kind(SyntaxKind.TemplateTail) + export interface TemplateLiteralFragment extends LiteralLikeNode { + _templateLiteralFragmentBrand: any; + } + + // @kind(SyntaxKind.TemplateExpression) export interface TemplateExpression extends PrimaryExpression { - head: LiteralExpression; + head: TemplateLiteralFragment; templateSpans: NodeArray; } // Each of these corresponds to a substitution expression and a template literal, in that order. // The template literal must have kind TemplateMiddleLiteral or TemplateTailLiteral. + // @kind(SyntaxKind.TemplateSpan) export interface TemplateSpan extends Node { expression: Expression; - literal: LiteralExpression; + literal: TemplateLiteralFragment; } + // @kind(SyntaxKind.ParenthesizedExpression) export interface ParenthesizedExpression extends PrimaryExpression { expression: Expression; } + // @kind(SyntaxKind.ArrayLiteralExpression) export interface ArrayLiteralExpression extends PrimaryExpression { elements: NodeArray; } + // @kind(SyntaxKind.SpreadElementExpression) export interface SpreadElementExpression extends Expression { expression: Expression; } // An ObjectLiteralExpression is the declaration node for an anonymous symbol. + // @kind(SyntaxKind.ObjectLiteralExpression) export interface ObjectLiteralExpression extends PrimaryExpression, Declaration { properties: NodeArray; } + // @kind(SyntaxKind.PropertyAccessExpression) export interface PropertyAccessExpression extends MemberExpression, Declaration { expression: LeftHandSideExpression; dotToken: Node; name: Identifier; } + // @kind(SyntaxKind.ElementAccessExpression) export interface ElementAccessExpression extends MemberExpression { expression: LeftHandSideExpression; argumentExpression?: Expression; } + // @kind(SyntaxKind.CallExpression) export interface CallExpression extends LeftHandSideExpression { expression: LeftHandSideExpression; typeArguments?: NodeArray; arguments: NodeArray; } + // @kind(SyntaxKind.ExpressionWithTypeArguments) export interface ExpressionWithTypeArguments extends TypeNode { expression: LeftHandSideExpression; typeArguments?: NodeArray; } + // @kind(SyntaxKind.NewExpression) export interface NewExpression extends CallExpression, PrimaryExpression { } + // @kind(SyntaxKind.TaggedTemplateExpression) export interface TaggedTemplateExpression extends MemberExpression { tag: LeftHandSideExpression; template: LiteralExpression | TemplateExpression; @@ -866,11 +1011,13 @@ namespace ts { export type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator; + // @kind(SyntaxKind.AsExpression) export interface AsExpression extends Expression { expression: Expression; type: TypeNode; } + // @kind(SyntaxKind.TypeAssertionExpression) export interface TypeAssertion extends UnaryExpression { type: TypeNode; expression: UnaryExpression; @@ -879,6 +1026,7 @@ namespace ts { export type AssertionExpression = TypeAssertion | AsExpression; /// A JSX expression of the form ... + // @kind(SyntaxKind.JsxElement) export interface JsxElement extends PrimaryExpression { openingElement: JsxOpeningElement; children: NodeArray; @@ -886,6 +1034,7 @@ namespace ts { } /// The opening element of a ... JsxElement + // @kind(SyntaxKind.JsxOpeningElement) export interface JsxOpeningElement extends Expression { _openingElementBrand?: any; tagName: EntityName; @@ -893,6 +1042,7 @@ namespace ts { } /// A JSX expression of the form + // @kind(SyntaxKind.JsxSelfClosingElement) export interface JsxSelfClosingElement extends PrimaryExpression, JsxOpeningElement { _selfClosingElementBrand?: any; } @@ -900,24 +1050,29 @@ namespace ts { /// Either the opening tag in a ... pair, or the lone in a self-closing form export type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement; + // @kind(SyntaxKind.JsxAttribute) export interface JsxAttribute extends Node { name: Identifier; /// JSX attribute initializers are optional; is sugar for initializer?: Expression; } + // @kind(SyntaxKind.JsxSpreadAttribute) export interface JsxSpreadAttribute extends Node { expression: Expression; } + // @kind(SyntaxKind.JsxClosingElement) export interface JsxClosingElement extends Node { tagName: EntityName; } + // @kind(SyntaxKind.JsxExpression) export interface JsxExpression extends Expression { expression?: Expression; } + // @kind(SyntaxKind.JsxText) export interface JsxText extends Node { _jsxTextExpressionBrand: any; } @@ -928,18 +1083,35 @@ namespace ts { _statementBrand: any; } + // @kind(SyntaxKind.EmptyStatement) + export interface EmptyStatement extends Statement { } + + // @kind(SyntaxKind.DebuggerStatement) + export interface DebuggerStatement extends Statement { } + + // @kind(SyntaxKind.MissingDeclaration) + export interface MissingDeclaration extends DeclarationStatement, ClassElement, ObjectLiteralElement, TypeElement { + name?: Identifier; + } + + export type BlockLike = SourceFile | Block | ModuleBlock | CaseClause; + + // @kind(SyntaxKind.Block) export interface Block extends Statement { statements: NodeArray; } + // @kind(SyntaxKind.VariableStatement) export interface VariableStatement extends Statement { declarationList: VariableDeclarationList; } + // @kind(SyntaxKind.ExpressionStatement) export interface ExpressionStatement extends Statement { expression: Expression; } + // @kind(SyntaxKind.IfStatement) export interface IfStatement extends Statement { expression: Expression; thenStatement: Statement; @@ -950,78 +1122,101 @@ namespace ts { statement: Statement; } + // @kind(SyntaxKind.DoStatement) export interface DoStatement extends IterationStatement { expression: Expression; } + // @kind(SyntaxKind.WhileStatement) export interface WhileStatement extends IterationStatement { expression: Expression; } + // @kind(SyntaxKind.ForStatement) export interface ForStatement extends IterationStatement { initializer?: VariableDeclarationList | Expression; condition?: Expression; incrementor?: Expression; } + // @kind(SyntaxKind.ForInStatement) export interface ForInStatement extends IterationStatement { initializer: VariableDeclarationList | Expression; expression: Expression; } + // @kind(SyntaxKind.ForOfStatement) export interface ForOfStatement extends IterationStatement { initializer: VariableDeclarationList | Expression; expression: Expression; } - export interface BreakOrContinueStatement extends Statement { + // @kind(SyntaxKind.BreakStatement) + export interface BreakStatement extends Statement { label?: Identifier; } + // @kind(SyntaxKind.ContinueStatement) + export interface ContinueStatement extends Statement { + label?: Identifier; + } + + export type BreakOrContinueStatement = BreakStatement | ContinueStatement; + + // @kind(SyntaxKind.ReturnStatement) export interface ReturnStatement extends Statement { expression?: Expression; } + // @kind(SyntaxKind.WithStatement) export interface WithStatement extends Statement { expression: Expression; statement: Statement; } + // @kind(SyntaxKind.SwitchStatement) export interface SwitchStatement extends Statement { expression: Expression; caseBlock: CaseBlock; } + // @kind(SyntaxKind.CaseBlock) export interface CaseBlock extends Node { clauses: NodeArray; } + // @kind(SyntaxKind.CaseClause) export interface CaseClause extends Node { expression?: Expression; statements: NodeArray; } + // @kind(SyntaxKind.DefaultClause) export interface DefaultClause extends Node { statements: NodeArray; } export type CaseOrDefaultClause = CaseClause | DefaultClause; + // @kind(SyntaxKind.LabeledStatement) export interface LabeledStatement extends Statement { label: Identifier; statement: Statement; } + // @kind(SyntaxKind.ThrowStatement) export interface ThrowStatement extends Statement { expression: Expression; } + // @kind(SyntaxKind.TryStatement) export interface TryStatement extends Statement { tryBlock: Block; catchClause?: CatchClause; finallyBlock?: Block; } + // @kind(SyntaxKind.CatchClause) export interface CatchClause extends Node { variableDeclaration: VariableDeclaration; block: Block; @@ -1034,34 +1229,48 @@ namespace ts { members: NodeArray; } - export interface ClassDeclaration extends ClassLikeDeclaration, Statement { + // @kind(SyntaxKind.ClassDeclaration) + export interface ClassDeclaration extends ClassLikeDeclaration, DeclarationStatement { + name?: Identifier; } + // @kind(SyntaxKind.ClassExpression) export interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression { } export interface ClassElement extends Declaration { _classElementBrand: any; + name?: PropertyName; } - export interface InterfaceDeclaration extends Declaration, Statement { + export interface TypeElement extends Declaration { + _typeElementBrand: any; + name?: PropertyName; + questionToken?: Node; + } + + // @kind(SyntaxKind.InterfaceDeclaration) + export interface InterfaceDeclaration extends DeclarationStatement { name: Identifier; typeParameters?: NodeArray; heritageClauses?: NodeArray; - members: NodeArray; + members: NodeArray; } + // @kind(SyntaxKind.HeritageClause) export interface HeritageClause extends Node { token: SyntaxKind; types?: NodeArray; } - export interface TypeAliasDeclaration extends Declaration, Statement { + // @kind(SyntaxKind.TypeAliasDeclaration) + export interface TypeAliasDeclaration extends DeclarationStatement { name: Identifier; typeParameters?: NodeArray; type: TypeNode; } + // @kind(SyntaxKind.EnumMember) export interface EnumMember extends Declaration { // This does include ComputedPropertyName, but the parser will give an error // if it parses a ComputedPropertyName in an EnumMember @@ -1069,21 +1278,27 @@ namespace ts { initializer?: Expression; } - export interface EnumDeclaration extends Declaration, Statement { + // @kind(SyntaxKind.EnumDeclaration) + export interface EnumDeclaration extends DeclarationStatement { name: Identifier; members: NodeArray; } - export interface ModuleDeclaration extends Declaration, Statement { + export type ModuleBody = ModuleBlock | ModuleDeclaration; + + // @kind(SyntaxKind.ModuleDeclaration) + export interface ModuleDeclaration extends DeclarationStatement { name: Identifier | LiteralExpression; body: ModuleBlock | ModuleDeclaration; } + // @kind(SyntaxKind.ModuleBlock) export interface ModuleBlock extends Node, Statement { statements: NodeArray; } - export interface ImportEqualsDeclaration extends Declaration, Statement { + // @kind(SyntaxKind.ImportEqualsDeclaration) + export interface ImportEqualsDeclaration extends DeclarationStatement { name: Identifier; // 'EntityName' for an internal module reference, 'ExternalModuleReference' for an external @@ -1091,6 +1306,7 @@ namespace ts { moduleReference: EntityName | ExternalModuleReference; } + // @kind(SyntaxKind.ExternalModuleReference) export interface ExternalModuleReference extends Node { expression?: Expression; } @@ -1099,6 +1315,7 @@ namespace ts { // import "mod" => importClause = undefined, moduleSpecifier = "mod" // In rest of the cases, module specifier is string literal corresponding to module // ImportClause information is shown at its declaration below. + // @kind(SyntaxKind.ImportDeclaration) export interface ImportDeclaration extends Statement { importClause?: ImportClause; moduleSpecifier: Expression; @@ -1110,36 +1327,51 @@ namespace ts { // import d, * as ns from "mod" => name = d, namedBinding: NamespaceImport = { name: ns } // import { a, b as x } from "mod" => name = undefined, namedBinding: NamedImports = { elements: [{ name: a }, { name: x, propertyName: b}]} // import d, { a, b as x } from "mod" => name = d, namedBinding: NamedImports = { elements: [{ name: a }, { name: x, propertyName: b}]} + // @kind(SyntaxKind.ImportClause) export interface ImportClause extends Declaration { name?: Identifier; // Default binding namedBindings?: NamespaceImport | NamedImports; } + // @kind(SyntaxKind.NamespaceImport) export interface NamespaceImport extends Declaration { name: Identifier; } - export interface ExportDeclaration extends Declaration, Statement { + // @kind(SyntaxKind.ExportDeclaration) + export interface ExportDeclaration extends DeclarationStatement { exportClause?: NamedExports; moduleSpecifier?: Expression; } - export interface NamedImportsOrExports extends Node { - elements: NodeArray; + // @kind(SyntaxKind.NamedImports) + export interface NamedImports extends Node { + elements: NodeArray; } - export type NamedImports = NamedImportsOrExports; - export type NamedExports = NamedImportsOrExports; + // @kind(SyntaxKind.NamedExports) + export interface NamedExports extends Node { + elements: NodeArray; + } + + export type NamedImportsOrExports = NamedImports | NamedExports; - export interface ImportOrExportSpecifier extends Declaration { + // @kind(SyntaxKind.ImportSpecifier) + export interface ImportSpecifier extends Declaration { propertyName?: Identifier; // Name preceding "as" keyword (or undefined when "as" is absent) name: Identifier; // Declared name } - export type ImportSpecifier = ImportOrExportSpecifier; - export type ExportSpecifier = ImportOrExportSpecifier; + // @kind(SyntaxKind.ExportSpecifier) + export interface ExportSpecifier extends Declaration { + propertyName?: Identifier; // Name preceding "as" keyword (or undefined when "as" is absent) + name: Identifier; // Declared name + } + + export type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier; - export interface ExportAssignment extends Declaration, Statement { + // @kind(SyntaxKind.ExportAssignment) + export interface ExportAssignment extends DeclarationStatement { isExportEquals?: boolean; expression: Expression; } @@ -1154,6 +1386,7 @@ namespace ts { } // represents a top level: { type } expression in a JSDoc comment. + // @kind(SyntaxKind.JSDocTypeExpression) export interface JSDocTypeExpression extends Node { type: JSDocType; } @@ -1162,90 +1395,111 @@ namespace ts { _jsDocTypeBrand: any; } + // @kind(SyntaxKind.JSDocAllType) export interface JSDocAllType extends JSDocType { _JSDocAllTypeBrand: any; } + // @kind(SyntaxKind.JSDocUnknownType) export interface JSDocUnknownType extends JSDocType { _JSDocUnknownTypeBrand: any; } + // @kind(SyntaxKind.JSDocArrayType) export interface JSDocArrayType extends JSDocType { elementType: JSDocType; } + // @kind(SyntaxKind.JSDocUnionType) export interface JSDocUnionType extends JSDocType { types: NodeArray; } + // @kind(SyntaxKind.JSDocTupleType) export interface JSDocTupleType extends JSDocType { types: NodeArray; } + // @kind(SyntaxKind.JSDocNonNullableType) export interface JSDocNonNullableType extends JSDocType { type: JSDocType; } + // @kind(SyntaxKind.JSDocNullableType) export interface JSDocNullableType extends JSDocType { type: JSDocType; } + // @kind(SyntaxKind.JSDocRecordType) export interface JSDocRecordType extends JSDocType, TypeLiteralNode { members: NodeArray; } + // @kind(SyntaxKind.JSDocTypeReference) export interface JSDocTypeReference extends JSDocType { name: EntityName; typeArguments: NodeArray; } + // @kind(SyntaxKind.JSDocOptionalType) export interface JSDocOptionalType extends JSDocType { type: JSDocType; } + // @kind(SyntaxKind.JSDocFunctionType) export interface JSDocFunctionType extends JSDocType, SignatureDeclaration { parameters: NodeArray; type: JSDocType; } + // @kind(SyntaxKind.JSDocVariadicType) export interface JSDocVariadicType extends JSDocType { type: JSDocType; } + // @kind(SyntaxKind.JSDocConstructorType) export interface JSDocConstructorType extends JSDocType { type: JSDocType; } + // @kind(SyntaxKind.JSDocThisType) export interface JSDocThisType extends JSDocType { type: JSDocType; } - export interface JSDocRecordMember extends PropertyDeclaration { + // @kind(SyntaxKind.JSDocRecordMember) + export interface JSDocRecordMember extends PropertySignature { name: Identifier | LiteralExpression; type?: JSDocType; } + // @kind(SyntaxKind.JSDocComment) export interface JSDocComment extends Node { tags: NodeArray; } + // @kind(SyntaxKind.JSDocTag) export interface JSDocTag extends Node { atToken: Node; tagName: Identifier; } + // @kind(SyntaxKind.JSDocTemplateTag) export interface JSDocTemplateTag extends JSDocTag { typeParameters: NodeArray; } + // @kind(SyntaxKind.JSDocReturnTag) export interface JSDocReturnTag extends JSDocTag { typeExpression: JSDocTypeExpression; } + // @kind(SyntaxKind.JSDocTypeTag) export interface JSDocTypeTag extends JSDocTag { typeExpression: JSDocTypeExpression; } + // @kind(SyntaxKind.JSDocParameterTag) export interface JSDocParameterTag extends JSDocTag { preParameterName?: Identifier; typeExpression?: JSDocTypeExpression; @@ -1253,7 +1507,13 @@ namespace ts { isBracketed: boolean; } + export interface AmdDependency { + path: string; + name: string; + } + // Source files are declarations when they are external modules. + // @kind(SyntaxKind.SourceFile) export interface SourceFile extends Declaration { statements: NodeArray; endOfFileToken: Node; @@ -1262,7 +1522,7 @@ namespace ts { /* internal */ path: Path; text: string; - amdDependencies: {path: string; name: string}[]; + amdDependencies: AmdDependency[]; moduleName: string; referencedFiles: FileReference[]; languageVariant: LanguageVariant; @@ -1288,7 +1548,6 @@ namespace ts { // The first node that causes this file to be a CommonJS module /* @internal */ commonJsModuleIndicator: Node; - /* @internal */ isDefaultLib: boolean; /* @internal */ identifiers: Map; /* @internal */ nodeCount: number; /* @internal */ identifierCount: number; @@ -1726,6 +1985,7 @@ namespace ts { /* @internal */ parent?: Symbol; // Parent symbol /* @internal */ exportSymbol?: Symbol; // Exported symbol associated with this symbol /* @internal */ constEnumOnlyModule?: boolean; // True if module contains only const enums or other modules with only const enums + /* @internal */ inferredConstructor?: boolean; // A function promoted to constructor as the result of a prototype property assignment } /* @internal */ @@ -1825,6 +2085,7 @@ namespace ts { ContainsAnyFunctionType = 0x00800000, // Type is or contains object literal type ESSymbol = 0x01000000, // Type of symbol primitive introduced in ES6 ThisType = 0x02000000, // This type + ObjectLiteralPatternWithComputedProperties = 0x04000000, // Object literal type implied by binding pattern has computed properties /* @internal */ Intrinsic = Any | String | Number | Boolean | ESSymbol | Void | Undefined | Null, @@ -1973,6 +2234,7 @@ namespace ts { declaration: SignatureDeclaration; // Originating declaration typeParameters: TypeParameter[]; // Type parameters (undefined if non-generic) parameters: Symbol[]; // Parameters + kind: SignatureKind; // Call or Construct typePredicate?: TypePredicate; // Type predicate /* @internal */ resolvedReturnType: Type; // Resolved return type @@ -2026,6 +2288,19 @@ namespace ts { // It is optional because in contextual signature instantiation, nothing fails } + /* @internal */ + export const enum SpecialPropertyAssignmentKind { + None, + /// exports.name = expr + ExportsProperty, + /// module.exports = expr + ModuleExports, + /// className.prototype.name = expr + PrototypeProperty, + /// this.name = expr + ThisProperty + } + export interface DiagnosticMessage { key: string; category: DiagnosticCategory; @@ -2113,6 +2388,8 @@ namespace ts { noImplicitReturns?: boolean; noFallthroughCasesInSwitch?: boolean; forceConsistentCasingInFileNames?: boolean; + allowSyntheticDefaultImports?: boolean; + allowJs?: boolean; /* @internal */ stripInternal?: boolean; // Skip checking lib.d.ts to help speed up tests. @@ -2178,17 +2455,17 @@ namespace ts { /* @internal */ export interface CommandLineOptionBase { name: string; - type: string | Map; // "string", "number", "boolean", or an object literal mapping named values to actual values - isFilePath?: boolean; // True if option value is a path or fileName - shortName?: string; // A short mnemonic for convenience - for instance, 'h' can be used in place of 'help' - description?: DiagnosticMessage; // The message describing what the command line switch does - paramType?: DiagnosticMessage; // The name to be used for a non-boolean option's parameter + type: "string" | "number" | "boolean" | Map; // a value of a primitive type, or an object literal mapping named values to actual values + isFilePath?: boolean; // True if option value is a path or fileName + shortName?: string; // A short mnemonic for convenience - for instance, 'h' can be used in place of 'help' + description?: DiagnosticMessage; // The message describing what the command line switch does + paramType?: DiagnosticMessage; // The name to be used for a non-boolean option's parameter experimental?: boolean; } /* @internal */ export interface CommandLineOptionOfPrimitiveType extends CommandLineOptionBase { - type: string; // "string" | "number" | "boolean" + type: "string" | "number" | "boolean"; } /* @internal */ @@ -2340,7 +2617,7 @@ namespace ts { export interface ModuleResolutionHost { fileExists(fileName: string): boolean; // readFile function is used to read arbitrary text files on disk, i.e. when resolution procedure needs the content of 'package.json' - // to determine location of bundled typings for node module + // to determine location of bundled typings for node module readFile(fileName: string): string; } @@ -2348,7 +2625,7 @@ namespace ts { resolvedFileName: string; /* * Denotes if 'resolvedFileName' is isExternalLibraryImport and thus should be proper external module: - * - be a .d.ts file + * - be a .d.ts file * - use top level imports\exports * - don't use tripleslash references */ @@ -2371,11 +2648,11 @@ namespace ts { getNewLine(): string; /* - * CompilerHost must either implement resolveModuleNames (in case if it wants to be completely in charge of - * module name resolution) or provide implementation for methods from ModuleResolutionHost (in this case compiler + * CompilerHost must either implement resolveModuleNames (in case if it wants to be completely in charge of + * module name resolution) or provide implementation for methods from ModuleResolutionHost (in this case compiler * will appply built-in module resolution logic and use members of ModuleResolutionHost to ask host specific questions). - * If resolveModuleNames is implemented then implementation for members from ModuleResolutionHost can be just - * 'throw new Error("NotImplemented")' + * If resolveModuleNames is implemented then implementation for members from ModuleResolutionHost can be just + * 'throw new Error("NotImplemented")' */ resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[]; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 7fdab45c2ed48..cffc1e90a0601 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -38,6 +38,8 @@ namespace ts { getCanonicalFileName(fileName: string): string; getNewLine(): string; + isEmitBlocked(emitFileName: string): boolean; + writeFile: WriteFileCallback; } @@ -464,9 +466,6 @@ namespace ts { return true; case SyntaxKind.VoidKeyword: return node.parent.kind !== SyntaxKind.VoidExpression; - case SyntaxKind.StringLiteral: - // Specialized signatures can have string literals as their parameters' type names - return node.parent.kind === SyntaxKind.Parameter; case SyntaxKind.ExpressionWithTypeArguments: return !isExpressionWithTypeArgumentsInClassExtendsClause(node); @@ -907,23 +906,6 @@ namespace ts { return false; } - export function childIsDecorated(node: Node): boolean { - switch (node.kind) { - case SyntaxKind.ClassDeclaration: - return forEach((node).members, nodeOrChildIsDecorated); - - case SyntaxKind.MethodDeclaration: - case SyntaxKind.SetAccessor: - return forEach((node).parameters, nodeIsDecorated); - } - - return false; - } - - export function nodeOrChildIsDecorated(node: Node): boolean { - return nodeIsDecorated(node) || childIsDecorated(node); - } - export function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression { return node.kind === SyntaxKind.PropertyAccessExpression; } @@ -1081,33 +1063,40 @@ namespace ts { (expression).arguments[0].kind === SyntaxKind.StringLiteral; } - /** - * Returns true if the node is an assignment to a property on the identifier 'exports'. - * This function does not test if the node is in a JavaScript file or not. - */ - export function isExportsPropertyAssignment(expression: Node): boolean { - // of the form 'exports.name = expr' where 'name' and 'expr' are arbitrary - return isInJavaScriptFile(expression) && - (expression.kind === SyntaxKind.BinaryExpression) && - ((expression).operatorToken.kind === SyntaxKind.EqualsToken) && - ((expression).left.kind === SyntaxKind.PropertyAccessExpression) && - (((expression).left).expression.kind === SyntaxKind.Identifier) && - (((((expression).left).expression)).text === "exports"); - } + /// Given a BinaryExpression, returns SpecialPropertyAssignmentKind for the various kinds of property + /// assignments we treat as special in the binder + export function getSpecialPropertyAssignmentKind(expression: Node): SpecialPropertyAssignmentKind { + if (expression.kind !== SyntaxKind.BinaryExpression) { + return SpecialPropertyAssignmentKind.None; + } + const expr = expression; + if (expr.operatorToken.kind !== SyntaxKind.EqualsToken || expr.left.kind !== SyntaxKind.PropertyAccessExpression) { + return SpecialPropertyAssignmentKind.None; + } + const lhs = expr.left; + if (lhs.expression.kind === SyntaxKind.Identifier) { + const lhsId = lhs.expression; + if (lhsId.text === "exports") { + // exports.name = expr + return SpecialPropertyAssignmentKind.ExportsProperty; + } + else if (lhsId.text === "module" && lhs.name.text === "exports") { + // module.exports = expr + return SpecialPropertyAssignmentKind.ModuleExports; + } + } + else if (lhs.expression.kind === SyntaxKind.ThisKeyword) { + return SpecialPropertyAssignmentKind.ThisProperty; + } + else if (lhs.expression.kind === SyntaxKind.PropertyAccessExpression) { + // chained dot, e.g. x.y.z = expr; this var is the 'x.y' part + const innerPropertyAccess = lhs.expression; + if (innerPropertyAccess.expression.kind === SyntaxKind.Identifier && innerPropertyAccess.name.text === "prototype") { + return SpecialPropertyAssignmentKind.PrototypeProperty; + } + } - /** - * Returns true if the node is an assignment to the property access expression 'module.exports'. - * This function does not test if the node is in a JavaScript file or not. - */ - export function isModuleExportsAssignment(expression: Node): boolean { - // of the form 'module.exports = expr' where 'expr' is arbitrary - return isInJavaScriptFile(expression) && - (expression.kind === SyntaxKind.BinaryExpression) && - ((expression).operatorToken.kind === SyntaxKind.EqualsToken) && - ((expression).left.kind === SyntaxKind.PropertyAccessExpression) && - (((expression).left).expression.kind === SyntaxKind.Identifier) && - (((((expression).left).expression)).text === "module") && - (((expression).left).name.text === "exports"); + return SpecialPropertyAssignmentKind.None; } export function getExternalModuleName(node: Node): Expression { @@ -1327,7 +1316,7 @@ namespace ts { } // True if the given identifier, string literal, or number literal is the name of a declaration node - export function isDeclarationName(name: Node): boolean { + export function isDeclarationName(name: Node): name is Identifier | StringLiteral | LiteralExpression { if (name.kind !== SyntaxKind.Identifier && name.kind !== SyntaxKind.StringLiteral && name.kind !== SyntaxKind.NumericLiteral) { return false; } @@ -1489,6 +1478,10 @@ namespace ts { return isFunctionLike(node) && (node.flags & NodeFlags.Async) !== 0 && !isAccessor(node); } + export function isStringOrNumericLiteral(kind: SyntaxKind): boolean { + return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral; + } + /** * A declaration has a dynamic name if both of the following are true: * 1. The declaration has a computed property name @@ -1497,9 +1490,13 @@ namespace ts { * Symbol. */ export function hasDynamicName(declaration: Declaration): boolean { - return declaration.name && - declaration.name.kind === SyntaxKind.ComputedPropertyName && - !isWellKnownSymbolSyntactically((declaration.name).expression); + return declaration.name && isDynamicName(declaration.name); + } + + export function isDynamicName(name: DeclarationName): boolean { + return name.kind === SyntaxKind.ComputedPropertyName && + !isStringOrNumericLiteral((name).expression.kind) && + !isWellKnownSymbolSyntactically((name).expression); } /** @@ -1537,7 +1534,7 @@ namespace ts { return node.kind === SyntaxKind.Identifier && (node).text === "Symbol"; } - export function isModifier(token: SyntaxKind): boolean { + export function isModifierKind(token: SyntaxKind): boolean { switch (token) { case SyntaxKind.AbstractKeyword: case SyntaxKind.AsyncKeyword: @@ -1570,20 +1567,60 @@ namespace ts { return isFunctionLike(n) || n.kind === SyntaxKind.ModuleDeclaration || n.kind === SyntaxKind.SourceFile; } - export function cloneEntityName(node: EntityName): EntityName { - if (node.kind === SyntaxKind.Identifier) { - const clone = createSynthesizedNode(SyntaxKind.Identifier); - clone.text = (node).text; - return clone; + /** + * Creates a shallow, memberwise clone of a node. The "kind", "pos", "end", "flags", and "parent" + * properties are excluded by default, and can be provided via the "location", "flags", and + * "parent" parameters. + * @param node The node to clone. + * @param location An optional TextRange to use to supply the new position. + * @param flags The NodeFlags to use for the cloned node. + * @param parent The parent for the new node. + */ + export function cloneNode(node: T, location?: TextRange, flags?: NodeFlags, parent?: Node): T { + // We don't use "clone" from core.ts here, as we need to preserve the prototype chain of + // the original node. We also need to exclude specific properties and only include own- + // properties (to skip members already defined on the shared prototype). + const clone = location !== undefined + ? createNode(node.kind, location.pos, location.end) + : createSynthesizedNode(node.kind); + + for (const key in node) { + if (clone.hasOwnProperty(key) || !node.hasOwnProperty(key)) { + continue; + } + + (clone)[key] = (node)[key]; } - else { - const clone = createSynthesizedNode(SyntaxKind.QualifiedName); - clone.left = cloneEntityName((node).left); - clone.left.parent = clone; - clone.right = cloneEntityName((node).right); - clone.right.parent = clone; - return clone; + + if (flags !== undefined) { + clone.flags = flags; + } + + if (parent !== undefined) { + clone.parent = parent; + } + + return clone; + } + + /** + * Creates a deep clone of an EntityName, with new parent pointers. + * @param node The EntityName to clone. + * @param parent The parent for the cloned node. + */ + export function cloneEntityName(node: EntityName, parent?: Node): EntityName { + const clone = cloneNode(node, node, node.flags, parent); + if (isQualifiedName(clone)) { + const { left, right } = clone; + clone.left = cloneEntityName(left, clone); + clone.right = cloneNode(right, right, right.flags, parent); } + + return clone; + } + + export function isQualifiedName(node: Node): node is QualifiedName { + return node.kind === SyntaxKind.QualifiedName; } export function nodeIsSynthesized(node: Node): boolean { @@ -1859,7 +1896,7 @@ namespace ts { * Resolves a local path to a path which is absolute to the base of the emit */ export function getExternalModuleNameFromPath(host: EmitHost, fileName: string): string { - const dir = host.getCurrentDirectory(); + const dir = toPath(host.getCommonSourceDirectory(), host.getCurrentDirectory(), f => host.getCanonicalFileName(f)); const relativePath = getRelativePathToDirectoryOrUrl(dir, fileName, dir, f => host.getCanonicalFileName(f), /*isAbsolutePathAnUrl*/ false); return removeFileExtension(relativePath); } @@ -1877,15 +1914,85 @@ namespace ts { return emitOutputFilePathWithoutExtension + extension; } + export function getEmitScriptTarget(compilerOptions: CompilerOptions) { + return compilerOptions.target || ScriptTarget.ES3; + } + + export function getEmitModuleKind(compilerOptions: CompilerOptions) { + return compilerOptions.module ? + compilerOptions.module : + getEmitScriptTarget(compilerOptions) === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.None; + } + + export interface EmitFileNames { + jsFilePath: string; + sourceMapFilePath: string; + declarationFilePath: string; + } + + export function forEachExpectedEmitFile(host: EmitHost, + action: (emitFileNames: EmitFileNames, sourceFiles: SourceFile[], isBundledEmit: boolean) => void, + targetSourceFile?: SourceFile) { + const options = host.getCompilerOptions(); + // Emit on each source file + if (options.outFile || options.out) { + onBundledEmit(host); + } + else { + const sourceFiles = targetSourceFile === undefined ? host.getSourceFiles() : [targetSourceFile]; + for (const sourceFile of sourceFiles) { + if (!isDeclarationFile(sourceFile)) { + onSingleFileEmit(host, sourceFile); + } + } + } + + function onSingleFileEmit(host: EmitHost, sourceFile: SourceFile) { + const jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, + sourceFile.languageVariant === LanguageVariant.JSX && options.jsx === JsxEmit.Preserve ? ".jsx" : ".js"); + const emitFileNames: EmitFileNames = { + jsFilePath, + sourceMapFilePath: getSourceMapFilePath(jsFilePath, options), + declarationFilePath: !isSourceFileJavaScript(sourceFile) ? getDeclarationEmitFilePath(jsFilePath, options) : undefined + }; + action(emitFileNames, [sourceFile], /*isBundledEmit*/false); + } + + function onBundledEmit(host: EmitHost) { + // Can emit only sources that are not declaration file and are either non module code or module with --module or --target es6 specified + const bundledSources = filter(host.getSourceFiles(), + sourceFile => !isDeclarationFile(sourceFile) && // Not a declaration file + (!isExternalModule(sourceFile) || // non module file + (getEmitModuleKind(options) && isExternalModule(sourceFile)))); // module that can emit - note falsy value from getEmitModuleKind means the module kind that shouldn't be emitted + if (bundledSources.length) { + const jsFilePath = options.outFile || options.out; + const emitFileNames: EmitFileNames = { + jsFilePath, + sourceMapFilePath: getSourceMapFilePath(jsFilePath, options), + declarationFilePath: getDeclarationEmitFilePath(jsFilePath, options) + }; + action(emitFileNames, bundledSources, /*isBundledEmit*/true); + } + } + + function getSourceMapFilePath(jsFilePath: string, options: CompilerOptions) { + return options.sourceMap ? jsFilePath + ".map" : undefined; + } + + function getDeclarationEmitFilePath(jsFilePath: string, options: CompilerOptions) { + return options.declaration ? removeFileExtension(jsFilePath) + ".d.ts" : undefined; + } + } + export function getSourceFilePathInNewDir(sourceFile: SourceFile, host: EmitHost, newDirPath: string) { let sourceFilePath = getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory()); sourceFilePath = sourceFilePath.replace(host.getCommonSourceDirectory(), ""); return combinePaths(newDirPath, sourceFilePath); } - export function writeFile(host: EmitHost, diagnostics: Diagnostic[], fileName: string, data: string, writeByteOrderMark: boolean) { + export function writeFile(host: EmitHost, diagnostics: DiagnosticCollection, fileName: string, data: string, writeByteOrderMark: boolean) { host.writeFile(fileName, data, writeByteOrderMark, hostErrorMessage => { - diagnostics.push(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); + diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); }); } @@ -1909,18 +2016,6 @@ namespace ts { return accessor && accessor.parameters.length > 0 && accessor.parameters[0].type; } - export function shouldEmitToOwnFile(sourceFile: SourceFile, compilerOptions: CompilerOptions): boolean { - if (!isDeclarationFile(sourceFile)) { - if ((isExternalModule(sourceFile) || !(compilerOptions.outFile || compilerOptions.out))) { - // 1. in-browser single file compilation scenario - // 2. non .js file - return compilerOptions.isolatedModules || !fileExtensionIs(sourceFile.fileName, ".js"); - } - return false; - } - return false; - } - export function getAllAccessorDeclarations(declarations: NodeArray, accessor: AccessorDeclaration) { let firstAccessor: AccessorDeclaration; let secondAccessor: AccessorDeclaration; @@ -2265,11 +2360,7 @@ namespace ts { } export function hasJavaScriptFileExtension(fileName: string) { - return fileExtensionIs(fileName, ".js") || fileExtensionIs(fileName, ".jsx"); - } - - export function allowsJsxExpressions(fileName: string) { - return fileExtensionIs(fileName, ".tsx") || fileExtensionIs(fileName, ".jsx"); + return forEach(supportedJavascriptExtensions, extension => fileExtensionIs(fileName, extension)); } /** @@ -2310,6 +2401,55 @@ namespace ts { return output; } + /** + * Serialize an object graph into a JSON string. This is intended only for use on an acyclic graph + * as the fallback implementation does not check for circular references by default. + */ + export const stringify: (value: any) => string = JSON && JSON.stringify + ? JSON.stringify + : stringifyFallback; + + /** + * Serialize an object graph into a JSON string. + */ + function stringifyFallback(value: any): string { + // JSON.stringify returns `undefined` here, instead of the string "undefined". + return value === undefined ? undefined : stringifyValue(value); + } + + function stringifyValue(value: any): string { + return typeof value === "string" ? `"${escapeString(value)}"` + : typeof value === "number" ? isFinite(value) ? String(value) : "null" + : typeof value === "boolean" ? value ? "true" : "false" + : typeof value === "object" && value ? isArray(value) ? cycleCheck(stringifyArray, value) : cycleCheck(stringifyObject, value) + : /*fallback*/ "null"; + } + + function cycleCheck(cb: (value: any) => string, value: any) { + Debug.assert(!value.hasOwnProperty("__cycle"), "Converting circular structure to JSON"); + value.__cycle = true; + const result = cb(value); + delete value.__cycle; + return result; + } + + function stringifyArray(value: any) { + return `[${reduceLeft(value, stringifyElement, "")}]`; + } + + function stringifyElement(memo: string, value: any) { + return (memo ? memo + "," : memo) + stringifyValue(value); + } + + function stringifyObject(value: any) { + return `{${reduceProperties(value, stringifyProperty, "")}}`; + } + + function stringifyProperty(memo: string, value: any, key: string) { + return value === undefined || typeof value === "function" || key === "__cycle" ? memo + : (memo ? memo + "," : memo) + `"${escapeString(key)}":${stringifyValue(value)}`; + } + const base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; /** diff --git a/src/harness/compilerRunner.ts b/src/harness/compilerRunner.ts index 848f229f109c0..4f3607cf182a2 100644 --- a/src/harness/compilerRunner.ts +++ b/src/harness/compilerRunner.ts @@ -40,89 +40,79 @@ class CompilerBaselineRunner extends RunnerBase { this.basePath += "/" + this.testSuiteName; } + private makeUnitName(name: string, root: string) { + return ts.isRootedDiskPath(name) ? name : ts.combinePaths(root, name); + }; + public checkTestCodeOutput(fileName: string) { describe("compiler tests for " + fileName, () => { // Mocha holds onto the closure environment of the describe callback even after the test is done. // Everything declared here should be cleared out in the "after" callback. let justName: string; - let content: string; - let testCaseContent: { settings: Harness.TestCaseParser.CompilerSettings; testUnitData: Harness.TestCaseParser.TestUnitData[]; }; - - let units: Harness.TestCaseParser.TestUnitData[]; - let tcSettings: Harness.TestCaseParser.CompilerSettings; let lastUnit: Harness.TestCaseParser.TestUnitData; - let rootDir: string; + let harnessSettings: Harness.TestCaseParser.CompilerSettings; + let hasNonDtsFiles: boolean; let result: Harness.Compiler.CompilerResult; - let program: ts.Program; let options: ts.CompilerOptions; // equivalent to the files that will be passed on the command line - let toBeCompiled: { unitName: string; content: string }[]; + let toBeCompiled: Harness.Compiler.TestFile[]; // equivalent to other files on the file system not directly passed to the compiler (ie things that are referenced by other files) - let otherFiles: { unitName: string; content: string }[]; - let harnessCompiler: Harness.Compiler.HarnessCompiler; + let otherFiles: Harness.Compiler.TestFile[]; before(() => { justName = fileName.replace(/^.*[\\\/]/, ""); // strips the fileName from the path. - content = Harness.IO.readFile(fileName); - testCaseContent = Harness.TestCaseParser.makeUnitsFromTest(content, fileName); - units = testCaseContent.testUnitData; - tcSettings = testCaseContent.settings; + const content = Harness.IO.readFile(fileName); + const testCaseContent = Harness.TestCaseParser.makeUnitsFromTest(content, fileName); + const units = testCaseContent.testUnitData; + harnessSettings = testCaseContent.settings; lastUnit = units[units.length - 1]; - rootDir = lastUnit.originalFilePath.indexOf("conformance") === -1 ? "tests/cases/compiler/" : lastUnit.originalFilePath.substring(0, lastUnit.originalFilePath.lastIndexOf("/")) + "/"; - harnessCompiler = Harness.Compiler.getCompiler(); + hasNonDtsFiles = ts.forEach(units, unit => !ts.fileExtensionIs(unit.name, ".d.ts")); + const rootDir = lastUnit.originalFilePath.indexOf("conformance") === -1 ? "tests/cases/compiler/" : lastUnit.originalFilePath.substring(0, lastUnit.originalFilePath.lastIndexOf("/")) + "/"; // We need to assemble the list of input files for the compiler and other related files on the 'filesystem' (ie in a multi-file test) // If the last file in a test uses require or a triple slash reference we'll assume all other files will be brought in via references, // otherwise, assume all files are just meant to be in the same compilation session without explicit references to one another. toBeCompiled = []; otherFiles = []; if (/require\(/.test(lastUnit.content) || /reference\spath/.test(lastUnit.content)) { - toBeCompiled.push({ unitName: rootDir + lastUnit.name, content: lastUnit.content }); + toBeCompiled.push({ unitName: this.makeUnitName(lastUnit.name, rootDir), content: lastUnit.content }); units.forEach(unit => { if (unit.name !== lastUnit.name) { - otherFiles.push({ unitName: rootDir + unit.name, content: unit.content }); + otherFiles.push({ unitName: this.makeUnitName(unit.name, rootDir), content: unit.content }); } }); } else { toBeCompiled = units.map(unit => { - return { unitName: rootDir + unit.name, content: unit.content }; + return { unitName: this.makeUnitName(unit.name, rootDir), content: unit.content }; }); } - options = harnessCompiler.compileFiles(toBeCompiled, otherFiles, function (compileResult, _program) { - result = compileResult; - // The program will be used by typeWriter - program = _program; - }, function (settings) { - harnessCompiler.setCompilerSettings(tcSettings); - }); + const output = Harness.Compiler.compileFiles( + toBeCompiled, otherFiles, harnessSettings, /* options */ undefined, /* currentDirectory */ undefined); + + options = output.options; + result = output.result; }); after(() => { // Mocha holds onto the closure environment of the describe callback even after the test is done. // Therefore we have to clean out large objects after the test is done. justName = undefined; - content = undefined; - testCaseContent = undefined; - units = undefined; - tcSettings = undefined; lastUnit = undefined; - rootDir = undefined; + hasNonDtsFiles = undefined; result = undefined; - program = undefined; options = undefined; toBeCompiled = undefined; otherFiles = undefined; - harnessCompiler = undefined; }); function getByteOrderMarkText(file: Harness.Compiler.GeneratedFile): string { return file.writeByteOrderMark ? "\u00EF\u00BB\u00BF" : ""; } - function getErrorBaseline(toBeCompiled: { unitName: string; content: string }[], otherFiles: { unitName: string; content: string }[], result: Harness.Compiler.CompilerResult) { + function getErrorBaseline(toBeCompiled: Harness.Compiler.TestFile[], otherFiles: Harness.Compiler.TestFile[], result: Harness.Compiler.CompilerResult) { return Harness.Compiler.getErrorBaseline(toBeCompiled.concat(otherFiles), result.errors); } @@ -151,7 +141,7 @@ class CompilerBaselineRunner extends RunnerBase { }); it("Correct JS output for " + fileName, () => { - if (!ts.fileExtensionIs(lastUnit.name, ".d.ts") && this.emit) { + if (hasNonDtsFiles && this.emit) { if (result.files.length === 0 && result.errors.length === 0) { throw new Error("Expected at least one js file to be emitted or at least one error to be created."); } @@ -184,9 +174,9 @@ class CompilerBaselineRunner extends RunnerBase { } } - const declFileCompilationResult = harnessCompiler.compileDeclarationFiles(toBeCompiled, otherFiles, result, function (settings) { - harnessCompiler.setCompilerSettings(tcSettings); - }, options); + const declFileCompilationResult = + Harness.Compiler.compileDeclarationFiles( + toBeCompiled, otherFiles, result, harnessSettings, options, /*currentDirectory*/ undefined); if (declFileCompilationResult && declFileCompilationResult.declResult.errors.length) { jsCode += "\r\n\r\n//// [DtsFileErrors]\r\n"; @@ -257,10 +247,11 @@ class CompilerBaselineRunner extends RunnerBase { // These types are equivalent, but depend on what order the compiler observed // certain parts of the program. + const program = result.program; const allFiles = toBeCompiled.concat(otherFiles).filter(file => !!program.getSourceFile(file.unitName)); - const fullWalker = new TypeWriterWalker(program, /*fullTypeCheck:*/ true); - const pullWalker = new TypeWriterWalker(program, /*fullTypeCheck:*/ false); + const fullWalker = new TypeWriterWalker(program, /*fullTypeCheck*/ true); + const pullWalker = new TypeWriterWalker(program, /*fullTypeCheck*/ false); const fullResults: ts.Map = {}; const pullResults: ts.Map = {}; @@ -274,14 +265,14 @@ class CompilerBaselineRunner extends RunnerBase { // The second gives symbols for all identifiers. let e1: Error, e2: Error; try { - checkBaseLines(/*isSymbolBaseLine:*/ false); + checkBaseLines(/*isSymbolBaseLine*/ false); } catch (e) { e1 = e; } try { - checkBaseLines(/*isSymbolBaseLine:*/ true); + checkBaseLines(/*isSymbolBaseLine*/ true); } catch (e) { e2 = e; @@ -367,7 +358,6 @@ class CompilerBaselineRunner extends RunnerBase { public initializeTests() { describe(this.testSuiteName + " tests", () => { describe("Setup compiler for compiler baselines", () => { - const harnessCompiler = Harness.Compiler.getCompiler(); this.parseOptions(); }); diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 1c8593a9e1294..24f3319285b22 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -48,12 +48,6 @@ namespace FourSlash { ranges: Range[]; } - export interface TestXmlData { - invalidReason: string; - originalName: string; - actions: string[]; - } - interface MemberListData { result: { maybeInaccurate: boolean; @@ -84,14 +78,14 @@ namespace FourSlash { marker?: Marker; } - interface ILocationInformation { + interface LocationInformation { position: number; sourcePosition: number; sourceLine: number; sourceColumn: number; } - interface IRangeLocationInformation extends ILocationInformation { + interface RangeLocationInformation extends LocationInformation { marker?: Marker; } @@ -134,11 +128,6 @@ namespace FourSlash { return settings; } - export let currentTestState: TestState = null; - function assertionMessage(msg: string) { - return "\nMarker: " + currentTestState.lastKnownMarker + "\nChecking: " + msg + "\n\n"; - } - export class TestCancellationToken implements ts.HostCancellationToken { // 0 - cancelled // >0 - not cancelled @@ -216,9 +205,6 @@ namespace FourSlash { public formatCodeOptions: ts.FormatCodeOptions; - private scenarioActions: string[] = []; - private taoInvalidReason: string = null; - private inputFiles: ts.Map = {}; // Map between inputFile's fileName and its content for easily looking up when resolving references // Add input file which has matched file name with the given reference-file path. @@ -300,7 +286,7 @@ namespace FourSlash { // Fourslash insert tests/cases/fourslash into inputFile.unitName and import statement doesn't require ".ts" // so convert them before making appropriate comparison const importedFilePath = this.basePath + "/" + importedFile.fileName; - this.addMatchedInputFile(importedFilePath, compilationOptions.allowNonTsExtensions ? ts.supportedJsExtensions : ts.supportedExtensions); + this.addMatchedInputFile(importedFilePath, ts.getSupportedExtensions(compilationOptions)); }); // Check if no-default-lib flag is false and if so add default library @@ -338,7 +324,6 @@ namespace FourSlash { this.testData.files.forEach(file => { const fileName = file.fileName.replace(Harness.IO.directoryName(file.fileName), "").substr(1); const fileNameWithoutExtension = fileName.substr(0, fileName.lastIndexOf(".")); - this.scenarioActions.push(""); }); // Open the first file by default @@ -367,35 +352,22 @@ namespace FourSlash { public goToPosition(pos: number) { this.currentCaretPosition = pos; - - const lineStarts = ts.computeLineStarts(this.getFileContent(this.activeFile.fileName)); - const lineCharPos = ts.computeLineAndCharacterOfPosition(lineStarts, pos); - this.scenarioActions.push(``); } public moveCaretRight(count = 1) { this.currentCaretPosition += count; this.currentCaretPosition = Math.min(this.currentCaretPosition, this.getFileContent(this.activeFile.fileName).length); - if (count > 0) { - this.scenarioActions.push(``); - } - else { - this.scenarioActions.push(``); - } } // Opens a file given its 0-based index or fileName - public openFile(index: number): void; - public openFile(name: string): void; - public openFile(indexOrName: any) { + public openFile(index: number, content?: string): void; + public openFile(name: string, content?: string): void; + public openFile(indexOrName: any, content?: string) { const fileToOpen: FourSlashFile = this.findFile(indexOrName); fileToOpen.fileName = ts.normalizeSlashes(fileToOpen.fileName); this.activeFile = fileToOpen; - const fileName = fileToOpen.fileName.replace(Harness.IO.directoryName(fileToOpen.fileName), "").substr(1); - this.scenarioActions.push(``); - // Let the host know that this file is now open - this.languageServiceAdapterHost.openFile(fileToOpen.fileName); + this.languageServiceAdapterHost.openFile(fileToOpen.fileName, content); } public verifyErrorExistsBetweenMarkers(startMarkerName: string, endMarkerName: string, negative: boolean) { @@ -407,8 +379,6 @@ namespace FourSlash { const exists = this.anyErrorInRange(predicate, startMarker, endMarker); - this.taoInvalidReason = "verifyErrorExistsBetweenMarkers NYI"; - if (exists !== negative) { this.printErrorLog(negative, this.getAllDiagnostics()); throw new Error("Failure between markers: " + startMarkerName + ", " + endMarkerName); @@ -421,7 +391,11 @@ namespace FourSlash { } private messageAtLastKnownMarker(message: string) { - return "Marker: " + currentTestState.lastKnownMarker + "\n" + message; + return "Marker: " + this.lastKnownMarker + "\n" + message; + } + + private assertionMessageAtLastKnownMarker(msg: string) { + return "\nMarker: " + this.lastKnownMarker + "\nChecking: " + msg + "\n\n"; } private getDiagnostics(fileName: string): ts.Diagnostic[] { @@ -461,8 +435,6 @@ namespace FourSlash { }; } - this.taoInvalidReason = "verifyErrorExistsAfterMarker NYI"; - const exists = this.anyErrorInRange(predicate, marker); const diagnostics = this.getAllDiagnostics(); @@ -511,10 +483,8 @@ namespace FourSlash { const errors = this.getDiagnostics(this.activeFile.fileName); const actual = errors.length; - this.scenarioActions.push(``); - if (actual !== expected) { - this.printErrorLog(false, errors); + this.printErrorLog(/*expectErrors*/ false, errors); const errorMsg = "Actual number of errors (" + actual + ") does not match expected number (" + expected + ")"; Harness.IO.log(errorMsg); this.raiseError(errorMsg); @@ -527,8 +497,6 @@ namespace FourSlash { throw new Error("Expected exactly one output from emit of " + this.activeFile.fileName); } - this.taoInvalidReason = "verifyEval impossible"; - const evaluation = new Function(`${emit.outputFiles[0].text};\r\nreturn (${expr});`)(); if (evaluation !== value) { this.raiseError(`Expected evaluation of expression "${expr}" to equal "${value}", but got "${evaluation}"`); @@ -540,21 +508,22 @@ namespace FourSlash { if (emit.outputFiles.length !== 1) { throw new Error("Expected exactly one output from emit of " + this.activeFile.fileName); } - this.taoInvalidReason = "verifyGetEmitOutputForCurrentFile impossible"; const actual = emit.outputFiles[0].text; if (actual !== expected) { this.raiseError(`Expected emit output to be "${expected}", but got "${actual}"`); } } - public verifyMemberListContains(symbol: string, text?: string, documentation?: string, kind?: string) { - this.scenarioActions.push(""); - this.scenarioActions.push(``); - - if (text || documentation || kind) { - this.taoInvalidReason = "verifyMemberListContains only supports the \"symbol\" parameter"; + public verifyGetEmitOutputContentsForCurrentFile(expected: ts.OutputFile[]): void { + const emit = this.languageService.getEmitOutput(this.activeFile.fileName); + assert.equal(emit.outputFiles.length, expected.length, "Number of emit output files"); + for (let i = 0; i < emit.outputFiles.length; i++) { + assert.equal(emit.outputFiles[i].name, expected[i].name, "FileName"); + assert.equal(emit.outputFiles[i].text, expected[i].text, "Content"); } + } + public verifyMemberListContains(symbol: string, text?: string, documentation?: string, kind?: string) { const members = this.getMemberListAtCaret(); if (members) { this.assertItemInCompletionList(members.entries, symbol, text, documentation, kind); @@ -565,18 +534,9 @@ namespace FourSlash { } public verifyMemberListCount(expectedCount: number, negative: boolean) { - if (expectedCount === 0) { - if (negative) { - this.verifyMemberListIsEmpty(false); - return; - } - else { - this.scenarioActions.push(""); - } - } - else { - this.scenarioActions.push(""); - this.scenarioActions.push(``); + if (expectedCount === 0 && negative) { + this.verifyMemberListIsEmpty(/*negative*/ false); + return; } const members = this.getMemberListAtCaret(); @@ -594,9 +554,6 @@ namespace FourSlash { } public verifyMemberListDoesNotContain(symbol: string) { - this.scenarioActions.push(""); - this.scenarioActions.push(``); - const members = this.getMemberListAtCaret(); if (members && members.entries.filter(e => e.name === symbol).length !== 0) { this.raiseError(`Member list did contain ${symbol}`); @@ -604,8 +561,6 @@ namespace FourSlash { } public verifyCompletionListItemsCountIsGreaterThan(count: number, negative: boolean) { - this.taoInvalidReason = "verifyCompletionListItemsCountIsGreaterThan NYI"; - const completions = this.getCompletionListAtCaret(); const itemsCount = completions.entries.length; @@ -622,13 +577,6 @@ namespace FourSlash { } public verifyMemberListIsEmpty(negative: boolean) { - if (negative) { - this.scenarioActions.push(""); - } - else { - this.scenarioActions.push(""); - } - const members = this.getMemberListAtCaret(); if ((!members || members.entries.length === 0) && negative) { this.raiseError("Member list is empty at Caret"); @@ -647,8 +595,6 @@ namespace FourSlash { } public verifyCompletionListIsEmpty(negative: boolean) { - this.scenarioActions.push(""); - const completions = this.getCompletionListAtCaret(); if ((!completions || completions.entries.length === 0) && negative) { this.raiseError("Completion list is empty at caret at position " + this.activeFile.fileName + " " + this.currentCaretPosition); @@ -716,8 +662,6 @@ namespace FourSlash { // and keep it in the list of filtered entry. return true; } - this.scenarioActions.push(""); - this.scenarioActions.push(``); const completions = this.getCompletionListAtCaret(); if (completions) { @@ -745,24 +689,20 @@ namespace FourSlash { } public verifyCompletionEntryDetails(entryName: string, expectedText: string, expectedDocumentation?: string, kind?: string) { - this.taoInvalidReason = "verifyCompletionEntryDetails NYI"; - const details = this.getCompletionEntryDetails(entryName); - assert.equal(ts.displayPartsToString(details.displayParts), expectedText, assertionMessage("completion entry details text")); + assert.equal(ts.displayPartsToString(details.displayParts), expectedText, this.assertionMessageAtLastKnownMarker("completion entry details text")); if (expectedDocumentation !== undefined) { - assert.equal(ts.displayPartsToString(details.documentation), expectedDocumentation, assertionMessage("completion entry documentation")); + assert.equal(ts.displayPartsToString(details.documentation), expectedDocumentation, this.assertionMessageAtLastKnownMarker("completion entry documentation")); } if (kind !== undefined) { - assert.equal(details.kind, kind, assertionMessage("completion entry kind")); + assert.equal(details.kind, kind, this.assertionMessageAtLastKnownMarker("completion entry kind")); } } public verifyReferencesAtPositionListContains(fileName: string, start: number, end: number, isWriteAccess?: boolean) { - this.taoInvalidReason = "verifyReferencesAtPositionListContains NYI"; - const references = this.getReferencesAtCaret(); if (!references || references.length === 0) { @@ -784,8 +724,6 @@ namespace FourSlash { } public verifyReferencesCountIs(count: number, localFilesOnly = true) { - this.taoInvalidReason = "verifyReferences NYI"; - const references = this.getReferencesAtCaret(); let referencesCount = 0; @@ -845,13 +783,6 @@ namespace FourSlash { } public verifyQuickInfoString(negative: boolean, expectedText?: string, expectedDocumentation?: string) { - [expectedText, expectedDocumentation].forEach(str => { - if (str) { - this.scenarioActions.push(""); - this.scenarioActions.push(``); - } - }); - const actualQuickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition); const actualQuickInfoText = actualQuickInfo ? ts.displayPartsToString(actualQuickInfo.displayParts) : ""; const actualQuickInfoDocumentation = actualQuickInfo ? ts.displayPartsToString(actualQuickInfo.documentation) : ""; @@ -871,7 +802,7 @@ namespace FourSlash { } // TODO: should be '==='? if (expectedDocumentation != undefined) { - assert.equal(actualQuickInfoDocumentation, expectedDocumentation, assertionMessage("quick info doc")); + assert.equal(actualQuickInfoDocumentation, expectedDocumentation, this.assertionMessageAtLastKnownMarker("quick info doc")); } } } @@ -879,8 +810,6 @@ namespace FourSlash { public verifyQuickInfoDisplayParts(kind: string, kindModifiers: string, textSpan: { start: number; length: number; }, displayParts: ts.SymbolDisplayPart[], documentation: ts.SymbolDisplayPart[]) { - this.scenarioActions.push(""); - this.scenarioActions.push(``); function getDisplayPartsJson(displayParts: ts.SymbolDisplayPart[]) { let result = ""; @@ -947,8 +876,6 @@ namespace FourSlash { } public verifyQuickInfoExists(negative: boolean) { - this.taoInvalidReason = "verifyQuickInfoExists NYI"; - const actualQuickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition); if (negative) { if (actualQuickInfo) { @@ -963,8 +890,6 @@ namespace FourSlash { } public verifyCurrentSignatureHelpIs(expected: string) { - this.taoInvalidReason = "verifyCurrentSignatureHelpIs NYI"; - const help = this.getActiveSignatureHelpItem(); assert.equal( ts.displayPartsToString(help.prefixDisplayParts) + @@ -973,75 +898,51 @@ namespace FourSlash { } public verifyCurrentParameterIsletiable(isVariable: boolean) { - this.taoInvalidReason = "verifyCurrentParameterIsletiable NYI"; - const signature = this.getActiveSignatureHelpItem(); assert.isNotNull(signature); assert.equal(isVariable, signature.isVariadic); } public verifyCurrentParameterHelpName(name: string) { - this.taoInvalidReason = "verifyCurrentParameterHelpName NYI"; - const activeParameter = this.getActiveParameter(); const activeParameterName = activeParameter.name; assert.equal(activeParameterName, name); } public verifyCurrentParameterSpanIs(parameter: string) { - this.taoInvalidReason = "verifyCurrentParameterSpanIs NYI"; - const activeSignature = this.getActiveSignatureHelpItem(); const activeParameter = this.getActiveParameter(); assert.equal(ts.displayPartsToString(activeParameter.displayParts), parameter); } public verifyCurrentParameterHelpDocComment(docComment: string) { - this.taoInvalidReason = "verifyCurrentParameterHelpDocComment NYI"; - const activeParameter = this.getActiveParameter(); const activeParameterDocComment = activeParameter.documentation; - assert.equal(ts.displayPartsToString(activeParameterDocComment), docComment, assertionMessage("current parameter Help DocComment")); + assert.equal(ts.displayPartsToString(activeParameterDocComment), docComment, this.assertionMessageAtLastKnownMarker("current parameter Help DocComment")); } public verifyCurrentSignatureHelpParameterCount(expectedCount: number) { - this.taoInvalidReason = "verifyCurrentSignatureHelpParameterCount NYI"; - assert.equal(this.getActiveSignatureHelpItem().parameters.length, expectedCount); } - public verifyCurrentSignatureHelpTypeParameterCount(expectedCount: number) { - this.taoInvalidReason = "verifyCurrentSignatureHelpTypeParameterCount NYI"; - - // assert.equal(this.getActiveSignatureHelpItem().typeParameters.length, expectedCount); - } - public verifyCurrentSignatureHelpDocComment(docComment: string) { - this.taoInvalidReason = "verifyCurrentSignatureHelpDocComment NYI"; - const actualDocComment = this.getActiveSignatureHelpItem().documentation; - assert.equal(ts.displayPartsToString(actualDocComment), docComment, assertionMessage("current signature help doc comment")); + assert.equal(ts.displayPartsToString(actualDocComment), docComment, this.assertionMessageAtLastKnownMarker("current signature help doc comment")); } public verifySignatureHelpCount(expected: number) { - this.scenarioActions.push(""); - this.scenarioActions.push(``); - const help = this.languageService.getSignatureHelpItems(this.activeFile.fileName, this.currentCaretPosition); const actual = help && help.items ? help.items.length : 0; assert.equal(actual, expected); } public verifySignatureHelpArgumentCount(expected: number) { - this.taoInvalidReason = "verifySignatureHelpArgumentCount NYI"; const signatureHelpItems = this.languageService.getSignatureHelpItems(this.activeFile.fileName, this.currentCaretPosition); const actual = signatureHelpItems.argumentCount; assert.equal(actual, expected); } public verifySignatureHelpPresent(shouldBePresent = true) { - this.taoInvalidReason = "verifySignatureHelpPresent NYI"; - const actual = this.languageService.getSignatureHelpItems(this.activeFile.fileName, this.currentCaretPosition); if (shouldBePresent) { if (!actual) { @@ -1184,13 +1085,10 @@ namespace FourSlash { } public getBreakpointStatementLocation(pos: number) { - this.taoInvalidReason = "getBreakpointStatementLocation NYI"; return this.languageService.getBreakpointStatementAtPosition(this.activeFile.fileName, pos); } public baselineCurrentFileBreakpointLocations() { - this.taoInvalidReason = "baselineCurrentFileBreakpointLocations impossible"; - Harness.Baseline.runBaseline( "Breakpoint Locations for " + this.activeFile.fileName, this.testData.globalOptions[metadataOptionNames.baselineFile], @@ -1201,7 +1099,6 @@ namespace FourSlash { } public baselineGetEmitOutput() { - this.taoInvalidReason = "baselineGetEmitOutput impossible"; // Find file to be emitted const emitFiles: FourSlashFile[] = []; // List of FourSlashFile that has emitThisFile flag on @@ -1265,7 +1162,7 @@ namespace FourSlash { public printCurrentQuickInfo() { const quickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition); - Harness.IO.log(JSON.stringify(quickInfo)); + Harness.IO.log("Quick Info: " + quickInfo.displayParts.map(part => part.text).join("")); } public printErrorList() { @@ -1307,12 +1204,26 @@ namespace FourSlash { public printMemberListMembers() { const members = this.getMemberListAtCaret(); - Harness.IO.log(JSON.stringify(members)); + this.printMembersOrCompletions(members); } public printCompletionListMembers() { const completions = this.getCompletionListAtCaret(); - Harness.IO.log(JSON.stringify(completions)); + this.printMembersOrCompletions(completions); + } + + private printMembersOrCompletions(info: ts.CompletionInfo) { + function pad(s: string, length: number) { + return s + new Array(length - s.length + 1).join(" "); + } + function max(arr: T[], selector: (x: T) => number): number { + return arr.reduce((prev, x) => Math.max(prev, selector(x)), 0); + } + const longestNameLength = max(info.entries, m => m.name.length); + const longestKindLength = max(info.entries, m => m.kind.length); + info.entries.sort((m, n) => m.sortText > n.sortText ? 1 : m.sortText < n.sortText ? -1 : m.name > n.name ? 1 : m.name < n.name ? -1 : 0); + const membersString = info.entries.map(m => `${pad(m.name, longestNameLength)} ${pad(m.kind, longestKindLength)} ${m.kindModifiers}`).join("\n"); + Harness.IO.log(membersString); } public printReferences() { @@ -1327,8 +1238,6 @@ namespace FourSlash { } public deleteChar(count = 1) { - this.scenarioActions.push(``); - let offset = this.currentCaretPosition; const ch = ""; @@ -1340,14 +1249,14 @@ namespace FourSlash { this.updateMarkersForEdit(this.activeFile.fileName, offset, offset + 1, ch); if (i % checkCadence === 0) { - this.checkPostEditInletiants(); + this.checkPostEditInvariants(); } // Handle post-keystroke formatting if (this.enableFormatting) { const edits = this.languageService.getFormattingEditsAfterKeystroke(this.activeFile.fileName, offset, ch, this.formatCodeOptions); if (edits.length) { - offset += this.applyEdits(this.activeFile.fileName, edits, true); + offset += this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true); // this.checkPostEditInletiants(); } } @@ -1357,20 +1266,16 @@ namespace FourSlash { this.currentCaretPosition = offset; this.fixCaretPosition(); - this.checkPostEditInletiants(); + this.checkPostEditInvariants(); } public replace(start: number, length: number, text: string) { - this.taoInvalidReason = "replace NYI"; - this.languageServiceAdapterHost.editScript(this.activeFile.fileName, start, start + length, text); this.updateMarkersForEdit(this.activeFile.fileName, start, start + length, text); - this.checkPostEditInletiants(); + this.checkPostEditInvariants(); } public deleteCharBehindMarker(count = 1) { - this.scenarioActions.push(``); - let offset = this.currentCaretPosition; const ch = ""; const checkCadence = (count >> 2) + 1; @@ -1382,14 +1287,14 @@ namespace FourSlash { this.updateMarkersForEdit(this.activeFile.fileName, offset, offset + 1, ch); if (i % checkCadence === 0) { - this.checkPostEditInletiants(); + this.checkPostEditInvariants(); } // Handle post-keystroke formatting if (this.enableFormatting) { const edits = this.languageService.getFormattingEditsAfterKeystroke(this.activeFile.fileName, offset, ch, this.formatCodeOptions); if (edits.length) { - offset += this.applyEdits(this.activeFile.fileName, edits, true); + offset += this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true); } } } @@ -1398,18 +1303,11 @@ namespace FourSlash { this.currentCaretPosition = offset; this.fixCaretPosition(); - this.checkPostEditInletiants(); + this.checkPostEditInvariants(); } // Enters lines of text at the current caret position public type(text: string) { - if (text === "") { - this.taoInvalidReason = "Test used empty-insert workaround."; - } - else { - this.scenarioActions.push(``); - } - return this.typeHighFidelity(text); } @@ -1440,7 +1338,7 @@ namespace FourSlash { } if (i % checkCadence === 0) { - this.checkPostEditInletiants(); + this.checkPostEditInvariants(); // this.languageService.getSyntacticDiagnostics(this.activeFile.fileName); // this.languageService.getSemanticDiagnostics(this.activeFile.fileName); } @@ -1449,7 +1347,7 @@ namespace FourSlash { if (this.enableFormatting) { const edits = this.languageService.getFormattingEditsAfterKeystroke(this.activeFile.fileName, offset, ch, this.formatCodeOptions); if (edits.length) { - offset += this.applyEdits(this.activeFile.fileName, edits, true); + offset += this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true); // this.checkPostEditInletiants(); } } @@ -1459,26 +1357,24 @@ namespace FourSlash { this.currentCaretPosition = offset; this.fixCaretPosition(); - this.checkPostEditInletiants(); + this.checkPostEditInvariants(); } // Enters text as if the user had pasted it public paste(text: string) { - this.scenarioActions.push(``); - const start = this.currentCaretPosition; let offset = this.currentCaretPosition; this.languageServiceAdapterHost.editScript(this.activeFile.fileName, offset, offset, text); this.updateMarkersForEdit(this.activeFile.fileName, offset, offset, text); - this.checkPostEditInletiants(); + this.checkPostEditInvariants(); offset += text.length; // Handle formatting if (this.enableFormatting) { const edits = this.languageService.getFormattingEditsForRange(this.activeFile.fileName, start, offset, this.formatCodeOptions); if (edits.length) { - offset += this.applyEdits(this.activeFile.fileName, edits, true); - this.checkPostEditInletiants(); + offset += this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true); + this.checkPostEditInvariants(); } } @@ -1486,10 +1382,10 @@ namespace FourSlash { this.currentCaretPosition = offset; this.fixCaretPosition(); - this.checkPostEditInletiants(); + this.checkPostEditInvariants(); } - private checkPostEditInletiants() { + private checkPostEditInvariants() { if (this.testType !== FourSlashTestType.Native) { // getSourcefile() results can not be serialized. Only perform these verifications // if running against a native LS object. @@ -1560,18 +1456,14 @@ namespace FourSlash { } public formatDocument() { - this.scenarioActions.push(""); - const edits = this.languageService.getFormattingEditsForDocument(this.activeFile.fileName, this.formatCodeOptions); - this.currentCaretPosition += this.applyEdits(this.activeFile.fileName, edits, true); + this.currentCaretPosition += this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true); this.fixCaretPosition(); } public formatSelection(start: number, end: number) { - this.taoInvalidReason = "formatSelection NYI"; - const edits = this.languageService.getFormattingEditsForRange(this.activeFile.fileName, start, end, this.formatCodeOptions); - this.currentCaretPosition += this.applyEdits(this.activeFile.fileName, edits, true); + this.currentCaretPosition += this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true); this.fixCaretPosition(); } @@ -1603,13 +1495,6 @@ namespace FourSlash { } public goToDefinition(definitionIndex: number) { - if (definitionIndex === 0) { - this.scenarioActions.push(""); - } - else { - this.taoInvalidReason = "GoToDefinition not supported for non-zero definition indices"; - } - const definitions = this.languageService.getDefinitionAtPosition(this.activeFile.fileName, this.currentCaretPosition); if (!definitions || !definitions.length) { this.raiseError("goToDefinition failed - expected to at least one definition location but got 0"); @@ -1625,13 +1510,6 @@ namespace FourSlash { } public goToTypeDefinition(definitionIndex: number) { - if (definitionIndex === 0) { - this.scenarioActions.push(""); - } - else { - this.taoInvalidReason = "GoToTypeDefinition not supported for non-zero definition indices"; - } - const definitions = this.languageService.getTypeDefinitionAtPosition(this.activeFile.fileName, this.currentCaretPosition); if (!definitions || !definitions.length) { this.raiseError("goToTypeDefinition failed - expected to at least one definition location but got 0"); @@ -1647,8 +1525,6 @@ namespace FourSlash { } public verifyDefinitionLocationExists(negative: boolean) { - this.taoInvalidReason = "verifyDefinitionLocationExists NYI"; - const definitions = this.languageService.getDefinitionAtPosition(this.activeFile.fileName, this.currentCaretPosition); const foundDefinitions = definitions && definitions.length; @@ -1680,8 +1556,6 @@ namespace FourSlash { } public verifyDefinitionsName(negative: boolean, expectedName: string, expectedContainerName: string) { - this.taoInvalidReason = "verifyDefinititionsInfo NYI"; - const definitions = this.languageService.getDefinitionAtPosition(this.activeFile.fileName, this.currentCaretPosition); const actualDefinitionName = definitions && definitions.length ? definitions[0].name : ""; const actualDefinitionContainerName = definitions && definitions.length ? definitions[0].containerName : ""; @@ -1706,8 +1580,6 @@ namespace FourSlash { } public verifyCaretAtMarker(markerName = "") { - this.taoInvalidReason = "verifyCaretAtMarker NYI"; - const pos = this.getMarkerByName(markerName); if (pos.fileName !== this.activeFile.fileName) { throw new Error(`verifyCaretAtMarker failed - expected to be in file "${pos.fileName}", but was in file "${this.activeFile.fileName}"`); @@ -1726,8 +1598,6 @@ namespace FourSlash { } public verifyIndentationAtCurrentPosition(numberOfSpaces: number, indentStyle: ts.IndentStyle = ts.IndentStyle.Smart) { - this.taoInvalidReason = "verifyIndentationAtCurrentPosition NYI"; - const actual = this.getIndentation(this.activeFile.fileName, this.currentCaretPosition, indentStyle); const lineCol = this.getLineColStringAtPosition(this.currentCaretPosition); if (actual !== numberOfSpaces) { @@ -1736,8 +1606,6 @@ namespace FourSlash { } public verifyIndentationAtPosition(fileName: string, position: number, numberOfSpaces: number, indentStyle: ts.IndentStyle = ts.IndentStyle.Smart) { - this.taoInvalidReason = "verifyIndentationAtPosition NYI"; - const actual = this.getIndentation(fileName, position, indentStyle); const lineCol = this.getLineColStringAtPosition(position); if (actual !== numberOfSpaces) { @@ -1746,8 +1614,6 @@ namespace FourSlash { } public verifyCurrentLineContent(text: string) { - this.taoInvalidReason = "verifyCurrentLineContent NYI"; - const actual = this.getCurrentLineContent(); if (actual !== text) { throw new Error("verifyCurrentLineContent\n" + @@ -1757,8 +1623,6 @@ namespace FourSlash { } public verifyCurrentFileContent(text: string) { - this.taoInvalidReason = "verifyCurrentFileContent NYI"; - const actual = this.getFileContent(this.activeFile.fileName); const replaceNewlines = (str: string) => str.replace(/\r\n/g, "\n"); if (replaceNewlines(actual) !== replaceNewlines(text)) { @@ -1769,8 +1633,6 @@ namespace FourSlash { } public verifyTextAtCaretIs(text: string) { - this.taoInvalidReason = "verifyCurrentFileContent NYI"; - const actual = this.getFileContent(this.activeFile.fileName).substring(this.currentCaretPosition, this.currentCaretPosition + text.length); if (actual !== text) { throw new Error("verifyTextAtCaretIs\n" + @@ -1780,8 +1642,6 @@ namespace FourSlash { } public verifyCurrentNameOrDottedNameSpanText(text: string) { - this.taoInvalidReason = "verifyCurrentNameOrDottedNameSpanText NYI"; - const span = this.languageService.getNameOrDottedNameSpan(this.activeFile.fileName, this.currentCaretPosition, this.currentCaretPosition); if (!span) { this.raiseError("verifyCurrentNameOrDottedNameSpanText\n" + @@ -1798,13 +1658,10 @@ namespace FourSlash { } private getNameOrDottedNameSpan(pos: number) { - this.taoInvalidReason = "getNameOrDottedNameSpan NYI"; return this.languageService.getNameOrDottedNameSpan(this.activeFile.fileName, pos, pos); } public baselineCurrentFileNameOrDottedNameSpans() { - this.taoInvalidReason = "baselineCurrentFileNameOrDottedNameSpans impossible"; - Harness.Baseline.runBaseline( "Name OrDottedNameSpans for " + this.activeFile.fileName, this.testData.globalOptions[metadataOptionNames.baselineFile], @@ -1898,8 +1755,6 @@ namespace FourSlash { } public verifyOutliningSpans(spans: TextSpan[]) { - this.taoInvalidReason = "verifyOutliningSpans NYI"; - const actual = this.languageService.getOutliningSpans(this.activeFile.fileName); if (actual.length !== spans.length) { @@ -1968,8 +1823,6 @@ namespace FourSlash { } public verifyMatchingBracePosition(bracePosition: number, expectedMatchPosition: number) { - this.taoInvalidReason = "verifyMatchingBracePosition NYI"; - const actual = this.languageService.getBraceMatchingAtPosition(this.activeFile.fileName, bracePosition); if (actual.length !== 2) { @@ -1993,8 +1846,6 @@ namespace FourSlash { } public verifyNoMatchingBracePosition(bracePosition: number) { - this.taoInvalidReason = "verifyNoMatchingBracePosition NYI"; - const actual = this.languageService.getBraceMatchingAtPosition(this.activeFile.fileName, bracePosition); if (actual.length !== 0) { @@ -2007,8 +1858,6 @@ namespace FourSlash { Report an error if expected value and actual value do not match. */ public verifyNavigationItemsCount(expected: number, searchValue: string, matchKind?: string) { - this.taoInvalidReason = "verifyNavigationItemsCount NYI"; - const items = this.languageService.getNavigateToItems(searchValue); let actual = 0; let item: ts.NavigateToItem = null; @@ -2037,8 +1886,6 @@ namespace FourSlash { matchKind: string, fileName?: string, parentName?: string) { - this.taoInvalidReason = "verifyNavigationItemsListContains NYI"; - const items = this.languageService.getNavigateToItems(searchValue); if (!items || items.length === 0) { @@ -2063,8 +1910,6 @@ namespace FourSlash { } public verifyGetScriptLexicalStructureListCount(expected: number) { - this.taoInvalidReason = "verifyNavigationItemsListContains impossible"; - const items = this.languageService.getNavigationBarItems(this.activeFile.fileName); const actual = this.getNavigationBarItemsCount(items); @@ -2086,8 +1931,6 @@ namespace FourSlash { } public verifyGetScriptLexicalStructureListContains(name: string, kind: string) { - this.taoInvalidReason = "verifyGetScriptLexicalStructureListContains impossible"; - const items = this.languageService.getNavigationBarItems(this.activeFile.fileName); if (!items || items.length === 0) { @@ -2148,8 +1991,6 @@ namespace FourSlash { } public verifyOccurrencesAtPositionListContains(fileName: string, start: number, end: number, isWriteAccess?: boolean) { - this.taoInvalidReason = "verifyOccurrencesAtPositionListContains NYI"; - const occurrences = this.getOccurrencesAtCurrentPosition(); if (!occurrences || occurrences.length === 0) { @@ -2170,8 +2011,6 @@ namespace FourSlash { } public verifyOccurrencesAtPositionListCount(expectedCount: number) { - this.taoInvalidReason = "verifyOccurrencesAtPositionListCount NYI"; - const occurrences = this.getOccurrencesAtCurrentPosition(); const actualCount = occurrences ? occurrences.length : 0; if (expectedCount !== actualCount) { @@ -2185,8 +2024,6 @@ namespace FourSlash { } public verifyDocumentHighlightsAtPositionListContains(fileName: string, start: number, end: number, fileNamesToSearch: string[], kind?: string) { - this.taoInvalidReason = "verifyDocumentHighlightsAtPositionListContains NYI"; - const documentHighlights = this.getDocumentHighlightsAtCurrentPosition(fileNamesToSearch); if (!documentHighlights || documentHighlights.length === 0) { @@ -2213,8 +2050,6 @@ namespace FourSlash { } public verifyDocumentHighlightsAtPositionListCount(expectedCount: number, fileNamesToSearch: string[]) { - this.taoInvalidReason = "verifyDocumentHighlightsAtPositionListCount NYI"; - const documentHighlights = this.getDocumentHighlightsAtCurrentPosition(fileNamesToSearch); const actualCount = documentHighlights ? documentHighlights.reduce((currentCount, { highlightSpans }) => currentCount + highlightSpans.length, 0) @@ -2255,13 +2090,6 @@ namespace FourSlash { } private assertItemInCompletionList(items: ts.CompletionEntry[], name: string, text?: string, documentation?: string, kind?: string) { - this.scenarioActions.push(""); - this.scenarioActions.push(``); - - if (text || documentation || kind) { - this.taoInvalidReason = "assertItemInCompletionList only supports the \"name\" parameter"; - } - for (let i = 0; i < items.length; i++) { const item = items[i]; if (item.name === name) { @@ -2269,15 +2097,15 @@ namespace FourSlash { const details = this.getCompletionEntryDetails(item.name); if (documentation !== undefined) { - assert.equal(ts.displayPartsToString(details.documentation), documentation, assertionMessage("completion item documentation for " + name)); + assert.equal(ts.displayPartsToString(details.documentation), documentation, this.assertionMessageAtLastKnownMarker("completion item documentation for " + name)); } if (text !== undefined) { - assert.equal(ts.displayPartsToString(details.displayParts), text, assertionMessage("completion item detail text for " + name)); + assert.equal(ts.displayPartsToString(details.displayParts), text, this.assertionMessageAtLastKnownMarker("completion item detail text for " + name)); } } if (kind !== undefined) { - assert.equal(item.kind, kind, assertionMessage("completion item kind for " + name)); + assert.equal(item.kind, kind, this.assertionMessageAtLastKnownMarker("completion item kind for " + name)); } return; @@ -2352,14 +2180,6 @@ namespace FourSlash { return text.replace(/ /g, "\u00B7").replace(/\r/g, "\u00B6").replace(/\n/g, "\u2193\n").replace(/\t/g, "\u2192\ "); } - public getTestXmlData(): TestXmlData { - return { - actions: this.scenarioActions, - invalidReason: this.taoInvalidReason, - originalName: "" - }; - } - public setCancelled(numberOfCalls: number): void { this.cancellationToken.setCancelled(numberOfCalls); } @@ -2372,43 +2192,33 @@ namespace FourSlash { // TOOD: should these just use the Harness's stdout/stderr? const fsOutput = new Harness.Compiler.WriterAggregator(); const fsErrors = new Harness.Compiler.WriterAggregator(); - export let xmlData: TestXmlData[] = []; export function runFourSlashTest(basePath: string, testType: FourSlashTestType, fileName: string) { const content = Harness.IO.readFile(fileName); - const xml = runFourSlashTestContent(basePath, testType, content, fileName); - xmlData.push(xml); + runFourSlashTestContent(basePath, testType, content, fileName); } - // We don't want to recompile 'fourslash.ts' for every test, so - // here we cache the JS output and reuse it for every test. - let fourslashJsOutput: string; - { - const host = Harness.Compiler.createCompilerHost([{ unitName: Harness.Compiler.fourslashFileName, content: undefined }], - (fn, contents) => fourslashJsOutput = contents, - ts.ScriptTarget.Latest, - Harness.IO.useCaseSensitiveFileNames()); - - const program = ts.createProgram([Harness.Compiler.fourslashFileName], { noResolve: true, target: ts.ScriptTarget.ES3 }, host); - - program.emit(host.getSourceFile(Harness.Compiler.fourslashFileName, ts.ScriptTarget.ES3)); - } - - - export function runFourSlashTestContent(basePath: string, testType: FourSlashTestType, content: string, fileName: string): TestXmlData { + export function runFourSlashTestContent(basePath: string, testType: FourSlashTestType, content: string, fileName: string): void { // Parse out the files and their metadata const testData = parseTestData(basePath, content, fileName); - currentTestState = new TestState(basePath, testType, testData); + const state = new TestState(basePath, testType, testData); let result = ""; + const fourslashFile: Harness.Compiler.TestFile = { + unitName: Harness.Compiler.fourslashFileName, + content: undefined, + }; + const testFile: Harness.Compiler.TestFile = { + unitName: fileName, + content: content + }; + const host = Harness.Compiler.createCompilerHost( - [ - { unitName: Harness.Compiler.fourslashFileName, content: undefined }, - { unitName: fileName, content: content } - ], + [ fourslashFile, testFile ], (fn, contents) => result = contents, ts.ScriptTarget.Latest, - Harness.IO.useCaseSensitiveFileNames()); + Harness.IO.useCaseSensitiveFileNames(), + Harness.IO.getCurrentDirectory()); const program = ts.createProgram([Harness.Compiler.fourslashFileName, fileName], { outFile: "fourslashTestOutput.js", noResolve: true, target: ts.ScriptTarget.ES3 }, host); @@ -2421,22 +2231,32 @@ namespace FourSlash { } program.emit(sourceFile); - result = result || ""; // Might have an empty fourslash file - result = fourslashJsOutput + "\r\n" + result; + ts.Debug.assert(!!result); + runCode(result, state); + } + function runCode(code: string, state: TestState): void { // Compile and execute the test + const wrappedCode = +`(function(test, goTo, verify, edit, debug, format, cancellation, classification, verifyOperationIsCancelled) { +${code} +})`; try { - eval(result); + const test = new FourSlashInterface.Test(state); + const goTo = new FourSlashInterface.GoTo(state); + const verify = new FourSlashInterface.Verify(state); + const edit = new FourSlashInterface.Edit(state); + const debug = new FourSlashInterface.Debug(state); + const format = new FourSlashInterface.Format(state); + const cancellation = new FourSlashInterface.Cancellation(state); + const f = eval(wrappedCode); + f(test, goTo, verify, edit, debug, format, cancellation, FourSlashInterface.Classification, FourSlash.verifyOperationIsCancelled); } catch (err) { // Debugging: FourSlash.currentTestState.printCurrentFileState(); throw err; } - - const xmlData = currentTestState.getTestXmlData(); - xmlData.originalName = fileName; - return xmlData; } function chompLeadingSpace(content: string) { @@ -2604,7 +2424,7 @@ namespace FourSlash { throw new Error(errorMessage); } - function recordObjectMarker(fileName: string, location: ILocationInformation, text: string, markerMap: MarkerMap, markers: Marker[]): Marker { + function recordObjectMarker(fileName: string, location: LocationInformation, text: string, markerMap: MarkerMap, markers: Marker[]): Marker { let markerValue: any = undefined; try { // Attempt to parse the marker value as JSON @@ -2635,7 +2455,7 @@ namespace FourSlash { return marker; } - function recordMarker(fileName: string, location: ILocationInformation, name: string, markerMap: MarkerMap, markers: Marker[]): Marker { + function recordMarker(fileName: string, location: LocationInformation, name: string, markerMap: MarkerMap, markers: Marker[]): Marker { const marker: Marker = { fileName: fileName, position: location.position @@ -2664,10 +2484,10 @@ namespace FourSlash { let output = ""; /// The current marker (or maybe multi-line comment?) we're parsing, possibly - let openMarker: ILocationInformation = null; + let openMarker: LocationInformation = null; /// A stack of the open range markers that are still unclosed - const openRanges: IRangeLocationInformation[] = []; + const openRanges: RangeLocationInformation[] = []; /// A list of ranges we've collected so far */ let localRanges: Range[] = []; @@ -2853,3 +2673,632 @@ namespace FourSlash { }; } } + +namespace FourSlashInterface { + export class Test { + constructor(private state: FourSlash.TestState) { + } + + public markers(): FourSlash.Marker[] { + return this.state.getMarkers(); + } + + public marker(name?: string): FourSlash.Marker { + return this.state.getMarkerByName(name); + } + + public ranges(): FourSlash.Range[] { + return this.state.getRanges(); + } + + public markerByName(s: string): FourSlash.Marker { + return this.state.getMarkerByName(s); + } + } + + export class GoTo { + constructor(private state: FourSlash.TestState) { + } + // Moves the caret to the specified marker, + // or the anonymous marker ('/**/') if no name + // is given + public marker(name?: string) { + this.state.goToMarker(name); + } + + public bof() { + this.state.goToBOF(); + } + + public eof() { + this.state.goToEOF(); + } + + public definition(definitionIndex = 0) { + this.state.goToDefinition(definitionIndex); + } + + public type(definitionIndex = 0) { + this.state.goToTypeDefinition(definitionIndex); + } + + public position(position: number, fileIndex?: number): void; + public position(position: number, fileName?: string): void; + public position(position: number, fileNameOrIndex?: any): void { + if (fileNameOrIndex !== undefined) { + this.file(fileNameOrIndex); + } + this.state.goToPosition(position); + } + + // Opens a file, given either its index as it + // appears in the test source, or its filename + // as specified in the test metadata + public file(index: number, content?: string): void; + public file(name: string, content?: string): void; + public file(indexOrName: any, content?: string): void { + this.state.openFile(indexOrName, content); + } + } + + export class VerifyNegatable { + public not: VerifyNegatable; + + constructor(protected state: FourSlash.TestState, private negative = false) { + if (!negative) { + this.not = new VerifyNegatable(state, true); + } + } + + // Verifies the member list contains the specified symbol. The + // member list is brought up if necessary + public memberListContains(symbol: string, text?: string, documenation?: string, kind?: string) { + if (this.negative) { + this.state.verifyMemberListDoesNotContain(symbol); + } + else { + this.state.verifyMemberListContains(symbol, text, documenation, kind); + } + } + + public memberListCount(expectedCount: number) { + this.state.verifyMemberListCount(expectedCount, this.negative); + } + + // Verifies the completion list contains the specified symbol. The + // completion list is brought up if necessary + public completionListContains(symbol: string, text?: string, documentation?: string, kind?: string) { + if (this.negative) { + this.state.verifyCompletionListDoesNotContain(symbol, text, documentation, kind); + } + else { + this.state.verifyCompletionListContains(symbol, text, documentation, kind); + } + } + + // Verifies the completion list items count to be greater than the specified amount. The + // completion list is brought up if necessary + public completionListItemsCountIsGreaterThan(count: number) { + this.state.verifyCompletionListItemsCountIsGreaterThan(count, this.negative); + } + + public completionListIsEmpty() { + this.state.verifyCompletionListIsEmpty(this.negative); + } + + public completionListAllowsNewIdentifier() { + this.state.verifyCompletionListAllowsNewIdentifier(this.negative); + } + + public memberListIsEmpty() { + this.state.verifyMemberListIsEmpty(this.negative); + } + + public referencesCountIs(count: number) { + this.state.verifyReferencesCountIs(count, /*localFilesOnly*/ false); + } + + public referencesAtPositionContains(range: FourSlash.Range, isWriteAccess?: boolean) { + this.state.verifyReferencesAtPositionListContains(range.fileName, range.start, range.end, isWriteAccess); + } + + public signatureHelpPresent() { + this.state.verifySignatureHelpPresent(!this.negative); + } + + public errorExistsBetweenMarkers(startMarker: string, endMarker: string) { + this.state.verifyErrorExistsBetweenMarkers(startMarker, endMarker, !this.negative); + } + + public errorExistsAfterMarker(markerName = "") { + this.state.verifyErrorExistsAfterMarker(markerName, !this.negative, /*after*/ true); + } + + public errorExistsBeforeMarker(markerName = "") { + this.state.verifyErrorExistsAfterMarker(markerName, !this.negative, /*after*/ false); + } + + public quickInfoIs(expectedText?: string, expectedDocumentation?: string) { + this.state.verifyQuickInfoString(this.negative, expectedText, expectedDocumentation); + } + + public quickInfoExists() { + this.state.verifyQuickInfoExists(this.negative); + } + + public definitionCountIs(expectedCount: number) { + this.state.verifyDefinitionsCount(this.negative, expectedCount); + } + + public typeDefinitionCountIs(expectedCount: number) { + this.state.verifyTypeDefinitionsCount(this.negative, expectedCount); + } + + public definitionLocationExists() { + this.state.verifyDefinitionLocationExists(this.negative); + } + + public verifyDefinitionsName(name: string, containerName: string) { + this.state.verifyDefinitionsName(this.negative, name, containerName); + } + } + + export class Verify extends VerifyNegatable { + constructor(state: FourSlash.TestState) { + super(state); + } + + public caretAtMarker(markerName?: string) { + this.state.verifyCaretAtMarker(markerName); + } + + public indentationIs(numberOfSpaces: number) { + this.state.verifyIndentationAtCurrentPosition(numberOfSpaces); + } + + public indentationAtPositionIs(fileName: string, position: number, numberOfSpaces: number, indentStyle = ts.IndentStyle.Smart) { + this.state.verifyIndentationAtPosition(fileName, position, numberOfSpaces, indentStyle); + } + + public textAtCaretIs(text: string) { + this.state.verifyTextAtCaretIs(text); + } + + /** + * Compiles the current file and evaluates 'expr' in a context containing + * the emitted output, then compares (using ===) the result of that expression + * to 'value'. Do not use this function with external modules as it is not supported. + */ + public eval(expr: string, value: any) { + this.state.verifyEval(expr, value); + } + + public currentLineContentIs(text: string) { + this.state.verifyCurrentLineContent(text); + } + + public currentFileContentIs(text: string) { + this.state.verifyCurrentFileContent(text); + } + + public verifyGetEmitOutputForCurrentFile(expected: string): void { + this.state.verifyGetEmitOutputForCurrentFile(expected); + } + + public verifyGetEmitOutputContentsForCurrentFile(expected: ts.OutputFile[]): void { + this.state.verifyGetEmitOutputContentsForCurrentFile(expected); + } + + public currentParameterHelpArgumentNameIs(name: string) { + this.state.verifyCurrentParameterHelpName(name); + } + + public currentParameterSpanIs(parameter: string) { + this.state.verifyCurrentParameterSpanIs(parameter); + } + + public currentParameterHelpArgumentDocCommentIs(docComment: string) { + this.state.verifyCurrentParameterHelpDocComment(docComment); + } + + public currentSignatureHelpDocCommentIs(docComment: string) { + this.state.verifyCurrentSignatureHelpDocComment(docComment); + } + + public signatureHelpCountIs(expected: number) { + this.state.verifySignatureHelpCount(expected); + } + + public signatureHelpArgumentCountIs(expected: number) { + this.state.verifySignatureHelpArgumentCount(expected); + } + + public currentSignatureParameterCountIs(expected: number) { + this.state.verifyCurrentSignatureHelpParameterCount(expected); + } + + public currentSignatureHelpIs(expected: string) { + this.state.verifyCurrentSignatureHelpIs(expected); + } + + public numberOfErrorsInCurrentFile(expected: number) { + this.state.verifyNumberOfErrorsInCurrentFile(expected); + } + + public baselineCurrentFileBreakpointLocations() { + this.state.baselineCurrentFileBreakpointLocations(); + } + + public baselineCurrentFileNameOrDottedNameSpans() { + this.state.baselineCurrentFileNameOrDottedNameSpans(); + } + + public baselineGetEmitOutput() { + this.state.baselineGetEmitOutput(); + } + + public nameOrDottedNameSpanTextIs(text: string) { + this.state.verifyCurrentNameOrDottedNameSpanText(text); + } + + public outliningSpansInCurrentFile(spans: FourSlash.TextSpan[]) { + this.state.verifyOutliningSpans(spans); + } + + public todoCommentsInCurrentFile(descriptors: string[]) { + this.state.verifyTodoComments(descriptors, this.state.getRanges()); + } + + public matchingBracePositionInCurrentFile(bracePosition: number, expectedMatchPosition: number) { + this.state.verifyMatchingBracePosition(bracePosition, expectedMatchPosition); + } + + public noMatchingBracePositionInCurrentFile(bracePosition: number) { + this.state.verifyNoMatchingBracePosition(bracePosition); + } + + public DocCommentTemplate(expectedText: string, expectedOffset: number, empty?: boolean) { + this.state.verifyDocCommentTemplate(empty ? undefined : { newText: expectedText, caretOffset: expectedOffset }); + } + + public noDocCommentTemplate() { + this.DocCommentTemplate(/*expectedText*/ undefined, /*expectedOffset*/ undefined, /*empty*/ true); + } + + public getScriptLexicalStructureListCount(count: number) { + this.state.verifyGetScriptLexicalStructureListCount(count); + } + + // TODO: figure out what to do with the unused arguments. + public getScriptLexicalStructureListContains( + name: string, + kind: string, + fileName?: string, + parentName?: string, + isAdditionalSpan?: boolean, + markerPosition?: number) { + this.state.verifyGetScriptLexicalStructureListContains(name, kind); + } + + public navigationItemsListCount(count: number, searchValue: string, matchKind?: string) { + this.state.verifyNavigationItemsCount(count, searchValue, matchKind); + } + + public navigationItemsListContains( + name: string, + kind: string, + searchValue: string, + matchKind: string, + fileName?: string, + parentName?: string) { + this.state.verifyNavigationItemsListContains( + name, + kind, + searchValue, + matchKind, + fileName, + parentName); + } + + public occurrencesAtPositionContains(range: FourSlash.Range, isWriteAccess?: boolean) { + this.state.verifyOccurrencesAtPositionListContains(range.fileName, range.start, range.end, isWriteAccess); + } + + public occurrencesAtPositionCount(expectedCount: number) { + this.state.verifyOccurrencesAtPositionListCount(expectedCount); + } + + public documentHighlightsAtPositionContains(range: FourSlash.Range, fileNamesToSearch: string[], kind?: string) { + this.state.verifyDocumentHighlightsAtPositionListContains(range.fileName, range.start, range.end, fileNamesToSearch, kind); + } + + public documentHighlightsAtPositionCount(expectedCount: number, fileNamesToSearch: string[]) { + this.state.verifyDocumentHighlightsAtPositionListCount(expectedCount, fileNamesToSearch); + } + + public completionEntryDetailIs(entryName: string, text: string, documentation?: string, kind?: string) { + this.state.verifyCompletionEntryDetails(entryName, text, documentation, kind); + } + + /** + * This method *requires* a contiguous, complete, and ordered stream of classifications for a file. + */ + public syntacticClassificationsAre(...classifications: { classificationType: string; text: string }[]) { + this.state.verifySyntacticClassifications(classifications); + } + + /** + * This method *requires* an ordered stream of classifications for a file, and spans are highly recommended. + */ + public semanticClassificationsAre(...classifications: { classificationType: string; text: string; textSpan?: FourSlash.TextSpan }[]) { + this.state.verifySemanticClassifications(classifications); + } + + public renameInfoSucceeded(displayName?: string, fullDisplayName?: string, kind?: string, kindModifiers?: string) { + this.state.verifyRenameInfoSucceeded(displayName, fullDisplayName, kind, kindModifiers); + } + + public renameInfoFailed(message?: string) { + this.state.verifyRenameInfoFailed(message); + } + + public renameLocations(findInStrings: boolean, findInComments: boolean) { + this.state.verifyRenameLocations(findInStrings, findInComments); + } + + public verifyQuickInfoDisplayParts(kind: string, kindModifiers: string, textSpan: { start: number; length: number; }, + displayParts: ts.SymbolDisplayPart[], documentation: ts.SymbolDisplayPart[]) { + this.state.verifyQuickInfoDisplayParts(kind, kindModifiers, textSpan, displayParts, documentation); + } + + public getSyntacticDiagnostics(expected: string) { + this.state.getSyntacticDiagnostics(expected); + } + + public getSemanticDiagnostics(expected: string) { + this.state.getSemanticDiagnostics(expected); + } + + public ProjectInfo(expected: string []) { + this.state.verifyProjectInfo(expected); + } + } + + export class Edit { + constructor(private state: FourSlash.TestState) { + } + public backspace(count?: number) { + this.state.deleteCharBehindMarker(count); + } + + public deleteAtCaret(times?: number) { + this.state.deleteChar(times); + } + + public replace(start: number, length: number, text: string) { + this.state.replace(start, length, text); + } + + public paste(text: string) { + this.state.paste(text); + } + + public insert(text: string) { + this.insertLines(text); + } + + public insertLine(text: string) { + this.insertLines(text + "\n"); + } + + public insertLines(...lines: string[]) { + this.state.type(lines.join("\n")); + } + + public moveRight(count?: number) { + this.state.moveCaretRight(count); + } + + public moveLeft(count?: number) { + if (typeof count === "undefined") { + count = 1; + } + this.state.moveCaretRight(count * -1); + } + + public enableFormatting() { + this.state.enableFormatting = true; + } + + public disableFormatting() { + this.state.enableFormatting = false; + } + } + + export class Debug { + constructor(private state: FourSlash.TestState) { + } + + public printCurrentParameterHelp() { + this.state.printCurrentParameterHelp(); + } + + public printCurrentFileState() { + this.state.printCurrentFileState(); + } + + public printCurrentFileStateWithWhitespace() { + this.state.printCurrentFileState(/*makeWhitespaceVisible*/true); + } + + public printCurrentFileStateWithoutCaret() { + this.state.printCurrentFileState(/*makeWhitespaceVisible*/false, /*makeCaretVisible*/false); + } + + public printCurrentQuickInfo() { + this.state.printCurrentQuickInfo(); + } + + public printCurrentSignatureHelp() { + this.state.printCurrentSignatureHelp(); + } + + public printMemberListMembers() { + this.state.printMemberListMembers(); + } + + public printCompletionListMembers() { + this.state.printCompletionListMembers(); + } + + public printBreakpointLocation(pos: number) { + this.state.printBreakpointLocation(pos); + } + public printBreakpointAtCurrentLocation() { + this.state.printBreakpointAtCurrentLocation(); + } + + public printNameOrDottedNameSpans(pos: number) { + this.state.printNameOrDottedNameSpans(pos); + } + + public printErrorList() { + this.state.printErrorList(); + } + + public printNavigationItems(searchValue = ".*") { + this.state.printNavigationItems(searchValue); + } + + public printScriptLexicalStructureItems() { + this.state.printScriptLexicalStructureItems(); + } + + public printReferences() { + this.state.printReferences(); + } + + public printContext() { + this.state.printContext(); + } + } + + export class Format { + constructor(private state: FourSlash.TestState) { + } + + public document() { + this.state.formatDocument(); + } + + public copyFormatOptions(): ts.FormatCodeOptions { + return this.state.copyFormatOptions(); + } + + public setFormatOptions(options: ts.FormatCodeOptions) { + return this.state.setFormatOptions(options); + } + + public selection(startMarker: string, endMarker: string) { + this.state.formatSelection(this.state.getMarkerByName(startMarker).position, this.state.getMarkerByName(endMarker).position); + } + + public setOption(name: string, value: number): void; + public setOption(name: string, value: string): void; + public setOption(name: string, value: boolean): void; + public setOption(name: string, value: any): void { + this.state.formatCodeOptions[name] = value; + } + } + + export class Cancellation { + constructor(private state: FourSlash.TestState) { + } + + public resetCancelled() { + this.state.resetCancelled(); + } + + public setCancelled(numberOfCalls = 0) { + this.state.setCancelled(numberOfCalls); + } + } + + export namespace Classification { + export function comment(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("comment", text, position); + } + + export function identifier(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("identifier", text, position); + } + + export function keyword(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("keyword", text, position); + } + + export function numericLiteral(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("numericLiteral", text, position); + } + + export function operator(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("operator", text, position); + } + + export function stringLiteral(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("stringLiteral", text, position); + } + + export function whiteSpace(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("whiteSpace", text, position); + } + + export function text(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("text", text, position); + } + + export function punctuation(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("punctuation", text, position); + } + + export function docCommentTagName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("docCommentTagName", text, position); + } + + export function className(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("className", text, position); + } + + export function enumName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("enumName", text, position); + } + + export function interfaceName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("interfaceName", text, position); + } + + export function moduleName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("moduleName", text, position); + } + + export function typeParameterName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("typeParameterName", text, position); + } + + export function parameterName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("parameterName", text, position); + } + + export function typeAliasName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("typeAliasName", text, position); + } + + function getClassification(type: string, text: string, position?: number) { + return { + classificationType: type, + text: text, + textSpan: position === undefined ? undefined : { start: position, end: position + text.length } + }; + } + } +} diff --git a/src/harness/fourslashRunner.ts b/src/harness/fourslashRunner.ts index 7228f06c20fcd..84e352359c4ac 100644 --- a/src/harness/fourslashRunner.ts +++ b/src/harness/fourslashRunner.ts @@ -58,56 +58,6 @@ class FourSlashRunner extends RunnerBase { } }); }); - - describe("Generate Tao XML", () => { - const invalidReasons: any = {}; - FourSlash.xmlData.forEach(xml => { - if (xml.invalidReason !== null) { - invalidReasons[xml.invalidReason] = (invalidReasons[xml.invalidReason] || 0) + 1; - } - }); - const invalidReport: { reason: string; count: number }[] = []; - for (const reason in invalidReasons) { - if (invalidReasons.hasOwnProperty(reason)) { - invalidReport.push({ reason: reason, count: invalidReasons[reason] }); - } - } - invalidReport.sort((lhs, rhs) => lhs.count > rhs.count ? -1 : lhs.count === rhs.count ? 0 : 1); - - const lines: string[] = []; - lines.push(""); - lines.push(""); - lines.push(" "); - lines.push(" "); - lines.push(" "); - lines.push(" "); - FourSlash.xmlData.forEach(xml => { - if (xml.invalidReason !== null) { - lines.push(""); - } - else { - lines.push(" "); - xml.actions.forEach(action => { - lines.push(" " + action); - }); - lines.push(" "); - } - }); - lines.push(" "); - lines.push(" "); - lines.push(" "); - lines.push(" "); - lines.push(" "); - lines.push(" "); - lines.push(" "); - lines.push(" "); - lines.push(""); - Harness.IO.writeFile("built/local/fourslash.xml", lines.join("\r\n")); - }); }); } } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 16c3b2d34885f..ecde2f32db09a 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -176,7 +176,9 @@ namespace Utils { ts.forEachChild(node, child => { childNodesAndArrays.push(child); }, array => { childNodesAndArrays.push(array); }); for (const childName in node) { - if (childName === "parent" || childName === "nextContainer" || childName === "modifiers" || childName === "externalModuleIndicator") { + if (childName === "parent" || childName === "nextContainer" || childName === "modifiers" || childName === "externalModuleIndicator" || + // for now ignore jsdoc comments + childName === "jsDocComment") { continue; } const child = (node)[childName]; @@ -628,7 +630,7 @@ namespace Harness { function getResolvedPathFromServer(path: string) { const xhr = new XMLHttpRequest(); try { - xhr.open("GET", path + "?resolve", false); + xhr.open("GET", path + "?resolve", /*async*/ false); xhr.send(); } catch (e) { @@ -647,7 +649,7 @@ namespace Harness { export function getFileFromServerSync(url: string): XHRResponse { const xhr = new XMLHttpRequest(); try { - xhr.open("GET", url, false); + xhr.open("GET", url, /*async*/ false); xhr.send(); } catch (e) { @@ -662,7 +664,7 @@ namespace Harness { const xhr = new XMLHttpRequest(); try { const actionMsg = "?action=" + action; - xhr.open("POST", url + actionMsg, false); + xhr.open("POST", url + actionMsg, /*async*/ false); xhr.setRequestHeader("Access-Control-Allow-Origin", "*"); xhr.send(contents); } @@ -767,26 +769,9 @@ namespace Harness { } namespace Harness { - let tcServicesFileName = "typescriptServices.js"; - - export let libFolder: string; - switch (Utils.getExecutionEnvironment()) { - case Utils.ExecutionEnvironment.CScript: - libFolder = "built/local/"; - tcServicesFileName = "built/local/typescriptServices.js"; - break; - case Utils.ExecutionEnvironment.Node: - libFolder = "built/local/"; - tcServicesFileName = "built/local/typescriptServices.js"; - break; - case Utils.ExecutionEnvironment.Browser: - libFolder = "built/local/"; - tcServicesFileName = "built/local/typescriptServices.js"; - break; - default: - throw new Error("Unknown context"); - } - export let tcServicesFile = IO.readFile(tcServicesFileName); + export const libFolder = "built/local/"; + const tcServicesFileName = ts.combinePaths(libFolder, "typescriptServices.js"); + export const tcServicesFile = IO.readFile(tcServicesFileName); export interface SourceMapEmitterCallback { (emittedFile: string, emittedLine: number, emittedColumn: number, sourceFile: string, sourceLine: number, sourceColumn: number, sourceName: string): void; @@ -827,57 +812,14 @@ namespace Harness { } } - export interface IEmitterIOHost { - writeFile(path: string, contents: string, writeByteOrderMark: boolean): void; - resolvePath(path: string): string; - } - - /** Mimics having multiple files, later concatenated to a single file. */ - export class EmitterIOHost implements IEmitterIOHost { - private fileCollection: any = {}; - - /** create file gets the whole path to create, so this works as expected with the --out parameter */ - public writeFile(s: string, contents: string, writeByteOrderMark: boolean): void { - let writer: ITextWriter; - if (this.fileCollection[s]) { - writer = this.fileCollection[s]; - } - else { - writer = new Harness.Compiler.WriterAggregator(); - this.fileCollection[s] = writer; - } - - writer.Write(contents); - writer.Close(); - } - - public resolvePath(s: string) { return s; } - - public reset() { this.fileCollection = {}; } - - public toArray(): { fileName: string; file: WriterAggregator; }[] { - const result: { fileName: string; file: WriterAggregator; }[] = []; - for (const p in this.fileCollection) { - if (this.fileCollection.hasOwnProperty(p)) { - const current = this.fileCollection[p]; - if (current.lines.length > 0) { - if (p.indexOf(".d.ts") !== -1) { current.lines.unshift(["////[", Path.getFileName(p), "]"].join("")); } - result.push({ fileName: p, file: this.fileCollection[p] }); - } - } - } - return result; - } - } - export function createSourceFileAndAssertInvariants( fileName: string, sourceText: string, languageVersion: ts.ScriptTarget) { - // We'll only assert inletiants outside of light mode. + // We'll only assert invariants outside of light mode. const shouldAssertInvariants = !Harness.lightMode; - // Only set the parent nodes if we're asserting inletiants. We don't need them otherwise. + // Only set the parent nodes if we're asserting invariants. We don't need them otherwise. const result = ts.createSourceFile(fileName, sourceText, languageVersion, /*setParentNodes:*/ shouldAssertInvariants); if (shouldAssertInvariants) { @@ -890,12 +832,12 @@ namespace Harness { const carriageReturnLineFeed = "\r\n"; const lineFeed = "\n"; - export let defaultLibFileName = "lib.d.ts"; - export let defaultLibSourceFile = createSourceFileAndAssertInvariants(defaultLibFileName, IO.readFile(libFolder + "lib.core.d.ts"), /*languageVersion*/ ts.ScriptTarget.Latest); - export let defaultES6LibSourceFile = createSourceFileAndAssertInvariants(defaultLibFileName, IO.readFile(libFolder + "lib.core.es6.d.ts"), /*languageVersion*/ ts.ScriptTarget.Latest); + export const defaultLibFileName = "lib.d.ts"; + export const defaultLibSourceFile = createSourceFileAndAssertInvariants(defaultLibFileName, IO.readFile(libFolder + "lib.core.d.ts"), /*languageVersion*/ ts.ScriptTarget.Latest); + export const defaultES6LibSourceFile = createSourceFileAndAssertInvariants(defaultLibFileName, IO.readFile(libFolder + "lib.core.es6.d.ts"), /*languageVersion*/ ts.ScriptTarget.Latest); // Cache these between executions so we don't have to re-parse them for every test - export let fourslashFileName = "fourslash.ts"; + export const fourslashFileName = "fourslash.ts"; export let fourslashSourceFile: ts.SourceFile; export function getCanonicalFileName(fileName: string): string { @@ -903,41 +845,32 @@ namespace Harness { } export function createCompilerHost( - inputFiles: { unitName: string; content: string; }[], + inputFiles: TestFile[], writeFile: (fn: string, contents: string, writeByteOrderMark: boolean) => void, scriptTarget: ts.ScriptTarget, useCaseSensitiveFileNames: boolean, // the currentDirectory is needed for rwcRunner to passed in specified current directory to compiler host - currentDirectory?: string, + currentDirectory: string, newLineKind?: ts.NewLineKind): ts.CompilerHost { // Local get canonical file name function, that depends on passed in parameter for useCaseSensitiveFileNames - function getCanonicalFileName(fileName: string): string { - return useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); - } - - const filemap: { [fileName: string]: ts.SourceFile; } = {}; - const getCurrentDirectory = currentDirectory === undefined ? Harness.IO.getCurrentDirectory : () => currentDirectory; + const getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames); - // Register input files - function register(file: { unitName: string; content: string; }) { + const fileMap: ts.FileMap = ts.createFileMap(); + for (const file of inputFiles) { if (file.content !== undefined) { const fileName = ts.normalizePath(file.unitName); const sourceFile = createSourceFileAndAssertInvariants(fileName, file.content, scriptTarget); - filemap[getCanonicalFileName(fileName)] = sourceFile; - filemap[getCanonicalFileName(ts.getNormalizedAbsolutePath(fileName, getCurrentDirectory()))] = sourceFile; + const path = ts.toPath(file.unitName, currentDirectory, getCanonicalFileName); + fileMap.set(path, sourceFile); } - }; - inputFiles.forEach(register); + } function getSourceFile(fn: string, languageVersion: ts.ScriptTarget) { fn = ts.normalizePath(fn); - if (Object.prototype.hasOwnProperty.call(filemap, getCanonicalFileName(fn))) { - return filemap[getCanonicalFileName(fn)]; - } - else if (currentDirectory) { - const canonicalAbsolutePath = getCanonicalFileName(ts.getNormalizedAbsolutePath(fn, currentDirectory)); - return Object.prototype.hasOwnProperty.call(filemap, getCanonicalFileName(canonicalAbsolutePath)) ? filemap[canonicalAbsolutePath] : undefined; + const path = ts.toPath(fn, currentDirectory, getCanonicalFileName); + if (fileMap.contains(path)) { + return fileMap.get(path); } else if (fn === fourslashFileName) { const tsFn = "tests/cases/fourslash/" + fourslashFileName; @@ -959,7 +892,7 @@ namespace Harness { Harness.IO.newLine(); return { - getCurrentDirectory, + getCurrentDirectory: () => currentDirectory, getSourceFile, getDefaultLibFileName: options => defaultLibFileName, writeFile, @@ -1034,176 +967,137 @@ namespace Harness { } } - export class HarnessCompiler { - private inputFiles: { unitName: string; content: string }[] = []; - private compileOptions: ts.CompilerOptions; - private settings: Harness.TestCaseParser.CompilerSettings = {}; - - private lastErrors: ts.Diagnostic[]; + export interface TestFile { + unitName: string; + content: string; + } - public reset() { - this.inputFiles = []; - this.settings = {}; - this.lastErrors = []; - } + export interface CompilationOutput { + result: CompilerResult; + options: ts.CompilerOptions & HarnessOptions; + } - public reportCompilationErrors() { - return this.lastErrors; - } + export function compileFiles( + inputFiles: TestFile[], + otherFiles: TestFile[], + harnessSettings: TestCaseParser.CompilerSettings, + compilerOptions: ts.CompilerOptions, + // Current directory is needed for rwcRunner to be able to use currentDirectory defined in json file + currentDirectory: string): CompilationOutput { - public setCompilerSettings(tcSettings: Harness.TestCaseParser.CompilerSettings) { - this.settings = tcSettings; - } + const options: ts.CompilerOptions & HarnessOptions = compilerOptions ? ts.clone(compilerOptions) : { noResolve: false }; + options.target = options.target || ts.ScriptTarget.ES3; + options.module = options.module || ts.ModuleKind.None; + options.newLine = options.newLine || ts.NewLineKind.CarriageReturnLineFeed; + options.noErrorTruncation = true; + options.skipDefaultLibCheck = true; - public addInputFiles(files: { unitName: string; content: string }[]) { - files.forEach(file => this.addInputFile(file)); - } + currentDirectory = currentDirectory || Harness.IO.getCurrentDirectory(); - public addInputFile(file: { unitName: string; content: string }) { - this.inputFiles.push(file); + // Parse settings + let useCaseSensitiveFileNames = Harness.IO.useCaseSensitiveFileNames(); + if (harnessSettings) { + setCompilerOptionsFromHarnessSetting(harnessSettings, options); } - - public setCompilerOptions(options?: ts.CompilerOptions) { - this.compileOptions = options || { noResolve: false }; + if (options.useCaseSensitiveFileNames !== undefined) { + useCaseSensitiveFileNames = options.useCaseSensitiveFileNames; } - public emitAll(ioHost?: IEmitterIOHost) { - this.compileFiles(this.inputFiles, - /*otherFiles*/ [], - /*onComplete*/ result => { - result.files.forEach(writeFile); - result.declFilesCode.forEach(writeFile); - result.sourceMaps.forEach(writeFile); - }, - /*settingsCallback*/ () => { }, - this.compileOptions); - - function writeFile(file: GeneratedFile) { - ioHost.writeFile(file.fileName, file.code, false); - } + const programFiles: TestFile[] = inputFiles.slice(); + // Files from built\local that are requested by test "@includeBuiltFiles" to be in the context. + // Treat them as library files, so include them in build, but not in baselines. + if (options.includeBuiltFile) { + const builtFileName = ts.combinePaths(libFolder, options.includeBuiltFile); + const builtFile: TestFile = { + unitName: builtFileName, + content: normalizeLineEndings(IO.readFile(builtFileName), Harness.IO.newLine()), + }; + programFiles.push(builtFile); } - public compileFiles(inputFiles: { unitName: string; content: string }[], - otherFiles: { unitName: string; content: string }[], - onComplete: (result: CompilerResult, program: ts.Program) => void, - settingsCallback?: (settings: ts.CompilerOptions) => void, - options?: ts.CompilerOptions & HarnessOptions, - // Current directory is needed for rwcRunner to be able to use currentDirectory defined in json file - currentDirectory?: string) { - - options = options || { noResolve: false }; - options.target = options.target || ts.ScriptTarget.ES3; - options.module = options.module || ts.ModuleKind.None; - options.newLine = options.newLine || ts.NewLineKind.CarriageReturnLineFeed; - options.noErrorTruncation = true; - options.skipDefaultLibCheck = true; - - if (settingsCallback) { - settingsCallback(null); - } - - const newLine = "\r\n"; - - // Parse settings - setCompilerOptionsFromHarnessSetting(this.settings, options); - - // Files from built\local that are requested by test "@includeBuiltFiles" to be in the context. - // Treat them as library files, so include them in build, but not in baselines. - const includeBuiltFiles: { unitName: string; content: string }[] = []; - if (options.includeBuiltFile) { - const builtFileName = libFolder + options.includeBuiltFile; - includeBuiltFiles.push({ unitName: builtFileName, content: normalizeLineEndings(IO.readFile(builtFileName), newLine) }); - } + const fileOutputs: GeneratedFile[] = []; - const useCaseSensitiveFileNames = options.useCaseSensitiveFileNames !== undefined ? options.useCaseSensitiveFileNames : Harness.IO.useCaseSensitiveFileNames(); + const programFileNames = programFiles.map(file => file.unitName); - const fileOutputs: GeneratedFile[] = []; + const compilerHost = createCompilerHost( + programFiles.concat(otherFiles), + (fileName, code, writeByteOrderMark) => fileOutputs.push({ fileName, code, writeByteOrderMark }), + options.target, + useCaseSensitiveFileNames, + currentDirectory, + options.newLine); + const program = ts.createProgram(programFileNames, options, compilerHost); - const programFiles = inputFiles.concat(includeBuiltFiles).map(file => file.unitName); + const emitResult = program.emit(); - const compilerHost = createCompilerHost( - inputFiles.concat(includeBuiltFiles).concat(otherFiles), - (fn, contents, writeByteOrderMark) => fileOutputs.push({ fileName: fn, code: contents, writeByteOrderMark: writeByteOrderMark }), - options.target, useCaseSensitiveFileNames, currentDirectory, options.newLine); - const program = ts.createProgram(programFiles, options, compilerHost); + const errors = ts.getPreEmitDiagnostics(program); - const emitResult = program.emit(); + const result = new CompilerResult(fileOutputs, errors, program, Harness.IO.getCurrentDirectory(), emitResult.sourceMaps); + return { result, options }; + } - const errors = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics); - this.lastErrors = errors; + export function compileDeclarationFiles(inputFiles: TestFile[], + otherFiles: TestFile[], + result: CompilerResult, + harnessSettings: TestCaseParser.CompilerSettings & HarnessOptions, + options: ts.CompilerOptions, + // Current directory is needed for rwcRunner to be able to use currentDirectory defined in json file + currentDirectory: string) { + if (options.declaration && result.errors.length === 0 && result.declFilesCode.length !== result.files.length) { + throw new Error("There were no errors and declFiles generated did not match number of js files generated"); + } - const result = new CompilerResult(fileOutputs, errors, program, Harness.IO.getCurrentDirectory(), emitResult.sourceMaps); - onComplete(result, program); + const declInputFiles: TestFile[] = []; + const declOtherFiles: TestFile[] = []; - return options; + // if the .d.ts is non-empty, confirm it compiles correctly as well + if (options.declaration && result.errors.length === 0 && result.declFilesCode.length > 0) { + ts.forEach(inputFiles, file => addDtsFile(file, declInputFiles)); + ts.forEach(otherFiles, file => addDtsFile(file, declOtherFiles)); + const output = compileFiles(declInputFiles, declOtherFiles, harnessSettings, options, currentDirectory); + return { declInputFiles, declOtherFiles, declResult: output.result }; } - public compileDeclarationFiles(inputFiles: { unitName: string; content: string; }[], - otherFiles: { unitName: string; content: string; }[], - result: CompilerResult, - settingsCallback?: (settings: ts.CompilerOptions) => void, - options?: ts.CompilerOptions, - // Current directory is needed for rwcRunner to be able to use currentDirectory defined in json file - currentDirectory?: string) { - if (options.declaration && result.errors.length === 0 && result.declFilesCode.length !== result.files.length) { - throw new Error("There were no errors and declFiles generated did not match number of js files generated"); + function addDtsFile(file: TestFile, dtsFiles: TestFile[]) { + if (isDTS(file.unitName)) { + dtsFiles.push(file); } - - const declInputFiles: { unitName: string; content: string }[] = []; - const declOtherFiles: { unitName: string; content: string }[] = []; - let declResult: Harness.Compiler.CompilerResult; - - // if the .d.ts is non-empty, confirm it compiles correctly as well - if (options.declaration && result.errors.length === 0 && result.declFilesCode.length > 0) { - ts.forEach(inputFiles, file => addDtsFile(file, declInputFiles)); - ts.forEach(otherFiles, file => addDtsFile(file, declOtherFiles)); - this.compileFiles(declInputFiles, declOtherFiles, function (compileResult) { declResult = compileResult; }, - settingsCallback, options, currentDirectory); - - return { declInputFiles, declOtherFiles, declResult }; + else if (isTS(file.unitName)) { + const declFile = findResultCodeFile(file.unitName); + if (declFile && !findUnit(declFile.fileName, declInputFiles) && !findUnit(declFile.fileName, declOtherFiles)) { + dtsFiles.push({ unitName: declFile.fileName, content: declFile.code }); + } } + } - function addDtsFile(file: { unitName: string; content: string }, dtsFiles: { unitName: string; content: string }[]) { - if (isDTS(file.unitName)) { - dtsFiles.push(file); + function findResultCodeFile(fileName: string) { + const sourceFile = result.program.getSourceFile(fileName); + assert(sourceFile, "Program has no source file with name '" + fileName + "'"); + // Is this file going to be emitted separately + let sourceFileName: string; + const outFile = options.outFile || options.out; + if (!outFile) { + if (options.outDir) { + let sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, result.currentDirectoryForProgram); + sourceFilePath = sourceFilePath.replace(result.program.getCommonSourceDirectory(), ""); + sourceFileName = ts.combinePaths(options.outDir, sourceFilePath); } - else if (isTS(file.unitName)) { - const declFile = findResultCodeFile(file.unitName); - if (declFile && !findUnit(declFile.fileName, declInputFiles) && !findUnit(declFile.fileName, declOtherFiles)) { - dtsFiles.push({ unitName: declFile.fileName, content: declFile.code }); - } + else { + sourceFileName = sourceFile.fileName; } + } + else { + // Goes to single --out file + sourceFileName = outFile; + } - function findResultCodeFile(fileName: string) { - const sourceFile = result.program.getSourceFile(fileName); - assert(sourceFile, "Program has no source file with name '" + fileName + "'"); - // Is this file going to be emitted separately - let sourceFileName: string; - const outFile = options.outFile || options.out; - if (ts.isExternalModule(sourceFile) || !outFile) { - if (options.outDir) { - let sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, result.currentDirectoryForProgram); - sourceFilePath = sourceFilePath.replace(result.program.getCommonSourceDirectory(), ""); - sourceFileName = ts.combinePaths(options.outDir, sourceFilePath); - } - else { - sourceFileName = sourceFile.fileName; - } - } - else { - // Goes to single --out file - sourceFileName = outFile; - } - - const dTsFileName = ts.removeFileExtension(sourceFileName) + ".d.ts"; + const dTsFileName = ts.removeFileExtension(sourceFileName) + ".d.ts"; - return ts.forEach(result.declFilesCode, declFile => declFile.fileName === dTsFileName ? declFile : undefined); - } + return ts.forEach(result.declFilesCode, declFile => declFile.fileName === dTsFileName ? declFile : undefined); + } - function findUnit(fileName: string, units: { unitName: string; content: string; }[]) { - return ts.forEach(units, unit => unit.unitName === fileName ? unit : undefined); - } - } + function findUnit(fileName: string, units: TestFile[]) { + return ts.forEach(units, unit => unit.unitName === fileName ? unit : undefined); } } @@ -1230,7 +1124,7 @@ namespace Harness { return errorOutput; } - export function getErrorBaseline(inputFiles: { unitName: string; content: string }[], diagnostics: ts.Diagnostic[]) { + export function getErrorBaseline(inputFiles: TestFile[], diagnostics: ts.Diagnostic[]) { diagnostics.sort(ts.compareDiagnostics); const outputLines: string[] = []; // Count up all errors that were found in files other than lib.d.ts so we don't miss any @@ -1371,16 +1265,6 @@ namespace Harness { } } - /** The harness' compiler instance used when tests are actually run. Reseting or changing settings of this compiler instance must be done within a test case (i.e., describe/it) */ - let harnessCompiler: HarnessCompiler; - - /** Returns the singleton harness compiler instance for generating and running tests. - If required a fresh compiler instance will be created, otherwise the existing singleton will be re-used. - */ - export function getCompiler() { - return harnessCompiler = harnessCompiler || new HarnessCompiler(); - } - // This does not need to exist strictly speaking, but many tests will need to be updated if it's removed export function compileString(code: string, unitName: string, callback: (result: CompilerResult) => void) { // NEWTODO: Re-implement 'compileString' @@ -1431,7 +1315,7 @@ namespace Harness { constructor(fileResults: GeneratedFile[], errors: ts.Diagnostic[], public program: ts.Program, public currentDirectoryForProgram: string, private sourceMapData: ts.SourceMapData[]) { - fileResults.forEach(emittedFile => { + for (const emittedFile of fileResults) { if (isDTS(emittedFile.fileName)) { // .d.ts file, add to declFiles emit this.declFilesCode.push(emittedFile); @@ -1446,7 +1330,7 @@ namespace Harness { else { throw new Error("Unrecognized file extension for file " + emittedFile.fileName); } - }); + } this.errors = errors; } @@ -1555,7 +1439,7 @@ namespace Harness { } // normalize the fileName for the single file case - currentFileName = testUnitData.length > 0 ? currentFileName : Path.getFileName(fileName); + currentFileName = testUnitData.length > 0 || currentFileName ? currentFileName : Path.getFileName(fileName); // EOF, push whatever remains const newTestFile2 = { @@ -1674,7 +1558,7 @@ namespace Harness { const encoded_actual = Utils.encodeString(actual); if (expected != encoded_actual) { // Overwrite & issue error - const errMsg = "The baseline file " + relativeFileName + " has changed"; + const errMsg = "The baseline file " + relativeFileName + " has changed."; throw new Error(errMsg); } } @@ -1711,12 +1595,9 @@ namespace Harness { return filePath.indexOf(Harness.libFolder) === 0; } - export function getDefaultLibraryFile(io: Harness.IO): { unitName: string, content: string } { + export function getDefaultLibraryFile(io: Harness.IO): Harness.Compiler.TestFile { const libFile = Harness.userSpecifiedRoot + Harness.libFolder + "lib.d.ts"; - return { - unitName: libFile, - content: io.readFile(libFile) - }; + return { unitName: libFile, content: io.readFile(libFile) }; } if (Error) (Error).stackTraceLimit = 1; diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index faf0ad28eb526..3c7814df56258 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -7,7 +7,7 @@ namespace Harness.LanguageService { export class ScriptInfo { public version: number = 1; public editRanges: { length: number; textChangeRange: ts.TextChangeRange; }[] = []; - public lineMap: number[] = undefined; + private lineMap: number[] = undefined; constructor(public fileName: string, public content: string) { this.setContent(content); @@ -15,7 +15,11 @@ namespace Harness.LanguageService { private setContent(content: string): void { this.content = content; - this.lineMap = ts.computeLineStarts(content); + this.lineMap = undefined; + } + + public getLineMap(): number[] { + return this.lineMap || (this.lineMap = ts.computeLineStarts(this.content)); } public updateContent(content: string): void { @@ -153,7 +157,7 @@ namespace Harness.LanguageService { throw new Error("No script with name '" + fileName + "'"); } - public openFile(fileName: string): void { + public openFile(fileName: string, content?: string): void { } /** @@ -164,7 +168,7 @@ namespace Harness.LanguageService { const script: ScriptInfo = this.fileNameToScript[fileName]; assert.isNotNull(script); - return ts.computeLineAndCharacterOfPosition(script.lineMap, position); + return ts.computeLineAndCharacterOfPosition(script.getLineMap(), position); } } @@ -493,9 +497,9 @@ namespace Harness.LanguageService { this.client = client; } - openFile(fileName: string): void { - super.openFile(fileName); - this.client.openFile(fileName); + openFile(fileName: string, content?: string): void { + super.openFile(fileName, content); + this.client.openFile(fileName, content); } editScript(fileName: string, start: number, end: number, newText: string) { diff --git a/src/harness/loggedIO.ts b/src/harness/loggedIO.ts index bf56f1aa3eafd..0bae91f7976fc 100644 --- a/src/harness/loggedIO.ts +++ b/src/harness/loggedIO.ts @@ -174,7 +174,7 @@ namespace Playback { return true; } else { - return findResultByFields(replayLog.fileExists, { path }, false); + return findResultByFields(replayLog.fileExists, { path }, /*defaultValue*/ false); } }) ); diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index f48822f122024..5210266345759 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -7,19 +7,11 @@ interface ProjectRunnerTestCase { scenario: string; projectRoot: string; // project where it lives - this also is the current directory when compiling inputFiles: string[]; // list of input files to be given to program - out?: string; // --out - outDir?: string; // --outDir - sourceMap?: boolean; // --map - mapRoot?: string; // --mapRoot resolveMapRoot?: boolean; // should we resolve this map root and give compiler the absolute disk path as map root? - sourceRoot?: string; // --sourceRoot resolveSourceRoot?: boolean; // should we resolve this source root and give compiler the absolute disk path as map root? - declaration?: boolean; // --d baselineCheck?: boolean; // Verify the baselines of output files, if this is false, we will write to output to the disk but there is no verification of baselines runTest?: boolean; // Run the resulting test bug?: string; // If there is any bug associated with this test case - noResolve?: boolean; - rootDir?: string; // --rootDir } interface ProjectRunnerTestCaseResolutionInfo extends ProjectRunnerTestCase { @@ -34,14 +26,14 @@ interface BatchCompileProjectTestCaseEmittedFile extends Harness.Compiler.Genera interface CompileProjectFilesResult { moduleKind: ts.ModuleKind; - program: ts.Program; + program?: ts.Program; + compilerOptions?: ts.CompilerOptions; errors: ts.Diagnostic[]; - sourceMapData: ts.SourceMapData[]; + sourceMapData?: ts.SourceMapData[]; } interface BatchCompileProjectTestCaseResult extends CompileProjectFilesResult { - outputFiles: BatchCompileProjectTestCaseEmittedFile[]; - nonSubfolderDiskFiles: number; + outputFiles?: BatchCompileProjectTestCaseEmittedFile[]; } class ProjectRunner extends RunnerBase { @@ -59,7 +51,7 @@ class ProjectRunner extends RunnerBase { } private runProjectTestCase(testCaseFileName: string) { - let testCase: ProjectRunnerTestCase; + let testCase: ProjectRunnerTestCase & ts.CompilerOptions; let testFileText: string = null; try { @@ -70,7 +62,7 @@ class ProjectRunner extends RunnerBase { } try { - testCase = JSON.parse(testFileText); + testCase = JSON.parse(testFileText); } catch (e) { assert(false, "Testcase: " + testCaseFileName + " does not contain valid json format: " + e.message); @@ -128,9 +120,10 @@ class ProjectRunner extends RunnerBase { function compileProjectFiles(moduleKind: ts.ModuleKind, getInputFiles: () => string[], getSourceFileTextImpl: (fileName: string) => string, - writeFile: (fileName: string, data: string, writeByteOrderMark: boolean) => void): CompileProjectFilesResult { + writeFile: (fileName: string, data: string, writeByteOrderMark: boolean) => void, + compilerOptions: ts.CompilerOptions): CompileProjectFilesResult { - const program = ts.createProgram(getInputFiles(), createCompilerOptions(), createCompilerHost()); + const program = ts.createProgram(getInputFiles(), compilerOptions, createCompilerHost()); let errors = ts.getPreEmitDiagnostics(program); const emitResult = program.emit(); @@ -155,21 +148,6 @@ class ProjectRunner extends RunnerBase { sourceMapData }; - function createCompilerOptions(): ts.CompilerOptions { - return { - declaration: !!testCase.declaration, - sourceMap: !!testCase.sourceMap, - outFile: testCase.out, - outDir: testCase.outDir, - mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? Harness.IO.resolvePath(testCase.mapRoot) : testCase.mapRoot, - sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? Harness.IO.resolvePath(testCase.sourceRoot) : testCase.sourceRoot, - module: moduleKind, - moduleResolution: ts.ModuleResolutionKind.Classic, // currently all tests use classic module resolution kind, this will change in the future - noResolve: testCase.noResolve, - rootDir: testCase.rootDir - }; - } - function getSourceFileText(fileName: string): string { const text = getSourceFileTextImpl(fileName); return text !== undefined ? text : getSourceFileTextImpl(ts.getNormalizedAbsolutePath(fileName, getCurrentDirectory())); @@ -209,23 +187,105 @@ class ProjectRunner extends RunnerBase { let nonSubfolderDiskFiles = 0; const outputFiles: BatchCompileProjectTestCaseEmittedFile[] = []; + let inputFiles = testCase.inputFiles; + let compilerOptions = createCompilerOptions(); + + let configFileName: string; + if (compilerOptions.project) { + // Parse project + configFileName = ts.normalizePath(ts.combinePaths(compilerOptions.project, "tsconfig.json")); + assert(!inputFiles || inputFiles.length === 0, "cannot specify input files and project option together"); + } + else if (!inputFiles || inputFiles.length === 0) { + configFileName = ts.findConfigFile("", fileExists); + } - const projectCompilerResult = compileProjectFiles(moduleKind, () => testCase.inputFiles, getSourceFileText, writeFile); + if (configFileName) { + const result = ts.readConfigFile(configFileName, getSourceFileText); + if (result.error) { + return { + moduleKind, + errors: [result.error] + }; + } + + const configObject = result.config; + const configParseResult = ts.parseJsonConfigFileContent(configObject, { readDirectory }, ts.getDirectoryPath(configFileName), compilerOptions); + if (configParseResult.errors.length > 0) { + return { + moduleKind, + errors: configParseResult.errors + }; + } + inputFiles = configParseResult.fileNames; + compilerOptions = configParseResult.options; + } + + const projectCompilerResult = compileProjectFiles(moduleKind, () => inputFiles, getSourceFileText, writeFile, compilerOptions); return { moduleKind, program: projectCompilerResult.program, + compilerOptions, sourceMapData: projectCompilerResult.sourceMapData, outputFiles, errors: projectCompilerResult.errors, - nonSubfolderDiskFiles, }; + function createCompilerOptions() { + // Set the special options that depend on other testcase options + const compilerOptions: ts.CompilerOptions = { + mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? Harness.IO.resolvePath(testCase.mapRoot) : testCase.mapRoot, + sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? Harness.IO.resolvePath(testCase.sourceRoot) : testCase.sourceRoot, + module: moduleKind, + moduleResolution: ts.ModuleResolutionKind.Classic, // currently all tests use classic module resolution kind, this will change in the future + }; + // Set the values specified using json + const optionNameMap: ts.Map = {}; + ts.forEach(ts.optionDeclarations, option => { + optionNameMap[option.name] = option; + }); + for (const name in testCase) { + if (name !== "mapRoot" && name !== "sourceRoot" && ts.hasProperty(optionNameMap, name)) { + const option = optionNameMap[name]; + const optType = option.type; + let value = testCase[name]; + if (typeof optType !== "string") { + const key = value.toLowerCase(); + if (ts.hasProperty(optType, key)) { + value = optType[key]; + } + } + compilerOptions[option.name] = value; + } + } + + return compilerOptions; + } + + function getFileNameInTheProjectTest(fileName: string): string { + return ts.isRootedDiskPath(fileName) + ? fileName + : ts.normalizeSlashes(testCase.projectRoot) + "/" + ts.normalizeSlashes(fileName); + } + + function readDirectory(rootDir: string, extension: string, exclude: string[]): string[] { + const harnessReadDirectoryResult = Harness.IO.readDirectory(getFileNameInTheProjectTest(rootDir), extension, exclude); + const result: string[] = []; + for (let i = 0; i < harnessReadDirectoryResult.length; i++) { + result[i] = ts.getRelativePathToDirectoryOrUrl(testCase.projectRoot, harnessReadDirectoryResult[i], + getCurrentDirectory(), Harness.Compiler.getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); + } + return result; + } + + function fileExists(fileName: string): boolean { + return Harness.IO.fileExists(getFileNameInTheProjectTest(fileName)); + } + function getSourceFileText(fileName: string): string { let text: string = undefined; try { - text = Harness.IO.readFile(ts.isRootedDiskPath(fileName) - ? fileName - : ts.normalizeSlashes(testCase.projectRoot) + "/" + ts.normalizeSlashes(fileName)); + text = Harness.IO.readFile(getFileNameInTheProjectTest(fileName)); } catch (e) { // text doesn't get defined. @@ -288,13 +348,16 @@ class ProjectRunner extends RunnerBase { function compileCompileDTsFiles(compilerResult: BatchCompileProjectTestCaseResult) { const allInputFiles: { emittedFileName: string; code: string; }[] = []; + if (!compilerResult.program) { + return; + } const compilerOptions = compilerResult.program.getCompilerOptions(); ts.forEach(compilerResult.program.getSourceFiles(), sourceFile => { - if (Harness.Compiler.isDTS(sourceFile.fileName)) { + if (ts.isDeclarationFile(sourceFile)) { allInputFiles.unshift({ emittedFileName: sourceFile.fileName, code: sourceFile.text }); } - else if (ts.shouldEmitToOwnFile(sourceFile, compilerResult.program.getCompilerOptions())) { + else if (!(compilerOptions.outFile || compilerOptions.out)) { let emitOutputFilePathWithoutExtension: string = undefined; if (compilerOptions.outDir) { let sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, compilerResult.program.getCurrentDirectory()); @@ -320,7 +383,8 @@ class ProjectRunner extends RunnerBase { } }); - return compileProjectFiles(compilerResult.moduleKind, getInputFiles, getSourceFileText, writeFile); + // Dont allow config files since we are compiling existing source options + return compileProjectFiles(compilerResult.moduleKind, getInputFiles, getSourceFileText, writeFile, compilerResult.compilerOptions); function findOutpuDtsFile(fileName: string) { return ts.forEach(compilerResult.outputFiles, outputFile => outputFile.emittedFileName === fileName ? outputFile : undefined); @@ -346,11 +410,16 @@ class ProjectRunner extends RunnerBase { } function getErrorsBaseline(compilerResult: CompileProjectFilesResult) { - const inputFiles = ts.map(ts.filter(compilerResult.program.getSourceFiles(), + const inputFiles = compilerResult.program ? ts.map(ts.filter(compilerResult.program.getSourceFiles(), sourceFile => sourceFile.fileName !== "lib.d.ts"), sourceFile => { - return { unitName: RunnerBase.removeFullPaths(sourceFile.fileName), content: sourceFile.text }; - }); + return { + unitName: ts.isRootedDiskPath(sourceFile.fileName) ? + RunnerBase.removeFullPaths(sourceFile.fileName) : + sourceFile.fileName, + content: sourceFile.text + }; + }) : []; return Harness.Compiler.getErrorBaseline(inputFiles, compilerResult.errors); } @@ -363,30 +432,13 @@ class ProjectRunner extends RunnerBase { let compilerResult: BatchCompileProjectTestCaseResult; function getCompilerResolutionInfo() { - const resolutionInfo: ProjectRunnerTestCaseResolutionInfo = { - scenario: testCase.scenario, - projectRoot: testCase.projectRoot, - inputFiles: testCase.inputFiles, - out: testCase.out, - outDir: testCase.outDir, - sourceMap: testCase.sourceMap, - mapRoot: testCase.mapRoot, - resolveMapRoot: testCase.resolveMapRoot, - sourceRoot: testCase.sourceRoot, - resolveSourceRoot: testCase.resolveSourceRoot, - declaration: testCase.declaration, - baselineCheck: testCase.baselineCheck, - runTest: testCase.runTest, - bug: testCase.bug, - rootDir: testCase.rootDir, - resolvedInputFiles: ts.map(compilerResult.program.getSourceFiles(), inputFile => { - return ts.convertToRelativePath(inputFile.fileName, getCurrentDirectory(), path => Harness.Compiler.getCanonicalFileName(path)); - }), - emittedFiles: ts.map(compilerResult.outputFiles, outputFile => { - return ts.convertToRelativePath(outputFile.emittedFileName, getCurrentDirectory(), path => Harness.Compiler.getCanonicalFileName(path)); - }) - }; - + const resolutionInfo: ProjectRunnerTestCaseResolutionInfo & ts.CompilerOptions = JSON.parse(JSON.stringify(testCase)); + resolutionInfo.resolvedInputFiles = ts.map(compilerResult.program.getSourceFiles(), inputFile => { + return ts.convertToRelativePath(inputFile.fileName, getCurrentDirectory(), path => Harness.Compiler.getCanonicalFileName(path)); + }); + resolutionInfo.emittedFiles = ts.map(compilerResult.outputFiles, outputFile => { + return ts.convertToRelativePath(outputFile.emittedFileName, getCurrentDirectory(), path => Harness.Compiler.getCanonicalFileName(path)); + }); return resolutionInfo; } @@ -442,7 +494,7 @@ class ProjectRunner extends RunnerBase { it("Errors in generated Dts files for (" + moduleNameToString(moduleKind) + "): " + testCaseFileName, () => { if (!compilerResult.errors.length && testCase.declaration) { const dTsCompileResult = compileCompileDTsFiles(compilerResult); - if (dTsCompileResult.errors.length) { + if (dTsCompileResult && dTsCompileResult.errors.length) { Harness.Baseline.runBaseline("Errors in generated Dts files for (" + moduleNameToString(compilerResult.moduleKind) + "): " + testCaseFileName, getBaselineFolder(compilerResult.moduleKind) + testCaseJustName + ".dts.errors.txt", () => { return getErrorsBaseline(dTsCompileResult); }); diff --git a/src/harness/rwcRunner.ts b/src/harness/rwcRunner.ts index a350eda08f327..ce570a7d6ad01 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -27,8 +27,8 @@ namespace RWC { export function runRWCTest(jsonPath: string) { describe("Testing a RWC project: " + jsonPath, () => { - let inputFiles: { unitName: string; content: string; }[] = []; - let otherFiles: { unitName: string; content: string; }[] = []; + let inputFiles: Harness.Compiler.TestFile[] = []; + let otherFiles: Harness.Compiler.TestFile[] = []; let compilerResult: Harness.Compiler.CompilerResult; let compilerOptions: ts.CompilerOptions; let baselineOpts: Harness.Baseline.BaselineOptions = { @@ -55,7 +55,6 @@ namespace RWC { }); it("can compile", () => { - const harnessCompiler = Harness.Compiler.getCompiler(); let opts: ts.ParsedCommandLine; const ioLog: IOLog = JSON.parse(Harness.IO.readFile(jsonPath)); @@ -71,8 +70,6 @@ namespace RWC { }); runWithIOLog(ioLog, oldIO => { - harnessCompiler.reset(); - let fileNames = opts.fileNames; const tsconfigFile = ts.forEach(ioLog.filesRead, f => isTsConfigFile(f) ? f : undefined); @@ -128,17 +125,21 @@ namespace RWC { opts.options.noLib = true; // Emit the results - compilerOptions = harnessCompiler.compileFiles( + compilerOptions = null; + const output = Harness.Compiler.compileFiles( inputFiles, otherFiles, - newCompilerResults => { compilerResult = newCompilerResults; }, - /*settingsCallback*/ undefined, opts.options, + /* harnessOptions */ undefined, + opts.options, // Since each RWC json file specifies its current directory in its json file, we need // to pass this information in explicitly instead of acquiring it from the process. currentDirectory); + + compilerOptions = output.options; + compilerResult = output.result; }); - function getHarnessCompilerInputUnit(fileName: string) { + function getHarnessCompilerInputUnit(fileName: string): Harness.Compiler.TestFile { const unitName = ts.normalizeSlashes(Harness.IO.resolvePath(fileName)); let content: string = null; try { @@ -201,8 +202,9 @@ namespace RWC { it("has the expected errors in generated declaration files", () => { if (compilerOptions.declaration && !compilerResult.errors.length) { Harness.Baseline.runBaseline("has the expected errors in generated declaration files", baseName + ".dts.errors.txt", () => { - const declFileCompilationResult = Harness.Compiler.getCompiler().compileDeclarationFiles(inputFiles, otherFiles, compilerResult, - /*settingscallback*/ undefined, compilerOptions, currentDirectory); + const declFileCompilationResult = Harness.Compiler.compileDeclarationFiles( + inputFiles, otherFiles, compilerResult, /*harnessSettings*/ undefined, compilerOptions, currentDirectory); + if (declFileCompilationResult.declResult.errors.length === 0) { return null; } diff --git a/src/harness/sourceMapRecorder.ts b/src/harness/sourceMapRecorder.ts index ce0a6a6528e29..806ca7a845d2a 100644 --- a/src/harness/sourceMapRecorder.ts +++ b/src/harness/sourceMapRecorder.ts @@ -172,7 +172,6 @@ namespace Harness.SourceMapRecoder { return { error: errorDecodeOfEncodedMapping, sourceMapSpan: decodeOfEncodedMapping }; } // 5. Check if there is name: - decodeOfEncodedMapping.nameIndex = -1; if (!isSourceMappingSegmentEnd()) { prevNameIndex += base64VLQFormatDecode(); decodeOfEncodedMapping.nameIndex = prevNameIndex; @@ -190,7 +189,7 @@ namespace Harness.SourceMapRecoder { return { error: errorDecodeOfEncodedMapping, sourceMapSpan: decodeOfEncodedMapping }; } - createErrorIfCondition(true, "No encoded entry found"); + createErrorIfCondition(/*condition*/ true, "No encoded entry found"); } export function hasCompletedDecoding() { @@ -249,7 +248,7 @@ namespace Harness.SourceMapRecoder { mapString += " name (" + sourceMapNames[mapEntry.nameIndex] + ")"; } else { - if (mapEntry.nameIndex !== -1 || getAbsentNameIndex) { + if ((mapEntry.nameIndex && mapEntry.nameIndex !== -1) || getAbsentNameIndex) { mapString += " nameIndex (" + mapEntry.nameIndex + ")"; } } diff --git a/src/harness/test262Runner.ts b/src/harness/test262Runner.ts index f25e0c79b63c9..262145b476405 100644 --- a/src/harness/test262Runner.ts +++ b/src/harness/test262Runner.ts @@ -5,9 +5,9 @@ class Test262BaselineRunner extends RunnerBase { private static basePath = "internal/cases/test262"; private static helpersFilePath = "tests/cases/test262-harness/helpers.d.ts"; - private static helperFile = { + private static helperFile: Harness.Compiler.TestFile = { unitName: Test262BaselineRunner.helpersFilePath, - content: Harness.IO.readFile(Test262BaselineRunner.helpersFilePath) + content: Harness.IO.readFile(Test262BaselineRunner.helpersFilePath), }; private static testFileExtensionRegex = /\.js$/; private static options: ts.CompilerOptions = { @@ -31,8 +31,7 @@ class Test262BaselineRunner extends RunnerBase { let testState: { filename: string; compilerResult: Harness.Compiler.CompilerResult; - inputFiles: { unitName: string; content: string }[]; - program: ts.Program; + inputFiles: Harness.Compiler.TestFile[]; }; before(() => { @@ -40,8 +39,9 @@ class Test262BaselineRunner extends RunnerBase { const testFilename = ts.removeFileExtension(filePath).replace(/\//g, "_") + ".test"; const testCaseContent = Harness.TestCaseParser.makeUnitsFromTest(content, testFilename); - const inputFiles = testCaseContent.testUnitData.map(unit => { - return { unitName: Test262BaselineRunner.getTestFilePath(unit.name), content: unit.content }; + const inputFiles: Harness.Compiler.TestFile[] = testCaseContent.testUnitData.map(unit => { + const unitName = Test262BaselineRunner.getTestFilePath(unit.name); + return { unitName, content: unit.content }; }); // Emit the results @@ -49,13 +49,16 @@ class Test262BaselineRunner extends RunnerBase { filename: testFilename, inputFiles: inputFiles, compilerResult: undefined, - program: undefined, }; - Harness.Compiler.getCompiler().compileFiles([Test262BaselineRunner.helperFile].concat(inputFiles), /*otherFiles*/ [], (compilerResult, program) => { - testState.compilerResult = compilerResult; - testState.program = program; - }, /*settingsCallback*/ undefined, Test262BaselineRunner.options); + const output = Harness.Compiler.compileFiles( + [Test262BaselineRunner.helperFile].concat(inputFiles), + /*otherFiles*/ [], + /* harnessOptions */ undefined, + Test262BaselineRunner.options, + /* currentDirectory */ undefined + ); + testState.compilerResult = output.result; }); after(() => { @@ -80,14 +83,14 @@ class Test262BaselineRunner extends RunnerBase { }, false, Test262BaselineRunner.baselineOptions); }); - it("satisfies inletiants", () => { - const sourceFile = testState.program.getSourceFile(Test262BaselineRunner.getTestFilePath(testState.filename)); + it("satisfies invariants", () => { + const sourceFile = testState.compilerResult.program.getSourceFile(Test262BaselineRunner.getTestFilePath(testState.filename)); Utils.assertInvariants(sourceFile, /*parent:*/ undefined); }); it("has the expected AST", () => { Harness.Baseline.runBaseline("has the expected AST", testState.filename + ".AST.txt", () => { - const sourceFile = testState.program.getSourceFile(Test262BaselineRunner.getTestFilePath(testState.filename)); + const sourceFile = testState.compilerResult.program.getSourceFile(Test262BaselineRunner.getTestFilePath(testState.filename)); return Utils.sourceFileToJSON(sourceFile); }, false, Test262BaselineRunner.baselineOptions); }); diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index ac039198b4bd5..5984505c4cf14 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -2058,6 +2058,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven * Gets or sets the version attribute specified in the declaration of an XML document. */ xmlVersion: string; + currentScript: HTMLScriptElement; adoptNode(source: Node): Node; captureEvents(): void; clear(): void; @@ -2977,6 +2978,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec webkitRequestFullScreen(): void; webkitRequestFullscreen(): void; getElementsByClassName(classNames: string): NodeListOf; + matches(selector: string): boolean; addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; @@ -3961,7 +3963,6 @@ interface HTMLElement extends Element { title: string; blur(): void; click(): void; - contains(child: HTMLElement): boolean; dragDrop(): boolean; focus(): void; insertAdjacentElement(position: string, insertedElement: Element): Element; @@ -6135,7 +6136,7 @@ interface HTMLSelectElement extends HTMLElement { * Sets or retrieves the name of the object. */ name: string; - options: HTMLSelectElement; + options: HTMLCollection; /** * When present, marks an element that can't be submitted without a value. */ @@ -6421,19 +6422,19 @@ interface HTMLTableElement extends HTMLElement { /** * Creates an empty caption element in the table. */ - createCaption(): HTMLElement; + createCaption(): HTMLTableCaptionElement; /** * Creates an empty tBody element in the table. */ - createTBody(): HTMLElement; + createTBody(): HTMLTableSectionElement; /** * Creates an empty tFoot element in the table. */ - createTFoot(): HTMLElement; + createTFoot(): HTMLTableSectionElement; /** * Returns the tHead element object if successful, or null otherwise. */ - createTHead(): HTMLElement; + createTHead(): HTMLTableSectionElement; /** * Deletes the caption element and its contents from the table. */ @@ -6455,7 +6456,7 @@ interface HTMLTableElement extends HTMLElement { * Creates a new row (tr) in the table, and adds the row to the rows collection. * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection. */ - insertRow(index?: number): HTMLElement; + insertRow(index?: number): HTMLTableRowElement; } declare var HTMLTableElement: { @@ -6506,7 +6507,7 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment { * Creates a new cell in the table row, and adds the cell to the cells collection. * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection. */ - insertCell(index?: number): HTMLElement; + insertCell(index?: number): HTMLTableCellElement; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } @@ -6533,7 +6534,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment { * Creates a new row (tr) in the table, and adds the row to the rows collection. * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection. */ - insertRow(index?: number): HTMLElement; + insertRow(index?: number): HTMLTableRowElement; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } @@ -7071,7 +7072,7 @@ declare var IDBVersionChangeEvent: { } interface ImageData { - data: number[]; + data: Uint8ClampedArray; height: number; width: number; } @@ -7869,6 +7870,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte getGamepads(): Gamepad[]; javaEnabled(): boolean; msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void; + vibrate(pattern: number | number[]): boolean; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } @@ -7909,6 +7911,7 @@ interface Node extends EventTarget { normalize(): void; removeChild(oldChild: Node): Node; replaceChild(newChild: Node, oldChild: Node): Node; + contains(node: Node): boolean; ATTRIBUTE_NODE: number; CDATA_SECTION_NODE: number; COMMENT_NODE: number; diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index a2ed9682f1bb2..8001511a98b93 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -460,7 +460,7 @@ declare var IDBVersionChangeEvent: { } interface ImageData { - data: number[]; + data: Uint8ClampedArray; height: number; width: number; } diff --git a/src/server/client.ts b/src/server/client.ts index ae234750d88da..08939b2b44aca 100644 --- a/src/server/client.ts +++ b/src/server/client.ts @@ -120,8 +120,8 @@ namespace ts.server { return response; } - openFile(fileName: string): void { - var args: protocol.FileRequestArgs = { file: fileName }; + openFile(fileName: string, content?: string): void { + var args: protocol.OpenRequestArgs = { file: fileName, fileContent: content }; this.processRequest(CommandNames.Open, args); } diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 333cea2745d6f..0305b7595c276 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -388,7 +388,7 @@ namespace ts.server { } openReferencedFile(filename: string) { - return this.projectService.openFile(filename, false); + return this.projectService.openFile(filename, /*openedByClient*/ false); } getRootFiles() { @@ -564,7 +564,7 @@ namespace ts.server { // If a change was made inside "folder/file", node will trigger the callback twice: // one with the fileName being "folder/file", and the other one with "folder". // We don't respond to the second one. - if (fileName && !ts.isSupportedSourceFileName(fileName)) { + if (fileName && !ts.isSupportedSourceFileName(fileName, project.projectOptions ? project.projectOptions.compilerOptions : undefined)) { return; } @@ -1006,14 +1006,15 @@ namespace ts.server { /** * @param filename is absolute pathname + * @param fileContent is a known version of the file content that is more up to date than the one on disk */ - openFile(fileName: string, openedByClient: boolean) { + openFile(fileName: string, openedByClient: boolean, fileContent?: string) { fileName = ts.normalizePath(fileName); let info = ts.lookUp(this.filenameToScriptInfo, fileName); if (!info) { let content: string; if (this.host.fileExists(fileName)) { - content = this.host.readFile(fileName); + content = fileContent || this.host.readFile(fileName); } if (!content) { if (openedByClient) { @@ -1030,6 +1031,9 @@ namespace ts.server { } } if (info) { + if (fileContent) { + info.svc.reload(fileContent); + } if (openedByClient) { info.isOpen = true; } @@ -1060,10 +1064,11 @@ namespace ts.server { /** * Open file whose contents is managed by the client * @param filename is absolute pathname + * @param fileContent is a known version of the file content that is more up to date than the one on disk */ - openClientFile(fileName: string) { + openClientFile(fileName: string, fileContent?: string) { this.openOrUpdateConfiguredProjectForFile(fileName); - const info = this.openFile(fileName, true); + const info = this.openFile(fileName, /*openedByClient*/ true, fileContent); this.addOpenFile(info); this.printProjects(); return info; @@ -1272,7 +1277,7 @@ namespace ts.server { for (const fileName of fileNamesToAdd) { let info = this.getScriptInfo(fileName); if (!info) { - info = this.openFile(fileName, false); + info = this.openFile(fileName, /*openedByClient*/ false); } else { // if the root file was opened by client, it would belong to either diff --git a/src/server/protocol.d.ts b/src/server/protocol.d.ts index ad1fc5e92de2a..3a66975332382 100644 --- a/src/server/protocol.d.ts +++ b/src/server/protocol.d.ts @@ -513,6 +513,11 @@ declare namespace ts.server.protocol { * Information found in an "open" request. */ export interface OpenRequestArgs extends FileRequestArgs { + /** + * Used when a version of the file content is known to be more up to date than the one on disk. + * Then the known content will be used upon opening instead of the disk copy + */ + fileContent?: string; } /** diff --git a/src/server/session.ts b/src/server/session.ts index 770256cc9f700..dae2384ce546d 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -532,9 +532,13 @@ namespace ts.server { }; } - private openClientFile(fileName: string) { + /** + * @param fileName is the name of the file to be opened + * @param fileContent is a version of the file content that is known to be more up to date than the one on disk + */ + private openClientFile(fileName: string, fileContent?: string) { const file = ts.normalizePath(fileName); - this.projectService.openClientFile(file); + this.projectService.openClientFile(file, fileContent); } private getQuickInfo(line: number, offset: number, fileName: string): protocol.QuickInfoResponseBody { @@ -897,7 +901,7 @@ namespace ts.server { } getDiagnosticsForProject(delay: number, fileName: string) { - const { configFileName, fileNames } = this.getProjectInfo(fileName, true); + const { configFileName, fileNames } = this.getProjectInfo(fileName, /*needFileNameList*/ true); // No need to analyze lib.d.ts let fileNamesInProject = fileNames.filter((value, index, array) => value.indexOf("lib.d.ts") < 0); @@ -968,7 +972,7 @@ namespace ts.server { }, [CommandNames.Open]: (request: protocol.Request) => { const openArgs = request.arguments; - this.openClientFile(openArgs.file); + this.openClientFile(openArgs.file, openArgs.fileContent); return {responseRequired: false}; }, [CommandNames.Quickinfo]: (request: protocol.Request) => { diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index e307b21979e26..31ab5d2adec5d 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -16,7 +16,7 @@ namespace ts.BreakpointResolver { let tokenAtLocation = getTokenAtPosition(sourceFile, position); let lineOfPosition = sourceFile.getLineAndCharacterOfPosition(position).line; - if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart()).line > lineOfPosition) { + if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart(sourceFile)).line > lineOfPosition) { // Get previous token if the token is returned starts on new line // eg: let x =10; |--- cursor is here // let y = 10; @@ -39,16 +39,23 @@ namespace ts.BreakpointResolver { return spanInNode(tokenAtLocation); function textSpan(startNode: Node, endNode?: Node) { - return createTextSpanFromBounds(startNode.getStart(), (endNode || startNode).getEnd()); + const start = startNode.decorators ? + skipTrivia(sourceFile.text, startNode.decorators.end) : + startNode.getStart(sourceFile); + return createTextSpanFromBounds(start, (endNode || startNode).getEnd()); } function spanInNodeIfStartsOnSameLine(node: Node, otherwiseOnNode?: Node): TextSpan { - if (node && lineOfPosition === sourceFile.getLineAndCharacterOfPosition(node.getStart()).line) { + if (node && lineOfPosition === sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line) { return spanInNode(node); } return spanInNode(otherwiseOnNode); } + function spanInNodeArray(nodeArray: NodeArray) { + return createTextSpanFromBounds(skipTrivia(sourceFile.text, nodeArray.pos), nodeArray.end); + } + function spanInPreviousNode(node: Node): TextSpan { return spanInNode(findPrecedingToken(node.pos, sourceFile)); } @@ -65,6 +72,11 @@ namespace ts.BreakpointResolver { return spanInPreviousNode(node); } + if (node.parent.kind === SyntaxKind.Decorator) { + // Set breakpoint on the decorator emit + return spanInNode(node.parent); + } + if (node.parent.kind === SyntaxKind.ForStatement) { // For now lets set the span on this expression, fix it later return textSpan(node); @@ -207,6 +219,9 @@ namespace ts.BreakpointResolver { // span in statement return spanInNode((node).statement); + case SyntaxKind.Decorator: + return spanInNodeArray(node.parent.decorators); + // No breakpoint in interface, type alias case SyntaxKind.InterfaceDeclaration: case SyntaxKind.TypeAliasDeclaration: diff --git a/src/services/formatting/tokenRange.ts b/src/services/formatting/tokenRange.ts index 19185cdf78d3f..1afde6136188c 100644 --- a/src/services/formatting/tokenRange.ts +++ b/src/services/formatting/tokenRange.ts @@ -14,7 +14,7 @@ namespace ts.formatting { constructor(from: SyntaxKind, to: SyntaxKind, except: SyntaxKind[]) { this.tokens = []; for (let token = from; token <= to; token++) { - if (except.indexOf(token) < 0) { + if (ts.indexOf(except, token) < 0) { this.tokens.push(token); } } @@ -123,4 +123,4 @@ namespace ts.formatting { static TypeNames = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.NumberKeyword, SyntaxKind.StringKeyword, SyntaxKind.BooleanKeyword, SyntaxKind.SymbolKeyword, SyntaxKind.VoidKeyword, SyntaxKind.AnyKeyword]); } } -} \ No newline at end of file +} diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index e822052a5b2c3..46ec807a881dd 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -2,7 +2,7 @@ /* @internal */ namespace ts.NavigationBar { - export function getNavigationBarItems(sourceFile: SourceFile): ts.NavigationBarItem[] { + export function getNavigationBarItems(sourceFile: SourceFile, compilerOptions: CompilerOptions): ts.NavigationBarItem[] { // If the source file has any child items, then it included in the tree // and takes lexical ownership of all other top-level items. let hasGlobalNode = false; diff --git a/src/services/services.ts b/src/services/services.ts index 3d7a73c913955..e145406ac18b7 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -132,43 +132,43 @@ namespace ts { let scanner: Scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ true); let emptyArray: any[] = []; - + const jsDocTagNames = [ - "augments", - "author", - "argument", - "borrows", - "class", - "constant", - "constructor", - "constructs", - "default", - "deprecated", - "description", - "event", - "example", - "extends", - "field", - "fileOverview", - "function", - "ignore", - "inner", - "lends", - "link", - "memberOf", - "name", - "namespace", - "param", - "private", - "property", - "public", - "requires", - "returns", - "see", - "since", - "static", - "throws", - "type", + "augments", + "author", + "argument", + "borrows", + "class", + "constant", + "constructor", + "constructs", + "default", + "deprecated", + "description", + "event", + "example", + "extends", + "field", + "fileOverview", + "function", + "ignore", + "inner", + "lends", + "link", + "memberOf", + "name", + "namespace", + "param", + "private", + "property", + "public", + "requires", + "returns", + "see", + "since", + "static", + "throws", + "type", "version" ]; let jsDocCompletionEntries: CompletionEntry[]; @@ -741,6 +741,7 @@ namespace ts { declaration: SignatureDeclaration; typeParameters: TypeParameter[]; parameters: Symbol[]; + kind: SignatureKind; resolvedReturnType: Type; minArgumentCount: number; hasRestParameter: boolean; @@ -817,7 +818,7 @@ namespace ts { constructor(kind: SyntaxKind, pos: number, end: number) { super(kind, pos, end) } - + public update(newText: string, textChangeRange: TextChangeRange): SourceFile { return updateSourceFile(this, newText, textChangeRange); } @@ -1031,7 +1032,7 @@ namespace ts { /* * LS host can optionally implement this method if it wants to be completely in charge of module name resolution. - * if implementation is omitted then language service will use built-in module resolution logic and get answers to + * if implementation is omitted then language service will use built-in module resolution logic and get answers to * host specific questions using 'getScriptSnapshot'. */ resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[]; @@ -1612,6 +1613,9 @@ namespace ts { public static typeAliasName = "type alias name"; public static parameterName = "parameter name"; public static docCommentTagName = "doc comment tag name"; + public static jsxOpenTagName = "jsx open tag name"; + public static jsxCloseTagName = "jsx close tag name"; + public static jsxSelfClosingTagName = "jsx self closing tag name"; } export const enum ClassificationType { @@ -1633,6 +1637,9 @@ namespace ts { typeAliasName = 16, parameterName = 17, docCommentTagName = 18, + jsxOpenTagName = 19, + jsxCloseTagName = 20, + jsxSelfClosingTagName = 21, } /// Language Service @@ -1855,7 +1862,7 @@ namespace ts { * - allowNonTsExtensions = true * - noLib = true * - noResolve = true - */ + */ export function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput { let options = transpileOptions.compilerOptions ? clone(transpileOptions.compilerOptions) : getDefaultCompilerOptions(); @@ -1895,7 +1902,7 @@ namespace ts { sourceMapText = text; } else { - Debug.assert(outputText === undefined, "Unexpected multiple outputs for the file: " + name); + Debug.assert(outputText === undefined, `Unexpected multiple outputs for the file: '${name}'`); outputText = text; } }, @@ -2017,7 +2024,7 @@ namespace ts { let getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames); function getKeyFromCompilationSettings(settings: CompilerOptions): string { - return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx; + return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + +"|" + settings.allowJs; } function getBucketForCompilationSettings(settings: CompilerOptions, createIfMissing: boolean): FileMap { @@ -2314,7 +2321,7 @@ namespace ts { return true; } - + return false; } @@ -2333,7 +2340,7 @@ namespace ts { } return false; } - + function tryConsumeDefine(): boolean { let token = scanner.getToken(); if (token === SyntaxKind.Identifier && scanner.getTokenValue() === "define") { @@ -2359,7 +2366,7 @@ namespace ts { if (token !== SyntaxKind.OpenBracketToken) { return true; } - + // skip open bracket token = scanner.scan(); let i = 0; @@ -2374,7 +2381,7 @@ namespace ts { token = scanner.scan(); } return true; - + } return false; } @@ -2664,7 +2671,7 @@ namespace ts { } } - export function createLanguageService(host: LanguageServiceHost, + export function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory())): LanguageService { let syntaxTreeCache: SyntaxTreeCache = new SyntaxTreeCache(host); @@ -2740,7 +2747,8 @@ namespace ts { (oldSettings.target !== newSettings.target || oldSettings.module !== newSettings.module || oldSettings.noResolve !== newSettings.noResolve || - oldSettings.jsx !== newSettings.jsx); + oldSettings.jsx !== newSettings.jsx || + oldSettings.allowJs !== newSettings.allowJs); // Now create a new compiler let compilerHost: CompilerHost = { @@ -2752,10 +2760,10 @@ namespace ts { getDefaultLibFileName: (options) => host.getDefaultLibFileName(options), writeFile: (fileName, data, writeByteOrderMark) => { }, getCurrentDirectory: () => currentDirectory, - fileExists: (fileName): boolean => { + fileExists: (fileName): boolean => { // stub missing host functionality Debug.assert(!host.resolveModuleNames); - return hostCache.getOrCreateEntry(fileName) !== undefined; + return hostCache.getOrCreateEntry(fileName) !== undefined; }, readFile: (fileName): string => { // stub missing host functionality @@ -2841,8 +2849,11 @@ namespace ts { } function sourceFileUpToDate(sourceFile: SourceFile): boolean { + if (!sourceFile) { + return false; + } let path = sourceFile.path || toPath(sourceFile.fileName, currentDirectory, getCanonicalFileName); - return sourceFile && sourceFile.version === hostCache.getVersion(path); + return sourceFile.version === hostCache.getVersion(path); } function programUpToDate(): boolean { @@ -2902,13 +2913,6 @@ namespace ts { let targetSourceFile = getValidSourceFile(fileName); - // For JavaScript files, we don't want to report the normal typescript semantic errors. - // Instead, we just report errors for using TypeScript-only constructs from within a - // JavaScript file. - if (isSourceFileJavaScript(targetSourceFile)) { - return getJavaScriptSemanticDiagnostics(targetSourceFile); - } - // Only perform the action per file regardless of '-out' flag as LanguageServiceHost is expected to call this function per file. // Therefore only get diagnostics for given file. @@ -2922,163 +2926,6 @@ namespace ts { return concatenate(semanticDiagnostics, declarationDiagnostics); } - function getJavaScriptSemanticDiagnostics(sourceFile: SourceFile): Diagnostic[] { - let diagnostics: Diagnostic[] = []; - walk(sourceFile); - - return diagnostics; - - function walk(node: Node): boolean { - if (!node) { - return false; - } - - switch (node.kind) { - case SyntaxKind.ImportEqualsDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.import_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.ExportAssignment: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.ClassDeclaration: - let classDeclaration = node; - if (checkModifiers(classDeclaration.modifiers) || - checkTypeParameters(classDeclaration.typeParameters)) { - return true; - } - break; - case SyntaxKind.HeritageClause: - let heritageClause = node; - if (heritageClause.token === SyntaxKind.ImplementsKeyword) { - diagnostics.push(createDiagnosticForNode(node, Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); - return true; - } - break; - case SyntaxKind.InterfaceDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.ModuleDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.TypeAliasDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.MethodDeclaration: - case SyntaxKind.MethodSignature: - case SyntaxKind.Constructor: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.FunctionExpression: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.ArrowFunction: - case SyntaxKind.FunctionDeclaration: - let functionDeclaration = node; - if (checkModifiers(functionDeclaration.modifiers) || - checkTypeParameters(functionDeclaration.typeParameters) || - checkTypeAnnotation(functionDeclaration.type)) { - return true; - } - break; - case SyntaxKind.VariableStatement: - let variableStatement = node; - if (checkModifiers(variableStatement.modifiers)) { - return true; - } - break; - case SyntaxKind.VariableDeclaration: - let variableDeclaration = node; - if (checkTypeAnnotation(variableDeclaration.type)) { - return true; - } - break; - case SyntaxKind.CallExpression: - case SyntaxKind.NewExpression: - let expression = node; - if (expression.typeArguments && expression.typeArguments.length > 0) { - let start = expression.typeArguments.pos; - diagnostics.push(createFileDiagnostic(sourceFile, start, expression.typeArguments.end - start, - Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); - return true; - } - break; - case SyntaxKind.Parameter: - let parameter = node; - if (parameter.modifiers) { - let start = parameter.modifiers.pos; - diagnostics.push(createFileDiagnostic(sourceFile, start, parameter.modifiers.end - start, - Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); - return true; - } - if (parameter.questionToken) { - diagnostics.push(createDiagnosticForNode(parameter.questionToken, Diagnostics._0_can_only_be_used_in_a_ts_file, '?')); - return true; - } - if (parameter.type) { - diagnostics.push(createDiagnosticForNode(parameter.type, Diagnostics.types_can_only_be_used_in_a_ts_file)); - return true; - } - break; - case SyntaxKind.PropertyDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.property_declarations_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.EnumDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.TypeAssertionExpression: - let typeAssertionExpression = node; - diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); - return true; - case SyntaxKind.Decorator: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.decorators_can_only_be_used_in_a_ts_file)); - return true; - } - - return forEachChild(node, walk); - } - - function checkTypeParameters(typeParameters: NodeArray): boolean { - if (typeParameters) { - let start = typeParameters.pos; - diagnostics.push(createFileDiagnostic(sourceFile, start, typeParameters.end - start, Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); - return true; - } - return false; - } - - function checkTypeAnnotation(type: TypeNode): boolean { - if (type) { - diagnostics.push(createDiagnosticForNode(type, Diagnostics.types_can_only_be_used_in_a_ts_file)); - return true; - } - - return false; - } - - function checkModifiers(modifiers: ModifiersArray): boolean { - if (modifiers) { - for (let modifier of modifiers) { - switch (modifier.kind) { - case SyntaxKind.PublicKeyword: - case SyntaxKind.PrivateKeyword: - case SyntaxKind.ProtectedKeyword: - case SyntaxKind.DeclareKeyword: - diagnostics.push(createDiagnosticForNode(modifier, Diagnostics._0_can_only_be_used_in_a_ts_file, tokenToString(modifier.kind))); - return true; - - // These are all legal modifiers. - case SyntaxKind.StaticKeyword: - case SyntaxKind.ExportKeyword: - case SyntaxKind.ConstKeyword: - case SyntaxKind.DefaultKeyword: - case SyntaxKind.AbstractKeyword: - } - } - } - - return false; - } - } - function getCompilerOptionsDiagnostics() { synchronizeHostData(); return program.getOptionsDiagnostics(cancellationToken).concat( @@ -3158,7 +3005,7 @@ namespace ts { log("getCompletionData: Is inside comment: " + (new Date().getTime() - start)); if (insideComment) { - // The current position is next to the '@' sign, when no tag name being provided yet. + // The current position is next to the '@' sign, when no tag name being provided yet. // Provide a full list of tag names if (hasDocComment(sourceFile, position) && sourceFile.text.charCodeAt(position - 1) === CharacterCodes.at) { isJsDocTagName = true; @@ -3191,7 +3038,7 @@ namespace ts { } if (!insideJsDocTagExpression) { - // Proceed if the current position is in jsDoc tag expression; otherwise it is a normal + // Proceed if the current position is in jsDoc tag expression; otherwise it is a normal // comment or the plain text part of a jsDoc comment, so no completion should be available log("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment."); return undefined; @@ -3526,6 +3373,7 @@ namespace ts { function isInStringOrRegularExpressionOrTemplateLiteral(contextToken: Node): boolean { if (contextToken.kind === SyntaxKind.StringLiteral + || contextToken.kind === SyntaxKind.StringLiteralType || contextToken.kind === SyntaxKind.RegularExpressionLiteral || isTemplateLiteralKind(contextToken.kind)) { let start = contextToken.getStart(); @@ -3712,8 +3560,8 @@ namespace ts { case SyntaxKind.CloseBraceToken: if (parent && - parent.kind === SyntaxKind.JsxExpression && - parent.parent && + parent.kind === SyntaxKind.JsxExpression && + parent.parent && (parent.parent.kind === SyntaxKind.JsxAttribute)) { return parent.parent.parent; } @@ -3762,7 +3610,7 @@ namespace ts { containingNodeKind === SyntaxKind.InterfaceDeclaration || // interface Am).propertyName) { - existingName = (m).propertyName.text; + // include only identifiers in completion list + if ((m).propertyName.kind === SyntaxKind.Identifier) { + existingName = ((m).propertyName).text + } } else { // TODO(jfreeman): Account for computed property name @@ -3973,7 +3824,7 @@ namespace ts { let sourceFile = getValidSourceFile(fileName); let entries: CompletionEntry[] = []; - + if (isRightOfDot && isSourceFileJavaScript(sourceFile)) { const uniqueNames = getCompletionEntriesFromSymbols(symbols, entries); addRange(entries, getJavaScriptCompletionEntries(sourceFile, uniqueNames)); @@ -4398,28 +4249,31 @@ namespace ts { } else { // Method/function type parameter - let container = getContainingFunction(location); - if (container) { - let signatureDeclaration = getDeclarationOfKind(symbol, SyntaxKind.TypeParameter).parent; - let signature = typeChecker.getSignatureFromDeclaration(signatureDeclaration); - if (signatureDeclaration.kind === SyntaxKind.ConstructSignature) { - displayParts.push(keywordPart(SyntaxKind.NewKeyword)); - displayParts.push(spacePart()); + let declaration = getDeclarationOfKind(symbol, SyntaxKind.TypeParameter); + Debug.assert(declaration !== undefined); + declaration = declaration.parent; + + if (declaration) { + if (isFunctionLikeKind(declaration.kind)) { + const signature = typeChecker.getSignatureFromDeclaration(declaration); + if (declaration.kind === SyntaxKind.ConstructSignature) { + displayParts.push(keywordPart(SyntaxKind.NewKeyword)); + displayParts.push(spacePart()); + } + else if (declaration.kind !== SyntaxKind.CallSignature && (declaration).name) { + addFullSymbolName(declaration.symbol); + } + addRange(displayParts, signatureToDisplayParts(typeChecker, signature, sourceFile, TypeFormatFlags.WriteTypeArgumentsOfSignature)); } - else if (signatureDeclaration.kind !== SyntaxKind.CallSignature && signatureDeclaration.name) { - addFullSymbolName(signatureDeclaration.symbol); + else { + // Type alias type parameter + // For example + // type list = T[]; // Both T will go through same code path + displayParts.push(keywordPart(SyntaxKind.TypeKeyword)); + displayParts.push(spacePart()); + addFullSymbolName(declaration.symbol); + writeTypeParametersOfSymbol(declaration.symbol, sourceFile); } - addRange(displayParts, signatureToDisplayParts(typeChecker, signature, sourceFile, TypeFormatFlags.WriteTypeArgumentsOfSignature)); - } - else { - // Type aliash type parameter - // For example - // type list = T[]; // Both T will go through same code path - let declaration = getDeclarationOfKind(symbol, SyntaxKind.TypeParameter).parent; - displayParts.push(keywordPart(SyntaxKind.TypeKeyword)); - displayParts.push(spacePart()); - addFullSymbolName(declaration.symbol); - writeTypeParametersOfSymbol(declaration.symbol, sourceFile); } } } @@ -4592,6 +4446,7 @@ namespace ts { case SyntaxKind.PropertyAccessExpression: case SyntaxKind.QualifiedName: case SyntaxKind.ThisKeyword: + case SyntaxKind.ThisType: case SyntaxKind.SuperKeyword: // For the identifiers/this/super etc get the type at position let type = typeChecker.getTypeAtLocation(node); @@ -4863,6 +4718,7 @@ namespace ts { function getSemanticDocumentHighlights(node: Node): DocumentHighlights[] { if (node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ThisKeyword || + node.kind === SyntaxKind.ThisType || node.kind === SyntaxKind.SuperKeyword || isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) { @@ -4994,7 +4850,7 @@ namespace ts { } break; default: - if (isModifier(node.kind) && node.parent && + if (isModifierKind(node.kind) && node.parent && (isDeclaration(node.parent) || node.parent.kind === SyntaxKind.VariableStatement)) { return getModifierOccurrences(node.kind, node.parent); } @@ -5558,7 +5414,7 @@ namespace ts { } } - if (node.kind === SyntaxKind.ThisKeyword) { + if (node.kind === SyntaxKind.ThisKeyword || node.kind === SyntaxKind.ThisType) { return getReferencesForThisKeyword(node, sourceFiles); } @@ -6040,7 +5896,7 @@ namespace ts { cancellationToken.throwIfCancellationRequested(); let node = getTouchingWord(sourceFile, position); - if (!node || node.kind !== SyntaxKind.ThisKeyword) { + if (!node || (node.kind !== SyntaxKind.ThisKeyword && node.kind !== SyntaxKind.ThisType)) { return; } @@ -6402,7 +6258,8 @@ namespace ts { return node.parent.kind === SyntaxKind.TypeReference || (node.parent.kind === SyntaxKind.ExpressionWithTypeArguments && !isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || - node.kind === SyntaxKind.ThisKeyword && !isExpression(node); + (node.kind === SyntaxKind.ThisKeyword && !isExpression(node)) || + node.kind === SyntaxKind.ThisType; } function isNamespaceReference(node: Node): boolean { @@ -6517,11 +6374,13 @@ namespace ts { case SyntaxKind.PropertyAccessExpression: case SyntaxKind.QualifiedName: case SyntaxKind.StringLiteral: + case SyntaxKind.StringLiteralType: case SyntaxKind.FalseKeyword: case SyntaxKind.TrueKeyword: case SyntaxKind.NullKeyword: case SyntaxKind.SuperKeyword: case SyntaxKind.ThisKeyword: + case SyntaxKind.ThisType: case SyntaxKind.Identifier: break; @@ -6569,7 +6428,7 @@ namespace ts { function getNavigationBarItems(fileName: string): NavigationBarItem[] { let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return NavigationBar.getNavigationBarItems(sourceFile); + return NavigationBar.getNavigationBarItems(sourceFile, host.getCompilationSettings()); } function getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[] { @@ -6707,6 +6566,9 @@ namespace ts { case ClassificationType.typeAliasName: return ClassificationTypeNames.typeAliasName; case ClassificationType.parameterName: return ClassificationTypeNames.parameterName; case ClassificationType.docCommentTagName: return ClassificationTypeNames.docCommentTagName; + case ClassificationType.jsxOpenTagName: return ClassificationTypeNames.jsxOpenTagName; + case ClassificationType.jsxCloseTagName: return ClassificationTypeNames.jsxCloseTagName; + case ClassificationType.jsxSelfClosingTagName: return ClassificationTypeNames.jsxSelfClosingTagName; } } @@ -6974,7 +6836,7 @@ namespace ts { else if (tokenKind === SyntaxKind.NumericLiteral) { return ClassificationType.numericLiteral; } - else if (tokenKind === SyntaxKind.StringLiteral) { + else if (tokenKind === SyntaxKind.StringLiteral || tokenKind === SyntaxKind.StringLiteralType) { return ClassificationType.stringLiteral; } else if (tokenKind === SyntaxKind.RegularExpressionLiteral) { @@ -7019,6 +6881,23 @@ namespace ts { } return; + case SyntaxKind.JsxOpeningElement: + if ((token.parent).tagName === token) { + return ClassificationType.jsxOpenTagName; + } + return; + + case SyntaxKind.JsxClosingElement: + if ((token.parent).tagName === token) { + return ClassificationType.jsxCloseTagName; + } + return; + + case SyntaxKind.JsxSelfClosingElement: + if ((token.parent).tagName === token) { + return ClassificationType.jsxSelfClosingTagName; + } + return; } } @@ -7876,7 +7755,7 @@ namespace ts { addResult(start, end, classFromKind(token)); if (end >= text.length) { - if (token === SyntaxKind.StringLiteral) { + if (token === SyntaxKind.StringLiteral || token === SyntaxKind.StringLiteralType) { // Check to see if we finished up on a multiline string literal. let tokenText = scanner.getTokenText(); if (scanner.isUnterminated()) { @@ -8026,6 +7905,7 @@ namespace ts { case SyntaxKind.NumericLiteral: return ClassificationType.numericLiteral; case SyntaxKind.StringLiteral: + case SyntaxKind.StringLiteralType: return ClassificationType.stringLiteral; case SyntaxKind.RegularExpressionLiteral: return ClassificationType.regularExpressionLiteral; diff --git a/src/services/utilities.ts b/src/services/utilities.ts index a7198b4cc6d9f..b3b4ec31a02f0 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -257,14 +257,14 @@ namespace ts { return syntaxList; } - /* Gets the token whose text has range [start, end) and + /* Gets the token whose text has range [start, end) and * position >= start and (position < end or (position === end && token is keyword or identifier)) */ export function getTouchingWord(sourceFile: SourceFile, position: number): Node { return getTouchingToken(sourceFile, position, n => isWord(n.kind)); } - /* Gets the token whose text has range [start, end) and position >= start + /* Gets the token whose text has range [start, end) and position >= start * and (position < end or (position === end && token is keyword or identifier or numeric\string litera)) */ export function getTouchingPropertyName(sourceFile: SourceFile, position: number): Node { @@ -391,8 +391,8 @@ namespace ts { const start = child.getStart(sourceFile); const lookInPreviousChild = (start >= position) || // cursor in the leading trivia - (child.kind === SyntaxKind.JsxText && start === child.end); // whitespace only JsxText - + (child.kind === SyntaxKind.JsxText && start === child.end); // whitespace only JsxText + if (lookInPreviousChild) { // actual start of the node is past the position - previous token should be at the end of previous child let candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ i); @@ -407,7 +407,7 @@ namespace ts { Debug.assert(startNode !== undefined || n.kind === SyntaxKind.SourceFile); - // Here we know that none of child token nodes embrace the position, + // Here we know that none of child token nodes embrace the position, // the only known case is when position is at the end of the file. // Try to find the rightmost token in the file without filtering. // Namely we are skipping the check: 'position < node.end' @@ -429,7 +429,7 @@ namespace ts { export function isInString(sourceFile: SourceFile, position: number) { let token = getTokenAtPosition(sourceFile, position); - return token && token.kind === SyntaxKind.StringLiteral && position > token.getStart(); + return token && (token.kind === SyntaxKind.StringLiteral || token.kind === SyntaxKind.StringLiteralType) && position > token.getStart(); } export function isInComment(sourceFile: SourceFile, position: number) { @@ -445,7 +445,7 @@ namespace ts { if (token && position <= token.getStart()) { let commentRanges = getLeadingCommentRanges(sourceFile.text, token.pos); - + // The end marker of a single-line comment does not include the newline character. // In the following case, we are inside a comment (^ denotes the cursor position): // @@ -565,6 +565,7 @@ namespace ts { export function isStringOrRegularExpressionOrTemplateLiteral(kind: SyntaxKind): boolean { if (kind === SyntaxKind.StringLiteral + || kind === SyntaxKind.StringLiteralType || kind === SyntaxKind.RegularExpressionLiteral || isTemplateLiteralKind(kind)) { return true; diff --git a/tests/baselines/reference/APISample_compile.js b/tests/baselines/reference/APISample_compile.js index 694730e61c4b3..3830e53697c72 100644 --- a/tests/baselines/reference/APISample_compile.js +++ b/tests/baselines/reference/APISample_compile.js @@ -40,6 +40,7 @@ compile(process.argv.slice(2), { at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler * Please log a "breaking change" issue for any API breaking change affecting this issue */ +"use strict"; var ts = require("typescript"); function compile(fileNames, options) { var program = ts.createProgram(fileNames, options); diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index b7b2a93ba87b0..62b201976cd22 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -70,6 +70,7 @@ fileNames.forEach(fileName => { at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#traversing-the-ast-with-a-little-linter * Please log a "breaking change" issue for any API breaking change affecting this issue */ +"use strict"; var ts = require("typescript"); function delint(sourceFile) { delintNode(sourceFile); diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index 0f22b8486dc4b..b0783d42a0615 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -22,6 +22,7 @@ console.log(JSON.stringify(result)); at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-simple-transform-function * Please log a "breaking change" issue for any API breaking change affecting this issue */ +"use strict"; var ts = require("typescript"); var source = "let x: string = 'string'"; var result = ts.transpile(source, { module: ts.ModuleKind.CommonJS }); diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index 0b31ca3c7bfe8..1b6d52255fbef 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -109,6 +109,7 @@ watch(currentDirectoryFiles, { module: ts.ModuleKind.CommonJS }); at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#incremental-build-support-using-the-language-services * Please log a "breaking change" issue for any API breaking change affecting this issue */ +"use strict"; var ts = require("typescript"); function watch(rootFileNames, options) { var files = {}; diff --git a/tests/baselines/reference/ES5For-of8.js.map b/tests/baselines/reference/ES5For-of8.js.map index be14106e77c3b..f4e62e46e18ba 100644 --- a/tests/baselines/reference/ES5For-of8.js.map +++ b/tests/baselines/reference/ES5For-of8.js.map @@ -1,2 +1,2 @@ //// [ES5For-of8.js.map] -{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":["foo"],"mappings":"AAAA;IACIA,MAAMA,CAACA,EAAEA,CAACA,EAAEA,CAACA,EAAEA,CAACA;AACpBA,CAACA;AACD,GAAG,CAAC,CAAY,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAA1B,cAAO,EAAP,IAA0B,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,SAAA;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"} \ No newline at end of file +{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":[],"mappings":"AAAA;IACI,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACpB,CAAC;AACD,GAAG,CAAC,CAAY,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAA1B,cAAO,EAAP,IAA0B,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,SAAA;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of8.sourcemap.txt b/tests/baselines/reference/ES5For-of8.sourcemap.txt index 814f4364dc689..7a87dbf3998ea 100644 --- a/tests/baselines/reference/ES5For-of8.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of8.sourcemap.txt @@ -34,15 +34,15 @@ sourceFile:ES5For-of8.ts 7 > 0 8 > } 9 > ; -1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) name (foo) -2 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) name (foo) -3 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) name (foo) -4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) name (foo) -5 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) name (foo) -6 >Emitted(2, 17) Source(2, 17) + SourceIndex(0) name (foo) -7 >Emitted(2, 18) Source(2, 18) + SourceIndex(0) name (foo) -8 >Emitted(2, 20) Source(2, 20) + SourceIndex(0) name (foo) -9 >Emitted(2, 21) Source(2, 21) + SourceIndex(0) name (foo) +1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) +3 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) +4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) +5 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) +6 >Emitted(2, 17) Source(2, 17) + SourceIndex(0) +7 >Emitted(2, 18) Source(2, 18) + SourceIndex(0) +8 >Emitted(2, 20) Source(2, 20) + SourceIndex(0) +9 >Emitted(2, 21) Source(2, 21) + SourceIndex(0) --- >>>} 1 > @@ -51,8 +51,8 @@ sourceFile:ES5For-of8.ts 1 > > 2 >} -1 >Emitted(3, 1) Source(3, 1) + SourceIndex(0) name (foo) -2 >Emitted(3, 2) Source(3, 2) + SourceIndex(0) name (foo) +1 >Emitted(3, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(3, 2) Source(3, 2) + SourceIndex(0) --- >>>for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) { 1-> diff --git a/tests/baselines/reference/ExportAssignment7.js b/tests/baselines/reference/ExportAssignment7.js index ce4f5d7bf09c0..ae534c9255b6e 100644 --- a/tests/baselines/reference/ExportAssignment7.js +++ b/tests/baselines/reference/ExportAssignment7.js @@ -5,6 +5,7 @@ export class C { export = B; //// [ExportAssignment7.js] +"use strict"; var C = (function () { function C() { } diff --git a/tests/baselines/reference/ExportAssignment8.js b/tests/baselines/reference/ExportAssignment8.js index 2f7ac9ee69f7d..be95e66948379 100644 --- a/tests/baselines/reference/ExportAssignment8.js +++ b/tests/baselines/reference/ExportAssignment8.js @@ -5,6 +5,7 @@ export class C { } //// [ExportAssignment8.js] +"use strict"; var C = (function () { function C() { } diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js index c7f55d0a2df4b..d6bcc74154245 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js @@ -30,6 +30,7 @@ export module A { //// [part1.js] +"use strict"; var A; (function (A) { var Utils; @@ -42,6 +43,7 @@ var A; A.Origin = { x: 0, y: 0 }; })(A = exports.A || (exports.A = {})); //// [part2.js] +"use strict"; var A; (function (A) { // collision with 'Origin' var in other part of merged module diff --git a/tests/baselines/reference/aliasAssignments.js b/tests/baselines/reference/aliasAssignments.js index 5283fe1bd9982..0c6ac09a382e0 100644 --- a/tests/baselines/reference/aliasAssignments.js +++ b/tests/baselines/reference/aliasAssignments.js @@ -14,6 +14,7 @@ y = moduleA; // should be error //// [aliasAssignments_moduleA.js] +"use strict"; var someClass = (function () { function someClass() { } @@ -21,6 +22,7 @@ var someClass = (function () { })(); exports.someClass = someClass; //// [aliasAssignments_1.js] +"use strict"; var moduleA = require("./aliasAssignments_moduleA"); var x = moduleA; x = 1; // Should be error diff --git a/tests/baselines/reference/aliasOnMergedModuleInterface.js b/tests/baselines/reference/aliasOnMergedModuleInterface.js index 2bd80be86342f..ee9562e7b7751 100644 --- a/tests/baselines/reference/aliasOnMergedModuleInterface.js +++ b/tests/baselines/reference/aliasOnMergedModuleInterface.js @@ -23,6 +23,7 @@ var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be err //// [aliasOnMergedModuleInterface_0.js] //// [aliasOnMergedModuleInterface_1.js] +"use strict"; var z; z.bar("hello"); // This should be ok var x = foo.bar("hello"); // foo.A should be ok but foo.bar should be error diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index bf7a7280f35a8..d067ca1c00aeb 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -28,6 +28,7 @@ class C2 { } //// [aliasUsage1_backbone.js] +"use strict"; var Model = (function () { function Model() { } @@ -35,6 +36,7 @@ var Model = (function () { })(); exports.Model = Model; //// [aliasUsage1_moduleA.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } @@ -50,6 +52,7 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [aliasUsage1_main.js] +"use strict"; var moduleA = require("./aliasUsage1_moduleA"); var C2 = (function () { function C2() { diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index 108407345b72b..183a885b3c640 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -22,6 +22,7 @@ var xs: IHasVisualizationModel[] = [moduleA]; var xs2: typeof moduleA[] = [moduleA]; //// [aliasUsageInArray_backbone.js] +"use strict"; var Model = (function () { function Model() { } @@ -29,6 +30,7 @@ var Model = (function () { })(); exports.Model = Model; //// [aliasUsageInArray_moduleA.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } @@ -44,6 +46,7 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [aliasUsageInArray_main.js] +"use strict"; var moduleA = require("./aliasUsageInArray_moduleA"); var xs = [moduleA]; var xs2 = [moduleA]; diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index 4229491c4c529..584c894cbad5d 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -21,6 +21,7 @@ var f = (x: IHasVisualizationModel) => x; f = (x) => moduleA; //// [aliasUsageInFunctionExpression_backbone.js] +"use strict"; var Model = (function () { function Model() { } @@ -28,6 +29,7 @@ var Model = (function () { })(); exports.Model = Model; //// [aliasUsageInFunctionExpression_moduleA.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } @@ -43,6 +45,7 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [aliasUsageInFunctionExpression_main.js] +"use strict"; var moduleA = require("./aliasUsageInFunctionExpression_moduleA"); var f = function (x) { return x; }; f = function (x) { return moduleA; }; diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index 7091c6d27c6f7..fe52d71bf3fca 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -25,6 +25,7 @@ var r2 = foo({ a: null }); //// [aliasUsageInGenericFunction_backbone.js] +"use strict"; var Model = (function () { function Model() { } @@ -32,6 +33,7 @@ var Model = (function () { })(); exports.Model = Model; //// [aliasUsageInGenericFunction_moduleA.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } @@ -47,6 +49,7 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [aliasUsageInGenericFunction_main.js] +"use strict"; var moduleA = require("./aliasUsageInGenericFunction_moduleA"); function foo(x) { return x; diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index 82490739687dc..e4448ef220faf 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -27,6 +27,7 @@ class N2 { } //// [aliasUsageInIndexerOfClass_backbone.js] +"use strict"; var Model = (function () { function Model() { } @@ -34,6 +35,7 @@ var Model = (function () { })(); exports.Model = Model; //// [aliasUsageInIndexerOfClass_moduleA.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } @@ -49,6 +51,7 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [aliasUsageInIndexerOfClass_main.js] +"use strict"; var moduleA = require("./aliasUsageInIndexerOfClass_moduleA"); var N = (function () { function N() { diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index f1bb99018df64..b0abd11b189e4 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -22,6 +22,7 @@ var b: { x: IHasVisualizationModel } = { x: moduleA }; var c: { y: { z: IHasVisualizationModel } } = { y: { z: moduleA } }; //// [aliasUsageInObjectLiteral_backbone.js] +"use strict"; var Model = (function () { function Model() { } @@ -29,6 +30,7 @@ var Model = (function () { })(); exports.Model = Model; //// [aliasUsageInObjectLiteral_moduleA.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } @@ -44,6 +46,7 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [aliasUsageInObjectLiteral_main.js] +"use strict"; var moduleA = require("./aliasUsageInObjectLiteral_moduleA"); var a = { x: moduleA }; var b = { x: moduleA }; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index 817ad95aaea50..ff8543bca7682 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -25,6 +25,7 @@ var e: { x: IHasVisualizationModel } = <{ x: IHasVisualizationModel }>null || { var f: { x: IHasVisualizationModel } = <{ x: IHasVisualizationModel }>null ? { x: moduleA } : null; //// [aliasUsageInOrExpression_backbone.js] +"use strict"; var Model = (function () { function Model() { } @@ -32,6 +33,7 @@ var Model = (function () { })(); exports.Model = Model; //// [aliasUsageInOrExpression_moduleA.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } @@ -47,6 +49,7 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [aliasUsageInOrExpression_main.js] +"use strict"; var moduleA = require("./aliasUsageInOrExpression_moduleA"); var i; var d1 = i || moduleA; diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 270a2807319b6..cf256e010eeab 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -25,6 +25,7 @@ class D extends C { } //// [aliasUsageInTypeArgumentOfExtendsClause_backbone.js] +"use strict"; var Model = (function () { function Model() { } @@ -32,6 +33,7 @@ var Model = (function () { })(); exports.Model = Model; //// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } @@ -47,6 +49,7 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [aliasUsageInTypeArgumentOfExtendsClause_main.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index f7949348cdd9f..8117aca8c355b 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -21,6 +21,7 @@ var i: IHasVisualizationModel; var m: typeof moduleA = i; //// [aliasUsageInVarAssignment_backbone.js] +"use strict"; var Model = (function () { function Model() { } @@ -28,6 +29,7 @@ var Model = (function () { })(); exports.Model = Model; //// [aliasUsageInVarAssignment_moduleA.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } @@ -43,5 +45,6 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [aliasUsageInVarAssignment_main.js] +"use strict"; var i; var m = i; diff --git a/tests/baselines/reference/aliasUsedAsNameValue.js b/tests/baselines/reference/aliasUsedAsNameValue.js index 9893eae6e1c01..9495f8890b66b 100644 --- a/tests/baselines/reference/aliasUsedAsNameValue.js +++ b/tests/baselines/reference/aliasUsedAsNameValue.js @@ -19,10 +19,13 @@ export var a = function () { //// [aliasUsedAsNameValue_0.js] +"use strict"; //// [aliasUsedAsNameValue_1.js] +"use strict"; function b(a) { return null; } exports.b = b; //// [aliasUsedAsNameValue_2.js] +"use strict"; /// /// var mod = require("./aliasUsedAsNameValue_0"); diff --git a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.js b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.js index 19534b279c020..8304be3a036d3 100644 --- a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.js +++ b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.js @@ -11,5 +11,7 @@ import moduleA = require("./aliasWithInterfaceExportAssignmentUsedInVarInitializ var d = b.q3; //// [aliasWithInterfaceExportAssignmentUsedInVarInitializer_0.js] +"use strict"; //// [aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.js] +"use strict"; var d = b.q3; diff --git a/tests/baselines/reference/aliasesInSystemModule1.js b/tests/baselines/reference/aliasesInSystemModule1.js index 05f74aef85266..43037c7634ca4 100644 --- a/tests/baselines/reference/aliasesInSystemModule1.js +++ b/tests/baselines/reference/aliasesInSystemModule1.js @@ -18,6 +18,7 @@ module M { //// [aliasesInSystemModule1.js] System.register(['foo'], function(exports_1) { + "use strict"; var alias; var cls, cls2, x, y, z, M; return { diff --git a/tests/baselines/reference/aliasesInSystemModule2.js b/tests/baselines/reference/aliasesInSystemModule2.js index 32d663a11e145..7effb2721be29 100644 --- a/tests/baselines/reference/aliasesInSystemModule2.js +++ b/tests/baselines/reference/aliasesInSystemModule2.js @@ -17,6 +17,7 @@ module M { //// [aliasesInSystemModule2.js] System.register(["foo"], function(exports_1) { + "use strict"; var foo_1; var cls, cls2, x, y, z, M; return { diff --git a/tests/baselines/reference/allowSyntheticDefaultImports1.js b/tests/baselines/reference/allowSyntheticDefaultImports1.js new file mode 100644 index 0000000000000..699880f930ccb --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports1.js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/allowSyntheticDefaultImports1.ts] //// + +//// [a.ts] +import Namespace from "./b"; +export var x = new Namespace.Foo(); + +//// [b.ts] +export class Foo { + member: string; +} + + +//// [b.js] +"use strict"; +var Foo = (function () { + function Foo() { + } + return Foo; +})(); +exports.Foo = Foo; +//// [a.js] +"use strict"; +var b_1 = require("./b"); +exports.x = new b_1["default"].Foo(); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports1.symbols b/tests/baselines/reference/allowSyntheticDefaultImports1.symbols new file mode 100644 index 0000000000000..d88a79e1bf27e --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports1.symbols @@ -0,0 +1,18 @@ +=== tests/cases/compiler/a.ts === +import Namespace from "./b"; +>Namespace : Symbol(Namespace, Decl(a.ts, 0, 6)) + +export var x = new Namespace.Foo(); +>x : Symbol(x, Decl(a.ts, 1, 10)) +>Namespace.Foo : Symbol(Namespace.Foo, Decl(b.ts, 0, 0)) +>Namespace : Symbol(Namespace, Decl(a.ts, 0, 6)) +>Foo : Symbol(Namespace.Foo, Decl(b.ts, 0, 0)) + +=== tests/cases/compiler/b.ts === +export class Foo { +>Foo : Symbol(Foo, Decl(b.ts, 0, 0)) + + member: string; +>member : Symbol(member, Decl(b.ts, 0, 18)) +} + diff --git a/tests/baselines/reference/allowSyntheticDefaultImports1.types b/tests/baselines/reference/allowSyntheticDefaultImports1.types new file mode 100644 index 0000000000000..c2265d7611b38 --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports1.types @@ -0,0 +1,19 @@ +=== tests/cases/compiler/a.ts === +import Namespace from "./b"; +>Namespace : typeof Namespace + +export var x = new Namespace.Foo(); +>x : Namespace.Foo +>new Namespace.Foo() : Namespace.Foo +>Namespace.Foo : typeof Namespace.Foo +>Namespace : typeof Namespace +>Foo : typeof Namespace.Foo + +=== tests/cases/compiler/b.ts === +export class Foo { +>Foo : Foo + + member: string; +>member : string +} + diff --git a/tests/baselines/reference/allowSyntheticDefaultImports2.js b/tests/baselines/reference/allowSyntheticDefaultImports2.js new file mode 100644 index 0000000000000..d21750c65fc31 --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports2.js @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/allowSyntheticDefaultImports2.ts] //// + +//// [a.ts] +import Namespace from "./b"; +export var x = new Namespace.Foo(); + +//// [b.ts] +export class Foo { + member: string; +} + +//// [b.js] +System.register([], function(exports_1) { + "use strict"; + var Foo; + return { + setters:[], + execute: function() { + Foo = (function () { + function Foo() { + } + return Foo; + })(); + exports_1("Foo", Foo); + } + } +}); +//// [a.js] +System.register(["./b"], function(exports_1) { + "use strict"; + var b_1; + var x; + return { + setters:[ + function (b_1_1) { + b_1 = b_1_1; + }], + execute: function() { + exports_1("x", x = new b_1["default"].Foo()); + } + } +}); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports2.symbols b/tests/baselines/reference/allowSyntheticDefaultImports2.symbols new file mode 100644 index 0000000000000..cea6145fbd607 --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports2.symbols @@ -0,0 +1,17 @@ +=== tests/cases/compiler/a.ts === +import Namespace from "./b"; +>Namespace : Symbol(Namespace, Decl(a.ts, 0, 6)) + +export var x = new Namespace.Foo(); +>x : Symbol(x, Decl(a.ts, 1, 10)) +>Namespace.Foo : Symbol(Namespace.Foo, Decl(b.ts, 0, 0)) +>Namespace : Symbol(Namespace, Decl(a.ts, 0, 6)) +>Foo : Symbol(Namespace.Foo, Decl(b.ts, 0, 0)) + +=== tests/cases/compiler/b.ts === +export class Foo { +>Foo : Symbol(Foo, Decl(b.ts, 0, 0)) + + member: string; +>member : Symbol(member, Decl(b.ts, 0, 18)) +} diff --git a/tests/baselines/reference/allowSyntheticDefaultImports2.types b/tests/baselines/reference/allowSyntheticDefaultImports2.types new file mode 100644 index 0000000000000..c40fbc7e98859 --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports2.types @@ -0,0 +1,18 @@ +=== tests/cases/compiler/a.ts === +import Namespace from "./b"; +>Namespace : typeof Namespace + +export var x = new Namespace.Foo(); +>x : Namespace.Foo +>new Namespace.Foo() : Namespace.Foo +>Namespace.Foo : typeof Namespace.Foo +>Namespace : typeof Namespace +>Foo : typeof Namespace.Foo + +=== tests/cases/compiler/b.ts === +export class Foo { +>Foo : Foo + + member: string; +>member : string +} diff --git a/tests/baselines/reference/allowSyntheticDefaultImports3.errors.txt b/tests/baselines/reference/allowSyntheticDefaultImports3.errors.txt new file mode 100644 index 0000000000000..551355e5cce06 --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports3.errors.txt @@ -0,0 +1,14 @@ +tests/cases/compiler/a.ts(1,8): error TS1192: Module '"tests/cases/compiler/b"' has no default export. + + +==== tests/cases/compiler/a.ts (1 errors) ==== + import Namespace from "./b"; + ~~~~~~~~~ +!!! error TS1192: Module '"tests/cases/compiler/b"' has no default export. + export var x = new Namespace.Foo(); + +==== tests/cases/compiler/b.ts (0 errors) ==== + export class Foo { + member: string; + } + \ No newline at end of file diff --git a/tests/baselines/reference/allowSyntheticDefaultImports3.js b/tests/baselines/reference/allowSyntheticDefaultImports3.js new file mode 100644 index 0000000000000..8864a28e7960d --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports3.js @@ -0,0 +1,43 @@ +//// [tests/cases/compiler/allowSyntheticDefaultImports3.ts] //// + +//// [a.ts] +import Namespace from "./b"; +export var x = new Namespace.Foo(); + +//// [b.ts] +export class Foo { + member: string; +} + + +//// [b.js] +System.register([], function(exports_1) { + "use strict"; + var Foo; + return { + setters:[], + execute: function() { + Foo = (function () { + function Foo() { + } + return Foo; + })(); + exports_1("Foo", Foo); + } + } +}); +//// [a.js] +System.register(["./b"], function(exports_1) { + "use strict"; + var b_1; + var x; + return { + setters:[ + function (b_1_1) { + b_1 = b_1_1; + }], + execute: function() { + exports_1("x", x = new b_1["default"].Foo()); + } + } +}); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports4.js b/tests/baselines/reference/allowSyntheticDefaultImports4.js new file mode 100644 index 0000000000000..747f59dc904fd --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports4.js @@ -0,0 +1,17 @@ +//// [tests/cases/compiler/allowSyntheticDefaultImports4.ts] //// + +//// [b.d.ts] +declare class Foo { + member: string; +} +export = Foo; + +//// [a.ts] +import Foo from "./b"; +export var x = new Foo(); + + +//// [a.js] +"use strict"; +var b_1 = require("./b"); +exports.x = new b_1["default"](); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports4.symbols b/tests/baselines/reference/allowSyntheticDefaultImports4.symbols new file mode 100644 index 0000000000000..8edad006c2dd5 --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports4.symbols @@ -0,0 +1,18 @@ +=== tests/cases/compiler/b.d.ts === +declare class Foo { +>Foo : Symbol(Foo, Decl(b.d.ts, 0, 0)) + + member: string; +>member : Symbol(member, Decl(b.d.ts, 0, 19)) +} +export = Foo; +>Foo : Symbol(Foo, Decl(b.d.ts, 0, 0)) + +=== tests/cases/compiler/a.ts === +import Foo from "./b"; +>Foo : Symbol(Foo, Decl(a.ts, 0, 6)) + +export var x = new Foo(); +>x : Symbol(x, Decl(a.ts, 1, 10)) +>Foo : Symbol(Foo, Decl(a.ts, 0, 6)) + diff --git a/tests/baselines/reference/allowSyntheticDefaultImports4.types b/tests/baselines/reference/allowSyntheticDefaultImports4.types new file mode 100644 index 0000000000000..5922abeb43f77 --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports4.types @@ -0,0 +1,19 @@ +=== tests/cases/compiler/b.d.ts === +declare class Foo { +>Foo : Foo + + member: string; +>member : string +} +export = Foo; +>Foo : Foo + +=== tests/cases/compiler/a.ts === +import Foo from "./b"; +>Foo : typeof Foo + +export var x = new Foo(); +>x : Foo +>new Foo() : Foo +>Foo : typeof Foo + diff --git a/tests/baselines/reference/allowSyntheticDefaultImports5.js b/tests/baselines/reference/allowSyntheticDefaultImports5.js new file mode 100644 index 0000000000000..c9121512b610c --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports5.js @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/allowSyntheticDefaultImports5.ts] //// + +//// [b.d.ts] +declare class Foo { + member: string; +} +export = Foo; + +//// [a.ts] +import Foo from "./b"; +export var x = new Foo(); + + +//// [a.js] +System.register(["./b"], function(exports_1) { + "use strict"; + var b_1; + var x; + return { + setters:[ + function (b_1_1) { + b_1 = b_1_1; + }], + execute: function() { + exports_1("x", x = new b_1["default"]()); + } + } +}); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports5.symbols b/tests/baselines/reference/allowSyntheticDefaultImports5.symbols new file mode 100644 index 0000000000000..8edad006c2dd5 --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports5.symbols @@ -0,0 +1,18 @@ +=== tests/cases/compiler/b.d.ts === +declare class Foo { +>Foo : Symbol(Foo, Decl(b.d.ts, 0, 0)) + + member: string; +>member : Symbol(member, Decl(b.d.ts, 0, 19)) +} +export = Foo; +>Foo : Symbol(Foo, Decl(b.d.ts, 0, 0)) + +=== tests/cases/compiler/a.ts === +import Foo from "./b"; +>Foo : Symbol(Foo, Decl(a.ts, 0, 6)) + +export var x = new Foo(); +>x : Symbol(x, Decl(a.ts, 1, 10)) +>Foo : Symbol(Foo, Decl(a.ts, 0, 6)) + diff --git a/tests/baselines/reference/allowSyntheticDefaultImports5.types b/tests/baselines/reference/allowSyntheticDefaultImports5.types new file mode 100644 index 0000000000000..5922abeb43f77 --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports5.types @@ -0,0 +1,19 @@ +=== tests/cases/compiler/b.d.ts === +declare class Foo { +>Foo : Foo + + member: string; +>member : string +} +export = Foo; +>Foo : Foo + +=== tests/cases/compiler/a.ts === +import Foo from "./b"; +>Foo : typeof Foo + +export var x = new Foo(); +>x : Foo +>new Foo() : Foo +>Foo : typeof Foo + diff --git a/tests/baselines/reference/allowSyntheticDefaultImports6.errors.txt b/tests/baselines/reference/allowSyntheticDefaultImports6.errors.txt new file mode 100644 index 0000000000000..80b9cf8d074ab --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports6.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/a.ts(1,8): error TS1192: Module '"tests/cases/compiler/b"' has no default export. + + +==== tests/cases/compiler/b.d.ts (0 errors) ==== + declare class Foo { + member: string; + } + export = Foo; + +==== tests/cases/compiler/a.ts (1 errors) ==== + import Foo from "./b"; + ~~~ +!!! error TS1192: Module '"tests/cases/compiler/b"' has no default export. + export var x = new Foo(); + \ No newline at end of file diff --git a/tests/baselines/reference/allowSyntheticDefaultImports6.js b/tests/baselines/reference/allowSyntheticDefaultImports6.js new file mode 100644 index 0000000000000..64d52e70af9d7 --- /dev/null +++ b/tests/baselines/reference/allowSyntheticDefaultImports6.js @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/allowSyntheticDefaultImports6.ts] //// + +//// [b.d.ts] +declare class Foo { + member: string; +} +export = Foo; + +//// [a.ts] +import Foo from "./b"; +export var x = new Foo(); + + +//// [a.js] +System.register(["./b"], function(exports_1) { + "use strict"; + var b_1; + var x; + return { + setters:[ + function (b_1_1) { + b_1 = b_1_1; + }], + execute: function() { + exports_1("x", x = new b_1["default"]()); + } + } +}); diff --git a/tests/baselines/reference/ambientClassDeclarationWithExtends.js b/tests/baselines/reference/ambientClassDeclarationWithExtends.js index 5fd4d5b4b28ea..940efb8899f86 100644 --- a/tests/baselines/reference/ambientClassDeclarationWithExtends.js +++ b/tests/baselines/reference/ambientClassDeclarationWithExtends.js @@ -1,6 +1,40 @@ -//// [ambientClassDeclarationWithExtends.ts] +//// [tests/cases/compiler/ambientClassDeclarationWithExtends.ts] //// + +//// [ambientClassDeclarationExtends_singleFile.ts] declare class A { } declare class B extends A { } + +declare class C { + public foo; +} +namespace D { var x; } +declare class D extends C { } + +var d: C = new D(); + +//// [ambientClassDeclarationExtends_file1.ts] + +declare class E { + public bar; +} +namespace F { var y; } + +//// [ambientClassDeclarationExtends_file2.ts] + +declare class F extends E { } +var f: E = new F(); -//// [ambientClassDeclarationWithExtends.js] +//// [ambientClassDeclarationExtends_singleFile.js] +var D; +(function (D) { + var x; +})(D || (D = {})); +var d = new D(); +//// [ambientClassDeclarationExtends_file1.js] +var F; +(function (F) { + var y; +})(F || (F = {})); +//// [ambientClassDeclarationExtends_file2.js] +var f = new F(); diff --git a/tests/baselines/reference/ambientClassDeclarationWithExtends.symbols b/tests/baselines/reference/ambientClassDeclarationWithExtends.symbols index 71d1e1a66d832..023ae6bf582c3 100644 --- a/tests/baselines/reference/ambientClassDeclarationWithExtends.symbols +++ b/tests/baselines/reference/ambientClassDeclarationWithExtends.symbols @@ -1,8 +1,50 @@ -=== tests/cases/compiler/ambientClassDeclarationWithExtends.ts === +=== tests/cases/compiler/ambientClassDeclarationExtends_singleFile.ts === declare class A { } ->A : Symbol(A, Decl(ambientClassDeclarationWithExtends.ts, 0, 0)) +>A : Symbol(A, Decl(ambientClassDeclarationExtends_singleFile.ts, 0, 0)) declare class B extends A { } ->B : Symbol(B, Decl(ambientClassDeclarationWithExtends.ts, 0, 19)) ->A : Symbol(A, Decl(ambientClassDeclarationWithExtends.ts, 0, 0)) +>B : Symbol(B, Decl(ambientClassDeclarationExtends_singleFile.ts, 0, 19)) +>A : Symbol(A, Decl(ambientClassDeclarationExtends_singleFile.ts, 0, 0)) + +declare class C { +>C : Symbol(C, Decl(ambientClassDeclarationExtends_singleFile.ts, 1, 29)) + + public foo; +>foo : Symbol(foo, Decl(ambientClassDeclarationExtends_singleFile.ts, 3, 17)) +} +namespace D { var x; } +>D : Symbol(D, Decl(ambientClassDeclarationExtends_singleFile.ts, 5, 1), Decl(ambientClassDeclarationExtends_singleFile.ts, 6, 22)) +>x : Symbol(x, Decl(ambientClassDeclarationExtends_singleFile.ts, 6, 17)) + +declare class D extends C { } +>D : Symbol(D, Decl(ambientClassDeclarationExtends_singleFile.ts, 5, 1), Decl(ambientClassDeclarationExtends_singleFile.ts, 6, 22)) +>C : Symbol(C, Decl(ambientClassDeclarationExtends_singleFile.ts, 1, 29)) + +var d: C = new D(); +>d : Symbol(d, Decl(ambientClassDeclarationExtends_singleFile.ts, 9, 3)) +>C : Symbol(C, Decl(ambientClassDeclarationExtends_singleFile.ts, 1, 29)) +>D : Symbol(D, Decl(ambientClassDeclarationExtends_singleFile.ts, 5, 1), Decl(ambientClassDeclarationExtends_singleFile.ts, 6, 22)) + +=== tests/cases/compiler/ambientClassDeclarationExtends_file1.ts === + +declare class E { +>E : Symbol(E, Decl(ambientClassDeclarationExtends_file1.ts, 0, 0)) + + public bar; +>bar : Symbol(bar, Decl(ambientClassDeclarationExtends_file1.ts, 1, 17)) +} +namespace F { var y; } +>F : Symbol(F, Decl(ambientClassDeclarationExtends_file1.ts, 3, 1), Decl(ambientClassDeclarationExtends_file2.ts, 0, 0)) +>y : Symbol(y, Decl(ambientClassDeclarationExtends_file1.ts, 4, 17)) + +=== tests/cases/compiler/ambientClassDeclarationExtends_file2.ts === + +declare class F extends E { } +>F : Symbol(F, Decl(ambientClassDeclarationExtends_file1.ts, 3, 1), Decl(ambientClassDeclarationExtends_file2.ts, 0, 0)) +>E : Symbol(E, Decl(ambientClassDeclarationExtends_file1.ts, 0, 0)) + +var f: E = new F(); +>f : Symbol(f, Decl(ambientClassDeclarationExtends_file2.ts, 2, 3)) +>E : Symbol(E, Decl(ambientClassDeclarationExtends_file1.ts, 0, 0)) +>F : Symbol(F, Decl(ambientClassDeclarationExtends_file1.ts, 3, 1), Decl(ambientClassDeclarationExtends_file2.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientClassDeclarationWithExtends.types b/tests/baselines/reference/ambientClassDeclarationWithExtends.types index 7609856882bed..c7f22eeb65fba 100644 --- a/tests/baselines/reference/ambientClassDeclarationWithExtends.types +++ b/tests/baselines/reference/ambientClassDeclarationWithExtends.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/ambientClassDeclarationWithExtends.ts === +=== tests/cases/compiler/ambientClassDeclarationExtends_singleFile.ts === declare class A { } >A : A @@ -6,3 +6,47 @@ declare class B extends A { } >B : B >A : A +declare class C { +>C : C + + public foo; +>foo : any +} +namespace D { var x; } +>D : typeof D +>x : any + +declare class D extends C { } +>D : D +>C : C + +var d: C = new D(); +>d : C +>C : C +>new D() : D +>D : typeof D + +=== tests/cases/compiler/ambientClassDeclarationExtends_file1.ts === + +declare class E { +>E : E + + public bar; +>bar : any +} +namespace F { var y; } +>F : typeof F +>y : any + +=== tests/cases/compiler/ambientClassDeclarationExtends_file2.ts === + +declare class F extends E { } +>F : F +>E : E + +var f: E = new F(); +>f : E +>E : E +>new F() : F +>F : typeof F + diff --git a/tests/baselines/reference/ambientDeclarationsExternal.js b/tests/baselines/reference/ambientDeclarationsExternal.js index 7d8491e00629f..42375bc1d09d9 100644 --- a/tests/baselines/reference/ambientDeclarationsExternal.js +++ b/tests/baselines/reference/ambientDeclarationsExternal.js @@ -27,6 +27,7 @@ var n: number; //// [decls.js] // Ambient external import declaration referencing ambient external module using top level module name //// [consumer.js] +"use strict"; // Ambient external module members are always exported with or without export keyword when module lacks export assignment var imp3 = require('equ2'); var n = imp3.x; diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.js b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.js index ea97c54213459..a089cea155b11 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.js +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.js @@ -13,6 +13,7 @@ var x = ext; //// [ambientExternalModuleInAnotherExternalModule.js] define(["require", "exports", "ext"], function (require, exports, ext) { + "use strict"; var D = (function () { function D() { } diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js index 8a3e15e7c7f46..bb0d3a907ae7c 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js @@ -3,4 +3,5 @@ export declare module "M" { } //// [ambientExternalModuleInsideNonAmbientExternalModule.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/ambientExternalModuleMerging.js b/tests/baselines/reference/ambientExternalModuleMerging.js index 1549b725d670f..217d7cb90c1a0 100644 --- a/tests/baselines/reference/ambientExternalModuleMerging.js +++ b/tests/baselines/reference/ambientExternalModuleMerging.js @@ -18,6 +18,7 @@ declare module "M" { //// [ambientExternalModuleMerging_use.js] define(["require", "exports", "M"], function (require, exports, M) { + "use strict"; // Should be strings var x = M.x; var y = M.y; diff --git a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.js b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.js index bfcde56cfed35..77d8e2d830dd9 100644 --- a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.js +++ b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.js @@ -21,5 +21,6 @@ var c = new A(); //// [ambientExternalModuleWithInternalImportDeclaration_0.js] //// [ambientExternalModuleWithInternalImportDeclaration_1.js] define(["require", "exports", 'M'], function (require, exports, A) { + "use strict"; var c = new A(); }); diff --git a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.js b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.js index db6be7be8fc76..158992234a2ee 100644 --- a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.js +++ b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.js @@ -20,5 +20,6 @@ var c = new A(); //// [ambientExternalModuleWithoutInternalImportDeclaration_0.js] //// [ambientExternalModuleWithoutInternalImportDeclaration_1.js] define(["require", "exports", 'M'], function (require, exports, A) { + "use strict"; var c = new A(); }); diff --git a/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js index 5db44bb1ce127..0e2d08ae07b17 100644 --- a/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js +++ b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js @@ -7,4 +7,5 @@ export declare module M { } //// [ambientInsideNonAmbientExternalModule.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/amdDependencyComment1.js b/tests/baselines/reference/amdDependencyComment1.js index ee4ed88ff74f0..2c0bdd551fa0a 100644 --- a/tests/baselines/reference/amdDependencyComment1.js +++ b/tests/baselines/reference/amdDependencyComment1.js @@ -6,5 +6,6 @@ m1.f(); //// [amdDependencyComment1.js] /// +"use strict"; var m1 = require("m2"); m1.f(); diff --git a/tests/baselines/reference/amdDependencyComment2.js b/tests/baselines/reference/amdDependencyComment2.js index 137e183017a69..6867b03f60651 100644 --- a/tests/baselines/reference/amdDependencyComment2.js +++ b/tests/baselines/reference/amdDependencyComment2.js @@ -7,5 +7,6 @@ m1.f(); //// [amdDependencyComment2.js] /// define(["require", "exports", "m2", "bar"], function (require, exports, m1) { + "use strict"; m1.f(); }); diff --git a/tests/baselines/reference/amdDependencyCommentName1.js b/tests/baselines/reference/amdDependencyCommentName1.js index b74e58b8538de..19024a09f3cd6 100644 --- a/tests/baselines/reference/amdDependencyCommentName1.js +++ b/tests/baselines/reference/amdDependencyCommentName1.js @@ -6,5 +6,6 @@ m1.f(); //// [amdDependencyCommentName1.js] /// +"use strict"; var m1 = require("m2"); m1.f(); diff --git a/tests/baselines/reference/amdDependencyCommentName2.js b/tests/baselines/reference/amdDependencyCommentName2.js index 6f9f1f268e80e..d60207e2becad 100644 --- a/tests/baselines/reference/amdDependencyCommentName2.js +++ b/tests/baselines/reference/amdDependencyCommentName2.js @@ -7,5 +7,6 @@ m1.f(); //// [amdDependencyCommentName2.js] /// define(["require", "exports", "bar", "m2"], function (require, exports, b, m1) { + "use strict"; m1.f(); }); diff --git a/tests/baselines/reference/amdDependencyCommentName3.js b/tests/baselines/reference/amdDependencyCommentName3.js index 2b74dc23aed57..1792c0c2aa002 100644 --- a/tests/baselines/reference/amdDependencyCommentName3.js +++ b/tests/baselines/reference/amdDependencyCommentName3.js @@ -11,5 +11,6 @@ m1.f(); /// /// define(["require", "exports", "bar", "goo", "m2", "foo"], function (require, exports, b, c, m1) { + "use strict"; m1.f(); }); diff --git a/tests/baselines/reference/amdDependencyCommentName4.js b/tests/baselines/reference/amdDependencyCommentName4.js index 636d28042576d..52b1010036566 100644 --- a/tests/baselines/reference/amdDependencyCommentName4.js +++ b/tests/baselines/reference/amdDependencyCommentName4.js @@ -26,6 +26,7 @@ import "unaliasedModule2"; /// /// define(["require", "exports", "aliasedModule5", "aliasedModule6", "aliasedModule1", "aliasedModule2", "aliasedModule3", "aliasedModule4", "unaliasedModule3", "unaliasedModule4", "unaliasedModule1", "unaliasedModule2"], function (require, exports, n1, n2, r1, aliasedModule2_1, aliasedModule3_1, ns) { + "use strict"; r1; aliasedModule2_1.p1; aliasedModule3_1["default"]; diff --git a/tests/baselines/reference/amdImportAsPrimaryExpression.js b/tests/baselines/reference/amdImportAsPrimaryExpression.js index fc8d0420842e7..1281b7f7f4757 100644 --- a/tests/baselines/reference/amdImportAsPrimaryExpression.js +++ b/tests/baselines/reference/amdImportAsPrimaryExpression.js @@ -14,6 +14,7 @@ if(foo.E1.A === 0){ //// [foo_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; (function (E1) { E1[E1["A"] = 0] = "A"; E1[E1["B"] = 1] = "B"; @@ -23,6 +24,7 @@ define(["require", "exports"], function (require, exports) { }); //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { + "use strict"; if (foo.E1.A === 0) { } }); diff --git a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js index c80da50da143a..3f6bcebab533b 100644 --- a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js @@ -33,6 +33,7 @@ var e: number = 0; //// [foo_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; var C1 = (function () { function C1() { this.m1 = 42; @@ -50,6 +51,7 @@ define(["require", "exports"], function (require, exports) { }); //// [foo_1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var i; var x = {}; var y = false; diff --git a/tests/baselines/reference/amdModuleName1.js b/tests/baselines/reference/amdModuleName1.js index e3505a007e361..ccfa8958575eb 100644 --- a/tests/baselines/reference/amdModuleName1.js +++ b/tests/baselines/reference/amdModuleName1.js @@ -11,6 +11,7 @@ export = Foo; //// [amdModuleName1.js] define("NamedModule", ["require", "exports"], function (require, exports) { + "use strict"; /// var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/amdModuleName2.js b/tests/baselines/reference/amdModuleName2.js index 90e50ce1e4814..ff547dd6c3bf5 100644 --- a/tests/baselines/reference/amdModuleName2.js +++ b/tests/baselines/reference/amdModuleName2.js @@ -12,6 +12,7 @@ export = Foo; //// [amdModuleName2.js] define("SecondModuleName", ["require", "exports"], function (require, exports) { + "use strict"; /// /// var Foo = (function () { diff --git a/tests/baselines/reference/arrayOfExportedClass.js b/tests/baselines/reference/arrayOfExportedClass.js index c3f81aca7b003..e86a83ee95dd7 100644 --- a/tests/baselines/reference/arrayOfExportedClass.js +++ b/tests/baselines/reference/arrayOfExportedClass.js @@ -25,6 +25,7 @@ export = Road; //// [arrayOfExportedClass_0.js] +"use strict"; var Car = (function () { function Car() { } @@ -32,6 +33,7 @@ var Car = (function () { })(); module.exports = Car; //// [arrayOfExportedClass_1.js] +"use strict"; var Road = (function () { function Road() { } diff --git a/tests/baselines/reference/asOperator4.js b/tests/baselines/reference/asOperator4.js index 906b807fe73f8..14978ce285c34 100644 --- a/tests/baselines/reference/asOperator4.js +++ b/tests/baselines/reference/asOperator4.js @@ -13,9 +13,11 @@ import { foo } from './foo'; //// [foo.js] +"use strict"; function foo() { } exports.foo = foo; //// [bar.js] +"use strict"; var foo_1 = require('./foo'); // These should emit identically foo_1.foo; diff --git a/tests/baselines/reference/asyncMultiFile.js b/tests/baselines/reference/asyncMultiFile.js new file mode 100644 index 0000000000000..e93dc586255c0 --- /dev/null +++ b/tests/baselines/reference/asyncMultiFile.js @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/async/es6/asyncMultiFile.ts] //// + +//// [a.ts] +async function f() {} +//// [b.ts] +function g() { } + +//// [a.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { + return new Promise(function (resolve, reject) { + generator = generator.call(thisArg, _arguments); + function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } + function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } + function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } + function step(verb, value) { + var result = generator[verb](value); + result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); + } + step("next", void 0); + }); +}; +function f() { + return __awaiter(this, void 0, Promise, function* () { }); +} +//// [b.js] +function g() { } diff --git a/tests/baselines/reference/asyncMultiFile.symbols b/tests/baselines/reference/asyncMultiFile.symbols new file mode 100644 index 0000000000000..790ceafef8f08 --- /dev/null +++ b/tests/baselines/reference/asyncMultiFile.symbols @@ -0,0 +1,8 @@ +=== tests/cases/conformance/async/es6/a.ts === +async function f() {} +>f : Symbol(f, Decl(a.ts, 0, 0)) + +=== tests/cases/conformance/async/es6/b.ts === +function g() { } +>g : Symbol(g, Decl(b.ts, 0, 0)) + diff --git a/tests/baselines/reference/asyncMultiFile.types b/tests/baselines/reference/asyncMultiFile.types new file mode 100644 index 0000000000000..70eebc0577a29 --- /dev/null +++ b/tests/baselines/reference/asyncMultiFile.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/async/es6/a.ts === +async function f() {} +>f : () => Promise + +=== tests/cases/conformance/async/es6/b.ts === +function g() { } +>g : () => void + diff --git a/tests/baselines/reference/augmentedTypesExternalModule1.js b/tests/baselines/reference/augmentedTypesExternalModule1.js index 104559396cca2..7965aa671ae1d 100644 --- a/tests/baselines/reference/augmentedTypesExternalModule1.js +++ b/tests/baselines/reference/augmentedTypesExternalModule1.js @@ -5,6 +5,7 @@ module c5 { } // should be ok everywhere //// [augmentedTypesExternalModule1.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.a = 1; var c5 = (function () { function c5() { diff --git a/tests/baselines/reference/badExternalModuleReference.js b/tests/baselines/reference/badExternalModuleReference.js index 3e748aee23974..4f9e1aae5078a 100644 --- a/tests/baselines/reference/badExternalModuleReference.js +++ b/tests/baselines/reference/badExternalModuleReference.js @@ -8,4 +8,5 @@ export declare var a: { //// [badExternalModuleReference.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/bangInModuleName.js b/tests/baselines/reference/bangInModuleName.js new file mode 100644 index 0000000000000..2fe13e00cf047 --- /dev/null +++ b/tests/baselines/reference/bangInModuleName.js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/bangInModuleName.ts] //// + +//// [a.d.ts] + + +declare module "http" { +} + +declare module 'intern/dojo/node!http' { + import http = require('http'); + export = http; +} + +//// [a.ts] + +/// + +import * as http from 'intern/dojo/node!http'; + +//// [a.js] +/// +define(["require", "exports"], function (require, exports) { + "use strict"; +}); diff --git a/tests/baselines/reference/bangInModuleName.symbols b/tests/baselines/reference/bangInModuleName.symbols new file mode 100644 index 0000000000000..63ba5d106d800 --- /dev/null +++ b/tests/baselines/reference/bangInModuleName.symbols @@ -0,0 +1,21 @@ +=== tests/cases/compiler/a.ts === + +/// + +import * as http from 'intern/dojo/node!http'; +>http : Symbol(http, Decl(a.ts, 3, 6)) + +=== tests/cases/compiler/a.d.ts === + + +declare module "http" { +} + +declare module 'intern/dojo/node!http' { + import http = require('http'); +>http : Symbol(http, Decl(a.d.ts, 5, 40)) + + export = http; +>http : Symbol(http, Decl(a.d.ts, 5, 40)) +} + diff --git a/tests/baselines/reference/bangInModuleName.types b/tests/baselines/reference/bangInModuleName.types new file mode 100644 index 0000000000000..06a602e2ff831 --- /dev/null +++ b/tests/baselines/reference/bangInModuleName.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/a.ts === + +/// + +import * as http from 'intern/dojo/node!http'; +>http : typeof http + +=== tests/cases/compiler/a.d.ts === + + +declare module "http" { +} + +declare module 'intern/dojo/node!http' { + import http = require('http'); +>http : typeof http + + export = http; +>http : typeof http +} + diff --git a/tests/baselines/reference/bpSpan_decorators.baseline b/tests/baselines/reference/bpSpan_decorators.baseline new file mode 100644 index 0000000000000..f6bb700e0989f --- /dev/null +++ b/tests/baselines/reference/bpSpan_decorators.baseline @@ -0,0 +1,384 @@ + +1 >declare function ClassDecorator1(target: Function): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (0 to 57) SpanInfo: undefined +-------------------------------- +2 >declare function ClassDecorator2(x: number): (target: Function) => void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (58 to 130) SpanInfo: undefined +-------------------------------- +3 >declare function PropertyDecorator1(target: Object, key: string | symbol, descriptor?: PropertyDescriptor): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (131 to 244) SpanInfo: undefined +-------------------------------- +4 >declare function PropertyDecorator2(x: number): (target: Object, key: string | symbol, descriptor?: PropertyDescriptor) => void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (245 to 373) SpanInfo: undefined +-------------------------------- +5 >declare function ParameterDecorator1(target: Object, key: string | symbol, paramIndex: number): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (374 to 475) SpanInfo: undefined +-------------------------------- +6 >declare function ParameterDecorator2(x: number): (target: Object, key: string | symbol, paramIndex: number) => void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (476 to 592) SpanInfo: undefined +-------------------------------- +7 > + + ~ => Pos: (593 to 593) SpanInfo: undefined +-------------------------------- +8 >@ClassDecorator1 + + ~~~~~~~~~~~~~~~~~ => Pos: (594 to 610) SpanInfo: {"start":594,"length":37} + >@ClassDecorator1 + >@ClassDecorator2(10) + >:=> (line 8, col 0) to (line 9, col 20) +-------------------------------- +9 >@ClassDecorator2(10) + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (611 to 631) SpanInfo: {"start":594,"length":37} + >@ClassDecorator1 + >@ClassDecorator2(10) + >:=> (line 8, col 0) to (line 9, col 20) +-------------------------------- +10 >class Greeter { + + ~~~~~~~~~~~~~~~~ => Pos: (632 to 647) SpanInfo: {"start":632,"length":914} + >class Greeter { + > constructor( + > @ParameterDecorator1 + > @ParameterDecorator2(20) + > public greeting: string, + > + > @ParameterDecorator1 + > @ParameterDecorator2(30) + > ...b: string[]) { + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(40) + > greet() { + > return "

" + this.greeting + "

"; + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(50) + > private x: string; + > + > @PropertyDecorator1 + > @PropertyDecorator2(60) + > private static x1: number = 10; + > + > private fn( + > @ParameterDecorator1 + > @ParameterDecorator2(70) + > x: number) { + > return this.greeting; + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(80) + > get greetings() { + > return this.greeting; + > } + > + > set greetings( + > @ParameterDecorator1 + > @ParameterDecorator2(90) + > greetings: string) { + > this.greeting = greetings; + > } + >} + >:=> (line 10, col 0) to (line 54, col 1) +-------------------------------- +11 > constructor( + + ~~~~~~~~~~~~~~~~~ => Pos: (648 to 664) SpanInfo: {"start":857,"length":1} + >} + >:=> (line 19, col 4) to (line 19, col 5) +-------------------------------- +12 > @ParameterDecorator1 + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (665 to 693) SpanInfo: {"start":673,"length":53} + >@ParameterDecorator1 + > @ParameterDecorator2(20) + >:=> (line 12, col 8) to (line 13, col 32) +-------------------------------- +13 > @ParameterDecorator2(20) + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (694 to 726) SpanInfo: {"start":673,"length":53} + >@ParameterDecorator1 + > @ParameterDecorator2(20) + >:=> (line 12, col 8) to (line 13, col 32) +-------------------------------- +14 > public greeting: string, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (727 to 759) SpanInfo: {"start":735,"length":23} + >public greeting: string + >:=> (line 14, col 8) to (line 14, col 31) +-------------------------------- +15 > + + ~ => Pos: (760 to 760) SpanInfo: undefined +-------------------------------- +16 > @ParameterDecorator1 + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (761 to 789) SpanInfo: {"start":769,"length":53} + >@ParameterDecorator1 + > @ParameterDecorator2(30) + >:=> (line 16, col 8) to (line 17, col 32) +-------------------------------- +17 > @ParameterDecorator2(30) + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (790 to 822) SpanInfo: {"start":769,"length":53} + >@ParameterDecorator1 + > @ParameterDecorator2(30) + >:=> (line 16, col 8) to (line 17, col 32) +-------------------------------- +18 > ...b: string[]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (823 to 849) SpanInfo: {"start":835,"length":14} + >...b: string[] + >:=> (line 18, col 12) to (line 18, col 26) +18 > ...b: string[]) { + + ~~~ => Pos: (850 to 852) SpanInfo: {"start":857,"length":1} + >} + >:=> (line 19, col 4) to (line 19, col 5) +-------------------------------- +19 > } + + ~~~~~~ => Pos: (853 to 858) SpanInfo: {"start":857,"length":1} + >} + >:=> (line 19, col 4) to (line 19, col 5) +-------------------------------- +20 > + + ~ => Pos: (859 to 859) SpanInfo: undefined +-------------------------------- +21 > @PropertyDecorator1 + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (860 to 883) SpanInfo: {"start":864,"length":47} + >@PropertyDecorator1 + > @PropertyDecorator2(40) + >:=> (line 21, col 4) to (line 22, col 27) +-------------------------------- +22 > @PropertyDecorator2(40) + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (884 to 911) SpanInfo: {"start":864,"length":47} + >@PropertyDecorator1 + > @PropertyDecorator2(40) + >:=> (line 21, col 4) to (line 22, col 27) +-------------------------------- +23 > greet() { + + ~~~~~~~~~~~ => Pos: (912 to 922) SpanInfo: {"start":916,"length":64} + >greet() { + > return "

" + this.greeting + "

"; + > } + >:=> (line 23, col 4) to (line 25, col 5) +23 > greet() { + + ~~~ => Pos: (923 to 925) SpanInfo: {"start":934,"length":39} + >return "

" + this.greeting + "

" + >:=> (line 24, col 8) to (line 24, col 47) +-------------------------------- +24 > return "

" + this.greeting + "

"; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (926 to 974) SpanInfo: {"start":934,"length":39} + >return "

" + this.greeting + "

" + >:=> (line 24, col 8) to (line 24, col 47) +-------------------------------- +25 > } + + ~~~~~~ => Pos: (975 to 980) SpanInfo: {"start":979,"length":1} + >} + >:=> (line 25, col 4) to (line 25, col 5) +-------------------------------- +26 > + + ~ => Pos: (981 to 981) SpanInfo: undefined +-------------------------------- +27 > @PropertyDecorator1 + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (982 to 1005) SpanInfo: {"start":986,"length":47} + >@PropertyDecorator1 + > @PropertyDecorator2(50) + >:=> (line 27, col 4) to (line 28, col 27) +-------------------------------- +28 > @PropertyDecorator2(50) + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1006 to 1033) SpanInfo: {"start":986,"length":47} + >@PropertyDecorator1 + > @PropertyDecorator2(50) + >:=> (line 27, col 4) to (line 28, col 27) +-------------------------------- +29 > private x: string; + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1034 to 1056) SpanInfo: undefined +-------------------------------- +30 > + + ~ => Pos: (1057 to 1057) SpanInfo: undefined +-------------------------------- +31 > @PropertyDecorator1 + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1058 to 1081) SpanInfo: {"start":1062,"length":47} + >@PropertyDecorator1 + > @PropertyDecorator2(60) + >:=> (line 31, col 4) to (line 32, col 27) +-------------------------------- +32 > @PropertyDecorator2(60) + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1082 to 1109) SpanInfo: {"start":1062,"length":47} + >@PropertyDecorator1 + > @PropertyDecorator2(60) + >:=> (line 31, col 4) to (line 32, col 27) +-------------------------------- +33 > private static x1: number = 10; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1110 to 1145) SpanInfo: {"start":1114,"length":31} + >private static x1: number = 10; + >:=> (line 33, col 4) to (line 33, col 35) +-------------------------------- +34 > + + ~ => Pos: (1146 to 1146) SpanInfo: undefined +-------------------------------- +35 > private fn( + + ~~~~~~~~~~~~~~~~ => Pos: (1147 to 1162) SpanInfo: {"start":1151,"length":130} + >private fn( + > @ParameterDecorator1 + > @ParameterDecorator2(70) + > x: number) { + > return this.greeting; + > } + >:=> (line 35, col 4) to (line 40, col 5) +-------------------------------- +36 > @ParameterDecorator1 + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1163 to 1191) SpanInfo: {"start":1171,"length":53} + >@ParameterDecorator1 + > @ParameterDecorator2(70) + >:=> (line 36, col 8) to (line 37, col 32) +-------------------------------- +37 > @ParameterDecorator2(70) + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1192 to 1224) SpanInfo: {"start":1171,"length":53} + >@ParameterDecorator1 + > @ParameterDecorator2(70) + >:=> (line 36, col 8) to (line 37, col 32) +-------------------------------- +38 > x: number) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (1225 to 1245) SpanInfo: {"start":1254,"length":20} + >return this.greeting + >:=> (line 39, col 8) to (line 39, col 28) +-------------------------------- +39 > return this.greeting; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1246 to 1275) SpanInfo: {"start":1254,"length":20} + >return this.greeting + >:=> (line 39, col 8) to (line 39, col 28) +-------------------------------- +40 > } + + ~~~~~~ => Pos: (1276 to 1281) SpanInfo: {"start":1280,"length":1} + >} + >:=> (line 40, col 4) to (line 40, col 5) +-------------------------------- +41 > + + ~ => Pos: (1282 to 1282) SpanInfo: undefined +-------------------------------- +42 > @PropertyDecorator1 + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1283 to 1306) SpanInfo: {"start":1287,"length":47} + >@PropertyDecorator1 + > @PropertyDecorator2(80) + >:=> (line 42, col 4) to (line 43, col 27) +-------------------------------- +43 > @PropertyDecorator2(80) + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1307 to 1334) SpanInfo: {"start":1287,"length":47} + >@PropertyDecorator1 + > @PropertyDecorator2(80) + >:=> (line 42, col 4) to (line 43, col 27) +-------------------------------- +44 > get greetings() { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1335 to 1353) SpanInfo: {"start":1339,"length":53} + >get greetings() { + > return this.greeting; + > } + >:=> (line 44, col 4) to (line 46, col 5) +44 > get greetings() { + + ~~~ => Pos: (1354 to 1356) SpanInfo: {"start":1365,"length":20} + >return this.greeting + >:=> (line 45, col 8) to (line 45, col 28) +-------------------------------- +45 > return this.greeting; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1357 to 1386) SpanInfo: {"start":1365,"length":20} + >return this.greeting + >:=> (line 45, col 8) to (line 45, col 28) +-------------------------------- +46 > } + + ~~~~~~ => Pos: (1387 to 1392) SpanInfo: {"start":1391,"length":1} + >} + >:=> (line 46, col 4) to (line 46, col 5) +-------------------------------- +47 > + + ~ => Pos: (1393 to 1393) SpanInfo: undefined +-------------------------------- +48 > set greetings( + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1394 to 1412) SpanInfo: {"start":1398,"length":146} + >set greetings( + > @ParameterDecorator1 + > @ParameterDecorator2(90) + > greetings: string) { + > this.greeting = greetings; + > } + >:=> (line 48, col 4) to (line 53, col 5) +-------------------------------- +49 > @ParameterDecorator1 + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1413 to 1441) SpanInfo: {"start":1421,"length":53} + >@ParameterDecorator1 + > @ParameterDecorator2(90) + >:=> (line 49, col 8) to (line 50, col 32) +-------------------------------- +50 > @ParameterDecorator2(90) + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1442 to 1474) SpanInfo: {"start":1421,"length":53} + >@ParameterDecorator1 + > @ParameterDecorator2(90) + >:=> (line 49, col 8) to (line 50, col 32) +-------------------------------- +51 > greetings: string) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1475 to 1503) SpanInfo: {"start":1512,"length":25} + >this.greeting = greetings + >:=> (line 52, col 8) to (line 52, col 33) +-------------------------------- +52 > this.greeting = greetings; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1504 to 1538) SpanInfo: {"start":1512,"length":25} + >this.greeting = greetings + >:=> (line 52, col 8) to (line 52, col 33) +-------------------------------- +53 > } + + ~~~~~~ => Pos: (1539 to 1544) SpanInfo: {"start":1543,"length":1} + >} + >:=> (line 53, col 4) to (line 53, col 5) +-------------------------------- +54 >} + ~ => Pos: (1545 to 1545) SpanInfo: {"start":1545,"length":1} + >} + >:=> (line 54, col 0) to (line 54, col 1) \ No newline at end of file diff --git a/tests/baselines/reference/callSignatureFunctionOverload.types b/tests/baselines/reference/callSignatureFunctionOverload.types index b9788e5b143a9..d5897c01494ca 100644 --- a/tests/baselines/reference/callSignatureFunctionOverload.types +++ b/tests/baselines/reference/callSignatureFunctionOverload.types @@ -1,33 +1,33 @@ === tests/cases/compiler/callSignatureFunctionOverload.ts === var foo: { ->foo : { (name: string): string; (name: 'order'): string; (name: 'content'): string; (name: 'done'): string; } +>foo : { (name: string): string; (name: "order"): string; (name: "content"): string; (name: "done"): string; } (name: string): string; >name : string (name: 'order'): string; ->name : 'order' +>name : "order" (name: 'content'): string; ->name : 'content' +>name : "content" (name: 'done'): string; ->name : 'done' +>name : "done" } var foo2: { ->foo2 : { (name: string): string; (name: 'order'): string; (name: 'order'): string; (name: 'done'): string; } +>foo2 : { (name: string): string; (name: "order"): string; (name: "order"): string; (name: "done"): string; } (name: string): string; >name : string (name: 'order'): string; ->name : 'order' +>name : "order" (name: 'order'): string; ->name : 'order' +>name : "order" (name: 'done'): string; ->name : 'done' +>name : "done" } diff --git a/tests/baselines/reference/capturedLetConstInLoop10.js b/tests/baselines/reference/capturedLetConstInLoop10.js new file mode 100644 index 0000000000000..36b2ab9453fb9 --- /dev/null +++ b/tests/baselines/reference/capturedLetConstInLoop10.js @@ -0,0 +1,124 @@ +//// [capturedLetConstInLoop10.ts] +class A { + foo() { + for (let x of [0]) { + let f = function() { return x; }; + this.bar(f()); + } + } + bar(a: number) { + } + + baz() { + for (let x of [1]) { + let a = function() { return x; }; + for (let y of [1]) { + let b = function() { return y; }; + this.bar(b()); + } + this.bar(a()); + } + } + baz2() { + for (let x of [1]) { + let a = function() { return x; }; + this.bar(a()); + for (let y of [1]) { + let b = function() { return y; }; + this.bar(b()); + } + } + } +} + +class B { + foo() { + let a = + () => { + for (let x of [0]) { + let f = () => x; + this.bar(f()); + } + } + } + bar(a: number) { + } +} + +//// [capturedLetConstInLoop10.js] +var A = (function () { + function A() { + } + A.prototype.foo = function () { + var _loop_1 = function(x) { + var f = function () { return x; }; + this_1.bar(f()); + }; + var this_1 = this; + for (var _i = 0, _a = [0]; _i < _a.length; _i++) { + var x = _a[_i]; + _loop_1(x); + } + }; + A.prototype.bar = function (a) { + }; + A.prototype.baz = function () { + var _loop_2 = function(x) { + var a = function () { return x; }; + var _loop_3 = function(y) { + var b = function () { return y; }; + this_2.bar(b()); + }; + for (var _i = 0, _a = [1]; _i < _a.length; _i++) { + var y = _a[_i]; + _loop_3(y); + } + this_2.bar(a()); + }; + var this_2 = this; + for (var _b = 0, _c = [1]; _b < _c.length; _b++) { + var x = _c[_b]; + _loop_2(x); + } + }; + A.prototype.baz2 = function () { + var _loop_4 = function(x) { + var a = function () { return x; }; + this_3.bar(a()); + var _loop_5 = function(y) { + var b = function () { return y; }; + this_3.bar(b()); + }; + for (var _i = 0, _a = [1]; _i < _a.length; _i++) { + var y = _a[_i]; + _loop_5(y); + } + }; + var this_3 = this; + for (var _b = 0, _c = [1]; _b < _c.length; _b++) { + var x = _c[_b]; + _loop_4(x); + } + }; + return A; +})(); +var B = (function () { + function B() { + } + B.prototype.foo = function () { + var _this = this; + var a = function () { + var _loop_6 = function(x) { + var f = function () { return x; }; + _this.bar(f()); + }; + for (var _i = 0, _a = [0]; _i < _a.length; _i++) { + var x = _a[_i]; + _loop_6(x); + } + }; + }; + B.prototype.bar = function (a) { + }; + return B; +})(); diff --git a/tests/baselines/reference/capturedLetConstInLoop10.symbols b/tests/baselines/reference/capturedLetConstInLoop10.symbols new file mode 100644 index 0000000000000..124874088a849 --- /dev/null +++ b/tests/baselines/reference/capturedLetConstInLoop10.symbols @@ -0,0 +1,119 @@ +=== tests/cases/compiler/capturedLetConstInLoop10.ts === +class A { +>A : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0)) + + foo() { +>foo : Symbol(foo, Decl(capturedLetConstInLoop10.ts, 0, 9)) + + for (let x of [0]) { +>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 2, 16)) + + let f = function() { return x; }; +>f : Symbol(f, Decl(capturedLetConstInLoop10.ts, 3, 15)) +>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 2, 16)) + + this.bar(f()); +>this.bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 6, 5)) +>this : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0)) +>bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 6, 5)) +>f : Symbol(f, Decl(capturedLetConstInLoop10.ts, 3, 15)) + } + } + bar(a: number) { +>bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 6, 5)) +>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 7, 8)) + } + + baz() { +>baz : Symbol(baz, Decl(capturedLetConstInLoop10.ts, 8, 5)) + + for (let x of [1]) { +>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 11, 16)) + + let a = function() { return x; }; +>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 12, 15)) +>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 11, 16)) + + for (let y of [1]) { +>y : Symbol(y, Decl(capturedLetConstInLoop10.ts, 13, 20)) + + let b = function() { return y; }; +>b : Symbol(b, Decl(capturedLetConstInLoop10.ts, 14, 19)) +>y : Symbol(y, Decl(capturedLetConstInLoop10.ts, 13, 20)) + + this.bar(b()); +>this.bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 6, 5)) +>this : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0)) +>bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 6, 5)) +>b : Symbol(b, Decl(capturedLetConstInLoop10.ts, 14, 19)) + } + this.bar(a()); +>this.bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 6, 5)) +>this : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0)) +>bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 6, 5)) +>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 12, 15)) + } + } + baz2() { +>baz2 : Symbol(baz2, Decl(capturedLetConstInLoop10.ts, 19, 5)) + + for (let x of [1]) { +>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 21, 16)) + + let a = function() { return x; }; +>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 22, 15)) +>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 21, 16)) + + this.bar(a()); +>this.bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 6, 5)) +>this : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0)) +>bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 6, 5)) +>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 22, 15)) + + for (let y of [1]) { +>y : Symbol(y, Decl(capturedLetConstInLoop10.ts, 24, 20)) + + let b = function() { return y; }; +>b : Symbol(b, Decl(capturedLetConstInLoop10.ts, 25, 19)) +>y : Symbol(y, Decl(capturedLetConstInLoop10.ts, 24, 20)) + + this.bar(b()); +>this.bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 6, 5)) +>this : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0)) +>bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 6, 5)) +>b : Symbol(b, Decl(capturedLetConstInLoop10.ts, 25, 19)) + } + } + } +} + +class B { +>B : Symbol(B, Decl(capturedLetConstInLoop10.ts, 30, 1)) + + foo() { +>foo : Symbol(foo, Decl(capturedLetConstInLoop10.ts, 32, 9)) + + let a = +>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 34, 11)) + + () => { + for (let x of [0]) { +>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 36, 24)) + + let f = () => x; +>f : Symbol(f, Decl(capturedLetConstInLoop10.ts, 37, 23)) +>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 36, 24)) + + this.bar(f()); +>this.bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 41, 5)) +>this : Symbol(B, Decl(capturedLetConstInLoop10.ts, 30, 1)) +>bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 41, 5)) +>f : Symbol(f, Decl(capturedLetConstInLoop10.ts, 37, 23)) + } + } + } + bar(a: number) { +>bar : Symbol(bar, Decl(capturedLetConstInLoop10.ts, 41, 5)) +>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 42, 8)) + } +} diff --git a/tests/baselines/reference/capturedLetConstInLoop10.types b/tests/baselines/reference/capturedLetConstInLoop10.types new file mode 100644 index 0000000000000..e4bca4d906a17 --- /dev/null +++ b/tests/baselines/reference/capturedLetConstInLoop10.types @@ -0,0 +1,151 @@ +=== tests/cases/compiler/capturedLetConstInLoop10.ts === +class A { +>A : A + + foo() { +>foo : () => void + + for (let x of [0]) { +>x : number +>[0] : number[] +>0 : number + + let f = function() { return x; }; +>f : () => number +>function() { return x; } : () => number +>x : number + + this.bar(f()); +>this.bar(f()) : void +>this.bar : (a: number) => void +>this : this +>bar : (a: number) => void +>f() : number +>f : () => number + } + } + bar(a: number) { +>bar : (a: number) => void +>a : number + } + + baz() { +>baz : () => void + + for (let x of [1]) { +>x : number +>[1] : number[] +>1 : number + + let a = function() { return x; }; +>a : () => number +>function() { return x; } : () => number +>x : number + + for (let y of [1]) { +>y : number +>[1] : number[] +>1 : number + + let b = function() { return y; }; +>b : () => number +>function() { return y; } : () => number +>y : number + + this.bar(b()); +>this.bar(b()) : void +>this.bar : (a: number) => void +>this : this +>bar : (a: number) => void +>b() : number +>b : () => number + } + this.bar(a()); +>this.bar(a()) : void +>this.bar : (a: number) => void +>this : this +>bar : (a: number) => void +>a() : number +>a : () => number + } + } + baz2() { +>baz2 : () => void + + for (let x of [1]) { +>x : number +>[1] : number[] +>1 : number + + let a = function() { return x; }; +>a : () => number +>function() { return x; } : () => number +>x : number + + this.bar(a()); +>this.bar(a()) : void +>this.bar : (a: number) => void +>this : this +>bar : (a: number) => void +>a() : number +>a : () => number + + for (let y of [1]) { +>y : number +>[1] : number[] +>1 : number + + let b = function() { return y; }; +>b : () => number +>function() { return y; } : () => number +>y : number + + this.bar(b()); +>this.bar(b()) : void +>this.bar : (a: number) => void +>this : this +>bar : (a: number) => void +>b() : number +>b : () => number + } + } + } +} + +class B { +>B : B + + foo() { +>foo : () => void + + let a = +>a : () => void + + () => { +>() => { for (let x of [0]) { let f = () => x; this.bar(f()); } } : () => void + + for (let x of [0]) { +>x : number +>[0] : number[] +>0 : number + + let f = () => x; +>f : () => number +>() => x : () => number +>x : number + + this.bar(f()); +>this.bar(f()) : void +>this.bar : (a: number) => void +>this : this +>bar : (a: number) => void +>f() : number +>f : () => number + } + } + } + bar(a: number) { +>bar : (a: number) => void +>a : number + } +} diff --git a/tests/baselines/reference/capturedLetConstInLoop10_ES6.js b/tests/baselines/reference/capturedLetConstInLoop10_ES6.js new file mode 100644 index 0000000000000..705a5e6ba9f63 --- /dev/null +++ b/tests/baselines/reference/capturedLetConstInLoop10_ES6.js @@ -0,0 +1,90 @@ +//// [capturedLetConstInLoop10_ES6.ts] +class A { + foo() { + for (let x of [0]) { + let f = function() { return x; }; + this.bar(f()); + } + } + bar(a: number) { + } + + baz() { + for (let x of [1]) { + let a = function() { return x; }; + for (let y of [1]) { + let b = function() { return y; }; + this.bar(b()); + } + this.bar(a()); + } + } + baz2() { + for (let x of [1]) { + let a = function() { return x; }; + this.bar(a()); + for (let y of [1]) { + let b = function() { return y; }; + this.bar(b()); + } + } + } +} + +class B { + foo() { + let a = + () => { + for (let x of [0]) { + let f = () => x; + this.bar(f()); + } + } + } + bar(a: number) { + } +} + +//// [capturedLetConstInLoop10_ES6.js] +class A { + foo() { + for (let x of [0]) { + let f = function () { return x; }; + this.bar(f()); + } + } + bar(a) { + } + baz() { + for (let x of [1]) { + let a = function () { return x; }; + for (let y of [1]) { + let b = function () { return y; }; + this.bar(b()); + } + this.bar(a()); + } + } + baz2() { + for (let x of [1]) { + let a = function () { return x; }; + this.bar(a()); + for (let y of [1]) { + let b = function () { return y; }; + this.bar(b()); + } + } + } +} +class B { + foo() { + let a = () => { + for (let x of [0]) { + let f = () => x; + this.bar(f()); + } + }; + } + bar(a) { + } +} diff --git a/tests/baselines/reference/capturedLetConstInLoop10_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop10_ES6.symbols new file mode 100644 index 0000000000000..f0cf92ff96b25 --- /dev/null +++ b/tests/baselines/reference/capturedLetConstInLoop10_ES6.symbols @@ -0,0 +1,119 @@ +=== tests/cases/compiler/capturedLetConstInLoop10_ES6.ts === +class A { +>A : Symbol(A, Decl(capturedLetConstInLoop10_ES6.ts, 0, 0)) + + foo() { +>foo : Symbol(foo, Decl(capturedLetConstInLoop10_ES6.ts, 0, 9)) + + for (let x of [0]) { +>x : Symbol(x, Decl(capturedLetConstInLoop10_ES6.ts, 2, 16)) + + let f = function() { return x; }; +>f : Symbol(f, Decl(capturedLetConstInLoop10_ES6.ts, 3, 15)) +>x : Symbol(x, Decl(capturedLetConstInLoop10_ES6.ts, 2, 16)) + + this.bar(f()); +>this.bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 6, 5)) +>this : Symbol(A, Decl(capturedLetConstInLoop10_ES6.ts, 0, 0)) +>bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 6, 5)) +>f : Symbol(f, Decl(capturedLetConstInLoop10_ES6.ts, 3, 15)) + } + } + bar(a: number) { +>bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 6, 5)) +>a : Symbol(a, Decl(capturedLetConstInLoop10_ES6.ts, 7, 8)) + } + + baz() { +>baz : Symbol(baz, Decl(capturedLetConstInLoop10_ES6.ts, 8, 5)) + + for (let x of [1]) { +>x : Symbol(x, Decl(capturedLetConstInLoop10_ES6.ts, 11, 16)) + + let a = function() { return x; }; +>a : Symbol(a, Decl(capturedLetConstInLoop10_ES6.ts, 12, 15)) +>x : Symbol(x, Decl(capturedLetConstInLoop10_ES6.ts, 11, 16)) + + for (let y of [1]) { +>y : Symbol(y, Decl(capturedLetConstInLoop10_ES6.ts, 13, 20)) + + let b = function() { return y; }; +>b : Symbol(b, Decl(capturedLetConstInLoop10_ES6.ts, 14, 19)) +>y : Symbol(y, Decl(capturedLetConstInLoop10_ES6.ts, 13, 20)) + + this.bar(b()); +>this.bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 6, 5)) +>this : Symbol(A, Decl(capturedLetConstInLoop10_ES6.ts, 0, 0)) +>bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 6, 5)) +>b : Symbol(b, Decl(capturedLetConstInLoop10_ES6.ts, 14, 19)) + } + this.bar(a()); +>this.bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 6, 5)) +>this : Symbol(A, Decl(capturedLetConstInLoop10_ES6.ts, 0, 0)) +>bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 6, 5)) +>a : Symbol(a, Decl(capturedLetConstInLoop10_ES6.ts, 12, 15)) + } + } + baz2() { +>baz2 : Symbol(baz2, Decl(capturedLetConstInLoop10_ES6.ts, 19, 5)) + + for (let x of [1]) { +>x : Symbol(x, Decl(capturedLetConstInLoop10_ES6.ts, 21, 16)) + + let a = function() { return x; }; +>a : Symbol(a, Decl(capturedLetConstInLoop10_ES6.ts, 22, 15)) +>x : Symbol(x, Decl(capturedLetConstInLoop10_ES6.ts, 21, 16)) + + this.bar(a()); +>this.bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 6, 5)) +>this : Symbol(A, Decl(capturedLetConstInLoop10_ES6.ts, 0, 0)) +>bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 6, 5)) +>a : Symbol(a, Decl(capturedLetConstInLoop10_ES6.ts, 22, 15)) + + for (let y of [1]) { +>y : Symbol(y, Decl(capturedLetConstInLoop10_ES6.ts, 24, 20)) + + let b = function() { return y; }; +>b : Symbol(b, Decl(capturedLetConstInLoop10_ES6.ts, 25, 19)) +>y : Symbol(y, Decl(capturedLetConstInLoop10_ES6.ts, 24, 20)) + + this.bar(b()); +>this.bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 6, 5)) +>this : Symbol(A, Decl(capturedLetConstInLoop10_ES6.ts, 0, 0)) +>bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 6, 5)) +>b : Symbol(b, Decl(capturedLetConstInLoop10_ES6.ts, 25, 19)) + } + } + } +} + +class B { +>B : Symbol(B, Decl(capturedLetConstInLoop10_ES6.ts, 30, 1)) + + foo() { +>foo : Symbol(foo, Decl(capturedLetConstInLoop10_ES6.ts, 32, 9)) + + let a = +>a : Symbol(a, Decl(capturedLetConstInLoop10_ES6.ts, 34, 11)) + + () => { + for (let x of [0]) { +>x : Symbol(x, Decl(capturedLetConstInLoop10_ES6.ts, 36, 24)) + + let f = () => x; +>f : Symbol(f, Decl(capturedLetConstInLoop10_ES6.ts, 37, 23)) +>x : Symbol(x, Decl(capturedLetConstInLoop10_ES6.ts, 36, 24)) + + this.bar(f()); +>this.bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 41, 5)) +>this : Symbol(B, Decl(capturedLetConstInLoop10_ES6.ts, 30, 1)) +>bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 41, 5)) +>f : Symbol(f, Decl(capturedLetConstInLoop10_ES6.ts, 37, 23)) + } + } + } + bar(a: number) { +>bar : Symbol(bar, Decl(capturedLetConstInLoop10_ES6.ts, 41, 5)) +>a : Symbol(a, Decl(capturedLetConstInLoop10_ES6.ts, 42, 8)) + } +} diff --git a/tests/baselines/reference/capturedLetConstInLoop10_ES6.types b/tests/baselines/reference/capturedLetConstInLoop10_ES6.types new file mode 100644 index 0000000000000..068c124582d54 --- /dev/null +++ b/tests/baselines/reference/capturedLetConstInLoop10_ES6.types @@ -0,0 +1,151 @@ +=== tests/cases/compiler/capturedLetConstInLoop10_ES6.ts === +class A { +>A : A + + foo() { +>foo : () => void + + for (let x of [0]) { +>x : number +>[0] : number[] +>0 : number + + let f = function() { return x; }; +>f : () => number +>function() { return x; } : () => number +>x : number + + this.bar(f()); +>this.bar(f()) : void +>this.bar : (a: number) => void +>this : this +>bar : (a: number) => void +>f() : number +>f : () => number + } + } + bar(a: number) { +>bar : (a: number) => void +>a : number + } + + baz() { +>baz : () => void + + for (let x of [1]) { +>x : number +>[1] : number[] +>1 : number + + let a = function() { return x; }; +>a : () => number +>function() { return x; } : () => number +>x : number + + for (let y of [1]) { +>y : number +>[1] : number[] +>1 : number + + let b = function() { return y; }; +>b : () => number +>function() { return y; } : () => number +>y : number + + this.bar(b()); +>this.bar(b()) : void +>this.bar : (a: number) => void +>this : this +>bar : (a: number) => void +>b() : number +>b : () => number + } + this.bar(a()); +>this.bar(a()) : void +>this.bar : (a: number) => void +>this : this +>bar : (a: number) => void +>a() : number +>a : () => number + } + } + baz2() { +>baz2 : () => void + + for (let x of [1]) { +>x : number +>[1] : number[] +>1 : number + + let a = function() { return x; }; +>a : () => number +>function() { return x; } : () => number +>x : number + + this.bar(a()); +>this.bar(a()) : void +>this.bar : (a: number) => void +>this : this +>bar : (a: number) => void +>a() : number +>a : () => number + + for (let y of [1]) { +>y : number +>[1] : number[] +>1 : number + + let b = function() { return y; }; +>b : () => number +>function() { return y; } : () => number +>y : number + + this.bar(b()); +>this.bar(b()) : void +>this.bar : (a: number) => void +>this : this +>bar : (a: number) => void +>b() : number +>b : () => number + } + } + } +} + +class B { +>B : B + + foo() { +>foo : () => void + + let a = +>a : () => void + + () => { +>() => { for (let x of [0]) { let f = () => x; this.bar(f()); } } : () => void + + for (let x of [0]) { +>x : number +>[0] : number[] +>0 : number + + let f = () => x; +>f : () => number +>() => x : () => number +>x : number + + this.bar(f()); +>this.bar(f()) : void +>this.bar : (a: number) => void +>this : this +>bar : (a: number) => void +>f() : number +>f : () => number + } + } + } + bar(a: number) { +>bar : (a: number) => void +>a : number + } +} diff --git a/tests/baselines/reference/capturedLetConstInLoop4.js b/tests/baselines/reference/capturedLetConstInLoop4.js index 6257d1c697e60..724c84fe04f04 100644 --- a/tests/baselines/reference/capturedLetConstInLoop4.js +++ b/tests/baselines/reference/capturedLetConstInLoop4.js @@ -145,6 +145,7 @@ for (const y = 0; y < 1;) { //// [capturedLetConstInLoop4.js] System.register([], function(exports_1) { + "use strict"; var v0, v00, v1, v2, v3, v4, v5, v6, v7, v8, v0_c, v00_c, v1_c, v2_c, v3_c, v4_c, v5_c, v6_c, v7_c, v8_c; //======let function exportedFoo() { diff --git a/tests/baselines/reference/chainedImportAlias.js b/tests/baselines/reference/chainedImportAlias.js index ec751b0329a91..2b1111f3096bf 100644 --- a/tests/baselines/reference/chainedImportAlias.js +++ b/tests/baselines/reference/chainedImportAlias.js @@ -12,12 +12,14 @@ y.m.foo(); //// [chainedImportAlias_file0.js] +"use strict"; var m; (function (m) { function foo() { } m.foo = foo; })(m = exports.m || (exports.m = {})); //// [chainedImportAlias_file1.js] +"use strict"; var x = require('./chainedImportAlias_file0'); var y = x; y.m.foo(); diff --git a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.js b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.js new file mode 100644 index 0000000000000..64ea4e67fa8a7 --- /dev/null +++ b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.js @@ -0,0 +1,27 @@ +//// [checkSwitchStatementIfCaseTypeIsString.ts] +declare function use(a: any): void; + +class A { + doIt(x: Array): void { + x.forEach((v) => { + switch(v) { + case "test": use(this); + } + }); + } +} + +//// [checkSwitchStatementIfCaseTypeIsString.js] +var A = (function () { + function A() { + } + A.prototype.doIt = function (x) { + var _this = this; + x.forEach(function (v) { + switch (v) { + case "test": use(_this); + } + }); + }; + return A; +})(); diff --git a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.symbols b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.symbols new file mode 100644 index 0000000000000..6bc994f2a449f --- /dev/null +++ b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.symbols @@ -0,0 +1,29 @@ +=== tests/cases/compiler/checkSwitchStatementIfCaseTypeIsString.ts === +declare function use(a: any): void; +>use : Symbol(use, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 0, 0)) +>a : Symbol(a, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 0, 21)) + +class A { +>A : Symbol(A, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 0, 35)) + + doIt(x: Array): void { +>doIt : Symbol(doIt, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 2, 9)) +>x : Symbol(x, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 3, 9)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + x.forEach((v) => { +>x.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 3, 9)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>v : Symbol(v, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 4, 19)) + + switch(v) { +>v : Symbol(v, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 4, 19)) + + case "test": use(this); +>use : Symbol(use, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 0, 0)) +>this : Symbol(A, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 0, 35)) + } + }); + } +} diff --git a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types new file mode 100644 index 0000000000000..fa394b4e0bd32 --- /dev/null +++ b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types @@ -0,0 +1,33 @@ +=== tests/cases/compiler/checkSwitchStatementIfCaseTypeIsString.ts === +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +class A { +>A : A + + doIt(x: Array): void { +>doIt : (x: string[]) => void +>x : string[] +>Array : T[] + + x.forEach((v) => { +>x.forEach((v) => { switch(v) { case "test": use(this); } }) : void +>x.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>x : string[] +>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>(v) => { switch(v) { case "test": use(this); } } : (v: string) => void +>v : string + + switch(v) { +>v : string + + case "test": use(this); +>"test" : string +>use(this) : void +>use : (a: any) => void +>this : this + } + }); + } +} diff --git a/tests/baselines/reference/circularReference.js b/tests/baselines/reference/circularReference.js index 02eef63db0602..ca072952b535d 100644 --- a/tests/baselines/reference/circularReference.js +++ b/tests/baselines/reference/circularReference.js @@ -34,6 +34,7 @@ export module M1 { //// [foo1.js] +"use strict"; var foo2 = require('./foo2'); var M1; (function (M1) { @@ -48,6 +49,7 @@ var M1; M1.C1 = C1; })(M1 = exports.M1 || (exports.M1 = {})); //// [foo2.js] +"use strict"; var foo1 = require('./foo1'); var M1; (function (M1) { diff --git a/tests/baselines/reference/classAbstractManyKeywords.js b/tests/baselines/reference/classAbstractManyKeywords.js index 79191c029e1b9..1be5a06195c63 100644 --- a/tests/baselines/reference/classAbstractManyKeywords.js +++ b/tests/baselines/reference/classAbstractManyKeywords.js @@ -5,6 +5,7 @@ default abstract class C {} import abstract class D {} //// [classAbstractManyKeywords.js] +"use strict"; var A = (function () { function A() { } diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.js b/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.js index bcf4cd60d7d9d..ae6bd9fe73040 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.js +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.js @@ -20,6 +20,7 @@ export class Test1 { //// [classMemberInitializerWithLamdaScoping3_0.js] var field1; //// [classMemberInitializerWithLamdaScoping3_1.js] +"use strict"; var Test1 = (function () { function Test1(field1) { this.field1 = field1; diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js index e6fbc48cadd11..a88e2e98a43f6 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js @@ -16,7 +16,9 @@ export class Test1 { } //// [classMemberInitializerWithLamdaScoping3_0.js] +"use strict"; //// [classMemberInitializerWithLamdaScoping3_1.js] +"use strict"; var Test1 = (function () { function Test1(field1) { this.field1 = field1; diff --git a/tests/baselines/reference/classdecl.errors.txt b/tests/baselines/reference/classdecl.errors.txt deleted file mode 100644 index e43be2f5ad083..0000000000000 --- a/tests/baselines/reference/classdecl.errors.txt +++ /dev/null @@ -1,108 +0,0 @@ -tests/cases/compiler/classdecl.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/classdecl.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/classdecl.ts(18,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/classdecl.ts(24,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/classdecl.ts (4 errors) ==== - class a { - //constructor (); - constructor (n: number); - constructor (s: string); - constructor (ns: any) { - - } - - public pgF() { } - - public pv; - public get d() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return 30; - } - public set d() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - public static get p2() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return { x: 30, y: 40 }; - } - - private static d2() { - } - private static get p3() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return "string"; - } - private pv3; - - private foo(n: number): string; - private foo(s: string): string; - private foo(ns: any) { - return ns.toString(); - } - } - - class b extends a { - } - - module m1 { - export class b { - } - class d { - } - - - export interface ib { - } - } - - module m2 { - - export module m3 { - export class c extends b { - } - export class ib2 implements m1.ib { - } - } - } - - class c extends m1.b { - } - - class ib2 implements m1.ib { - } - - declare class aAmbient { - constructor (n: number); - constructor (s: string); - public pgF(): void; - public pv; - public d : number; - static p2 : { x: number; y: number; }; - static d2(); - static p3; - private pv3; - private foo(s); - } - - class d { - private foo(n: number): string; - private foo(s: string): string; - private foo(ns: any) { - return ns.toString(); - } - } - - class e { - private foo(s: string): string; - private foo(n: number): string; - private foo(ns: any) { - return ns.toString(); - } - } \ No newline at end of file diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index 2af85da5b5783..b424243c164d5 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -13,7 +13,7 @@ class a { public get d() { return 30; } - public set d() { + public set d(a: number) { } public static get p2() { @@ -107,7 +107,7 @@ var a = (function () { get: function () { return 30; }, - set: function () { + set: function (a) { }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/classdecl.symbols b/tests/baselines/reference/classdecl.symbols new file mode 100644 index 0000000000000..ad355e2351760 --- /dev/null +++ b/tests/baselines/reference/classdecl.symbols @@ -0,0 +1,198 @@ +=== tests/cases/compiler/classdecl.ts === +class a { +>a : Symbol(a, Decl(classdecl.ts, 0, 0)) + + //constructor (); + constructor (n: number); +>n : Symbol(n, Decl(classdecl.ts, 2, 17)) + + constructor (s: string); +>s : Symbol(s, Decl(classdecl.ts, 3, 17)) + + constructor (ns: any) { +>ns : Symbol(ns, Decl(classdecl.ts, 4, 17)) + + } + + public pgF() { } +>pgF : Symbol(pgF, Decl(classdecl.ts, 6, 5)) + + public pv; +>pv : Symbol(pv, Decl(classdecl.ts, 8, 20)) + + public get d() { +>d : Symbol(d, Decl(classdecl.ts, 10, 14), Decl(classdecl.ts, 13, 5)) + + return 30; + } + public set d(a: number) { +>d : Symbol(d, Decl(classdecl.ts, 10, 14), Decl(classdecl.ts, 13, 5)) +>a : Symbol(a, Decl(classdecl.ts, 14, 17)) + } + + public static get p2() { +>p2 : Symbol(a.p2, Decl(classdecl.ts, 15, 5)) + + return { x: 30, y: 40 }; +>x : Symbol(x, Decl(classdecl.ts, 18, 16)) +>y : Symbol(y, Decl(classdecl.ts, 18, 23)) + } + + private static d2() { +>d2 : Symbol(a.d2, Decl(classdecl.ts, 19, 5)) + } + private static get p3() { +>p3 : Symbol(a.p3, Decl(classdecl.ts, 22, 5)) + + return "string"; + } + private pv3; +>pv3 : Symbol(pv3, Decl(classdecl.ts, 25, 5)) + + private foo(n: number): string; +>foo : Symbol(foo, Decl(classdecl.ts, 26, 16), Decl(classdecl.ts, 28, 35), Decl(classdecl.ts, 29, 35)) +>n : Symbol(n, Decl(classdecl.ts, 28, 16)) + + private foo(s: string): string; +>foo : Symbol(foo, Decl(classdecl.ts, 26, 16), Decl(classdecl.ts, 28, 35), Decl(classdecl.ts, 29, 35)) +>s : Symbol(s, Decl(classdecl.ts, 29, 16)) + + private foo(ns: any) { +>foo : Symbol(foo, Decl(classdecl.ts, 26, 16), Decl(classdecl.ts, 28, 35), Decl(classdecl.ts, 29, 35)) +>ns : Symbol(ns, Decl(classdecl.ts, 30, 16)) + + return ns.toString(); +>ns : Symbol(ns, Decl(classdecl.ts, 30, 16)) + } +} + +class b extends a { +>b : Symbol(b, Decl(classdecl.ts, 33, 1)) +>a : Symbol(a, Decl(classdecl.ts, 0, 0)) +} + +module m1 { +>m1 : Symbol(m1, Decl(classdecl.ts, 36, 1)) + + export class b { +>b : Symbol(b, Decl(classdecl.ts, 38, 11)) + } + class d { +>d : Symbol(d, Decl(classdecl.ts, 40, 5)) + } + + + export interface ib { +>ib : Symbol(ib, Decl(classdecl.ts, 42, 5)) + } +} + +module m2 { +>m2 : Symbol(m2, Decl(classdecl.ts, 47, 1)) + + export module m3 { +>m3 : Symbol(m3, Decl(classdecl.ts, 49, 11)) + + export class c extends b { +>c : Symbol(c, Decl(classdecl.ts, 51, 22)) +>b : Symbol(b, Decl(classdecl.ts, 33, 1)) + } + export class ib2 implements m1.ib { +>ib2 : Symbol(ib2, Decl(classdecl.ts, 53, 9)) +>m1.ib : Symbol(m1.ib, Decl(classdecl.ts, 42, 5)) +>m1 : Symbol(m1, Decl(classdecl.ts, 36, 1)) +>ib : Symbol(m1.ib, Decl(classdecl.ts, 42, 5)) + } + } +} + +class c extends m1.b { +>c : Symbol(c, Decl(classdecl.ts, 57, 1)) +>m1.b : Symbol(m1.b, Decl(classdecl.ts, 38, 11)) +>m1 : Symbol(m1, Decl(classdecl.ts, 36, 1)) +>b : Symbol(m1.b, Decl(classdecl.ts, 38, 11)) +} + +class ib2 implements m1.ib { +>ib2 : Symbol(ib2, Decl(classdecl.ts, 60, 1)) +>m1.ib : Symbol(m1.ib, Decl(classdecl.ts, 42, 5)) +>m1 : Symbol(m1, Decl(classdecl.ts, 36, 1)) +>ib : Symbol(m1.ib, Decl(classdecl.ts, 42, 5)) +} + +declare class aAmbient { +>aAmbient : Symbol(aAmbient, Decl(classdecl.ts, 63, 1)) + + constructor (n: number); +>n : Symbol(n, Decl(classdecl.ts, 66, 17)) + + constructor (s: string); +>s : Symbol(s, Decl(classdecl.ts, 67, 17)) + + public pgF(): void; +>pgF : Symbol(pgF, Decl(classdecl.ts, 67, 28)) + + public pv; +>pv : Symbol(pv, Decl(classdecl.ts, 68, 23)) + + public d : number; +>d : Symbol(d, Decl(classdecl.ts, 69, 14)) + + static p2 : { x: number; y: number; }; +>p2 : Symbol(aAmbient.p2, Decl(classdecl.ts, 70, 22)) +>x : Symbol(x, Decl(classdecl.ts, 71, 17)) +>y : Symbol(y, Decl(classdecl.ts, 71, 28)) + + static d2(); +>d2 : Symbol(aAmbient.d2, Decl(classdecl.ts, 71, 42)) + + static p3; +>p3 : Symbol(aAmbient.p3, Decl(classdecl.ts, 72, 16)) + + private pv3; +>pv3 : Symbol(pv3, Decl(classdecl.ts, 73, 14)) + + private foo(s); +>foo : Symbol(foo, Decl(classdecl.ts, 74, 16)) +>s : Symbol(s, Decl(classdecl.ts, 75, 16)) +} + +class d { +>d : Symbol(d, Decl(classdecl.ts, 76, 1)) + + private foo(n: number): string; +>foo : Symbol(foo, Decl(classdecl.ts, 78, 9), Decl(classdecl.ts, 79, 35), Decl(classdecl.ts, 80, 35)) +>n : Symbol(n, Decl(classdecl.ts, 79, 16)) + + private foo(s: string): string; +>foo : Symbol(foo, Decl(classdecl.ts, 78, 9), Decl(classdecl.ts, 79, 35), Decl(classdecl.ts, 80, 35)) +>s : Symbol(s, Decl(classdecl.ts, 80, 16)) + + private foo(ns: any) { +>foo : Symbol(foo, Decl(classdecl.ts, 78, 9), Decl(classdecl.ts, 79, 35), Decl(classdecl.ts, 80, 35)) +>ns : Symbol(ns, Decl(classdecl.ts, 81, 16)) + + return ns.toString(); +>ns : Symbol(ns, Decl(classdecl.ts, 81, 16)) + } +} + +class e { +>e : Symbol(e, Decl(classdecl.ts, 84, 1)) + + private foo(s: string): string; +>foo : Symbol(foo, Decl(classdecl.ts, 86, 9), Decl(classdecl.ts, 87, 35), Decl(classdecl.ts, 88, 35)) +>s : Symbol(s, Decl(classdecl.ts, 87, 16)) + + private foo(n: number): string; +>foo : Symbol(foo, Decl(classdecl.ts, 86, 9), Decl(classdecl.ts, 87, 35), Decl(classdecl.ts, 88, 35)) +>n : Symbol(n, Decl(classdecl.ts, 88, 16)) + + private foo(ns: any) { +>foo : Symbol(foo, Decl(classdecl.ts, 86, 9), Decl(classdecl.ts, 87, 35), Decl(classdecl.ts, 88, 35)) +>ns : Symbol(ns, Decl(classdecl.ts, 89, 16)) + + return ns.toString(); +>ns : Symbol(ns, Decl(classdecl.ts, 89, 16)) + } +} diff --git a/tests/baselines/reference/classdecl.types b/tests/baselines/reference/classdecl.types new file mode 100644 index 0000000000000..6339873656343 --- /dev/null +++ b/tests/baselines/reference/classdecl.types @@ -0,0 +1,212 @@ +=== tests/cases/compiler/classdecl.ts === +class a { +>a : a + + //constructor (); + constructor (n: number); +>n : number + + constructor (s: string); +>s : string + + constructor (ns: any) { +>ns : any + + } + + public pgF() { } +>pgF : () => void + + public pv; +>pv : any + + public get d() { +>d : number + + return 30; +>30 : number + } + public set d(a: number) { +>d : number +>a : number + } + + public static get p2() { +>p2 : { x: number; y: number; } + + return { x: 30, y: 40 }; +>{ x: 30, y: 40 } : { x: number; y: number; } +>x : number +>30 : number +>y : number +>40 : number + } + + private static d2() { +>d2 : () => void + } + private static get p3() { +>p3 : string + + return "string"; +>"string" : string + } + private pv3; +>pv3 : any + + private foo(n: number): string; +>foo : { (n: number): string; (s: string): string; } +>n : number + + private foo(s: string): string; +>foo : { (n: number): string; (s: string): string; } +>s : string + + private foo(ns: any) { +>foo : { (n: number): string; (s: string): string; } +>ns : any + + return ns.toString(); +>ns.toString() : any +>ns.toString : any +>ns : any +>toString : any + } +} + +class b extends a { +>b : b +>a : a +} + +module m1 { +>m1 : typeof m1 + + export class b { +>b : b + } + class d { +>d : d + } + + + export interface ib { +>ib : ib + } +} + +module m2 { +>m2 : typeof m2 + + export module m3 { +>m3 : typeof m3 + + export class c extends b { +>c : c +>b : b + } + export class ib2 implements m1.ib { +>ib2 : ib2 +>m1.ib : any +>m1 : typeof m1 +>ib : m1.ib + } + } +} + +class c extends m1.b { +>c : c +>m1.b : m1.b +>m1 : typeof m1 +>b : typeof m1.b +} + +class ib2 implements m1.ib { +>ib2 : ib2 +>m1.ib : any +>m1 : typeof m1 +>ib : m1.ib +} + +declare class aAmbient { +>aAmbient : aAmbient + + constructor (n: number); +>n : number + + constructor (s: string); +>s : string + + public pgF(): void; +>pgF : () => void + + public pv; +>pv : any + + public d : number; +>d : number + + static p2 : { x: number; y: number; }; +>p2 : { x: number; y: number; } +>x : number +>y : number + + static d2(); +>d2 : () => any + + static p3; +>p3 : any + + private pv3; +>pv3 : any + + private foo(s); +>foo : (s: any) => any +>s : any +} + +class d { +>d : d + + private foo(n: number): string; +>foo : { (n: number): string; (s: string): string; } +>n : number + + private foo(s: string): string; +>foo : { (n: number): string; (s: string): string; } +>s : string + + private foo(ns: any) { +>foo : { (n: number): string; (s: string): string; } +>ns : any + + return ns.toString(); +>ns.toString() : any +>ns.toString : any +>ns : any +>toString : any + } +} + +class e { +>e : e + + private foo(s: string): string; +>foo : { (s: string): string; (n: number): string; } +>s : string + + private foo(n: number): string; +>foo : { (s: string): string; (n: number): string; } +>n : number + + private foo(ns: any) { +>foo : { (s: string): string; (n: number): string; } +>ns : any + + return ns.toString(); +>ns.toString() : any +>ns.toString : any +>ns : any +>toString : any + } +} diff --git a/tests/baselines/reference/clinterfaces.js b/tests/baselines/reference/clinterfaces.js index a55924227c9ef..26f4efde61c97 100644 --- a/tests/baselines/reference/clinterfaces.js +++ b/tests/baselines/reference/clinterfaces.js @@ -26,6 +26,7 @@ export = Foo; //// [clinterfaces.js] +"use strict"; var M; (function (M) { var C = (function () { diff --git a/tests/baselines/reference/collisionExportsRequireAndAlias.js b/tests/baselines/reference/collisionExportsRequireAndAlias.js index 2e4210f49104d..cbf9633b31461 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAlias.js +++ b/tests/baselines/reference/collisionExportsRequireAndAlias.js @@ -19,18 +19,21 @@ export function foo2() { //// [collisionExportsRequireAndAlias_file1.js] define(["require", "exports"], function (require, exports) { + "use strict"; function bar() { } exports.bar = bar; }); //// [collisionExportsRequireAndAlias_file3333.js] define(["require", "exports"], function (require, exports) { + "use strict"; function bar2() { } exports.bar2 = bar2; }); //// [collisionExportsRequireAndAlias_file2.js] define(["require", "exports", 'collisionExportsRequireAndAlias_file1', 'collisionExportsRequireAndAlias_file3333'], function (require, exports, require, exports) { + "use strict"; function foo() { require.bar(); } diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientClass.js b/tests/baselines/reference/collisionExportsRequireAndAmbientClass.js index 9f4106616a84b..3083e9c586ba0 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAmbientClass.js +++ b/tests/baselines/reference/collisionExportsRequireAndAmbientClass.js @@ -39,6 +39,7 @@ module m4 { //// [collisionExportsRequireAndAmbientClass_externalmodule.js] define(["require", "exports"], function (require, exports) { + "use strict"; var m2; (function (m2) { })(m2 || (m2 = {})); diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientEnum.js b/tests/baselines/reference/collisionExportsRequireAndAmbientEnum.js index 829f93e4fa775..7f0f76381a308 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAmbientEnum.js +++ b/tests/baselines/reference/collisionExportsRequireAndAmbientEnum.js @@ -62,6 +62,7 @@ module m4 { //// [collisionExportsRequireAndAmbientEnum_externalmodule.js] define(["require", "exports"], function (require, exports) { + "use strict"; var m2; (function (m2) { })(m2 || (m2 = {})); diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js b/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js index c1fb0ce163ac1..37b1a724c2850 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js +++ b/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js @@ -15,6 +15,7 @@ module m2 { //// [collisionExportsRequireAndAmbientFunction.js] define(["require", "exports"], function (require, exports) { + "use strict"; var m2; (function (m2) { var a = 10; diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js b/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js index 4979e9e50ca3d..7f0a5c82d9a7b 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js +++ b/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js @@ -96,6 +96,7 @@ module m4 { //// [collisionExportsRequireAndAmbientModule_externalmodule.js] define(["require", "exports"], function (require, exports) { + "use strict"; function foo() { return null; } diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientVar.js b/tests/baselines/reference/collisionExportsRequireAndAmbientVar.js index 7a552251b158b..1e63364a3967c 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAmbientVar.js +++ b/tests/baselines/reference/collisionExportsRequireAndAmbientVar.js @@ -28,6 +28,7 @@ module m4 { //// [collisionExportsRequireAndAmbientVar_externalmodule.js] define(["require", "exports"], function (require, exports) { + "use strict"; var m2; (function (m2) { var a = 10; diff --git a/tests/baselines/reference/collisionExportsRequireAndClass.js b/tests/baselines/reference/collisionExportsRequireAndClass.js index f337d9a0a35a0..b993f9a23c58e 100644 --- a/tests/baselines/reference/collisionExportsRequireAndClass.js +++ b/tests/baselines/reference/collisionExportsRequireAndClass.js @@ -38,6 +38,7 @@ module m4 { //// [collisionExportsRequireAndClass_externalmodule.js] define(["require", "exports"], function (require, exports) { + "use strict"; var require = (function () { function require() { } diff --git a/tests/baselines/reference/collisionExportsRequireAndEnum.js b/tests/baselines/reference/collisionExportsRequireAndEnum.js index be63fa3285165..3935ee312fb73 100644 --- a/tests/baselines/reference/collisionExportsRequireAndEnum.js +++ b/tests/baselines/reference/collisionExportsRequireAndEnum.js @@ -62,6 +62,7 @@ module m4 { //// [collisionExportsRequireAndEnum_externalmodule.js] define(["require", "exports"], function (require, exports) { + "use strict"; (function (require) { require[require["_thisVal1"] = 0] = "_thisVal1"; require[require["_thisVal2"] = 1] = "_thisVal2"; diff --git a/tests/baselines/reference/collisionExportsRequireAndFunction.js b/tests/baselines/reference/collisionExportsRequireAndFunction.js index e768609f3c683..0fe5405cfb34b 100644 --- a/tests/baselines/reference/collisionExportsRequireAndFunction.js +++ b/tests/baselines/reference/collisionExportsRequireAndFunction.js @@ -24,6 +24,7 @@ module m2 { //// [collisionExportsRequireAndFunction.js] define(["require", "exports"], function (require, exports) { + "use strict"; function exports() { return 1; } diff --git a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.js b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.js index 07d23016fe677..71432241b00bc 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) { + "use strict"; var m; (function (m) { var c = (function () { diff --git a/tests/baselines/reference/collisionExportsRequireAndModule.js b/tests/baselines/reference/collisionExportsRequireAndModule.js index 112a84bc3e8f6..3c31c94437025 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) { + "use strict"; var require; (function (require) { var C = (function () { diff --git a/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.js b/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.js index 7961015b30b54..6270cf65c027c 100644 --- a/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.js +++ b/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.js @@ -16,6 +16,7 @@ export function foo2(): exports.I { //// [collisionExportsRequireAndUninstantiatedModule.js] define(["require", "exports"], function (require, exports) { + "use strict"; function foo() { return null; } diff --git a/tests/baselines/reference/collisionExportsRequireAndVar.js b/tests/baselines/reference/collisionExportsRequireAndVar.js index 07c8827603ed7..0686b9329211d 100644 --- a/tests/baselines/reference/collisionExportsRequireAndVar.js +++ b/tests/baselines/reference/collisionExportsRequireAndVar.js @@ -28,6 +28,7 @@ module m4 { //// [collisionExportsRequireAndVar_externalmodule.js] define(["require", "exports"], function (require, exports) { + "use strict"; function foo() { } exports.foo = foo; diff --git a/tests/baselines/reference/commentOnImportStatement1.js b/tests/baselines/reference/commentOnImportStatement1.js index 4c13b0ed72c2b..d9506e0072439 100644 --- a/tests/baselines/reference/commentOnImportStatement1.js +++ b/tests/baselines/reference/commentOnImportStatement1.js @@ -7,4 +7,5 @@ import foo = require('./foo'); //// [commentOnImportStatement1.js] /* Copyright */ define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/commentOnImportStatement2.js b/tests/baselines/reference/commentOnImportStatement2.js index 63cedfcab1850..e7550582dfe11 100644 --- a/tests/baselines/reference/commentOnImportStatement2.js +++ b/tests/baselines/reference/commentOnImportStatement2.js @@ -3,3 +3,4 @@ import foo = require('./foo'); //// [commentOnImportStatement2.js] +"use strict"; diff --git a/tests/baselines/reference/commentOnImportStatement3.js b/tests/baselines/reference/commentOnImportStatement3.js index a230470dcb274..f716fa32baaa7 100644 --- a/tests/baselines/reference/commentOnImportStatement3.js +++ b/tests/baselines/reference/commentOnImportStatement3.js @@ -6,3 +6,4 @@ import foo = require('./foo'); //// [commentOnImportStatement3.js] /* copyright */ +"use strict"; diff --git a/tests/baselines/reference/commentsBeforeVariableStatement1.js b/tests/baselines/reference/commentsBeforeVariableStatement1.js index c82909f8cd414..f172c40cc0df8 100644 --- a/tests/baselines/reference/commentsBeforeVariableStatement1.js +++ b/tests/baselines/reference/commentsBeforeVariableStatement1.js @@ -5,4 +5,5 @@ export var b: number; //// [commentsBeforeVariableStatement1.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/commentsDottedModuleName.js b/tests/baselines/reference/commentsDottedModuleName.js index b727d8afa721f..ef3e591b55e8e 100644 --- a/tests/baselines/reference/commentsDottedModuleName.js +++ b/tests/baselines/reference/commentsDottedModuleName.js @@ -9,6 +9,7 @@ export module outerModule.InnerModule { //// [commentsDottedModuleName.js] define(["require", "exports"], function (require, exports) { + "use strict"; /** this is multi declare module*/ var outerModule; (function (outerModule) { diff --git a/tests/baselines/reference/commentsExternalModules.js b/tests/baselines/reference/commentsExternalModules.js index c982e66bf72fb..f1a5781d67b55 100644 --- a/tests/baselines/reference/commentsExternalModules.js +++ b/tests/baselines/reference/commentsExternalModules.js @@ -63,6 +63,7 @@ var newVar2 = new extMod.m4.m2.c(); //// [commentsExternalModules_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; /** Module comment*/ var m1; (function (m1) { @@ -126,6 +127,7 @@ define(["require", "exports"], function (require, exports) { }); //// [commentsExternalModules_1.js] define(["require", "exports", "commentsExternalModules_0"], function (require, exports, extMod) { + "use strict"; extMod.m1.fooExport(); var newVar = new extMod.m1.m2.c(); extMod.m4.fooExport(); diff --git a/tests/baselines/reference/commentsExternalModules2.js b/tests/baselines/reference/commentsExternalModules2.js index 2c8b811d7543f..ce367a136e3e0 100644 --- a/tests/baselines/reference/commentsExternalModules2.js +++ b/tests/baselines/reference/commentsExternalModules2.js @@ -63,6 +63,7 @@ export var newVar2 = new extMod.m4.m2.c(); //// [commentsExternalModules2_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; /** Module comment*/ var m1; (function (m1) { @@ -126,6 +127,7 @@ define(["require", "exports"], function (require, exports) { }); //// [commentsExternalModules_1.js] define(["require", "exports", "commentsExternalModules2_0"], function (require, exports, extMod) { + "use strict"; extMod.m1.fooExport(); exports.newVar = new extMod.m1.m2.c(); extMod.m4.fooExport(); diff --git a/tests/baselines/reference/commentsExternalModules3.js b/tests/baselines/reference/commentsExternalModules3.js index 2acf93296de81..76ff906155ae1 100644 --- a/tests/baselines/reference/commentsExternalModules3.js +++ b/tests/baselines/reference/commentsExternalModules3.js @@ -62,6 +62,7 @@ export var newVar2 = new extMod.m4.m2.c(); //// [commentsExternalModules2_0.js] +"use strict"; /** Module comment*/ var m1; (function (m1) { @@ -123,6 +124,7 @@ var m4; m4.fooExport(); var myvar2 = new m4.m2.c(); //// [commentsExternalModules_1.js] +"use strict"; /**This is on import declaration*/ var extMod = require("./commentsExternalModules2_0"); // trailing comment 1 extMod.m1.fooExport(); diff --git a/tests/baselines/reference/commentsMultiModuleMultiFile.js b/tests/baselines/reference/commentsMultiModuleMultiFile.js index 3201c25625683..cf85a1b1c02d6 100644 --- a/tests/baselines/reference/commentsMultiModuleMultiFile.js +++ b/tests/baselines/reference/commentsMultiModuleMultiFile.js @@ -38,6 +38,7 @@ new multiM.d(); //// [commentsMultiModuleMultiFile_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; /** this is multi declare module*/ var multiM; (function (multiM) { @@ -72,6 +73,7 @@ define(["require", "exports"], function (require, exports) { }); //// [commentsMultiModuleMultiFile_1.js] define(["require", "exports"], function (require, exports) { + "use strict"; /** this is multi module 3 comment*/ var multiM; (function (multiM) { diff --git a/tests/baselines/reference/commonJSImportAsPrimaryExpression.js b/tests/baselines/reference/commonJSImportAsPrimaryExpression.js index 9ae5a21c86295..e43b321893af3 100644 --- a/tests/baselines/reference/commonJSImportAsPrimaryExpression.js +++ b/tests/baselines/reference/commonJSImportAsPrimaryExpression.js @@ -14,6 +14,7 @@ if(foo.C1.s1){ //// [foo_0.js] +"use strict"; var C1 = (function () { function C1() { this.m1 = 42; @@ -23,6 +24,7 @@ var C1 = (function () { })(); exports.C1 = C1; //// [foo_1.js] +"use strict"; var foo = require("./foo_0"); if (foo.C1.s1) { } diff --git a/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js b/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js index 266ffe4698afe..8ecda412106aa 100644 --- a/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js @@ -32,6 +32,7 @@ var z: foo.M1.I2; var e: number = 0; //// [foo_0.js] +"use strict"; var C1 = (function () { function C1() { this.m1 = 42; @@ -47,6 +48,7 @@ exports.C1 = C1; })(exports.E1 || (exports.E1 = {})); var E1 = exports.E1; //// [foo_1.js] +"use strict"; var i; var x = {}; var y = false; diff --git a/tests/baselines/reference/commonSourceDir1.js b/tests/baselines/reference/commonSourceDir1.js new file mode 100644 index 0000000000000..68833aed49db0 --- /dev/null +++ b/tests/baselines/reference/commonSourceDir1.js @@ -0,0 +1,13 @@ +//// [tests/cases/compiler/commonSourceDir1.ts] //// + +//// [bar.ts] +var x: number; + +//// [baz.ts] +var y: number; + + +//// [bar.js] +var x; +//// [baz.js] +var y; diff --git a/tests/baselines/reference/commonSourceDir1.symbols b/tests/baselines/reference/commonSourceDir1.symbols new file mode 100644 index 0000000000000..9248e0c97afb6 --- /dev/null +++ b/tests/baselines/reference/commonSourceDir1.symbols @@ -0,0 +1,8 @@ +=== A:/foo/bar.ts === +var x: number; +>x : Symbol(x, Decl(bar.ts, 0, 3)) + +=== A:/foo/baz.ts === +var y: number; +>y : Symbol(y, Decl(baz.ts, 0, 3)) + diff --git a/tests/baselines/reference/commonSourceDir1.types b/tests/baselines/reference/commonSourceDir1.types new file mode 100644 index 0000000000000..6c9864c02ccb8 --- /dev/null +++ b/tests/baselines/reference/commonSourceDir1.types @@ -0,0 +1,8 @@ +=== A:/foo/bar.ts === +var x: number; +>x : number + +=== A:/foo/baz.ts === +var y: number; +>y : number + diff --git a/tests/baselines/reference/commonSourceDir2.errors.txt b/tests/baselines/reference/commonSourceDir2.errors.txt new file mode 100644 index 0000000000000..85bcf5d9c722c --- /dev/null +++ b/tests/baselines/reference/commonSourceDir2.errors.txt @@ -0,0 +1,9 @@ +error TS5009: Cannot find the common subdirectory path for the input files. + + +!!! error TS5009: Cannot find the common subdirectory path for the input files. +==== A:/foo/bar.ts (0 errors) ==== + var x: number; + +==== B:/foo/baz.ts (0 errors) ==== + var y: number; \ No newline at end of file diff --git a/tests/baselines/reference/commonSourceDir2.js b/tests/baselines/reference/commonSourceDir2.js new file mode 100644 index 0000000000000..cf263b51fb60b --- /dev/null +++ b/tests/baselines/reference/commonSourceDir2.js @@ -0,0 +1,12 @@ +//// [tests/cases/compiler/commonSourceDir2.ts] //// + +//// [bar.ts] +var x: number; + +//// [baz.ts] +var y: number; + +//// [bar.js] +var x; +//// [baz.js] +var y; diff --git a/tests/baselines/reference/commonSourceDir3.js b/tests/baselines/reference/commonSourceDir3.js new file mode 100644 index 0000000000000..0535d51f4bf08 --- /dev/null +++ b/tests/baselines/reference/commonSourceDir3.js @@ -0,0 +1,12 @@ +//// [tests/cases/compiler/commonSourceDir3.ts] //// + +//// [bar.ts] +var x: number; + +//// [baz.ts] +var y: number; + +//// [bar.js] +var x; +//// [baz.js] +var y; diff --git a/tests/baselines/reference/commonSourceDir3.symbols b/tests/baselines/reference/commonSourceDir3.symbols new file mode 100644 index 0000000000000..b8783523dfd9a --- /dev/null +++ b/tests/baselines/reference/commonSourceDir3.symbols @@ -0,0 +1,8 @@ +=== A:/foo/bar.ts === +var x: number; +>x : Symbol(x, Decl(bar.ts, 0, 3)) + +=== a:/foo/baz.ts === +var y: number; +>y : Symbol(y, Decl(baz.ts, 0, 3)) + diff --git a/tests/baselines/reference/commonSourceDir3.types b/tests/baselines/reference/commonSourceDir3.types new file mode 100644 index 0000000000000..a0b95275897a2 --- /dev/null +++ b/tests/baselines/reference/commonSourceDir3.types @@ -0,0 +1,8 @@ +=== A:/foo/bar.ts === +var x: number; +>x : number + +=== a:/foo/baz.ts === +var y: number; +>y : number + diff --git a/tests/baselines/reference/commonSourceDir4.errors.txt b/tests/baselines/reference/commonSourceDir4.errors.txt new file mode 100644 index 0000000000000..f3493504e4d56 --- /dev/null +++ b/tests/baselines/reference/commonSourceDir4.errors.txt @@ -0,0 +1,9 @@ +error TS5009: Cannot find the common subdirectory path for the input files. + + +!!! error TS5009: Cannot find the common subdirectory path for the input files. +==== A:/foo/bar.ts (0 errors) ==== + var x: number; + +==== a:/foo/baz.ts (0 errors) ==== + var y: number; \ No newline at end of file diff --git a/tests/baselines/reference/commonSourceDir4.js b/tests/baselines/reference/commonSourceDir4.js new file mode 100644 index 0000000000000..2f2af9f68b2d9 --- /dev/null +++ b/tests/baselines/reference/commonSourceDir4.js @@ -0,0 +1,12 @@ +//// [tests/cases/compiler/commonSourceDir4.ts] //// + +//// [bar.ts] +var x: number; + +//// [baz.ts] +var y: number; + +//// [bar.js] +var x; +//// [baz.js] +var y; diff --git a/tests/baselines/reference/commonSourceDir5.js b/tests/baselines/reference/commonSourceDir5.js new file mode 100644 index 0000000000000..7a43aba254e1d --- /dev/null +++ b/tests/baselines/reference/commonSourceDir5.js @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/commonSourceDir5.ts] //// + +//// [bar.ts] +import {z} from "./foo"; +export var x = z + z; + +//// [foo.ts] +import {pi} from "B:/baz"; +export var i = Math.sqrt(-1); +export var z = pi * pi; + +//// [baz.ts] +import {x} from "A:/bar"; +import {i} from "A:/foo"; +export var pi = Math.PI; +export var y = x * i; + +//// [concat.js] +define("B:/baz", ["require", "exports", "A:/bar", "A:/foo"], function (require, exports, bar_1, foo_1) { + "use strict"; + exports.pi = Math.PI; + exports.y = bar_1.x * foo_1.i; +}); +define("A:/foo", ["require", "exports", "B:/baz"], function (require, exports, baz_1) { + "use strict"; + exports.i = Math.sqrt(-1); + exports.z = baz_1.pi * baz_1.pi; +}); +define("A:/bar", ["require", "exports", "A:/foo"], function (require, exports, foo_2) { + "use strict"; + exports.x = foo_2.z + foo_2.z; +}); diff --git a/tests/baselines/reference/commonSourceDir5.symbols b/tests/baselines/reference/commonSourceDir5.symbols new file mode 100644 index 0000000000000..6426ac39de3c4 --- /dev/null +++ b/tests/baselines/reference/commonSourceDir5.symbols @@ -0,0 +1,42 @@ +=== A:/bar.ts === +import {z} from "./foo"; +>z : Symbol(z, Decl(bar.ts, 0, 8)) + +export var x = z + z; +>x : Symbol(x, Decl(bar.ts, 1, 10)) +>z : Symbol(z, Decl(bar.ts, 0, 8)) +>z : Symbol(z, Decl(bar.ts, 0, 8)) + +=== A:/foo.ts === +import {pi} from "B:/baz"; +>pi : Symbol(pi, Decl(foo.ts, 0, 8)) + +export var i = Math.sqrt(-1); +>i : Symbol(i, Decl(foo.ts, 1, 10)) +>Math.sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) + +export var z = pi * pi; +>z : Symbol(z, Decl(foo.ts, 2, 10)) +>pi : Symbol(pi, Decl(foo.ts, 0, 8)) +>pi : Symbol(pi, Decl(foo.ts, 0, 8)) + +=== B:/baz.ts === +import {x} from "A:/bar"; +>x : Symbol(x, Decl(baz.ts, 0, 8)) + +import {i} from "A:/foo"; +>i : Symbol(i, Decl(baz.ts, 1, 8)) + +export var pi = Math.PI; +>pi : Symbol(pi, Decl(baz.ts, 2, 10)) +>Math.PI : Symbol(Math.PI, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>PI : Symbol(Math.PI, Decl(lib.d.ts, --, --)) + +export var y = x * i; +>y : Symbol(y, Decl(baz.ts, 3, 10)) +>x : Symbol(x, Decl(baz.ts, 0, 8)) +>i : Symbol(i, Decl(baz.ts, 1, 8)) + diff --git a/tests/baselines/reference/commonSourceDir5.types b/tests/baselines/reference/commonSourceDir5.types new file mode 100644 index 0000000000000..ff13bb20215c0 --- /dev/null +++ b/tests/baselines/reference/commonSourceDir5.types @@ -0,0 +1,48 @@ +=== A:/bar.ts === +import {z} from "./foo"; +>z : number + +export var x = z + z; +>x : number +>z + z : number +>z : number +>z : number + +=== A:/foo.ts === +import {pi} from "B:/baz"; +>pi : number + +export var i = Math.sqrt(-1); +>i : number +>Math.sqrt(-1) : number +>Math.sqrt : (x: number) => number +>Math : Math +>sqrt : (x: number) => number +>-1 : number +>1 : number + +export var z = pi * pi; +>z : number +>pi * pi : number +>pi : number +>pi : number + +=== B:/baz.ts === +import {x} from "A:/bar"; +>x : number + +import {i} from "A:/foo"; +>i : number + +export var pi = Math.PI; +>pi : number +>Math.PI : number +>Math : Math +>PI : number + +export var y = x * i; +>y : number +>x * i : number +>x : number +>i : number + diff --git a/tests/baselines/reference/commonSourceDir6.js b/tests/baselines/reference/commonSourceDir6.js new file mode 100644 index 0000000000000..6fe0b4a1b8fe5 --- /dev/null +++ b/tests/baselines/reference/commonSourceDir6.js @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/commonSourceDir6.ts] //// + +//// [bar.ts] +import {z} from "./foo"; +export var x = z + z; + +//// [foo.ts] +import {pi} from "../baz"; +export var i = Math.sqrt(-1); +export var z = pi * pi; + +//// [baz.ts] +import {x} from "a/bar"; +import {i} from "a/foo"; +export var pi = Math.PI; +export var y = x * i; + +//// [concat.js] +define("tests/cases/compiler/baz", ["require", "exports", "tests/cases/compiler/a/bar", "tests/cases/compiler/a/foo"], function (require, exports, bar_1, foo_1) { + "use strict"; + exports.pi = Math.PI; + exports.y = bar_1.x * foo_1.i; +}); +define("tests/cases/compiler/a/foo", ["require", "exports", "tests/cases/compiler/baz"], function (require, exports, baz_1) { + "use strict"; + exports.i = Math.sqrt(-1); + exports.z = baz_1.pi * baz_1.pi; +}); +define("tests/cases/compiler/a/bar", ["require", "exports", "tests/cases/compiler/a/foo"], function (require, exports, foo_2) { + "use strict"; + exports.x = foo_2.z + foo_2.z; +}); diff --git a/tests/baselines/reference/commonSourceDir6.symbols b/tests/baselines/reference/commonSourceDir6.symbols new file mode 100644 index 0000000000000..e9d5edb28b205 --- /dev/null +++ b/tests/baselines/reference/commonSourceDir6.symbols @@ -0,0 +1,42 @@ +=== tests/cases/compiler/a/bar.ts === +import {z} from "./foo"; +>z : Symbol(z, Decl(bar.ts, 0, 8)) + +export var x = z + z; +>x : Symbol(x, Decl(bar.ts, 1, 10)) +>z : Symbol(z, Decl(bar.ts, 0, 8)) +>z : Symbol(z, Decl(bar.ts, 0, 8)) + +=== tests/cases/compiler/a/foo.ts === +import {pi} from "../baz"; +>pi : Symbol(pi, Decl(foo.ts, 0, 8)) + +export var i = Math.sqrt(-1); +>i : Symbol(i, Decl(foo.ts, 1, 10)) +>Math.sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) + +export var z = pi * pi; +>z : Symbol(z, Decl(foo.ts, 2, 10)) +>pi : Symbol(pi, Decl(foo.ts, 0, 8)) +>pi : Symbol(pi, Decl(foo.ts, 0, 8)) + +=== tests/cases/compiler/baz.ts === +import {x} from "a/bar"; +>x : Symbol(x, Decl(baz.ts, 0, 8)) + +import {i} from "a/foo"; +>i : Symbol(i, Decl(baz.ts, 1, 8)) + +export var pi = Math.PI; +>pi : Symbol(pi, Decl(baz.ts, 2, 10)) +>Math.PI : Symbol(Math.PI, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>PI : Symbol(Math.PI, Decl(lib.d.ts, --, --)) + +export var y = x * i; +>y : Symbol(y, Decl(baz.ts, 3, 10)) +>x : Symbol(x, Decl(baz.ts, 0, 8)) +>i : Symbol(i, Decl(baz.ts, 1, 8)) + diff --git a/tests/baselines/reference/commonSourceDir6.types b/tests/baselines/reference/commonSourceDir6.types new file mode 100644 index 0000000000000..e30cdd2deeea5 --- /dev/null +++ b/tests/baselines/reference/commonSourceDir6.types @@ -0,0 +1,48 @@ +=== tests/cases/compiler/a/bar.ts === +import {z} from "./foo"; +>z : number + +export var x = z + z; +>x : number +>z + z : number +>z : number +>z : number + +=== tests/cases/compiler/a/foo.ts === +import {pi} from "../baz"; +>pi : number + +export var i = Math.sqrt(-1); +>i : number +>Math.sqrt(-1) : number +>Math.sqrt : (x: number) => number +>Math : Math +>sqrt : (x: number) => number +>-1 : number +>1 : number + +export var z = pi * pi; +>z : number +>pi * pi : number +>pi : number +>pi : number + +=== tests/cases/compiler/baz.ts === +import {x} from "a/bar"; +>x : number + +import {i} from "a/foo"; +>i : number + +export var pi = Math.PI; +>pi : number +>Math.PI : number +>Math : Math +>PI : number + +export var y = x * i; +>y : number +>x * i : number +>x : number +>i : number + diff --git a/tests/baselines/reference/commonjsSafeImport.js b/tests/baselines/reference/commonjsSafeImport.js index a0ef81cc27782..dd5acba597cee 100644 --- a/tests/baselines/reference/commonjsSafeImport.js +++ b/tests/baselines/reference/commonjsSafeImport.js @@ -11,9 +11,11 @@ Foo(); //// [10_lib.js] +"use strict"; function Foo() { } exports.Foo = Foo; //// [main.js] +"use strict"; var _10_lib_1 = require('./10_lib'); _10_lib_1.Foo(); diff --git a/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline b/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline new file mode 100644 index 0000000000000..f9bcca268ec34 --- /dev/null +++ b/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline @@ -0,0 +1,8 @@ +EmitSkipped: true +Diagnostics: + Cannot write file 'tests/cases/fourslash/b.js' because it would overwrite input file. + +EmitSkipped: false +FileName : tests/cases/fourslash/a.js +function foo2() { return 30; } // no error - should emit a.js + diff --git a/tests/baselines/reference/computedPropertiesInDestructuring1.errors.txt b/tests/baselines/reference/computedPropertiesInDestructuring1.errors.txt new file mode 100644 index 0000000000000..dc536e544b23f --- /dev/null +++ b/tests/baselines/reference/computedPropertiesInDestructuring1.errors.txt @@ -0,0 +1,52 @@ +tests/cases/compiler/computedPropertiesInDestructuring1.ts(20,8): error TS2349: Cannot invoke an expression whose type lacks a call signature. +tests/cases/compiler/computedPropertiesInDestructuring1.ts(21,12): error TS2339: Property 'toExponential' does not exist on type 'string'. +tests/cases/compiler/computedPropertiesInDestructuring1.ts(33,4): error TS2349: Cannot invoke an expression whose type lacks a call signature. +tests/cases/compiler/computedPropertiesInDestructuring1.ts(34,5): error TS2365: Operator '+' cannot be applied to types 'number' and '{}'. + + +==== tests/cases/compiler/computedPropertiesInDestructuring1.ts (4 errors) ==== + // destructuring in variable declarations + let foo = "bar"; + let {[foo]: bar} = {bar: "bar"}; + + let {["bar"]: bar2} = {bar: "bar"}; + + let foo2 = () => "bar"; + let {[foo2()]: bar3} = {bar: "bar"}; + + let [{[foo]: bar4}] = [{bar: "bar"}]; + let [{[foo2()]: bar5}] = [{bar: "bar"}]; + + function f1({["bar"]: x}: { bar: number }) {} + function f2({[foo]: x}: { bar: number }) {} + function f3({[foo2()]: x}: { bar: number }) {} + function f4([{[foo]: x}]: [{ bar: number }]) {} + function f5([{[foo2()]: x}]: [{ bar: number }]) {} + + // report errors on type errors in computed properties used in destructuring + let [{[foo()]: bar6}] = [{bar: "bar"}]; + ~~~~~ +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. + let [{[foo.toExponential()]: bar7}] = [{bar: "bar"}]; + ~~~~~~~~~~~~~ +!!! error TS2339: Property 'toExponential' does not exist on type 'string'. + + // destructuring assignment + ({[foo]: bar} = {bar: "bar"}); + + ({["bar"]: bar2} = {bar: "bar"}); + + ({[foo2()]: bar3} = {bar: "bar"}); + + [{[foo]: bar4}] = [{bar: "bar"}]; + [{[foo2()]: bar5}] = [{bar: "bar"}]; + + [{[foo()]: bar4}] = [{bar: "bar"}]; + ~~~~~ +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. + [{[(1 + {})]: bar4}] = [{bar: "bar"}]; + ~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types 'number' and '{}'. + + + \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertiesInDestructuring1.js b/tests/baselines/reference/computedPropertiesInDestructuring1.js new file mode 100644 index 0000000000000..0bc4286ed7b79 --- /dev/null +++ b/tests/baselines/reference/computedPropertiesInDestructuring1.js @@ -0,0 +1,75 @@ +//// [computedPropertiesInDestructuring1.ts] +// destructuring in variable declarations +let foo = "bar"; +let {[foo]: bar} = {bar: "bar"}; + +let {["bar"]: bar2} = {bar: "bar"}; + +let foo2 = () => "bar"; +let {[foo2()]: bar3} = {bar: "bar"}; + +let [{[foo]: bar4}] = [{bar: "bar"}]; +let [{[foo2()]: bar5}] = [{bar: "bar"}]; + +function f1({["bar"]: x}: { bar: number }) {} +function f2({[foo]: x}: { bar: number }) {} +function f3({[foo2()]: x}: { bar: number }) {} +function f4([{[foo]: x}]: [{ bar: number }]) {} +function f5([{[foo2()]: x}]: [{ bar: number }]) {} + +// report errors on type errors in computed properties used in destructuring +let [{[foo()]: bar6}] = [{bar: "bar"}]; +let [{[foo.toExponential()]: bar7}] = [{bar: "bar"}]; + +// destructuring assignment +({[foo]: bar} = {bar: "bar"}); + +({["bar"]: bar2} = {bar: "bar"}); + +({[foo2()]: bar3} = {bar: "bar"}); + +[{[foo]: bar4}] = [{bar: "bar"}]; +[{[foo2()]: bar5}] = [{bar: "bar"}]; + +[{[foo()]: bar4}] = [{bar: "bar"}]; +[{[(1 + {})]: bar4}] = [{bar: "bar"}]; + + + + +//// [computedPropertiesInDestructuring1.js] +// destructuring in variable declarations +var foo = "bar"; +var _a = foo, bar = { bar: "bar" }[_a]; +var _b = "bar", bar2 = { bar: "bar" }[_b]; +var foo2 = function () { return "bar"; }; +var _c = foo2(), bar3 = { bar: "bar" }[_c]; +var _d = foo, bar4 = [{ bar: "bar" }][0][_d]; +var _e = foo2(), bar5 = [{ bar: "bar" }][0][_e]; +function f1(_a) { + var _b = "bar", x = _a[_b]; +} +function f2(_a) { + var _b = foo, x = _a[_b]; +} +function f3(_a) { + var _b = foo2(), x = _a[_b]; +} +function f4(_a) { + var _b = foo, x = _a[0][_b]; +} +function f5(_a) { + var _b = foo2(), x = _a[0][_b]; +} +// report errors on type errors in computed properties used in destructuring +var _f = foo(), bar6 = [{ bar: "bar" }][0][_f]; +var _g = foo.toExponential(), bar7 = [{ bar: "bar" }][0][_g]; +// destructuring assignment +(_h = { bar: "bar" }, _j = foo, bar = _h[_j], _h); +(_k = { bar: "bar" }, _l = "bar", bar2 = _k[_l], _k); +(_m = { bar: "bar" }, _o = foo2(), bar3 = _m[_o], _m); +_p = foo, bar4 = [{ bar: "bar" }][0][_p]; +_q = foo2(), bar5 = [{ bar: "bar" }][0][_q]; +_r = foo(), bar4 = [{ bar: "bar" }][0][_r]; +_s = (1 + {}), bar4 = [{ bar: "bar" }][0][_s]; +var _h, _j, _k, _l, _m, _o, _p, _q, _r, _s; diff --git a/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.errors.txt b/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.errors.txt new file mode 100644 index 0000000000000..96ab892d1b953 --- /dev/null +++ b/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.errors.txt @@ -0,0 +1,51 @@ +tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(21,8): error TS2349: Cannot invoke an expression whose type lacks a call signature. +tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(22,12): error TS2339: Property 'toExponential' does not exist on type 'string'. +tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(34,4): error TS2349: Cannot invoke an expression whose type lacks a call signature. +tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(35,5): error TS2365: Operator '+' cannot be applied to types 'number' and '{}'. + + +==== tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts (4 errors) ==== + // destructuring in variable declarations + let foo = "bar"; + let {[foo]: bar} = {bar: "bar"}; + + let {["bar"]: bar2} = {bar: "bar"}; + let {[11]: bar2_1} = {11: "bar"}; + + let foo2 = () => "bar"; + let {[foo2()]: bar3} = {bar: "bar"}; + + let [{[foo]: bar4}] = [{bar: "bar"}]; + let [{[foo2()]: bar5}] = [{bar: "bar"}]; + + function f1({["bar"]: x}: { bar: number }) {} + function f2({[foo]: x}: { bar: number }) {} + function f3({[foo2()]: x}: { bar: number }) {} + function f4([{[foo]: x}]: [{ bar: number }]) {} + function f5([{[foo2()]: x}]: [{ bar: number }]) {} + + // report errors on type errors in computed properties used in destructuring + let [{[foo()]: bar6}] = [{bar: "bar"}]; + ~~~~~ +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. + let [{[foo.toExponential()]: bar7}] = [{bar: "bar"}]; + ~~~~~~~~~~~~~ +!!! error TS2339: Property 'toExponential' does not exist on type 'string'. + + // destructuring assignment + ({[foo]: bar} = {bar: "bar"}); + + ({["bar"]: bar2} = {bar: "bar"}); + + ({[foo2()]: bar3} = {bar: "bar"}); + + [{[foo]: bar4}] = [{bar: "bar"}]; + [{[foo2()]: bar5}] = [{bar: "bar"}]; + + [{[foo()]: bar4}] = [{bar: "bar"}]; + ~~~~~ +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. + [{[(1 + {})]: bar4}] = [{bar: "bar"}]; + ~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types 'number' and '{}'. + \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.js b/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.js new file mode 100644 index 0000000000000..e6e19f93b802d --- /dev/null +++ b/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.js @@ -0,0 +1,64 @@ +//// [computedPropertiesInDestructuring1_ES6.ts] +// destructuring in variable declarations +let foo = "bar"; +let {[foo]: bar} = {bar: "bar"}; + +let {["bar"]: bar2} = {bar: "bar"}; +let {[11]: bar2_1} = {11: "bar"}; + +let foo2 = () => "bar"; +let {[foo2()]: bar3} = {bar: "bar"}; + +let [{[foo]: bar4}] = [{bar: "bar"}]; +let [{[foo2()]: bar5}] = [{bar: "bar"}]; + +function f1({["bar"]: x}: { bar: number }) {} +function f2({[foo]: x}: { bar: number }) {} +function f3({[foo2()]: x}: { bar: number }) {} +function f4([{[foo]: x}]: [{ bar: number }]) {} +function f5([{[foo2()]: x}]: [{ bar: number }]) {} + +// report errors on type errors in computed properties used in destructuring +let [{[foo()]: bar6}] = [{bar: "bar"}]; +let [{[foo.toExponential()]: bar7}] = [{bar: "bar"}]; + +// destructuring assignment +({[foo]: bar} = {bar: "bar"}); + +({["bar"]: bar2} = {bar: "bar"}); + +({[foo2()]: bar3} = {bar: "bar"}); + +[{[foo]: bar4}] = [{bar: "bar"}]; +[{[foo2()]: bar5}] = [{bar: "bar"}]; + +[{[foo()]: bar4}] = [{bar: "bar"}]; +[{[(1 + {})]: bar4}] = [{bar: "bar"}]; + + +//// [computedPropertiesInDestructuring1_ES6.js] +// destructuring in variable declarations +let foo = "bar"; +let { [foo]: bar } = { bar: "bar" }; +let { ["bar"]: bar2 } = { bar: "bar" }; +let { [11]: bar2_1 } = { 11: "bar" }; +let foo2 = () => "bar"; +let { [foo2()]: bar3 } = { bar: "bar" }; +let [{ [foo]: bar4 }] = [{ bar: "bar" }]; +let [{ [foo2()]: bar5 }] = [{ bar: "bar" }]; +function f1({ ["bar"]: x }) { } +function f2({ [foo]: x }) { } +function f3({ [foo2()]: x }) { } +function f4([{ [foo]: x }]) { } +function f5([{ [foo2()]: x }]) { } +// report errors on type errors in computed properties used in destructuring +let [{ [foo()]: bar6 }] = [{ bar: "bar" }]; +let [{ [foo.toExponential()]: bar7 }] = [{ bar: "bar" }]; +// destructuring assignment +({ [foo]: bar } = { bar: "bar" }); +({ ["bar"]: bar2 } = { bar: "bar" }); +({ [foo2()]: bar3 } = { bar: "bar" }); +[{ [foo]: bar4 }] = [{ bar: "bar" }]; +[{ [foo2()]: bar5 }] = [{ bar: "bar" }]; +[{ [foo()]: bar4 }] = [{ bar: "bar" }]; +[{ [(1 + {})]: bar4 }] = [{ bar: "bar" }]; diff --git a/tests/baselines/reference/computedPropertiesInDestructuring2.js b/tests/baselines/reference/computedPropertiesInDestructuring2.js new file mode 100644 index 0000000000000..8579881b77546 --- /dev/null +++ b/tests/baselines/reference/computedPropertiesInDestructuring2.js @@ -0,0 +1,7 @@ +//// [computedPropertiesInDestructuring2.ts] +let foo2 = () => "bar"; +let {[foo2()]: bar3} = {}; + +//// [computedPropertiesInDestructuring2.js] +var foo2 = function () { return "bar"; }; +var _a = foo2(), bar3 = {}[_a]; diff --git a/tests/baselines/reference/computedPropertiesInDestructuring2.symbols b/tests/baselines/reference/computedPropertiesInDestructuring2.symbols new file mode 100644 index 0000000000000..4ae6d5323e187 --- /dev/null +++ b/tests/baselines/reference/computedPropertiesInDestructuring2.symbols @@ -0,0 +1,8 @@ +=== tests/cases/compiler/computedPropertiesInDestructuring2.ts === +let foo2 = () => "bar"; +>foo2 : Symbol(foo2, Decl(computedPropertiesInDestructuring2.ts, 0, 3)) + +let {[foo2()]: bar3} = {}; +>foo2 : Symbol(foo2, Decl(computedPropertiesInDestructuring2.ts, 0, 3)) +>bar3 : Symbol(bar3, Decl(computedPropertiesInDestructuring2.ts, 1, 5)) + diff --git a/tests/baselines/reference/computedPropertiesInDestructuring2.types b/tests/baselines/reference/computedPropertiesInDestructuring2.types new file mode 100644 index 0000000000000..0fa2066227047 --- /dev/null +++ b/tests/baselines/reference/computedPropertiesInDestructuring2.types @@ -0,0 +1,12 @@ +=== tests/cases/compiler/computedPropertiesInDestructuring2.ts === +let foo2 = () => "bar"; +>foo2 : () => string +>() => "bar" : () => string +>"bar" : string + +let {[foo2()]: bar3} = {}; +>foo2() : string +>foo2 : () => string +>bar3 : any +>{} : {} + diff --git a/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.js b/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.js new file mode 100644 index 0000000000000..e0bd16287ee09 --- /dev/null +++ b/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.js @@ -0,0 +1,8 @@ +//// [computedPropertiesInDestructuring2_ES6.ts] + +let foo2 = () => "bar"; +let {[foo2()]: bar3} = {}; + +//// [computedPropertiesInDestructuring2_ES6.js] +let foo2 = () => "bar"; +let { [foo2()]: bar3 } = {}; diff --git a/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.symbols b/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.symbols new file mode 100644 index 0000000000000..cd7cfda98441a --- /dev/null +++ b/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.symbols @@ -0,0 +1,9 @@ +=== tests/cases/compiler/computedPropertiesInDestructuring2_ES6.ts === + +let foo2 = () => "bar"; +>foo2 : Symbol(foo2, Decl(computedPropertiesInDestructuring2_ES6.ts, 1, 3)) + +let {[foo2()]: bar3} = {}; +>foo2 : Symbol(foo2, Decl(computedPropertiesInDestructuring2_ES6.ts, 1, 3)) +>bar3 : Symbol(bar3, Decl(computedPropertiesInDestructuring2_ES6.ts, 2, 5)) + diff --git a/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.types b/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.types new file mode 100644 index 0000000000000..f0d8b1033c829 --- /dev/null +++ b/tests/baselines/reference/computedPropertiesInDestructuring2_ES6.types @@ -0,0 +1,13 @@ +=== tests/cases/compiler/computedPropertiesInDestructuring2_ES6.ts === + +let foo2 = () => "bar"; +>foo2 : () => string +>() => "bar" : () => string +>"bar" : string + +let {[foo2()]: bar3} = {}; +>foo2() : string +>foo2 : () => string +>bar3 : any +>{} : {} + diff --git a/tests/baselines/reference/computedPropertyNames10_ES5.types b/tests/baselines/reference/computedPropertyNames10_ES5.types index 87648c1ed8015..9dea9cfca9390 100644 --- a/tests/baselines/reference/computedPropertyNames10_ES5.types +++ b/tests/baselines/reference/computedPropertyNames10_ES5.types @@ -9,8 +9,8 @@ var a: any; >a : any var v = { ->v : {} ->{ [s]() { }, [n]() { }, [s + s]() { }, [s + n]() { }, [+s]() { }, [""]() { }, [0]() { }, [a]() { }, [true]() { }, [`hello bye`]() { }, [`hello ${a} bye`]() { }} : {} +>v : { [0](): void; [""](): void; } +>{ [s]() { }, [n]() { }, [s + s]() { }, [s + n]() { }, [+s]() { }, [""]() { }, [0]() { }, [a]() { }, [true]() { }, [`hello bye`]() { }, [`hello ${a} bye`]() { }} : { [0](): void; [""](): void; } [s]() { }, >s : string diff --git a/tests/baselines/reference/computedPropertyNames10_ES6.types b/tests/baselines/reference/computedPropertyNames10_ES6.types index 996dfc99fe921..d2faa13898076 100644 --- a/tests/baselines/reference/computedPropertyNames10_ES6.types +++ b/tests/baselines/reference/computedPropertyNames10_ES6.types @@ -9,8 +9,8 @@ var a: any; >a : any var v = { ->v : {} ->{ [s]() { }, [n]() { }, [s + s]() { }, [s + n]() { }, [+s]() { }, [""]() { }, [0]() { }, [a]() { }, [true]() { }, [`hello bye`]() { }, [`hello ${a} bye`]() { }} : {} +>v : { [0](): void; [""](): void; } +>{ [s]() { }, [n]() { }, [s + s]() { }, [s + n]() { }, [+s]() { }, [""]() { }, [0]() { }, [a]() { }, [true]() { }, [`hello bye`]() { }, [`hello ${a} bye`]() { }} : { [0](): void; [""](): void; } [s]() { }, >s : string diff --git a/tests/baselines/reference/computedPropertyNames11_ES5.js b/tests/baselines/reference/computedPropertyNames11_ES5.js index 64c0b0bd67e35..0917f82477049 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5.js +++ b/tests/baselines/reference/computedPropertyNames11_ES5.js @@ -46,16 +46,8 @@ var v = (_a = {}, enumerable: true, configurable: true }), - Object.defineProperty(_a, "", { - set: function (v) { }, - enumerable: true, - configurable: true - }), - Object.defineProperty(_a, 0, { - get: function () { return 0; }, - enumerable: true, - configurable: true - }), + , + , Object.defineProperty(_a, a, { set: function (v) { }, enumerable: true, diff --git a/tests/baselines/reference/computedPropertyNames11_ES5.types b/tests/baselines/reference/computedPropertyNames11_ES5.types index c3c59c2eb9c73..e0787fc3ee712 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5.types +++ b/tests/baselines/reference/computedPropertyNames11_ES5.types @@ -9,8 +9,8 @@ var a: any; >a : any var v = { ->v : {} ->{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : {} +>v : { [0]: number; [""]: any; } +>{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { [0]: number; [""]: any; } get [s]() { return 0; }, >s : string diff --git a/tests/baselines/reference/computedPropertyNames11_ES6.types b/tests/baselines/reference/computedPropertyNames11_ES6.types index ef11511baaed7..8ad31a7c2a14e 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES6.types +++ b/tests/baselines/reference/computedPropertyNames11_ES6.types @@ -9,8 +9,8 @@ var a: any; >a : any var v = { ->v : {} ->{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : {} +>v : { [0]: number; [""]: any; } +>{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { [0]: number; [""]: any; } get [s]() { return 0; }, >s : string diff --git a/tests/baselines/reference/computedPropertyNames12_ES5.errors.txt b/tests/baselines/reference/computedPropertyNames12_ES5.errors.txt index 9d07f34f3c4eb..71f81c27245f9 100644 --- a/tests/baselines/reference/computedPropertyNames12_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNames12_ES5.errors.txt @@ -3,15 +3,13 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(6, tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. -tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(10,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. -tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(11,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(14,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts (11 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts (9 errors) ==== var s: string; var n: number; var a: any; @@ -32,11 +30,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(15 ~~~~ !!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. static [""]: number; - ~~~~ -!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. [0]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. [a]: number; ~~~ !!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. diff --git a/tests/baselines/reference/computedPropertyNames12_ES6.errors.txt b/tests/baselines/reference/computedPropertyNames12_ES6.errors.txt index f0a2267f8b365..8d8cce7e1408d 100644 --- a/tests/baselines/reference/computedPropertyNames12_ES6.errors.txt +++ b/tests/baselines/reference/computedPropertyNames12_ES6.errors.txt @@ -3,15 +3,13 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(6, tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. -tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(10,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. -tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(11,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(14,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts (11 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts (9 errors) ==== var s: string; var n: number; var a: any; @@ -32,11 +30,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(15 ~~~~ !!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. static [""]: number; - ~~~~ -!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. [0]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. [a]: number; ~~~ !!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. diff --git a/tests/baselines/reference/computedPropertyNames16_ES5.js b/tests/baselines/reference/computedPropertyNames16_ES5.js index 2c7316e13982c..f4d90579d63aa 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES5.js +++ b/tests/baselines/reference/computedPropertyNames16_ES5.js @@ -48,16 +48,6 @@ var C = (function () { enumerable: true, configurable: true }); - Object.defineProperty(C, "", { - set: function (v) { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, 0, { - get: function () { return 0; }, - enumerable: true, - configurable: true - }); Object.defineProperty(C.prototype, a, { set: function (v) { }, enumerable: true, diff --git a/tests/baselines/reference/computedPropertyNames36_ES5.js b/tests/baselines/reference/computedPropertyNames36_ES5.js index 5519a6d284caf..4bb10ea754395 100644 --- a/tests/baselines/reference/computedPropertyNames36_ES5.js +++ b/tests/baselines/reference/computedPropertyNames36_ES5.js @@ -27,10 +27,6 @@ var C = (function () { Object.defineProperty(C.prototype, "get1", { // Computed properties get: function () { return new Foo; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, "set1", { set: function (p) { }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/computedPropertyNames37_ES5.js b/tests/baselines/reference/computedPropertyNames37_ES5.js index 54a7243f3fae8..c2a346608fe79 100644 --- a/tests/baselines/reference/computedPropertyNames37_ES5.js +++ b/tests/baselines/reference/computedPropertyNames37_ES5.js @@ -27,10 +27,6 @@ var C = (function () { Object.defineProperty(C.prototype, "get1", { // Computed properties get: function () { return new Foo; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, "set1", { set: function (p) { }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/computedPropertyNames40_ES5.errors.txt b/tests/baselines/reference/computedPropertyNames40_ES5.errors.txt index e8ceef0d58115..482978064d167 100644 --- a/tests/baselines/reference/computedPropertyNames40_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNames40_ES5.errors.txt @@ -1,7 +1,9 @@ +tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES5.ts(8,5): error TS2393: Duplicate function implementation. tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES5.ts(8,5): error TS2411: Property '[""]' of type '() => Foo' is not assignable to string index type '() => Foo2'. +tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES5.ts(9,5): error TS2393: Duplicate function implementation. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES5.ts (1 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES5.ts (3 errors) ==== class Foo { x } class Foo2 { x; y } @@ -10,7 +12,11 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES5.ts(8, // Computed properties [""]() { return new Foo } + ~~~~ +!!! error TS2393: Duplicate function implementation. ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2411: Property '[""]' of type '() => Foo' is not assignable to string index type '() => Foo2'. [""]() { return new Foo2 } + ~~~~ +!!! error TS2393: Duplicate function implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNames40_ES6.errors.txt b/tests/baselines/reference/computedPropertyNames40_ES6.errors.txt index 1a032a87b2b00..669d0d04e6612 100644 --- a/tests/baselines/reference/computedPropertyNames40_ES6.errors.txt +++ b/tests/baselines/reference/computedPropertyNames40_ES6.errors.txt @@ -1,7 +1,9 @@ +tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES6.ts(8,5): error TS2393: Duplicate function implementation. tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES6.ts(8,5): error TS2411: Property '[""]' of type '() => Foo' is not assignable to string index type '() => Foo2'. +tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES6.ts(9,5): error TS2393: Duplicate function implementation. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES6.ts (1 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES6.ts (3 errors) ==== class Foo { x } class Foo2 { x; y } @@ -10,7 +12,11 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES6.ts(8, // Computed properties [""]() { return new Foo } + ~~~~ +!!! error TS2393: Duplicate function implementation. ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2411: Property '[""]' of type '() => Foo' is not assignable to string index type '() => Foo2'. [""]() { return new Foo2 } + ~~~~ +!!! error TS2393: Duplicate function implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNames42_ES5.errors.txt b/tests/baselines/reference/computedPropertyNames42_ES5.errors.txt index 94153c47aa5d4..bdb978220a03d 100644 --- a/tests/baselines/reference/computedPropertyNames42_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNames42_ES5.errors.txt @@ -1,8 +1,7 @@ -tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES5.ts(8,5): error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES5.ts (2 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES5.ts (1 errors) ==== class Foo { x } class Foo2 { x; y } @@ -11,8 +10,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES5.ts(8, // Computed properties [""]: Foo; - ~~~~ -!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. ~~~~~~~~~~ !!! error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'. } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNames42_ES6.errors.txt b/tests/baselines/reference/computedPropertyNames42_ES6.errors.txt index 1f4e27d6e810a..9feb6ba3d32ae 100644 --- a/tests/baselines/reference/computedPropertyNames42_ES6.errors.txt +++ b/tests/baselines/reference/computedPropertyNames42_ES6.errors.txt @@ -1,8 +1,7 @@ -tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES6.ts(8,5): error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES6.ts (2 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES6.ts (1 errors) ==== class Foo { x } class Foo2 { x; y } @@ -11,8 +10,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES6.ts(8, // Computed properties [""]: Foo; - ~~~~ -!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. ~~~~~~~~~~ !!! error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'. } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index c3b7f6a71d0e9..57026c3c70694 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -41,10 +41,6 @@ var D = (function (_super) { Object.defineProperty(D.prototype, "get1", { // Computed properties get: function () { return new Foo; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(D.prototype, "set1", { set: function (p) { }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.errors.txt b/tests/baselines/reference/computedPropertyNames45_ES5.errors.txt index 83855c5f0b7e2..8baae68f33799 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNames45_ES5.errors.txt @@ -1,12 +1,15 @@ +tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES5.ts(5,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'. tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES5.ts(11,5): error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES5.ts (1 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES5.ts (2 errors) ==== class Foo { x } class Foo2 { x; y } class C { get ["get1"]() { return new Foo } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'. } class D extends C { diff --git a/tests/baselines/reference/computedPropertyNames45_ES6.errors.txt b/tests/baselines/reference/computedPropertyNames45_ES6.errors.txt index 963e01ed86bd8..e329785f4cf53 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES6.errors.txt +++ b/tests/baselines/reference/computedPropertyNames45_ES6.errors.txt @@ -1,12 +1,15 @@ +tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES6.ts(5,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'. tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES6.ts(11,5): error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES6.ts (1 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES6.ts (2 errors) ==== class Foo { x } class Foo2 { x; y } class C { get ["get1"]() { return new Foo } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'. } class D extends C { diff --git a/tests/baselines/reference/computedPropertyNames4_ES5.types b/tests/baselines/reference/computedPropertyNames4_ES5.types index 51baca2658629..6984d2e69b8a4 100644 --- a/tests/baselines/reference/computedPropertyNames4_ES5.types +++ b/tests/baselines/reference/computedPropertyNames4_ES5.types @@ -9,8 +9,8 @@ var a: any; >a : any var v = { ->v : {} ->{ [s]: 0, [n]: n, [s + s]: 1, [s + n]: 2, [+s]: s, [""]: 0, [0]: 0, [a]: 1, [true]: 0, [`hello bye`]: 0, [`hello ${a} bye`]: 0} : {} +>v : { [0]: number; [""]: number; } +>{ [s]: 0, [n]: n, [s + s]: 1, [s + n]: 2, [+s]: s, [""]: 0, [0]: 0, [a]: 1, [true]: 0, [`hello bye`]: 0, [`hello ${a} bye`]: 0} : { [0]: number; [""]: number; } [s]: 0, >s : string diff --git a/tests/baselines/reference/computedPropertyNames4_ES6.types b/tests/baselines/reference/computedPropertyNames4_ES6.types index 0526704951726..1fece561f5ae8 100644 --- a/tests/baselines/reference/computedPropertyNames4_ES6.types +++ b/tests/baselines/reference/computedPropertyNames4_ES6.types @@ -9,8 +9,8 @@ var a: any; >a : any var v = { ->v : {} ->{ [s]: 0, [n]: n, [s + s]: 1, [s + n]: 2, [+s]: s, [""]: 0, [0]: 0, [a]: 1, [true]: 0, [`hello bye`]: 0, [`hello ${a} bye`]: 0} : {} +>v : { [0]: number; [""]: number; } +>{ [s]: 0, [n]: n, [s + s]: 1, [s + n]: 2, [+s]: s, [""]: 0, [0]: 0, [a]: 1, [true]: 0, [`hello bye`]: 0, [`hello ${a} bye`]: 0} : { [0]: number; [""]: number; } [s]: 0, >s : string diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.js.map b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.js.map index c47fcfcad3114..e8d4e52ad9672 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.js.map +++ b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.js.map @@ -1,2 +1,2 @@ //// [computedPropertyNamesSourceMap1_ES5.js.map] -{"version":3,"file":"computedPropertyNamesSourceMap1_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap1_ES5.ts"],"names":["C","C.constructor","C[\"hello\"]"],"mappings":"AAAA;IAAAA;IAIAC,CAACA;IAHGD,YAACA,OAAOA,CAACA,GAATA;QACIE,QAAQA,CAACA;IACbA,CAACA;IACLF,QAACA;AAADA,CAACA,AAJD,IAIC"} \ No newline at end of file +{"version":3,"file":"computedPropertyNamesSourceMap1_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap1_ES5.ts"],"names":[],"mappings":"AAAA;IAAA;IAIA,CAAC;IAHG,YAAC,OAAO,CAAC,GAAT;QACI,QAAQ,CAAC;IACb,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.sourcemap.txt b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.sourcemap.txt index df0af71fb0224..53dce3e574c1f 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.sourcemap.txt +++ b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.sourcemap.txt @@ -18,7 +18,7 @@ sourceFile:computedPropertyNamesSourceMap1_ES5.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C) +1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -30,8 +30,8 @@ sourceFile:computedPropertyNamesSourceMap1_ES5.ts > } > 2 > } -1->Emitted(3, 5) Source(5, 1) + SourceIndex(0) name (C.constructor) -2 >Emitted(3, 6) Source(5, 2) + SourceIndex(0) name (C.constructor) +1->Emitted(3, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(5, 2) + SourceIndex(0) --- >>> C.prototype["hello"] = function () { 1->^^^^ @@ -44,11 +44,11 @@ sourceFile:computedPropertyNamesSourceMap1_ES5.ts 3 > "hello" 4 > ] 5 > -1->Emitted(4, 5) Source(2, 5) + SourceIndex(0) name (C) -2 >Emitted(4, 17) Source(2, 6) + SourceIndex(0) name (C) -3 >Emitted(4, 24) Source(2, 13) + SourceIndex(0) name (C) -4 >Emitted(4, 25) Source(2, 14) + SourceIndex(0) name (C) -5 >Emitted(4, 28) Source(2, 5) + SourceIndex(0) name (C) +1->Emitted(4, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(4, 17) Source(2, 6) + SourceIndex(0) +3 >Emitted(4, 24) Source(2, 13) + SourceIndex(0) +4 >Emitted(4, 25) Source(2, 14) + SourceIndex(0) +5 >Emitted(4, 28) Source(2, 5) + SourceIndex(0) --- >>> debugger; 1 >^^^^^^^^ @@ -58,9 +58,9 @@ sourceFile:computedPropertyNamesSourceMap1_ES5.ts > 2 > debugger 3 > ; -1 >Emitted(5, 9) Source(3, 9) + SourceIndex(0) name (C["hello"]) -2 >Emitted(5, 17) Source(3, 17) + SourceIndex(0) name (C["hello"]) -3 >Emitted(5, 18) Source(3, 18) + SourceIndex(0) name (C["hello"]) +1 >Emitted(5, 9) Source(3, 9) + SourceIndex(0) +2 >Emitted(5, 17) Source(3, 17) + SourceIndex(0) +3 >Emitted(5, 18) Source(3, 18) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -69,8 +69,8 @@ sourceFile:computedPropertyNamesSourceMap1_ES5.ts 1 > > 2 > } -1 >Emitted(6, 5) Source(4, 5) + SourceIndex(0) name (C["hello"]) -2 >Emitted(6, 6) Source(4, 6) + SourceIndex(0) name (C["hello"]) +1 >Emitted(6, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(6, 6) Source(4, 6) + SourceIndex(0) --- >>> return C; 1->^^^^ @@ -78,8 +78,8 @@ sourceFile:computedPropertyNamesSourceMap1_ES5.ts 1-> > 2 > } -1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (C) -2 >Emitted(7, 13) Source(5, 2) + SourceIndex(0) name (C) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 13) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -95,8 +95,8 @@ sourceFile:computedPropertyNamesSourceMap1_ES5.ts > debugger; > } > } -1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) name (C) -2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) name (C) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(1, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.js.map b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.js.map index 9a2dd60999ef8..9ec6d18cc72db 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.js.map +++ b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.js.map @@ -1,2 +1,2 @@ //// [computedPropertyNamesSourceMap1_ES6.js.map] -{"version":3,"file":"computedPropertyNamesSourceMap1_ES6.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap1_ES6.ts"],"names":["C","C[\"hello\"]"],"mappings":"AAAA;IACIA,CAACA,OAAOA,CAACA;QACLC,QAAQA,CAACA;IACbA,CAACA;AACLD,CAACA;AAAA"} \ No newline at end of file +{"version":3,"file":"computedPropertyNamesSourceMap1_ES6.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap1_ES6.ts"],"names":[],"mappings":"AAAA;IACI,CAAC,OAAO,CAAC;QACL,QAAQ,CAAC;IACb,CAAC;AACL,CAAC;AAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.sourcemap.txt b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.sourcemap.txt index 30493b9734737..b589b7ad8eef1 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.sourcemap.txt +++ b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.sourcemap.txt @@ -25,10 +25,10 @@ sourceFile:computedPropertyNamesSourceMap1_ES6.ts 2 > [ 3 > "hello" 4 > ] -1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) name (C) -2 >Emitted(2, 6) Source(2, 6) + SourceIndex(0) name (C) -3 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) name (C) -4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) name (C) +1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(2, 6) Source(2, 6) + SourceIndex(0) +3 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) +4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) --- >>> debugger; 1->^^^^^^^^ @@ -38,9 +38,9 @@ sourceFile:computedPropertyNamesSourceMap1_ES6.ts > 2 > debugger 3 > ; -1->Emitted(3, 9) Source(3, 9) + SourceIndex(0) name (C["hello"]) -2 >Emitted(3, 17) Source(3, 17) + SourceIndex(0) name (C["hello"]) -3 >Emitted(3, 18) Source(3, 18) + SourceIndex(0) name (C["hello"]) +1->Emitted(3, 9) Source(3, 9) + SourceIndex(0) +2 >Emitted(3, 17) Source(3, 17) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 18) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -48,8 +48,8 @@ sourceFile:computedPropertyNamesSourceMap1_ES6.ts 1 > > 2 > } -1 >Emitted(4, 5) Source(4, 5) + SourceIndex(0) name (C["hello"]) -2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) name (C["hello"]) +1 >Emitted(4, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) --- >>>} 1 > @@ -58,8 +58,8 @@ sourceFile:computedPropertyNamesSourceMap1_ES6.ts 1 > > 2 >} -1 >Emitted(5, 1) Source(5, 1) + SourceIndex(0) name (C) -2 >Emitted(5, 2) Source(5, 2) + SourceIndex(0) name (C) +1 >Emitted(5, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(5, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=computedPropertyNamesSourceMap1_ES6.js.map1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map index 696204ae8da52..baf1e998efdc5 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map @@ -1,2 +1,2 @@ //// [computedPropertyNamesSourceMap2_ES5.js.map] -{"version":3,"file":"computedPropertyNamesSourceMap2_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES5.ts"],"names":["[\"hello\"]"],"mappings":"AAAA,IAAI,CAAC,GAAG;IACJ,GAAC,OAAO,CAAC,GAAT;QACIA,QAAQA,CAACA;IACbA,CAACA;;CACJ,CAAA"} \ No newline at end of file +{"version":3,"file":"computedPropertyNamesSourceMap2_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES5.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG;IACJ,GAAC,OAAO,CAAC,GAAT;QACI,QAAQ,CAAC;IACb,CAAC;;CACJ,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt index c922e4f706db5..f6501777985f3 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt @@ -49,9 +49,9 @@ sourceFile:computedPropertyNamesSourceMap2_ES5.ts > 2 > debugger 3 > ; -1 >Emitted(3, 9) Source(3, 9) + SourceIndex(0) name (["hello"]) -2 >Emitted(3, 17) Source(3, 17) + SourceIndex(0) name (["hello"]) -3 >Emitted(3, 18) Source(3, 18) + SourceIndex(0) name (["hello"]) +1 >Emitted(3, 9) Source(3, 9) + SourceIndex(0) +2 >Emitted(3, 17) Source(3, 17) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 18) + SourceIndex(0) --- >>> }, 1 >^^^^ @@ -60,8 +60,8 @@ sourceFile:computedPropertyNamesSourceMap2_ES5.ts 1 > > 2 > } -1 >Emitted(4, 5) Source(4, 5) + SourceIndex(0) name (["hello"]) -2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) name (["hello"]) +1 >Emitted(4, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) --- >>> _a >>>); diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.types b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.types index 9470aee8eb6f0..147b296650998 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/computedProperties/computedPropertyNamesSourceMap2_ES5.ts === var v = { ->v : {} ->{ ["hello"]() { debugger; }} : {} +>v : { ["hello"](): void; } +>{ ["hello"]() { debugger; }} : { ["hello"](): void; } ["hello"]() { >"hello" : string diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.js.map b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.js.map index 251171232e03a..f8ca7ab584521 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.js.map +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.js.map @@ -1,2 +1,2 @@ //// [computedPropertyNamesSourceMap2_ES6.js.map] -{"version":3,"file":"computedPropertyNamesSourceMap2_ES6.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES6.ts"],"names":["[\"hello\"]"],"mappings":"AAAA,IAAI,CAAC,GAAG;IACJ,CAAC,OAAO,CAAC;QACLA,QAAQA,CAACA;IACbA,CAACA;CACJ,CAAA"} \ No newline at end of file +{"version":3,"file":"computedPropertyNamesSourceMap2_ES6.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES6.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG;IACJ,CAAC,OAAO,CAAC;QACL,QAAQ,CAAC;IACb,CAAC;CACJ,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.sourcemap.txt b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.sourcemap.txt index 48149aee0b5a7..a6f9086e45561 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.sourcemap.txt +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.sourcemap.txt @@ -47,9 +47,9 @@ sourceFile:computedPropertyNamesSourceMap2_ES6.ts > 2 > debugger 3 > ; -1->Emitted(3, 9) Source(3, 9) + SourceIndex(0) name (["hello"]) -2 >Emitted(3, 17) Source(3, 17) + SourceIndex(0) name (["hello"]) -3 >Emitted(3, 18) Source(3, 18) + SourceIndex(0) name (["hello"]) +1->Emitted(3, 9) Source(3, 9) + SourceIndex(0) +2 >Emitted(3, 17) Source(3, 17) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 18) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -57,8 +57,8 @@ sourceFile:computedPropertyNamesSourceMap2_ES6.ts 1 > > 2 > } -1 >Emitted(4, 5) Source(4, 5) + SourceIndex(0) name (["hello"]) -2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) name (["hello"]) +1 >Emitted(4, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) --- >>>}; 1 >^ diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.types b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.types index c4f02155a95e9..0033468036299 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES6.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/computedProperties/computedPropertyNamesSourceMap2_ES6.ts === var v = { ->v : {} ->{ ["hello"]() { debugger; }} : {} +>v : { ["hello"](): void; } +>{ ["hello"]() { debugger; }} : { ["hello"](): void; } ["hello"]() { >"hello" : string diff --git a/tests/baselines/reference/constDeclarations-access5.js b/tests/baselines/reference/constDeclarations-access5.js index 71b8c99ae58f0..8ebd171600553 100644 --- a/tests/baselines/reference/constDeclarations-access5.js +++ b/tests/baselines/reference/constDeclarations-access5.js @@ -50,10 +50,12 @@ m.x.toString(); //// [constDeclarations_access_1.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.x = 0; }); //// [constDeclarations_access_2.js] define(["require", "exports", 'constDeclarations_access_1'], function (require, exports, m) { + "use strict"; // Errors m.x = 1; m.x += 2; diff --git a/tests/baselines/reference/constEnumExternalModule.js b/tests/baselines/reference/constEnumExternalModule.js index 4054ba788cb63..e0a3f46ee89bd 100644 --- a/tests/baselines/reference/constEnumExternalModule.js +++ b/tests/baselines/reference/constEnumExternalModule.js @@ -12,8 +12,10 @@ var v = A.V; //// [m1.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [m2.js] define(["require", "exports"], function (require, exports) { + "use strict"; var v = 100 /* V */; }); diff --git a/tests/baselines/reference/constEnumMergingWithValues1.js b/tests/baselines/reference/constEnumMergingWithValues1.js index f47fc227baed6..1fdfb3fb1dd8d 100644 --- a/tests/baselines/reference/constEnumMergingWithValues1.js +++ b/tests/baselines/reference/constEnumMergingWithValues1.js @@ -1,4 +1,4 @@ -//// [constEnumMergingWithValues1.ts] +//// [m1.ts] function foo() {} module foo { @@ -7,8 +7,9 @@ module foo { export = foo -//// [constEnumMergingWithValues1.js] +//// [m1.js] define(["require", "exports"], function (require, exports) { + "use strict"; function foo() { } return foo; }); diff --git a/tests/baselines/reference/constEnumMergingWithValues1.symbols b/tests/baselines/reference/constEnumMergingWithValues1.symbols index 3dd1c80705ced..ba655091dedc1 100644 --- a/tests/baselines/reference/constEnumMergingWithValues1.symbols +++ b/tests/baselines/reference/constEnumMergingWithValues1.symbols @@ -1,16 +1,16 @@ -=== tests/cases/compiler/constEnumMergingWithValues1.ts === +=== tests/cases/compiler/m1.ts === function foo() {} ->foo : Symbol(foo, Decl(constEnumMergingWithValues1.ts, 0, 0), Decl(constEnumMergingWithValues1.ts, 1, 17)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 17)) module foo { ->foo : Symbol(foo, Decl(constEnumMergingWithValues1.ts, 0, 0), Decl(constEnumMergingWithValues1.ts, 1, 17)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 17)) const enum E { X } ->E : Symbol(E, Decl(constEnumMergingWithValues1.ts, 2, 12)) ->X : Symbol(E.X, Decl(constEnumMergingWithValues1.ts, 3, 18)) +>E : Symbol(E, Decl(m1.ts, 2, 12)) +>X : Symbol(E.X, Decl(m1.ts, 3, 18)) } export = foo ->foo : Symbol(foo, Decl(constEnumMergingWithValues1.ts, 0, 0), Decl(constEnumMergingWithValues1.ts, 1, 17)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 17)) diff --git a/tests/baselines/reference/constEnumMergingWithValues1.types b/tests/baselines/reference/constEnumMergingWithValues1.types index 8d5b15795f7f8..c5b1a82a5a871 100644 --- a/tests/baselines/reference/constEnumMergingWithValues1.types +++ b/tests/baselines/reference/constEnumMergingWithValues1.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/constEnumMergingWithValues1.ts === +=== tests/cases/compiler/m1.ts === function foo() {} >foo : typeof foo diff --git a/tests/baselines/reference/constEnumMergingWithValues2.js b/tests/baselines/reference/constEnumMergingWithValues2.js index 393ab41fa1f03..fea628fa540a5 100644 --- a/tests/baselines/reference/constEnumMergingWithValues2.js +++ b/tests/baselines/reference/constEnumMergingWithValues2.js @@ -1,4 +1,4 @@ -//// [constEnumMergingWithValues2.ts] +//// [m1.ts] class foo {} module foo { @@ -7,8 +7,9 @@ module foo { export = foo -//// [constEnumMergingWithValues2.js] +//// [m1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var foo = (function () { function foo() { } diff --git a/tests/baselines/reference/constEnumMergingWithValues2.symbols b/tests/baselines/reference/constEnumMergingWithValues2.symbols index bfb438a387dff..a7744499f4990 100644 --- a/tests/baselines/reference/constEnumMergingWithValues2.symbols +++ b/tests/baselines/reference/constEnumMergingWithValues2.symbols @@ -1,16 +1,16 @@ -=== tests/cases/compiler/constEnumMergingWithValues2.ts === +=== tests/cases/compiler/m1.ts === class foo {} ->foo : Symbol(foo, Decl(constEnumMergingWithValues2.ts, 0, 0), Decl(constEnumMergingWithValues2.ts, 1, 12)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 12)) module foo { ->foo : Symbol(foo, Decl(constEnumMergingWithValues2.ts, 0, 0), Decl(constEnumMergingWithValues2.ts, 1, 12)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 12)) const enum E { X } ->E : Symbol(E, Decl(constEnumMergingWithValues2.ts, 2, 12)) ->X : Symbol(E.X, Decl(constEnumMergingWithValues2.ts, 3, 18)) +>E : Symbol(E, Decl(m1.ts, 2, 12)) +>X : Symbol(E.X, Decl(m1.ts, 3, 18)) } export = foo ->foo : Symbol(foo, Decl(constEnumMergingWithValues2.ts, 0, 0), Decl(constEnumMergingWithValues2.ts, 1, 12)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 12)) diff --git a/tests/baselines/reference/constEnumMergingWithValues2.types b/tests/baselines/reference/constEnumMergingWithValues2.types index dd706ef33a105..ab2372cbae9a3 100644 --- a/tests/baselines/reference/constEnumMergingWithValues2.types +++ b/tests/baselines/reference/constEnumMergingWithValues2.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/constEnumMergingWithValues2.ts === +=== tests/cases/compiler/m1.ts === class foo {} >foo : foo diff --git a/tests/baselines/reference/constEnumMergingWithValues3.js b/tests/baselines/reference/constEnumMergingWithValues3.js index d28f29f0962a5..c2cafb2a5f1ea 100644 --- a/tests/baselines/reference/constEnumMergingWithValues3.js +++ b/tests/baselines/reference/constEnumMergingWithValues3.js @@ -1,4 +1,4 @@ -//// [constEnumMergingWithValues3.ts] +//// [m1.ts] enum foo { A } module foo { @@ -7,8 +7,9 @@ module foo { export = foo -//// [constEnumMergingWithValues3.js] +//// [m1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var foo; (function (foo) { foo[foo["A"] = 0] = "A"; diff --git a/tests/baselines/reference/constEnumMergingWithValues3.symbols b/tests/baselines/reference/constEnumMergingWithValues3.symbols index 33e020b5679d7..816919c6805ac 100644 --- a/tests/baselines/reference/constEnumMergingWithValues3.symbols +++ b/tests/baselines/reference/constEnumMergingWithValues3.symbols @@ -1,17 +1,17 @@ -=== tests/cases/compiler/constEnumMergingWithValues3.ts === +=== tests/cases/compiler/m1.ts === enum foo { A } ->foo : Symbol(foo, Decl(constEnumMergingWithValues3.ts, 0, 0), Decl(constEnumMergingWithValues3.ts, 1, 14)) ->A : Symbol(foo.A, Decl(constEnumMergingWithValues3.ts, 1, 10)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 14)) +>A : Symbol(foo.A, Decl(m1.ts, 1, 10)) module foo { ->foo : Symbol(foo, Decl(constEnumMergingWithValues3.ts, 0, 0), Decl(constEnumMergingWithValues3.ts, 1, 14)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 14)) const enum E { X } ->E : Symbol(E, Decl(constEnumMergingWithValues3.ts, 2, 12)) ->X : Symbol(E.X, Decl(constEnumMergingWithValues3.ts, 3, 18)) +>E : Symbol(E, Decl(m1.ts, 2, 12)) +>X : Symbol(E.X, Decl(m1.ts, 3, 18)) } export = foo ->foo : Symbol(foo, Decl(constEnumMergingWithValues3.ts, 0, 0), Decl(constEnumMergingWithValues3.ts, 1, 14)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 14)) diff --git a/tests/baselines/reference/constEnumMergingWithValues3.types b/tests/baselines/reference/constEnumMergingWithValues3.types index df2e88204669a..392772860e406 100644 --- a/tests/baselines/reference/constEnumMergingWithValues3.types +++ b/tests/baselines/reference/constEnumMergingWithValues3.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/constEnumMergingWithValues3.ts === +=== tests/cases/compiler/m1.ts === enum foo { A } >foo : foo diff --git a/tests/baselines/reference/constEnumMergingWithValues4.js b/tests/baselines/reference/constEnumMergingWithValues4.js index 7ed8b44dc7666..c297b83465418 100644 --- a/tests/baselines/reference/constEnumMergingWithValues4.js +++ b/tests/baselines/reference/constEnumMergingWithValues4.js @@ -1,4 +1,4 @@ -//// [constEnumMergingWithValues4.ts] +//// [m1.ts] module foo { const enum E { X } @@ -11,8 +11,9 @@ module foo { export = foo -//// [constEnumMergingWithValues4.js] +//// [m1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var foo; (function (foo) { var x = 1; diff --git a/tests/baselines/reference/constEnumMergingWithValues4.symbols b/tests/baselines/reference/constEnumMergingWithValues4.symbols index 817c9aeeff370..a7135b53d57f8 100644 --- a/tests/baselines/reference/constEnumMergingWithValues4.symbols +++ b/tests/baselines/reference/constEnumMergingWithValues4.symbols @@ -1,21 +1,21 @@ -=== tests/cases/compiler/constEnumMergingWithValues4.ts === +=== tests/cases/compiler/m1.ts === module foo { ->foo : Symbol(foo, Decl(constEnumMergingWithValues4.ts, 0, 0), Decl(constEnumMergingWithValues4.ts, 3, 1)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 3, 1)) const enum E { X } ->E : Symbol(E, Decl(constEnumMergingWithValues4.ts, 1, 12)) ->X : Symbol(E.X, Decl(constEnumMergingWithValues4.ts, 2, 18)) +>E : Symbol(E, Decl(m1.ts, 1, 12)) +>X : Symbol(E.X, Decl(m1.ts, 2, 18)) } module foo { ->foo : Symbol(foo, Decl(constEnumMergingWithValues4.ts, 0, 0), Decl(constEnumMergingWithValues4.ts, 3, 1)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 3, 1)) var x = 1; ->x : Symbol(x, Decl(constEnumMergingWithValues4.ts, 6, 7)) +>x : Symbol(x, Decl(m1.ts, 6, 7)) } export = foo ->foo : Symbol(foo, Decl(constEnumMergingWithValues4.ts, 0, 0), Decl(constEnumMergingWithValues4.ts, 3, 1)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 3, 1)) diff --git a/tests/baselines/reference/constEnumMergingWithValues4.types b/tests/baselines/reference/constEnumMergingWithValues4.types index 3da306fedbf61..92d04fc10cc7d 100644 --- a/tests/baselines/reference/constEnumMergingWithValues4.types +++ b/tests/baselines/reference/constEnumMergingWithValues4.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/constEnumMergingWithValues4.ts === +=== tests/cases/compiler/m1.ts === module foo { >foo : typeof foo diff --git a/tests/baselines/reference/constEnumMergingWithValues5.js b/tests/baselines/reference/constEnumMergingWithValues5.js index 378b11cfd2212..45aeff7bba35f 100644 --- a/tests/baselines/reference/constEnumMergingWithValues5.js +++ b/tests/baselines/reference/constEnumMergingWithValues5.js @@ -1,4 +1,4 @@ -//// [constEnumMergingWithValues5.ts] +//// [m1.ts] module foo { const enum E { X } @@ -6,8 +6,9 @@ module foo { export = foo -//// [constEnumMergingWithValues5.js] +//// [m1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var foo; (function (foo) { var E; diff --git a/tests/baselines/reference/constEnumMergingWithValues5.symbols b/tests/baselines/reference/constEnumMergingWithValues5.symbols index 6354f64d834e2..257e1897e5c55 100644 --- a/tests/baselines/reference/constEnumMergingWithValues5.symbols +++ b/tests/baselines/reference/constEnumMergingWithValues5.symbols @@ -1,13 +1,13 @@ -=== tests/cases/compiler/constEnumMergingWithValues5.ts === +=== tests/cases/compiler/m1.ts === module foo { ->foo : Symbol(foo, Decl(constEnumMergingWithValues5.ts, 0, 0)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0)) const enum E { X } ->E : Symbol(E, Decl(constEnumMergingWithValues5.ts, 1, 12)) ->X : Symbol(E.X, Decl(constEnumMergingWithValues5.ts, 2, 18)) +>E : Symbol(E, Decl(m1.ts, 1, 12)) +>X : Symbol(E.X, Decl(m1.ts, 2, 18)) } export = foo ->foo : Symbol(foo, Decl(constEnumMergingWithValues5.ts, 0, 0)) +>foo : Symbol(foo, Decl(m1.ts, 0, 0)) diff --git a/tests/baselines/reference/constEnumMergingWithValues5.types b/tests/baselines/reference/constEnumMergingWithValues5.types index 617676ba0c0ad..585363f4d9743 100644 --- a/tests/baselines/reference/constEnumMergingWithValues5.types +++ b/tests/baselines/reference/constEnumMergingWithValues5.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/constEnumMergingWithValues5.ts === +=== tests/cases/compiler/m1.ts === module foo { >foo : typeof foo diff --git a/tests/baselines/reference/constantOverloadFunction.types b/tests/baselines/reference/constantOverloadFunction.types index d643d3a726d9a..d7deaaae46d79 100644 --- a/tests/baselines/reference/constantOverloadFunction.types +++ b/tests/baselines/reference/constantOverloadFunction.types @@ -19,27 +19,27 @@ class Derived3 extends Base { biz() { } } >biz : () => void function foo(tagName: 'canvas'): Derived1; ->foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } ->tagName : 'canvas' +>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>tagName : "canvas" >Derived1 : Derived1 function foo(tagName: 'div'): Derived2; ->foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } ->tagName : 'div' +>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>tagName : "div" >Derived2 : Derived2 function foo(tagName: 'span'): Derived3; ->foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } ->tagName : 'span' +>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } +>tagName : "span" >Derived3 : Derived3 function foo(tagName: string): Base; ->foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } >tagName : string >Base : Base function foo(tagName: any): Base { ->foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } +>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; } >tagName : any >Base : Base diff --git a/tests/baselines/reference/contextualTyping.js.map b/tests/baselines/reference/contextualTyping.js.map index 7c814c231e00d..247469aeb2db8 100644 --- a/tests/baselines/reference/contextualTyping.js.map +++ b/tests/baselines/reference/contextualTyping.js.map @@ -1,2 +1,2 @@ //// [contextualTyping.js.map] -{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":["C1T5","C1T5.constructor","C2T5","C4T5","C4T5.constructor","C5T5","c9t5","C11t5","C11t5.constructor","EF1","Point"],"mappings":"AAYA,sCAAsC;AACtC;IAAAA;QACIC,QAAGA,GAAqCA,UAASA,CAACA;YAC9C,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IAADD,WAACA;AAADA,CAACA,AAJD,IAIC;AAED,uCAAuC;AACvC,IAAO,IAAI,CAIV;AAJD,WAAO,IAAI,EAAC,CAAC;IACEE,QAAGA,GAAqCA,UAASA,CAACA;QACzD,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAAA;AACLA,CAACA,EAJM,IAAI,KAAJ,IAAI,QAIV;AAED,gCAAgC;AAChC,IAAI,IAAI,GAA0B,CAAC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe,cAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,qCAAqC;AACrC;IAEIC;QACIC,IAAIA,CAACA,GAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;YACpB,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IACLD,WAACA;AAADA,CAACA,AAPD,IAOC;AAED,sCAAsC;AACtC,IAAO,IAAI,CAKV;AALD,WAAO,IAAI,EAAC,CAAC;IAETE,QAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;QACf,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAAA;AACLA,CAACA,EALM,IAAI,KAAJ,IAAI,QAKV;AAED,+BAA+B;AAC/B,IAAI,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAE9D,kCAAkC;AAClC,IAAI,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG,cAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AACF,yBAAyB;AACzB,cAAc,CAAsB,IAAGC,CAACA;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC;IACX,MAAM,CAAO,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,4BAA4B;AAC5B,IAAI,KAAK,GAA8B,cAAa,MAAM,CAAC,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAE/F,0BAA0B;AAC1B;IAAcC,eAAYA,CAAsBA;IAAIC,CAACA;IAACD,YAACA;AAADA,CAACA,AAAvD,IAAuD;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAErD,qCAAqC;AACrC,IAAI,KAAK,GAA2B,CAAC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB,cAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,aAAa,CAAC,EAAC,CAAC,IAAIE,MAAMA,CAACA,CAACA,GAACA,CAACA,CAACA,CAACA,CAACA;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,eAAe,CAAC,EAAE,CAAC;IACfC,IAAIA,CAACA,CAACA,GAAGA,CAACA,CAACA;IACXA,IAAIA,CAACA,CAACA,GAAGA,CAACA,CAACA;IAEXA,MAAMA,CAACA,IAAIA,CAACA;AAChBA,CAACA;AAED,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE;IACjC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE;QAChB,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} \ No newline at end of file +{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":[],"mappings":"AAYA,sCAAsC;AACtC;IAAA;QACI,QAAG,GAAqC,UAAS,CAAC;YAC9C,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAA;IACL,CAAC;IAAD,WAAC;AAAD,CAAC,AAJD,IAIC;AAED,uCAAuC;AACvC,IAAO,IAAI,CAIV;AAJD,WAAO,IAAI,EAAC,CAAC;IACE,QAAG,GAAqC,UAAS,CAAC;QACzD,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAA;AACL,CAAC,EAJM,IAAI,KAAJ,IAAI,QAIV;AAED,gCAAgC;AAChC,IAAI,IAAI,GAA0B,CAAC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe,cAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,qCAAqC;AACrC;IAEI;QACI,IAAI,CAAC,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC;YACpB,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAA;IACL,CAAC;IACL,WAAC;AAAD,CAAC,AAPD,IAOC;AAED,sCAAsC;AACtC,IAAO,IAAI,CAKV;AALD,WAAO,IAAI,EAAC,CAAC;IAET,QAAG,GAAG,UAAS,CAAC,EAAE,CAAC;QACf,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAA;AACL,CAAC,EALM,IAAI,KAAJ,IAAI,QAKV;AAED,+BAA+B;AAC/B,IAAI,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAE9D,kCAAkC;AAClC,IAAI,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG,cAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AACF,yBAAyB;AACzB,cAAc,CAAsB,IAAG,CAAC;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC;IACX,MAAM,CAAO,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,4BAA4B;AAC5B,IAAI,KAAK,GAA8B,cAAa,MAAM,CAAC,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAE/F,0BAA0B;AAC1B;IAAc,eAAY,CAAsB;IAAI,CAAC;IAAC,YAAC;AAAD,CAAC,AAAvD,IAAuD;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAErD,qCAAqC;AACrC,IAAI,KAAK,GAA2B,CAAC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB,cAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,aAAa,CAAC,EAAC,CAAC,IAAI,MAAM,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC,CAAC;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,eAAe,CAAC,EAAE,CAAC;IACf,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAEX,MAAM,CAAC,IAAI,CAAC;AAChB,CAAC;AAED,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE;IACjC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE;QAChB,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping.sourcemap.txt b/tests/baselines/reference/contextualTyping.sourcemap.txt index 72419ef846a2e..3498ec016df93 100644 --- a/tests/baselines/reference/contextualTyping.sourcemap.txt +++ b/tests/baselines/reference/contextualTyping.sourcemap.txt @@ -39,7 +39,7 @@ sourceFile:contextualTyping.ts 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(3, 5) Source(14, 1) + SourceIndex(0) name (C1T5) +1->Emitted(3, 5) Source(14, 1) + SourceIndex(0) --- >>> this.foo = function (i) { 1->^^^^^^^^ @@ -53,11 +53,11 @@ sourceFile:contextualTyping.ts 3 > : (i: number, s: string) => number = 4 > function( 5 > i -1->Emitted(4, 9) Source(15, 5) + SourceIndex(0) name (C1T5.constructor) -2 >Emitted(4, 17) Source(15, 8) + SourceIndex(0) name (C1T5.constructor) -3 >Emitted(4, 20) Source(15, 45) + SourceIndex(0) name (C1T5.constructor) -4 >Emitted(4, 30) Source(15, 54) + SourceIndex(0) name (C1T5.constructor) -5 >Emitted(4, 31) Source(15, 55) + SourceIndex(0) name (C1T5.constructor) +1->Emitted(4, 9) Source(15, 5) + SourceIndex(0) +2 >Emitted(4, 17) Source(15, 8) + SourceIndex(0) +3 >Emitted(4, 20) Source(15, 45) + SourceIndex(0) +4 >Emitted(4, 30) Source(15, 54) + SourceIndex(0) +5 >Emitted(4, 31) Source(15, 55) + SourceIndex(0) --- >>> return i; 1 >^^^^^^^^^^^^ @@ -87,7 +87,7 @@ sourceFile:contextualTyping.ts 3 > 1 >Emitted(6, 9) Source(17, 5) + SourceIndex(0) 2 >Emitted(6, 10) Source(17, 6) + SourceIndex(0) -3 >Emitted(6, 11) Source(17, 6) + SourceIndex(0) name (C1T5.constructor) +3 >Emitted(6, 11) Source(17, 6) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -96,16 +96,16 @@ sourceFile:contextualTyping.ts 1 > > 2 > } -1 >Emitted(7, 5) Source(18, 1) + SourceIndex(0) name (C1T5.constructor) -2 >Emitted(7, 6) Source(18, 2) + SourceIndex(0) name (C1T5.constructor) +1 >Emitted(7, 5) Source(18, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(18, 2) + SourceIndex(0) --- >>> return C1T5; 1->^^^^ 2 > ^^^^^^^^^^^ 1-> 2 > } -1->Emitted(8, 5) Source(18, 1) + SourceIndex(0) name (C1T5) -2 >Emitted(8, 16) Source(18, 2) + SourceIndex(0) name (C1T5) +1->Emitted(8, 5) Source(18, 1) + SourceIndex(0) +2 >Emitted(8, 16) Source(18, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -121,8 +121,8 @@ sourceFile:contextualTyping.ts > return i; > } > } -1 >Emitted(9, 1) Source(18, 1) + SourceIndex(0) name (C1T5) -2 >Emitted(9, 2) Source(18, 2) + SourceIndex(0) name (C1T5) +1 >Emitted(9, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(18, 2) + SourceIndex(0) 3 >Emitted(9, 2) Source(14, 1) + SourceIndex(0) 4 >Emitted(9, 6) Source(18, 2) + SourceIndex(0) --- @@ -186,11 +186,11 @@ sourceFile:contextualTyping.ts 3 > : (i: number, s: string) => number = 4 > function( 5 > i -1->Emitted(13, 5) Source(22, 16) + SourceIndex(0) name (C2T5) -2 >Emitted(13, 13) Source(22, 19) + SourceIndex(0) name (C2T5) -3 >Emitted(13, 16) Source(22, 56) + SourceIndex(0) name (C2T5) -4 >Emitted(13, 26) Source(22, 65) + SourceIndex(0) name (C2T5) -5 >Emitted(13, 27) Source(22, 66) + SourceIndex(0) name (C2T5) +1->Emitted(13, 5) Source(22, 16) + SourceIndex(0) +2 >Emitted(13, 13) Source(22, 19) + SourceIndex(0) +3 >Emitted(13, 16) Source(22, 56) + SourceIndex(0) +4 >Emitted(13, 26) Source(22, 65) + SourceIndex(0) +5 >Emitted(13, 27) Source(22, 66) + SourceIndex(0) --- >>> return i; 1 >^^^^^^^^ @@ -221,7 +221,7 @@ sourceFile:contextualTyping.ts 3 > 1 >Emitted(15, 5) Source(24, 5) + SourceIndex(0) 2 >Emitted(15, 6) Source(24, 6) + SourceIndex(0) -3 >Emitted(15, 7) Source(24, 6) + SourceIndex(0) name (C2T5) +3 >Emitted(15, 7) Source(24, 6) + SourceIndex(0) --- >>>})(C2T5 || (C2T5 = {})); 1-> @@ -244,8 +244,8 @@ sourceFile:contextualTyping.ts > return i; > } > } -1->Emitted(16, 1) Source(25, 1) + SourceIndex(0) name (C2T5) -2 >Emitted(16, 2) Source(25, 2) + SourceIndex(0) name (C2T5) +1->Emitted(16, 1) Source(25, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(25, 2) + SourceIndex(0) 3 >Emitted(16, 4) Source(21, 8) + SourceIndex(0) 4 >Emitted(16, 8) Source(21, 12) + SourceIndex(0) 5 >Emitted(16, 13) Source(21, 8) + SourceIndex(0) @@ -962,7 +962,7 @@ sourceFile:contextualTyping.ts 1->class C4T5 { > foo: (i: number, s: string) => string; > -1->Emitted(42, 5) Source(58, 5) + SourceIndex(0) name (C4T5) +1->Emitted(42, 5) Source(58, 5) + SourceIndex(0) --- >>> this.foo = function (i, s) { 1->^^^^^^^^ @@ -984,15 +984,15 @@ sourceFile:contextualTyping.ts 7 > i 8 > , 9 > s -1->Emitted(43, 9) Source(59, 9) + SourceIndex(0) name (C4T5.constructor) -2 >Emitted(43, 13) Source(59, 13) + SourceIndex(0) name (C4T5.constructor) -3 >Emitted(43, 14) Source(59, 14) + SourceIndex(0) name (C4T5.constructor) -4 >Emitted(43, 17) Source(59, 17) + SourceIndex(0) name (C4T5.constructor) -5 >Emitted(43, 20) Source(59, 20) + SourceIndex(0) name (C4T5.constructor) -6 >Emitted(43, 30) Source(59, 29) + SourceIndex(0) name (C4T5.constructor) -7 >Emitted(43, 31) Source(59, 30) + SourceIndex(0) name (C4T5.constructor) -8 >Emitted(43, 33) Source(59, 32) + SourceIndex(0) name (C4T5.constructor) -9 >Emitted(43, 34) Source(59, 33) + SourceIndex(0) name (C4T5.constructor) +1->Emitted(43, 9) Source(59, 9) + SourceIndex(0) +2 >Emitted(43, 13) Source(59, 13) + SourceIndex(0) +3 >Emitted(43, 14) Source(59, 14) + SourceIndex(0) +4 >Emitted(43, 17) Source(59, 17) + SourceIndex(0) +5 >Emitted(43, 20) Source(59, 20) + SourceIndex(0) +6 >Emitted(43, 30) Source(59, 29) + SourceIndex(0) +7 >Emitted(43, 31) Source(59, 30) + SourceIndex(0) +8 >Emitted(43, 33) Source(59, 32) + SourceIndex(0) +9 >Emitted(43, 34) Source(59, 33) + SourceIndex(0) --- >>> return s; 1 >^^^^^^^^^^^^ @@ -1022,7 +1022,7 @@ sourceFile:contextualTyping.ts 3 > 1 >Emitted(45, 9) Source(61, 9) + SourceIndex(0) 2 >Emitted(45, 10) Source(61, 10) + SourceIndex(0) -3 >Emitted(45, 11) Source(61, 10) + SourceIndex(0) name (C4T5.constructor) +3 >Emitted(45, 11) Source(61, 10) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -1031,8 +1031,8 @@ sourceFile:contextualTyping.ts 1 > > 2 > } -1 >Emitted(46, 5) Source(62, 5) + SourceIndex(0) name (C4T5.constructor) -2 >Emitted(46, 6) Source(62, 6) + SourceIndex(0) name (C4T5.constructor) +1 >Emitted(46, 5) Source(62, 5) + SourceIndex(0) +2 >Emitted(46, 6) Source(62, 6) + SourceIndex(0) --- >>> return C4T5; 1->^^^^ @@ -1040,8 +1040,8 @@ sourceFile:contextualTyping.ts 1-> > 2 > } -1->Emitted(47, 5) Source(63, 1) + SourceIndex(0) name (C4T5) -2 >Emitted(47, 16) Source(63, 2) + SourceIndex(0) name (C4T5) +1->Emitted(47, 5) Source(63, 1) + SourceIndex(0) +2 >Emitted(47, 16) Source(63, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -1060,8 +1060,8 @@ sourceFile:contextualTyping.ts > } > } > } -1 >Emitted(48, 1) Source(63, 1) + SourceIndex(0) name (C4T5) -2 >Emitted(48, 2) Source(63, 2) + SourceIndex(0) name (C4T5) +1 >Emitted(48, 1) Source(63, 1) + SourceIndex(0) +2 >Emitted(48, 2) Source(63, 2) + SourceIndex(0) 3 >Emitted(48, 2) Source(56, 1) + SourceIndex(0) 4 >Emitted(48, 6) Source(63, 2) + SourceIndex(0) --- @@ -1131,13 +1131,13 @@ sourceFile:contextualTyping.ts 5 > i 6 > , 7 > s -1->Emitted(52, 5) Source(68, 5) + SourceIndex(0) name (C5T5) -2 >Emitted(52, 13) Source(68, 8) + SourceIndex(0) name (C5T5) -3 >Emitted(52, 16) Source(68, 11) + SourceIndex(0) name (C5T5) -4 >Emitted(52, 26) Source(68, 20) + SourceIndex(0) name (C5T5) -5 >Emitted(52, 27) Source(68, 21) + SourceIndex(0) name (C5T5) -6 >Emitted(52, 29) Source(68, 23) + SourceIndex(0) name (C5T5) -7 >Emitted(52, 30) Source(68, 24) + SourceIndex(0) name (C5T5) +1->Emitted(52, 5) Source(68, 5) + SourceIndex(0) +2 >Emitted(52, 13) Source(68, 8) + SourceIndex(0) +3 >Emitted(52, 16) Source(68, 11) + SourceIndex(0) +4 >Emitted(52, 26) Source(68, 20) + SourceIndex(0) +5 >Emitted(52, 27) Source(68, 21) + SourceIndex(0) +6 >Emitted(52, 29) Source(68, 23) + SourceIndex(0) +7 >Emitted(52, 30) Source(68, 24) + SourceIndex(0) --- >>> return s; 1 >^^^^^^^^ @@ -1168,7 +1168,7 @@ sourceFile:contextualTyping.ts 3 > 1 >Emitted(54, 5) Source(70, 5) + SourceIndex(0) 2 >Emitted(54, 6) Source(70, 6) + SourceIndex(0) -3 >Emitted(54, 7) Source(70, 6) + SourceIndex(0) name (C5T5) +3 >Emitted(54, 7) Source(70, 6) + SourceIndex(0) --- >>>})(C5T5 || (C5T5 = {})); 1-> @@ -1192,8 +1192,8 @@ sourceFile:contextualTyping.ts > return s; > } > } -1->Emitted(55, 1) Source(71, 1) + SourceIndex(0) name (C5T5) -2 >Emitted(55, 2) Source(71, 2) + SourceIndex(0) name (C5T5) +1->Emitted(55, 1) Source(71, 1) + SourceIndex(0) +2 >Emitted(55, 2) Source(71, 2) + SourceIndex(0) 3 >Emitted(55, 4) Source(66, 8) + SourceIndex(0) 4 >Emitted(55, 8) Source(66, 12) + SourceIndex(0) 5 >Emitted(55, 13) Source(66, 8) + SourceIndex(0) @@ -2153,8 +2153,8 @@ sourceFile:contextualTyping.ts 1 >Emitted(86, 1) Source(146, 1) + SourceIndex(0) 2 >Emitted(86, 15) Source(146, 15) + SourceIndex(0) 3 >Emitted(86, 16) Source(146, 37) + SourceIndex(0) -4 >Emitted(86, 20) Source(146, 40) + SourceIndex(0) name (c9t5) -5 >Emitted(86, 21) Source(146, 41) + SourceIndex(0) name (c9t5) +4 >Emitted(86, 20) Source(146, 40) + SourceIndex(0) +5 >Emitted(86, 21) Source(146, 41) + SourceIndex(0) --- >>>; 1 > @@ -2329,9 +2329,9 @@ sourceFile:contextualTyping.ts 1->class C11t5 { 2 > constructor( 3 > f: (n: number) => IFoo -1->Emitted(95, 5) Source(155, 15) + SourceIndex(0) name (C11t5) -2 >Emitted(95, 20) Source(155, 27) + SourceIndex(0) name (C11t5) -3 >Emitted(95, 21) Source(155, 49) + SourceIndex(0) name (C11t5) +1->Emitted(95, 5) Source(155, 15) + SourceIndex(0) +2 >Emitted(95, 20) Source(155, 27) + SourceIndex(0) +3 >Emitted(95, 21) Source(155, 49) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -2339,16 +2339,16 @@ sourceFile:contextualTyping.ts 3 > ^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(96, 5) Source(155, 53) + SourceIndex(0) name (C11t5.constructor) -2 >Emitted(96, 6) Source(155, 54) + SourceIndex(0) name (C11t5.constructor) +1 >Emitted(96, 5) Source(155, 53) + SourceIndex(0) +2 >Emitted(96, 6) Source(155, 54) + SourceIndex(0) --- >>> return C11t5; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(97, 5) Source(155, 55) + SourceIndex(0) name (C11t5) -2 >Emitted(97, 17) Source(155, 56) + SourceIndex(0) name (C11t5) +1->Emitted(97, 5) Source(155, 55) + SourceIndex(0) +2 >Emitted(97, 17) Source(155, 56) + SourceIndex(0) --- >>>})(); 1 > @@ -2359,8 +2359,8 @@ sourceFile:contextualTyping.ts 2 >} 3 > 4 > class C11t5 { constructor(f: (n: number) => IFoo) { } } -1 >Emitted(98, 1) Source(155, 55) + SourceIndex(0) name (C11t5) -2 >Emitted(98, 2) Source(155, 56) + SourceIndex(0) name (C11t5) +1 >Emitted(98, 1) Source(155, 55) + SourceIndex(0) +2 >Emitted(98, 2) Source(155, 56) + SourceIndex(0) 3 >Emitted(98, 2) Source(155, 1) + SourceIndex(0) 4 >Emitted(98, 6) Source(155, 56) + SourceIndex(0) --- @@ -3164,15 +3164,15 @@ sourceFile:contextualTyping.ts 3 >Emitted(124, 15) Source(191, 15) + SourceIndex(0) 4 >Emitted(124, 17) Source(191, 16) + SourceIndex(0) 5 >Emitted(124, 18) Source(191, 17) + SourceIndex(0) -6 >Emitted(124, 22) Source(191, 21) + SourceIndex(0) name (EF1) -7 >Emitted(124, 28) Source(191, 27) + SourceIndex(0) name (EF1) -8 >Emitted(124, 29) Source(191, 28) + SourceIndex(0) name (EF1) -9 >Emitted(124, 30) Source(191, 29) + SourceIndex(0) name (EF1) -10>Emitted(124, 33) Source(191, 30) + SourceIndex(0) name (EF1) -11>Emitted(124, 34) Source(191, 31) + SourceIndex(0) name (EF1) -12>Emitted(124, 35) Source(191, 32) + SourceIndex(0) name (EF1) -13>Emitted(124, 36) Source(191, 33) + SourceIndex(0) name (EF1) -14>Emitted(124, 37) Source(191, 34) + SourceIndex(0) name (EF1) +6 >Emitted(124, 22) Source(191, 21) + SourceIndex(0) +7 >Emitted(124, 28) Source(191, 27) + SourceIndex(0) +8 >Emitted(124, 29) Source(191, 28) + SourceIndex(0) +9 >Emitted(124, 30) Source(191, 29) + SourceIndex(0) +10>Emitted(124, 33) Source(191, 30) + SourceIndex(0) +11>Emitted(124, 34) Source(191, 31) + SourceIndex(0) +12>Emitted(124, 35) Source(191, 32) + SourceIndex(0) +13>Emitted(124, 36) Source(191, 33) + SourceIndex(0) +14>Emitted(124, 37) Source(191, 34) + SourceIndex(0) --- >>>var efv = EF1(1, 2); 1 > @@ -3260,13 +3260,13 @@ sourceFile:contextualTyping.ts 5 > = 6 > x 7 > ; -1 >Emitted(127, 5) Source(208, 5) + SourceIndex(0) name (Point) -2 >Emitted(127, 9) Source(208, 9) + SourceIndex(0) name (Point) -3 >Emitted(127, 10) Source(208, 10) + SourceIndex(0) name (Point) -4 >Emitted(127, 11) Source(208, 11) + SourceIndex(0) name (Point) -5 >Emitted(127, 14) Source(208, 14) + SourceIndex(0) name (Point) -6 >Emitted(127, 15) Source(208, 15) + SourceIndex(0) name (Point) -7 >Emitted(127, 16) Source(208, 16) + SourceIndex(0) name (Point) +1 >Emitted(127, 5) Source(208, 5) + SourceIndex(0) +2 >Emitted(127, 9) Source(208, 9) + SourceIndex(0) +3 >Emitted(127, 10) Source(208, 10) + SourceIndex(0) +4 >Emitted(127, 11) Source(208, 11) + SourceIndex(0) +5 >Emitted(127, 14) Source(208, 14) + SourceIndex(0) +6 >Emitted(127, 15) Source(208, 15) + SourceIndex(0) +7 >Emitted(127, 16) Source(208, 16) + SourceIndex(0) --- >>> this.y = y; 1->^^^^ @@ -3285,13 +3285,13 @@ sourceFile:contextualTyping.ts 5 > = 6 > y 7 > ; -1->Emitted(128, 5) Source(209, 5) + SourceIndex(0) name (Point) -2 >Emitted(128, 9) Source(209, 9) + SourceIndex(0) name (Point) -3 >Emitted(128, 10) Source(209, 10) + SourceIndex(0) name (Point) -4 >Emitted(128, 11) Source(209, 11) + SourceIndex(0) name (Point) -5 >Emitted(128, 14) Source(209, 14) + SourceIndex(0) name (Point) -6 >Emitted(128, 15) Source(209, 15) + SourceIndex(0) name (Point) -7 >Emitted(128, 16) Source(209, 16) + SourceIndex(0) name (Point) +1->Emitted(128, 5) Source(209, 5) + SourceIndex(0) +2 >Emitted(128, 9) Source(209, 9) + SourceIndex(0) +3 >Emitted(128, 10) Source(209, 10) + SourceIndex(0) +4 >Emitted(128, 11) Source(209, 11) + SourceIndex(0) +5 >Emitted(128, 14) Source(209, 14) + SourceIndex(0) +6 >Emitted(128, 15) Source(209, 15) + SourceIndex(0) +7 >Emitted(128, 16) Source(209, 16) + SourceIndex(0) --- >>> return this; 1->^^^^ @@ -3306,11 +3306,11 @@ sourceFile:contextualTyping.ts 3 > 4 > this 5 > ; -1->Emitted(129, 5) Source(211, 5) + SourceIndex(0) name (Point) -2 >Emitted(129, 11) Source(211, 11) + SourceIndex(0) name (Point) -3 >Emitted(129, 12) Source(211, 12) + SourceIndex(0) name (Point) -4 >Emitted(129, 16) Source(211, 16) + SourceIndex(0) name (Point) -5 >Emitted(129, 17) Source(211, 17) + SourceIndex(0) name (Point) +1->Emitted(129, 5) Source(211, 5) + SourceIndex(0) +2 >Emitted(129, 11) Source(211, 11) + SourceIndex(0) +3 >Emitted(129, 12) Source(211, 12) + SourceIndex(0) +4 >Emitted(129, 16) Source(211, 16) + SourceIndex(0) +5 >Emitted(129, 17) Source(211, 17) + SourceIndex(0) --- >>>} 1 > @@ -3319,8 +3319,8 @@ sourceFile:contextualTyping.ts 1 > > 2 >} -1 >Emitted(130, 1) Source(212, 1) + SourceIndex(0) name (Point) -2 >Emitted(130, 2) Source(212, 2) + SourceIndex(0) name (Point) +1 >Emitted(130, 1) Source(212, 1) + SourceIndex(0) +2 >Emitted(130, 2) Source(212, 2) + SourceIndex(0) --- >>>Point.origin = new Point(0, 0); 1-> diff --git a/tests/baselines/reference/copyrightWithNewLine1.js b/tests/baselines/reference/copyrightWithNewLine1.js index 79f158cf7d92b..006c29597b973 100644 --- a/tests/baselines/reference/copyrightWithNewLine1.js +++ b/tests/baselines/reference/copyrightWithNewLine1.js @@ -14,6 +14,7 @@ greeter.start(); * (c) Copyright - Important ****************************/ define(["require", "exports", "./greeter"], function (require, exports, model) { + "use strict"; var el = document.getElementById('content'); var greeter = new model.Greeter(el); /** things */ diff --git a/tests/baselines/reference/copyrightWithoutNewLine1.js b/tests/baselines/reference/copyrightWithoutNewLine1.js index 507c66fa3af52..15e3c9f79bece 100644 --- a/tests/baselines/reference/copyrightWithoutNewLine1.js +++ b/tests/baselines/reference/copyrightWithoutNewLine1.js @@ -10,6 +10,7 @@ greeter.start(); //// [copyrightWithoutNewLine1.js] define(["require", "exports", "./greeter"], function (require, exports, model) { + "use strict"; var el = document.getElementById('content'); var greeter = new model.Greeter(el); /** things */ diff --git a/tests/baselines/reference/crashIntypeCheckInvocationExpression.js b/tests/baselines/reference/crashIntypeCheckInvocationExpression.js index e373afe9b2072..549d7948fcbdf 100644 --- a/tests/baselines/reference/crashIntypeCheckInvocationExpression.js +++ b/tests/baselines/reference/crashIntypeCheckInvocationExpression.js @@ -14,6 +14,7 @@ export var compileServer = task(() => { //// [crashIntypeCheckInvocationExpression.js] define(["require", "exports"], function (require, exports) { + "use strict"; var nake; function doCompile(fileset, moduleType) { return undefined; diff --git a/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.js b/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.js index 87deabbdf6b8e..8ae7ccc135487 100644 --- a/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.js +++ b/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.js @@ -10,6 +10,7 @@ export class BuildWorkspaceService { //// [crashIntypeCheckObjectCreationExpression.js] define(["require", "exports"], function (require, exports) { + "use strict"; var BuildWorkspaceService = (function () { function BuildWorkspaceService() { } diff --git a/tests/baselines/reference/declFileAccessors.js b/tests/baselines/reference/declFileAccessors.js index f39cd13fdd0a4..6c92f5b18d5a4 100644 --- a/tests/baselines/reference/declFileAccessors.js +++ b/tests/baselines/reference/declFileAccessors.js @@ -102,6 +102,7 @@ class c2 { } //// [declFileAccessors_0.js] +"use strict"; /** This is comment for c1*/ var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js b/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js index 2355d7bbc7aee..9c0ffc6123bba 100644 --- a/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js +++ b/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js @@ -9,6 +9,7 @@ export function bar(a: foo.Foo) { } import foo = require("./declFileAliasUseBeforeDeclaration_foo"); //// [declFileAliasUseBeforeDeclaration_foo.js] +"use strict"; var Foo = (function () { function Foo() { } @@ -16,6 +17,7 @@ var Foo = (function () { })(); exports.Foo = Foo; //// [declFileAliasUseBeforeDeclaration_test.js] +"use strict"; function bar(a) { } exports.bar = bar; diff --git a/tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js b/tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js index a30f0f334c281..f98e2f6aafb7d 100644 --- a/tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js +++ b/tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js @@ -20,6 +20,7 @@ export var x: SubModule.m.m3.c; //// [declFileAmbientExternalModuleWithSingleExportedModule_0.js] //// [declFileAmbientExternalModuleWithSingleExportedModule_1.js] +"use strict"; //// [declFileAmbientExternalModuleWithSingleExportedModule_0.d.ts] diff --git a/tests/baselines/reference/declFileCallSignatures.js b/tests/baselines/reference/declFileCallSignatures.js index 2d4519b209037..10b87d4e7770b 100644 --- a/tests/baselines/reference/declFileCallSignatures.js +++ b/tests/baselines/reference/declFileCallSignatures.js @@ -66,6 +66,7 @@ interface IGlobalCallSignatureWithOwnTypeParametes { } //// [declFileCallSignatures_0.js] +"use strict"; //// [declFileCallSignatures_1.js] diff --git a/tests/baselines/reference/declFileClassWithStaticMethodReturningConstructor.js b/tests/baselines/reference/declFileClassWithStaticMethodReturningConstructor.js index c2d1bab986182..1a54642fbd4b2 100644 --- a/tests/baselines/reference/declFileClassWithStaticMethodReturningConstructor.js +++ b/tests/baselines/reference/declFileClassWithStaticMethodReturningConstructor.js @@ -7,6 +7,7 @@ export class Enhancement { } //// [declFileClassWithStaticMethodReturningConstructor.js] +"use strict"; var Enhancement = (function () { function Enhancement() { } diff --git a/tests/baselines/reference/declFileConstructSignatures.js b/tests/baselines/reference/declFileConstructSignatures.js index ae756e32eeda7..993c8ea46371c 100644 --- a/tests/baselines/reference/declFileConstructSignatures.js +++ b/tests/baselines/reference/declFileConstructSignatures.js @@ -66,6 +66,7 @@ interface IGlobalConstructSignatureWithOwnTypeParametes { } //// [declFileConstructSignatures_0.js] +"use strict"; //// [declFileConstructSignatures_1.js] diff --git a/tests/baselines/reference/declFileConstructors.js b/tests/baselines/reference/declFileConstructors.js index 327221debf805..e1786dfdd5e10 100644 --- a/tests/baselines/reference/declFileConstructors.js +++ b/tests/baselines/reference/declFileConstructors.js @@ -98,6 +98,7 @@ class GlobalConstructorWithParameterInitializer { } //// [declFileConstructors_0.js] +"use strict"; var SimpleConstructor = (function () { /** This comment should appear for foo*/ function SimpleConstructor() { diff --git a/tests/baselines/reference/declFileExportAssignmentImportInternalModule.js b/tests/baselines/reference/declFileExportAssignmentImportInternalModule.js index 6bd4320426c7d..8a57cef6b255d 100644 --- a/tests/baselines/reference/declFileExportAssignmentImportInternalModule.js +++ b/tests/baselines/reference/declFileExportAssignmentImportInternalModule.js @@ -22,6 +22,7 @@ import m = m3 export = m; //// [declFileExportAssignmentImportInternalModule.js] +"use strict"; var m3; (function (m3) { })(m3 || (m3 = {})); diff --git a/tests/baselines/reference/declFileExportAssignmentOfGenericInterface.js b/tests/baselines/reference/declFileExportAssignmentOfGenericInterface.js index 4d203705c4a1f..c54c3c7e73111 100644 --- a/tests/baselines/reference/declFileExportAssignmentOfGenericInterface.js +++ b/tests/baselines/reference/declFileExportAssignmentOfGenericInterface.js @@ -14,9 +14,11 @@ x.a; //// [declFileExportAssignmentOfGenericInterface_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [declFileExportAssignmentOfGenericInterface_1.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.x.a; }); diff --git a/tests/baselines/reference/declFileExportImportChain.js b/tests/baselines/reference/declFileExportImportChain.js index 127e8010b4923..88aa985ef7b25 100644 --- a/tests/baselines/reference/declFileExportImportChain.js +++ b/tests/baselines/reference/declFileExportImportChain.js @@ -26,6 +26,7 @@ export var x: c.b1.a.m2.c1; //// [declFileExportImportChain_a.js] define(["require", "exports"], function (require, exports) { + "use strict"; var m1; (function (m1) { var m2; @@ -42,18 +43,22 @@ define(["require", "exports"], function (require, exports) { }); //// [declFileExportImportChain_b.js] define(["require", "exports", "declFileExportImportChain_a"], function (require, exports, a) { + "use strict"; exports.a = a; }); //// [declFileExportImportChain_b1.js] define(["require", "exports", "declFileExportImportChain_b"], function (require, exports, b) { + "use strict"; return b; }); //// [declFileExportImportChain_c.js] define(["require", "exports", "declFileExportImportChain_b1"], function (require, exports, b1) { + "use strict"; exports.b1 = b1; }); //// [declFileExportImportChain_d.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/declFileExportImportChain2.js b/tests/baselines/reference/declFileExportImportChain2.js index 3a644428b8a00..6b633b0fb9776 100644 --- a/tests/baselines/reference/declFileExportImportChain2.js +++ b/tests/baselines/reference/declFileExportImportChain2.js @@ -23,6 +23,7 @@ export var x: c.b.m2.c1; //// [declFileExportImportChain2_a.js] define(["require", "exports"], function (require, exports) { + "use strict"; var m1; (function (m1) { var m2; @@ -39,14 +40,17 @@ define(["require", "exports"], function (require, exports) { }); //// [declFileExportImportChain2_b.js] define(["require", "exports", "declFileExportImportChain2_a"], function (require, exports, a) { + "use strict"; return a; }); //// [declFileExportImportChain2_c.js] define(["require", "exports", "declFileExportImportChain2_b"], function (require, exports, b) { + "use strict"; exports.b = b; }); //// [declFileExportImportChain2_d.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/declFileForExportedImport.js b/tests/baselines/reference/declFileForExportedImport.js index 88967c4c2a406..266e030128eaf 100644 --- a/tests/baselines/reference/declFileForExportedImport.js +++ b/tests/baselines/reference/declFileForExportedImport.js @@ -12,7 +12,9 @@ export import b = a; var z = b.x; //// [declFileForExportedImport_0.js] +"use strict"; //// [declFileForExportedImport_1.js] +"use strict"; /// exports.a = require('./declFileForExportedImport_0'); var y = exports.a.x; diff --git a/tests/baselines/reference/declFileFunctions.js b/tests/baselines/reference/declFileFunctions.js index 163fa1905c8e7..e4f674d43c0f4 100644 --- a/tests/baselines/reference/declFileFunctions.js +++ b/tests/baselines/reference/declFileFunctions.js @@ -78,6 +78,7 @@ function globalfooWithOverloads(a: any): any { } //// [declFileFunctions_0.js] +"use strict"; /** This comment should appear for foo*/ function foo() { } diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index b67bacebb1a68..ccc022f26d52d 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -40,6 +40,7 @@ export var j = C.F6; //// [declFileGenericType.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/declFileImportChainInExportAssignment.js b/tests/baselines/reference/declFileImportChainInExportAssignment.js index 4ec3893d02fa8..41157907e8b1b 100644 --- a/tests/baselines/reference/declFileImportChainInExportAssignment.js +++ b/tests/baselines/reference/declFileImportChainInExportAssignment.js @@ -10,6 +10,7 @@ import b = a; export = b; //// [declFileImportChainInExportAssignment.js] +"use strict"; var m; (function (m) { var c; diff --git a/tests/baselines/reference/declFileImportModuleWithExportAssignment.js b/tests/baselines/reference/declFileImportModuleWithExportAssignment.js index b070b67ad18fc..a733e1332a769 100644 --- a/tests/baselines/reference/declFileImportModuleWithExportAssignment.js +++ b/tests/baselines/reference/declFileImportModuleWithExportAssignment.js @@ -27,9 +27,11 @@ a.test1(null, null, null); //// [declFileImportModuleWithExportAssignment_0.js] +"use strict"; var m2; module.exports = m2; //// [declFileImportModuleWithExportAssignment_1.js] +"use strict"; /**This is on import declaration*/ var a1 = require("./declFileImportModuleWithExportAssignment_0"); exports.a = a1; diff --git a/tests/baselines/reference/declFileIndexSignatures.js b/tests/baselines/reference/declFileIndexSignatures.js index 547c3f47060cf..4d3f3847ca18a 100644 --- a/tests/baselines/reference/declFileIndexSignatures.js +++ b/tests/baselines/reference/declFileIndexSignatures.js @@ -36,6 +36,7 @@ interface IGlobalIndexSignatureWithTypeParameter { } //// [declFileIndexSignatures_0.js] +"use strict"; //// [declFileIndexSignatures_1.js] diff --git a/tests/baselines/reference/declFileMethods.js b/tests/baselines/reference/declFileMethods.js index 2b82a4b71b525..c31fd6950ce56 100644 --- a/tests/baselines/reference/declFileMethods.js +++ b/tests/baselines/reference/declFileMethods.js @@ -191,6 +191,7 @@ interface I2 { //// [declFileMethods_0.js] +"use strict"; var c1 = (function () { function c1() { } diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt b/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt deleted file mode 100644 index 4c0093a543821..0000000000000 --- a/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -tests/cases/compiler/declFileObjectLiteralWithAccessors.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/declFileObjectLiteralWithAccessors.ts(6,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/declFileObjectLiteralWithAccessors.ts (2 errors) ==== - - function /*1*/makePoint(x: number) { - return { - b: 10, - get x() { return x; }, - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - set x(a: number) { this.b = a; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - }; - }; - var /*4*/point = makePoint(2); - var /*2*/x = point.x; - point./*3*/x = 30; \ No newline at end of file diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors.symbols b/tests/baselines/reference/declFileObjectLiteralWithAccessors.symbols new file mode 100644 index 0000000000000..862b0b3781eff --- /dev/null +++ b/tests/baselines/reference/declFileObjectLiteralWithAccessors.symbols @@ -0,0 +1,36 @@ +=== tests/cases/compiler/declFileObjectLiteralWithAccessors.ts === + +function /*1*/makePoint(x: number) { +>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithAccessors.ts, 0, 0)) +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 1, 24)) + + return { + b: 10, +>b : Symbol(b, Decl(declFileObjectLiteralWithAccessors.ts, 2, 12)) + + get x() { return x; }, +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30)) +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 1, 24)) + + set x(a: number) { this.b = a; } +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30)) +>a : Symbol(a, Decl(declFileObjectLiteralWithAccessors.ts, 5, 14)) +>a : Symbol(a, Decl(declFileObjectLiteralWithAccessors.ts, 5, 14)) + + }; +}; +var /*4*/point = makePoint(2); +>point : Symbol(point, Decl(declFileObjectLiteralWithAccessors.ts, 8, 3)) +>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithAccessors.ts, 0, 0)) + +var /*2*/x = point.x; +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 9, 3)) +>point.x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30)) +>point : Symbol(point, Decl(declFileObjectLiteralWithAccessors.ts, 8, 3)) +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30)) + +point./*3*/x = 30; +>point./*3*/x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30)) +>point : Symbol(point, Decl(declFileObjectLiteralWithAccessors.ts, 8, 3)) +>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30)) + diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors.types b/tests/baselines/reference/declFileObjectLiteralWithAccessors.types new file mode 100644 index 0000000000000..f7bb57b0e1e7d --- /dev/null +++ b/tests/baselines/reference/declFileObjectLiteralWithAccessors.types @@ -0,0 +1,47 @@ +=== tests/cases/compiler/declFileObjectLiteralWithAccessors.ts === + +function /*1*/makePoint(x: number) { +>makePoint : (x: number) => { b: number; x: number; } +>x : number + + return { +>{ b: 10, get x() { return x; }, set x(a: number) { this.b = a; } } : { b: number; x: number; } + + b: 10, +>b : number +>10 : number + + get x() { return x; }, +>x : number +>x : number + + set x(a: number) { this.b = a; } +>x : number +>a : number +>this.b = a : number +>this.b : any +>this : any +>b : any +>a : number + + }; +}; +var /*4*/point = makePoint(2); +>point : { b: number; x: number; } +>makePoint(2) : { b: number; x: number; } +>makePoint : (x: number) => { b: number; x: number; } +>2 : number + +var /*2*/x = point.x; +>x : number +>point.x : number +>point : { b: number; x: number; } +>x : number + +point./*3*/x = 30; +>point./*3*/x = 30 : number +>point./*3*/x : number +>point : { b: number; x: number; } +>x : number +>30 : number + diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt deleted file mode 100644 index 961442c23d073..0000000000000 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts (1 errors) ==== - - function /*1*/makePoint(x: number) { - return { - get x() { return x; }, - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - }; - }; - var /*4*/point = makePoint(2); - var /*2*/x = point./*3*/x; - \ No newline at end of file diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js index 8d79a576b06ea..396ee75422e71 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js @@ -12,7 +12,7 @@ var /*2*/x = point./*3*/x; //// [declFileObjectLiteralWithOnlyGetter.js] function makePoint(x) { return { - get x() { return x; } + get x() { return x; }, }; } ; diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.symbols b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.symbols new file mode 100644 index 0000000000000..ef9cd96e5555c --- /dev/null +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.symbols @@ -0,0 +1,23 @@ +=== tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts === + +function /*1*/makePoint(x: number) { +>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlyGetter.ts, 0, 0)) +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 1, 24)) + + return { + get x() { return x; }, +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 2, 12)) +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 1, 24)) + + }; +}; +var /*4*/point = makePoint(2); +>point : Symbol(point, Decl(declFileObjectLiteralWithOnlyGetter.ts, 6, 3)) +>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlyGetter.ts, 0, 0)) + +var /*2*/x = point./*3*/x; +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 7, 3)) +>point./*3*/x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 2, 12)) +>point : Symbol(point, Decl(declFileObjectLiteralWithOnlyGetter.ts, 6, 3)) +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 2, 12)) + diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types new file mode 100644 index 0000000000000..c0fb7b763fcfb --- /dev/null +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types @@ -0,0 +1,27 @@ +=== tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts === + +function /*1*/makePoint(x: number) { +>makePoint : (x: number) => { x: number; } +>x : number + + return { +>{ get x() { return x; }, } : { x: number; } + + get x() { return x; }, +>x : number +>x : number + + }; +}; +var /*4*/point = makePoint(2); +>point : { x: number; } +>makePoint(2) : { x: number; } +>makePoint : (x: number) => { x: number; } +>2 : number + +var /*2*/x = point./*3*/x; +>x : number +>point./*3*/x : number +>point : { x: number; } +>x : number + diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt deleted file mode 100644 index 7680a8d14dccd..0000000000000 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts (1 errors) ==== - - function /*1*/makePoint(x: number) { - return { - b: 10, - set x(a: number) { this.b = a; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - }; - }; - var /*3*/point = makePoint(2); - point./*2*/x = 30; \ No newline at end of file diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.symbols b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.symbols new file mode 100644 index 0000000000000..f747446614018 --- /dev/null +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.symbols @@ -0,0 +1,26 @@ +=== tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts === + +function /*1*/makePoint(x: number) { +>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlySetter.ts, 0, 0)) +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 1, 24)) + + return { + b: 10, +>b : Symbol(b, Decl(declFileObjectLiteralWithOnlySetter.ts, 2, 12)) + + set x(a: number) { this.b = a; } +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 3, 14)) +>a : Symbol(a, Decl(declFileObjectLiteralWithOnlySetter.ts, 4, 14)) +>a : Symbol(a, Decl(declFileObjectLiteralWithOnlySetter.ts, 4, 14)) + + }; +}; +var /*3*/point = makePoint(2); +>point : Symbol(point, Decl(declFileObjectLiteralWithOnlySetter.ts, 7, 3)) +>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlySetter.ts, 0, 0)) + +point./*2*/x = 30; +>point./*2*/x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 3, 14)) +>point : Symbol(point, Decl(declFileObjectLiteralWithOnlySetter.ts, 7, 3)) +>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 3, 14)) + diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.types b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.types new file mode 100644 index 0000000000000..2b9b98a896398 --- /dev/null +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.types @@ -0,0 +1,37 @@ +=== tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts === + +function /*1*/makePoint(x: number) { +>makePoint : (x: number) => { b: number; x: number; } +>x : number + + return { +>{ b: 10, set x(a: number) { this.b = a; } } : { b: number; x: number; } + + b: 10, +>b : number +>10 : number + + set x(a: number) { this.b = a; } +>x : number +>a : number +>this.b = a : number +>this.b : any +>this : any +>b : any +>a : number + + }; +}; +var /*3*/point = makePoint(2); +>point : { b: number; x: number; } +>makePoint(2) : { b: number; x: number; } +>makePoint : (x: number) => { b: number; x: number; } +>2 : number + +point./*2*/x = 30; +>point./*2*/x = 30 : number +>point./*2*/x : number +>point : { b: number; x: number; } +>x : number +>30 : number + diff --git a/tests/baselines/reference/declFilePrivateStatic.errors.txt b/tests/baselines/reference/declFilePrivateStatic.errors.txt deleted file mode 100644 index 4e1da34b979a9..0000000000000 --- a/tests/baselines/reference/declFilePrivateStatic.errors.txt +++ /dev/null @@ -1,29 +0,0 @@ -tests/cases/compiler/declFilePrivateStatic.ts(9,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/declFilePrivateStatic.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/declFilePrivateStatic.ts(12,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/declFilePrivateStatic.ts(13,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/declFilePrivateStatic.ts (4 errors) ==== - - class C { - private static x = 1; - static y = 1; - - private static a() { } - static b() { } - - private static get c() { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static get d() { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - private static set e(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static set f(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } \ No newline at end of file diff --git a/tests/baselines/reference/declFilePrivateStatic.symbols b/tests/baselines/reference/declFilePrivateStatic.symbols new file mode 100644 index 0000000000000..d3d0753123c6d --- /dev/null +++ b/tests/baselines/reference/declFilePrivateStatic.symbols @@ -0,0 +1,31 @@ +=== tests/cases/compiler/declFilePrivateStatic.ts === + +class C { +>C : Symbol(C, Decl(declFilePrivateStatic.ts, 0, 0)) + + private static x = 1; +>x : Symbol(C.x, Decl(declFilePrivateStatic.ts, 1, 9)) + + static y = 1; +>y : Symbol(C.y, Decl(declFilePrivateStatic.ts, 2, 25)) + + private static a() { } +>a : Symbol(C.a, Decl(declFilePrivateStatic.ts, 3, 17)) + + static b() { } +>b : Symbol(C.b, Decl(declFilePrivateStatic.ts, 5, 26)) + + private static get c() { return 1; } +>c : Symbol(C.c, Decl(declFilePrivateStatic.ts, 6, 18)) + + static get d() { return 1; } +>d : Symbol(C.d, Decl(declFilePrivateStatic.ts, 8, 40)) + + private static set e(v) { } +>e : Symbol(C.e, Decl(declFilePrivateStatic.ts, 9, 32)) +>v : Symbol(v, Decl(declFilePrivateStatic.ts, 11, 25)) + + static set f(v) { } +>f : Symbol(C.f, Decl(declFilePrivateStatic.ts, 11, 31)) +>v : Symbol(v, Decl(declFilePrivateStatic.ts, 12, 17)) +} diff --git a/tests/baselines/reference/declFilePrivateStatic.types b/tests/baselines/reference/declFilePrivateStatic.types new file mode 100644 index 0000000000000..35aaa3acdeb44 --- /dev/null +++ b/tests/baselines/reference/declFilePrivateStatic.types @@ -0,0 +1,35 @@ +=== tests/cases/compiler/declFilePrivateStatic.ts === + +class C { +>C : C + + private static x = 1; +>x : number +>1 : number + + static y = 1; +>y : number +>1 : number + + private static a() { } +>a : () => void + + static b() { } +>b : () => void + + private static get c() { return 1; } +>c : number +>1 : number + + static get d() { return 1; } +>d : number +>1 : number + + private static set e(v) { } +>e : any +>v : any + + static set f(v) { } +>f : any +>v : any +} diff --git a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.errors.txt b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.errors.txt new file mode 100644 index 0000000000000..970133016183c --- /dev/null +++ b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/declFile.d.ts(3,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/declFile.d.ts(4,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/declFile.d.ts(6,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/declFile.d.ts(8,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + +==== tests/cases/compiler/client.ts (0 errors) ==== + /// + var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file + +==== tests/cases/compiler/declFile.d.ts (4 errors) ==== + + declare module M { + declare var x; + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + declare function f(); + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + declare module N { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + declare class C { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + } + \ No newline at end of file diff --git a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js new file mode 100644 index 0000000000000..30e80ef4e6f2c --- /dev/null +++ b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js @@ -0,0 +1,26 @@ +//// [tests/cases/compiler/declFileWithErrorsInInputDeclarationFile.ts] //// + +//// [declFile.d.ts] + +declare module M { + declare var x; + declare function f(); + + declare module N { } + + declare class C { } +} + +//// [client.ts] +/// +var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file + + +//// [client.js] +/// +var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file + + +//// [client.d.ts] +/// +declare var x: M.C; diff --git a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt new file mode 100644 index 0000000000000..970133016183c --- /dev/null +++ b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/declFile.d.ts(3,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/declFile.d.ts(4,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/declFile.d.ts(6,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/declFile.d.ts(8,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + +==== tests/cases/compiler/client.ts (0 errors) ==== + /// + var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file + +==== tests/cases/compiler/declFile.d.ts (4 errors) ==== + + declare module M { + declare var x; + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + declare function f(); + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + declare module N { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + declare class C { } + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. + } + \ No newline at end of file diff --git a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js new file mode 100644 index 0000000000000..99dd625760f07 --- /dev/null +++ b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js @@ -0,0 +1,26 @@ +//// [tests/cases/compiler/declFileWithErrorsInInputDeclarationFileWithOut.ts] //// + +//// [declFile.d.ts] + +declare module M { + declare var x; + declare function f(); + + declare module N { } + + declare class C { } +} + +//// [client.ts] +/// +var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file + + +//// [out.js] +/// +var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file + + +//// [out.d.ts] +/// +declare var x: M.C; diff --git a/tests/baselines/reference/declarationEmitImportInExportAssignmentModule.js b/tests/baselines/reference/declarationEmitImportInExportAssignmentModule.js index b82766e2834cb..f39b35fe1f11e 100644 --- a/tests/baselines/reference/declarationEmitImportInExportAssignmentModule.js +++ b/tests/baselines/reference/declarationEmitImportInExportAssignmentModule.js @@ -11,6 +11,7 @@ module m { export = m; //// [declarationEmitImportInExportAssignmentModule.js] +"use strict"; var m; (function (m) { var c; diff --git a/tests/baselines/reference/declarationEmit_exportAssignment.js b/tests/baselines/reference/declarationEmit_exportAssignment.js index d761e2c45ebc6..36f698ec6c797 100644 --- a/tests/baselines/reference/declarationEmit_exportAssignment.js +++ b/tests/baselines/reference/declarationEmit_exportAssignment.js @@ -11,11 +11,13 @@ import {foo} from "./utils"; export = foo; //// [utils.js] +"use strict"; function foo() { } exports.foo = foo; function bar() { } exports.bar = bar; //// [index.js] +"use strict"; var utils_1 = require("./utils"); module.exports = utils_1.foo; diff --git a/tests/baselines/reference/declarationEmit_exportDeclaration.js b/tests/baselines/reference/declarationEmit_exportDeclaration.js index e2cb15b408ca0..6c6c37bbcfdec 100644 --- a/tests/baselines/reference/declarationEmit_exportDeclaration.js +++ b/tests/baselines/reference/declarationEmit_exportDeclaration.js @@ -14,11 +14,13 @@ let obj: Buzz; export {bar}; //// [utils.js] +"use strict"; function foo() { } exports.foo = foo; function bar() { } exports.bar = bar; //// [index.js] +"use strict"; var utils_1 = require("./utils"); exports.bar = utils_1.bar; utils_1.foo(); diff --git a/tests/baselines/reference/declarationEmit_nameConflicts.js b/tests/baselines/reference/declarationEmit_nameConflicts.js index 857fbee764d91..f0db81e0ac822 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts.js @@ -50,6 +50,7 @@ export module M.Q { } //// [declarationEmit_nameConflicts_1.js] +"use strict"; var f; (function (f) { var c = (function () { @@ -61,6 +62,7 @@ var f; })(f || (f = {})); module.exports = f; //// [declarationEmit_nameConflicts_0.js] +"use strict"; var im = require('./declarationEmit_nameConflicts_1'); var M; (function (M) { diff --git a/tests/baselines/reference/declarationEmit_nameConflictsWithAlias.js b/tests/baselines/reference/declarationEmit_nameConflictsWithAlias.js index e553229194680..0b99d3e1efe9a 100644 --- a/tests/baselines/reference/declarationEmit_nameConflictsWithAlias.js +++ b/tests/baselines/reference/declarationEmit_nameConflictsWithAlias.js @@ -7,6 +7,7 @@ export module M { } //// [declarationEmit_nameConflictsWithAlias.js] +"use strict"; var M; (function (M) { })(M = exports.M || (exports.M = {})); diff --git a/tests/baselines/reference/declarationFileOverwriteError.errors.txt b/tests/baselines/reference/declarationFileOverwriteError.errors.txt new file mode 100644 index 0000000000000..a12c60482e904 --- /dev/null +++ b/tests/baselines/reference/declarationFileOverwriteError.errors.txt @@ -0,0 +1,12 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' because it would overwrite input file. + + +!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. +==== tests/cases/compiler/a.d.ts (0 errors) ==== + + declare class c { + } + +==== tests/cases/compiler/a.ts (0 errors) ==== + class d { + } \ No newline at end of file diff --git a/tests/baselines/reference/declarationFileOverwriteError.js b/tests/baselines/reference/declarationFileOverwriteError.js new file mode 100644 index 0000000000000..a9ae79f8ed6d8 --- /dev/null +++ b/tests/baselines/reference/declarationFileOverwriteError.js @@ -0,0 +1,17 @@ +//// [tests/cases/compiler/declarationFileOverwriteError.ts] //// + +//// [a.d.ts] + +declare class c { +} + +//// [a.ts] +class d { +} + +//// [a.js] +var d = (function () { + function d() { + } + return d; +})(); diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt new file mode 100644 index 0000000000000..02251900345a4 --- /dev/null +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt @@ -0,0 +1,12 @@ +error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' because it would overwrite input file. + + +!!! error TS5055: Cannot write file 'out.d.ts' because it would overwrite input file. +==== tests/cases/compiler/out.d.ts (0 errors) ==== + + declare class c { + } + +==== tests/cases/compiler/a.ts (0 errors) ==== + class d { + } \ No newline at end of file diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.js b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.js new file mode 100644 index 0000000000000..34d9c95a00519 --- /dev/null +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.js @@ -0,0 +1,17 @@ +//// [tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts] //// + +//// [out.d.ts] + +declare class c { +} + +//// [a.ts] +class d { +} + +//// [out.js] +var d = (function () { + function d() { + } + return d; +})(); diff --git a/tests/baselines/reference/declarationFiles.js b/tests/baselines/reference/declarationFiles.js index d7ed9bde8c7c0..7ef41a630cba3 100644 --- a/tests/baselines/reference/declarationFiles.js +++ b/tests/baselines/reference/declarationFiles.js @@ -88,48 +88,3 @@ var C4 = (function () { }; return C4; })(); - - -//// [declarationFiles.d.ts] -declare class C1 { - x: this; - f(x: this): this; - constructor(x: this); -} -declare class C2 { - [x: string]: this; -} -interface Foo { - x: T; - y: this; -} -declare class C3 { - a: this[]; - b: [this, this]; - c: this | Date; - d: this & Date; - e: (((this))); - f: (x: this) => this; - g: new (x: this) => this; - h: Foo; - i: Foo this)>; - j: (x: any) => x is this; -} -declare class C4 { - x1: { - a: this; - }; - x2: this[]; - x3: { - a: this; - }[]; - x4: () => this; - f1(): { - a: this; - }; - f2(): this[]; - f3(): { - a: this; - }[]; - f4(): () => this; -} diff --git a/tests/baselines/reference/declareFileExportAssignment.js b/tests/baselines/reference/declareFileExportAssignment.js index ff16eee27fcef..891fb851818b8 100644 --- a/tests/baselines/reference/declareFileExportAssignment.js +++ b/tests/baselines/reference/declareFileExportAssignment.js @@ -19,6 +19,7 @@ var m2: { export = m2; //// [declareFileExportAssignment.js] +"use strict"; var m2; module.exports = m2; diff --git a/tests/baselines/reference/declareFileExportAssignmentWithVarFromVariableStatement.js b/tests/baselines/reference/declareFileExportAssignmentWithVarFromVariableStatement.js index c4acd79545382..ef7afd9dda6b6 100644 --- a/tests/baselines/reference/declareFileExportAssignmentWithVarFromVariableStatement.js +++ b/tests/baselines/reference/declareFileExportAssignmentWithVarFromVariableStatement.js @@ -19,6 +19,7 @@ var x = 10, m2: { export = m2; //// [declareFileExportAssignmentWithVarFromVariableStatement.js] +"use strict"; var x = 10, m2; module.exports = m2; diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.js new file mode 100644 index 0000000000000..3fb23375f0273 --- /dev/null +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.js @@ -0,0 +1,25 @@ +//// [decoratedDefaultExportsGetExportedAmd.ts] + +var decorator: ClassDecorator; + +@decorator +export default class Foo {} + + +//// [decoratedDefaultExportsGetExportedAmd.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +define(["require", "exports"], function (require, exports) { + "use strict"; + var decorator; + let Foo = class { + }; + Foo = __decorate([ + decorator + ], Foo); + exports.default = Foo; +}); diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.symbols b/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.symbols new file mode 100644 index 0000000000000..d8ff6716c38c5 --- /dev/null +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/es6/moduleExportsAmd/decoratedDefaultExportsGetExportedAmd.ts === + +var decorator: ClassDecorator; +>decorator : Symbol(decorator, Decl(decoratedDefaultExportsGetExportedAmd.ts, 1, 3)) +>ClassDecorator : Symbol(ClassDecorator, Decl(lib.d.ts, --, --)) + +@decorator +>decorator : Symbol(decorator, Decl(decoratedDefaultExportsGetExportedAmd.ts, 1, 3)) + +export default class Foo {} +>Foo : Symbol(Foo, Decl(decoratedDefaultExportsGetExportedAmd.ts, 1, 30)) + diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.types b/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.types new file mode 100644 index 0000000000000..89df83ce76d05 --- /dev/null +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.types @@ -0,0 +1,12 @@ +=== tests/cases/conformance/es6/moduleExportsAmd/decoratedDefaultExportsGetExportedAmd.ts === + +var decorator: ClassDecorator; +>decorator : (target: TFunction) => TFunction | void +>ClassDecorator : (target: TFunction) => TFunction | void + +@decorator +>decorator : (target: TFunction) => TFunction | void + +export default class Foo {} +>Foo : Foo + diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.js new file mode 100644 index 0000000000000..32acfbbea3991 --- /dev/null +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.js @@ -0,0 +1,23 @@ +//// [decoratedDefaultExportsGetExportedCommonjs.ts] + +var decorator: ClassDecorator; + +@decorator +export default class Foo {} + + +//// [decoratedDefaultExportsGetExportedCommonjs.js] +"use strict"; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var decorator; +let Foo = class { +}; +Foo = __decorate([ + decorator +], Foo); +exports.default = Foo; diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.symbols b/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.symbols new file mode 100644 index 0000000000000..35131c1244e1b --- /dev/null +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/es6/moduleExportsCommonjs/decoratedDefaultExportsGetExportedCommonjs.ts === + +var decorator: ClassDecorator; +>decorator : Symbol(decorator, Decl(decoratedDefaultExportsGetExportedCommonjs.ts, 1, 3)) +>ClassDecorator : Symbol(ClassDecorator, Decl(lib.d.ts, --, --)) + +@decorator +>decorator : Symbol(decorator, Decl(decoratedDefaultExportsGetExportedCommonjs.ts, 1, 3)) + +export default class Foo {} +>Foo : Symbol(Foo, Decl(decoratedDefaultExportsGetExportedCommonjs.ts, 1, 30)) + diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.types b/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.types new file mode 100644 index 0000000000000..56c8926342a25 --- /dev/null +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.types @@ -0,0 +1,12 @@ +=== tests/cases/conformance/es6/moduleExportsCommonjs/decoratedDefaultExportsGetExportedCommonjs.ts === + +var decorator: ClassDecorator; +>decorator : (target: TFunction) => TFunction | void +>ClassDecorator : (target: TFunction) => TFunction | void + +@decorator +>decorator : (target: TFunction) => TFunction | void + +export default class Foo {} +>Foo : Foo + diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js new file mode 100644 index 0000000000000..a2b22e4ccdbec --- /dev/null +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js @@ -0,0 +1,30 @@ +//// [decoratedDefaultExportsGetExportedSystem.ts] + +var decorator: ClassDecorator; + +@decorator +export default class Foo {} + + +//// [decoratedDefaultExportsGetExportedSystem.js] +System.register([], function(exports_1) { + "use strict"; + var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var decorator, Foo; + return { + setters:[], + execute: function() { + let Foo = class { + }; + Foo = __decorate([ + decorator + ], Foo); + exports_1("default", Foo); + } + } +}); diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.symbols b/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.symbols new file mode 100644 index 0000000000000..106ea3cacd8a1 --- /dev/null +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/es6/moduleExportsSystem/decoratedDefaultExportsGetExportedSystem.ts === + +var decorator: ClassDecorator; +>decorator : Symbol(decorator, Decl(decoratedDefaultExportsGetExportedSystem.ts, 1, 3)) +>ClassDecorator : Symbol(ClassDecorator, Decl(lib.d.ts, --, --)) + +@decorator +>decorator : Symbol(decorator, Decl(decoratedDefaultExportsGetExportedSystem.ts, 1, 3)) + +export default class Foo {} +>Foo : Symbol(Foo, Decl(decoratedDefaultExportsGetExportedSystem.ts, 1, 30)) + diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.types b/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.types new file mode 100644 index 0000000000000..c180f5fcf0940 --- /dev/null +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.types @@ -0,0 +1,12 @@ +=== tests/cases/conformance/es6/moduleExportsSystem/decoratedDefaultExportsGetExportedSystem.ts === + +var decorator: ClassDecorator; +>decorator : (target: TFunction) => TFunction | void +>ClassDecorator : (target: TFunction) => TFunction | void + +@decorator +>decorator : (target: TFunction) => TFunction | void + +export default class Foo {} +>Foo : Foo + diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.js new file mode 100644 index 0000000000000..06cee476b5761 --- /dev/null +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.js @@ -0,0 +1,32 @@ +//// [decoratedDefaultExportsGetExportedUmd.ts] + +var decorator: ClassDecorator; + +@decorator +export default class Foo {} + + +//// [decoratedDefaultExportsGetExportedUmd.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +(function (factory) { + if (typeof module === 'object' && typeof module.exports === 'object') { + var v = factory(require, exports); if (v !== undefined) module.exports = v; + } + else if (typeof define === 'function' && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + var decorator; + let Foo = class { + }; + Foo = __decorate([ + decorator + ], Foo); + exports.default = Foo; +}); diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.symbols b/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.symbols new file mode 100644 index 0000000000000..f4a8266cfa157 --- /dev/null +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/es6/moduleExportsUmd/decoratedDefaultExportsGetExportedUmd.ts === + +var decorator: ClassDecorator; +>decorator : Symbol(decorator, Decl(decoratedDefaultExportsGetExportedUmd.ts, 1, 3)) +>ClassDecorator : Symbol(ClassDecorator, Decl(lib.d.ts, --, --)) + +@decorator +>decorator : Symbol(decorator, Decl(decoratedDefaultExportsGetExportedUmd.ts, 1, 3)) + +export default class Foo {} +>Foo : Symbol(Foo, Decl(decoratedDefaultExportsGetExportedUmd.ts, 1, 30)) + diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.types b/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.types new file mode 100644 index 0000000000000..a258a600ba0f0 --- /dev/null +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.types @@ -0,0 +1,12 @@ +=== tests/cases/conformance/es6/moduleExportsUmd/decoratedDefaultExportsGetExportedUmd.ts === + +var decorator: ClassDecorator; +>decorator : (target: TFunction) => TFunction | void +>ClassDecorator : (target: TFunction) => TFunction | void + +@decorator +>decorator : (target: TFunction) => TFunction | void + +export default class Foo {} +>Foo : Foo + diff --git a/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.js b/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.js index ee39c1746a28d..51f32d67b4e82 100644 --- a/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.js +++ b/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.js @@ -22,9 +22,11 @@ class Wat { } //// [a.js] +"use strict"; // from #3108 exports.test = 'abc'; //// [b.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorMetadata.js b/tests/baselines/reference/decoratorMetadata.js index 3c4637d9dab7e..32ecf919593e4 100644 --- a/tests/baselines/reference/decoratorMetadata.js +++ b/tests/baselines/reference/decoratorMetadata.js @@ -12,9 +12,14 @@ declare var decorator: any; class MyComponent { constructor(public Service: Service) { } + + @decorator + method(x: this) { + } } //// [service.js] +"use strict"; var Service = (function () { function Service() { } @@ -23,6 +28,7 @@ var Service = (function () { Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Service; //// [component.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); @@ -37,6 +43,14 @@ var MyComponent = (function () { function MyComponent(Service) { this.Service = Service; } + MyComponent.prototype.method = function (x) { + }; + __decorate([ + decorator, + __metadata('design:type', Function), + __metadata('design:paramtypes', [Object]), + __metadata('design:returntype', void 0) + ], MyComponent.prototype, "method", null); MyComponent = __decorate([ decorator, __metadata('design:paramtypes', [service_1.default]) diff --git a/tests/baselines/reference/decoratorMetadata.symbols b/tests/baselines/reference/decoratorMetadata.symbols index 706f5ace8a921..842982286d48f 100644 --- a/tests/baselines/reference/decoratorMetadata.symbols +++ b/tests/baselines/reference/decoratorMetadata.symbols @@ -19,4 +19,12 @@ class MyComponent { >Service : Symbol(Service, Decl(component.ts, 6, 16)) >Service : Symbol(Service, Decl(component.ts, 0, 6)) } + + @decorator +>decorator : Symbol(decorator, Decl(component.ts, 2, 11)) + + method(x: this) { +>method : Symbol(method, Decl(component.ts, 7, 5)) +>x : Symbol(x, Decl(component.ts, 10, 11)) + } } diff --git a/tests/baselines/reference/decoratorMetadata.types b/tests/baselines/reference/decoratorMetadata.types index b0ce80fb1e40f..a25f55f01b101 100644 --- a/tests/baselines/reference/decoratorMetadata.types +++ b/tests/baselines/reference/decoratorMetadata.types @@ -19,4 +19,12 @@ class MyComponent { >Service : Service >Service : Service } + + @decorator +>decorator : any + + method(x: this) { +>method : (x: this) => void +>x : this + } } diff --git a/tests/baselines/reference/decoratorMetadataOnInferredType.js b/tests/baselines/reference/decoratorMetadataOnInferredType.js index 32aeca93c1be8..46d853a7dcd74 100644 --- a/tests/baselines/reference/decoratorMetadataOnInferredType.js +++ b/tests/baselines/reference/decoratorMetadataOnInferredType.js @@ -18,6 +18,7 @@ export class B { //// [decoratorMetadataOnInferredType.js] +"use strict"; var A = (function () { function A() { console.log('new A'); diff --git a/tests/baselines/reference/decoratorMetadataWithConstructorType.js b/tests/baselines/reference/decoratorMetadataWithConstructorType.js index 717ae5c4ce25d..28df2186097c1 100644 --- a/tests/baselines/reference/decoratorMetadataWithConstructorType.js +++ b/tests/baselines/reference/decoratorMetadataWithConstructorType.js @@ -18,6 +18,7 @@ export class B { //// [decoratorMetadataWithConstructorType.js] +"use strict"; var A = (function () { function A() { console.log('new A'); diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision.js index 392506e53683f..4b37415c4b7d0 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision.js @@ -24,6 +24,7 @@ export {MyClass}; //// [db.js] +"use strict"; var db = (function () { function db() { } @@ -33,6 +34,7 @@ var db = (function () { })(); exports.db = db; //// [service.js] +"use strict"; var db_1 = require('./db'); function someDecorator(target) { return target; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2.js index da011acf1105c..015ed6eb122ce 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2.js @@ -24,6 +24,7 @@ export {MyClass}; //// [db.js] +"use strict"; var db = (function () { function db() { } @@ -33,6 +34,7 @@ var db = (function () { })(); exports.db = db; //// [service.js] +"use strict"; var db_1 = require('./db'); function someDecorator(target) { return target; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3.js index b219bba4102f0..0aff28542c095 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3.js @@ -24,6 +24,7 @@ export {MyClass}; //// [db.js] +"use strict"; var db = (function () { function db() { } @@ -33,6 +34,7 @@ var db = (function () { })(); exports.db = db; //// [service.js] +"use strict"; var db = require('./db'); function someDecorator(target) { return target; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.js index d0d201e62b5f2..c9f51ae3eed8c 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.js @@ -24,6 +24,7 @@ export {MyClass}; //// [db.js] +"use strict"; var db = (function () { function db() { } @@ -33,6 +34,7 @@ var db = (function () { })(); exports.db = db; //// [service.js] +"use strict"; var db_1 = require('./db'); // error no default export function someDecorator(target) { return target; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5.js index a25995153382b..b5b1dd02ecdf8 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5.js @@ -24,6 +24,7 @@ export {MyClass}; //// [db.js] +"use strict"; var db = (function () { function db() { } @@ -34,6 +35,7 @@ var db = (function () { Object.defineProperty(exports, "__esModule", { value: true }); exports.default = db; //// [service.js] +"use strict"; var db_1 = require('./db'); function someDecorator(target) { return target; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6.js index 917cdc7036f0e..5cb989e750a8c 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6.js @@ -24,6 +24,7 @@ export {MyClass}; //// [db.js] +"use strict"; var db = (function () { function db() { } @@ -34,6 +35,7 @@ var db = (function () { Object.defineProperty(exports, "__esModule", { value: true }); exports.default = db; //// [service.js] +"use strict"; var db_1 = require('./db'); function someDecorator(target) { return target; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7.js index 1dd93b12915f5..7962eae638fee 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7.js @@ -24,6 +24,7 @@ export {MyClass}; //// [db.js] +"use strict"; var db = (function () { function db() { } @@ -34,6 +35,7 @@ var db = (function () { Object.defineProperty(exports, "__esModule", { value: true }); exports.default = db; //// [service.js] +"use strict"; var db_1 = require('./db'); function someDecorator(target) { return target; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8.js index 0aee9e471dd43..d4b24d075e9f7 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8.js @@ -24,6 +24,7 @@ export {MyClass}; //// [db.js] +"use strict"; var db = (function () { function db() { } @@ -33,6 +34,7 @@ var db = (function () { })(); exports.db = db; //// [service.js] +"use strict"; var database = require('./db'); function someDecorator(target) { return target; diff --git a/tests/baselines/reference/decoratorOnClass2.js b/tests/baselines/reference/decoratorOnClass2.js index 5e5f4e4b07d45..d2258f2e0f357 100644 --- a/tests/baselines/reference/decoratorOnClass2.js +++ b/tests/baselines/reference/decoratorOnClass2.js @@ -6,6 +6,7 @@ export class C { } //// [decoratorOnClass2.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnImportEquals2.js b/tests/baselines/reference/decoratorOnImportEquals2.js index 5f54f0b4ee6ed..5e6b6b4a62322 100644 --- a/tests/baselines/reference/decoratorOnImportEquals2.js +++ b/tests/baselines/reference/decoratorOnImportEquals2.js @@ -10,4 +10,6 @@ import lib = require('./decoratorOnImportEquals2_0'); declare function dec(target: T): T; //// [decoratorOnImportEquals2_0.js] +"use strict"; //// [decoratorOnImportEquals2_1.js] +"use strict"; diff --git a/tests/baselines/reference/defaultExportWithOverloads01.js b/tests/baselines/reference/defaultExportWithOverloads01.js index 9ec8cccf5bfca..f88d60182db13 100644 --- a/tests/baselines/reference/defaultExportWithOverloads01.js +++ b/tests/baselines/reference/defaultExportWithOverloads01.js @@ -6,6 +6,7 @@ export default function f(...args: any[]) { } //// [defaultExportWithOverloads01.js] +"use strict"; function f() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/defaultExportsCannotMerge01.js b/tests/baselines/reference/defaultExportsCannotMerge01.js index 99b8ecab1d325..24a37cad2c371 100644 --- a/tests/baselines/reference/defaultExportsCannotMerge01.js +++ b/tests/baselines/reference/defaultExportsCannotMerge01.js @@ -31,6 +31,7 @@ Entity.x; Entity.y; //// [m1.js] +"use strict"; function Decl() { return 0; } @@ -42,6 +43,7 @@ var Decl; Decl.y = 20; })(Decl = exports.Decl || (exports.Decl = {})); //// [m2.js] +"use strict"; var m1_1 = require("m1"); m1_1.default(); var x; diff --git a/tests/baselines/reference/defaultExportsCannotMerge02.js b/tests/baselines/reference/defaultExportsCannotMerge02.js index e3897395c74fd..57b175266c1fc 100644 --- a/tests/baselines/reference/defaultExportsCannotMerge02.js +++ b/tests/baselines/reference/defaultExportsCannotMerge02.js @@ -26,6 +26,7 @@ var z = new Entity(); var sum = z.p1 + z.p2 //// [m1.js] +"use strict"; var Decl = (function () { function Decl() { } @@ -34,6 +35,7 @@ var Decl = (function () { Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Decl; //// [m2.js] +"use strict"; var m1_1 = require("m1"); m1_1.default(); var x; diff --git a/tests/baselines/reference/defaultExportsCannotMerge03.js b/tests/baselines/reference/defaultExportsCannotMerge03.js index 05e7de9412087..0b4f77bfb10dc 100644 --- a/tests/baselines/reference/defaultExportsCannotMerge03.js +++ b/tests/baselines/reference/defaultExportsCannotMerge03.js @@ -26,6 +26,7 @@ var z = new Entity(); var sum = z.p1 + z.p2 //// [m1.js] +"use strict"; var Decl = (function () { function Decl() { } @@ -34,6 +35,7 @@ var Decl = (function () { Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Decl; //// [m2.js] +"use strict"; var m1_1 = require("m1"); m1_1.default(); var x; diff --git a/tests/baselines/reference/defaultExportsCannotMerge04.js b/tests/baselines/reference/defaultExportsCannotMerge04.js index eb1122a819743..7c9bd88bc16df 100644 --- a/tests/baselines/reference/defaultExportsCannotMerge04.js +++ b/tests/baselines/reference/defaultExportsCannotMerge04.js @@ -14,6 +14,7 @@ export interface Foo { } //// [defaultExportsCannotMerge04.js] +"use strict"; function Foo() { } Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/defaultExportsGetExportedAmd.js b/tests/baselines/reference/defaultExportsGetExportedAmd.js new file mode 100644 index 0000000000000..b9387a2cc84d8 --- /dev/null +++ b/tests/baselines/reference/defaultExportsGetExportedAmd.js @@ -0,0 +1,11 @@ +//// [defaultExportsGetExportedAmd.ts] +export default class Foo {} + + +//// [defaultExportsGetExportedAmd.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + class Foo { + } + exports.default = Foo; +}); diff --git a/tests/baselines/reference/defaultExportsGetExportedAmd.symbols b/tests/baselines/reference/defaultExportsGetExportedAmd.symbols new file mode 100644 index 0000000000000..22376f91b08f9 --- /dev/null +++ b/tests/baselines/reference/defaultExportsGetExportedAmd.symbols @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/moduleExportsAmd/defaultExportsGetExportedAmd.ts === +export default class Foo {} +>Foo : Symbol(Foo, Decl(defaultExportsGetExportedAmd.ts, 0, 0)) + diff --git a/tests/baselines/reference/defaultExportsGetExportedAmd.types b/tests/baselines/reference/defaultExportsGetExportedAmd.types new file mode 100644 index 0000000000000..94e511dbef682 --- /dev/null +++ b/tests/baselines/reference/defaultExportsGetExportedAmd.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/moduleExportsAmd/defaultExportsGetExportedAmd.ts === +export default class Foo {} +>Foo : Foo + diff --git a/tests/baselines/reference/defaultExportsGetExportedCommonjs.js b/tests/baselines/reference/defaultExportsGetExportedCommonjs.js new file mode 100644 index 0000000000000..28301251efc90 --- /dev/null +++ b/tests/baselines/reference/defaultExportsGetExportedCommonjs.js @@ -0,0 +1,9 @@ +//// [defaultExportsGetExportedCommonjs.ts] +export default class Foo {} + + +//// [defaultExportsGetExportedCommonjs.js] +"use strict"; +class Foo { +} +exports.default = Foo; diff --git a/tests/baselines/reference/defaultExportsGetExportedCommonjs.symbols b/tests/baselines/reference/defaultExportsGetExportedCommonjs.symbols new file mode 100644 index 0000000000000..a5be95f1787c1 --- /dev/null +++ b/tests/baselines/reference/defaultExportsGetExportedCommonjs.symbols @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/moduleExportsCommonjs/defaultExportsGetExportedCommonjs.ts === +export default class Foo {} +>Foo : Symbol(Foo, Decl(defaultExportsGetExportedCommonjs.ts, 0, 0)) + diff --git a/tests/baselines/reference/defaultExportsGetExportedCommonjs.types b/tests/baselines/reference/defaultExportsGetExportedCommonjs.types new file mode 100644 index 0000000000000..d7034ffa03d46 --- /dev/null +++ b/tests/baselines/reference/defaultExportsGetExportedCommonjs.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/moduleExportsCommonjs/defaultExportsGetExportedCommonjs.ts === +export default class Foo {} +>Foo : Foo + diff --git a/tests/baselines/reference/defaultExportsGetExportedSystem.js b/tests/baselines/reference/defaultExportsGetExportedSystem.js new file mode 100644 index 0000000000000..7d5c6ee28543f --- /dev/null +++ b/tests/baselines/reference/defaultExportsGetExportedSystem.js @@ -0,0 +1,17 @@ +//// [defaultExportsGetExportedSystem.ts] +export default class Foo {} + + +//// [defaultExportsGetExportedSystem.js] +System.register([], function(exports_1) { + "use strict"; + var Foo; + return { + setters:[], + execute: function() { + class Foo { + } + exports_1("default", Foo); + } + } +}); diff --git a/tests/baselines/reference/defaultExportsGetExportedSystem.symbols b/tests/baselines/reference/defaultExportsGetExportedSystem.symbols new file mode 100644 index 0000000000000..9050833680e51 --- /dev/null +++ b/tests/baselines/reference/defaultExportsGetExportedSystem.symbols @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/moduleExportsSystem/defaultExportsGetExportedSystem.ts === +export default class Foo {} +>Foo : Symbol(Foo, Decl(defaultExportsGetExportedSystem.ts, 0, 0)) + diff --git a/tests/baselines/reference/defaultExportsGetExportedSystem.types b/tests/baselines/reference/defaultExportsGetExportedSystem.types new file mode 100644 index 0000000000000..d1439f0f99d45 --- /dev/null +++ b/tests/baselines/reference/defaultExportsGetExportedSystem.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/moduleExportsSystem/defaultExportsGetExportedSystem.ts === +export default class Foo {} +>Foo : Foo + diff --git a/tests/baselines/reference/defaultExportsGetExportedUmd.js b/tests/baselines/reference/defaultExportsGetExportedUmd.js new file mode 100644 index 0000000000000..902fc89c1d41b --- /dev/null +++ b/tests/baselines/reference/defaultExportsGetExportedUmd.js @@ -0,0 +1,18 @@ +//// [defaultExportsGetExportedUmd.ts] +export default class Foo {} + + +//// [defaultExportsGetExportedUmd.js] +(function (factory) { + if (typeof module === 'object' && typeof module.exports === 'object') { + var v = factory(require, exports); if (v !== undefined) module.exports = v; + } + else if (typeof define === 'function' && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + class Foo { + } + exports.default = Foo; +}); diff --git a/tests/baselines/reference/defaultExportsGetExportedUmd.symbols b/tests/baselines/reference/defaultExportsGetExportedUmd.symbols new file mode 100644 index 0000000000000..9c59f10e6e04b --- /dev/null +++ b/tests/baselines/reference/defaultExportsGetExportedUmd.symbols @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/moduleExportsUmd/defaultExportsGetExportedUmd.ts === +export default class Foo {} +>Foo : Symbol(Foo, Decl(defaultExportsGetExportedUmd.ts, 0, 0)) + diff --git a/tests/baselines/reference/defaultExportsGetExportedUmd.types b/tests/baselines/reference/defaultExportsGetExportedUmd.types new file mode 100644 index 0000000000000..ed5f4b7f709c0 --- /dev/null +++ b/tests/baselines/reference/defaultExportsGetExportedUmd.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/moduleExportsUmd/defaultExportsGetExportedUmd.ts === +export default class Foo {} +>Foo : Foo + diff --git a/tests/baselines/reference/dependencyViaImportAlias.js b/tests/baselines/reference/dependencyViaImportAlias.js index e94be4a0affe8..4ce37904a222d 100644 --- a/tests/baselines/reference/dependencyViaImportAlias.js +++ b/tests/baselines/reference/dependencyViaImportAlias.js @@ -12,6 +12,7 @@ export = A; //// [A.js] define(["require", "exports"], function (require, exports) { + "use strict"; var A = (function () { function A() { } @@ -21,6 +22,7 @@ define(["require", "exports"], function (require, exports) { }); //// [B.js] define(["require", "exports", 'A'], function (require, exports, a) { + "use strict"; var A = a.A; return A; }); diff --git a/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt index 95524d4bf4dc5..c8037255a3293 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt @@ -8,6 +8,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts( Type 'number | string[][] | string' is not assignable to type 'number | string[][]'. Type 'string' is not assignable to type 'number | string[][]'. Type 'string' is not assignable to type 'string[][]'. + Property 'push' is missing in type 'String'. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(16,8): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(16,16): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(23,14): error TS2345: Argument of type '{ x: string; y: boolean; }' is not assignable to parameter of type '{ x: number; y: any; }'. @@ -77,6 +78,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts( !!! error TS2345: Type 'number | string[][] | string' is not assignable to type 'number | string[][]'. !!! error TS2345: Type 'string' is not assignable to type 'number | string[][]'. !!! error TS2345: Type 'string' is not assignable to type 'string[][]'. +!!! error TS2345: Property 'push' is missing in type 'String'. // If the declaration includes an initializer expression (which is permitted only diff --git a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.js b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.js index 99e50801d5031..de55d21cb1d53 100644 --- a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.js +++ b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.js @@ -1,4 +1,4 @@ -//// [doNotEmitPinnedCommentOnNotEmittedNode.ts] +//// [file1.ts] class C { /*! remove pinned comment anywhere else */ @@ -11,7 +11,7 @@ var x = 10; /*! remove pinned comment anywhere else */ declare var OData: any; -//// [doNotEmitPinnedCommentOnNotEmittedNode.js] +//// [file1.js] var C = (function () { function C() { } diff --git a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.symbols b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.symbols index 6460926604422..c733d886ff337 100644 --- a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.symbols +++ b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.symbols @@ -1,24 +1,24 @@ -=== tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts === +=== tests/cases/compiler/file1.ts === class C { ->C : Symbol(C, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 0, 0)) +>C : Symbol(C, Decl(file1.ts, 0, 0)) /*! remove pinned comment anywhere else */ public foo(x: string, y: any) ->foo : Symbol(foo, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 1, 9), Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 3, 33)) ->x : Symbol(x, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 3, 15)) ->y : Symbol(y, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 3, 25)) +>foo : Symbol(foo, Decl(file1.ts, 1, 9), Decl(file1.ts, 3, 33)) +>x : Symbol(x, Decl(file1.ts, 3, 15)) +>y : Symbol(y, Decl(file1.ts, 3, 25)) public foo(x: string, y: number) { } ->foo : Symbol(foo, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 1, 9), Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 3, 33)) ->x : Symbol(x, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 4, 15)) ->y : Symbol(y, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 4, 25)) +>foo : Symbol(foo, Decl(file1.ts, 1, 9), Decl(file1.ts, 3, 33)) +>x : Symbol(x, Decl(file1.ts, 4, 15)) +>y : Symbol(y, Decl(file1.ts, 4, 25)) } var x = 10; ->x : Symbol(x, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 7, 3)) +>x : Symbol(x, Decl(file1.ts, 7, 3)) /*! remove pinned comment anywhere else */ declare var OData: any; ->OData : Symbol(OData, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 10, 11)) +>OData : Symbol(OData, Decl(file1.ts, 10, 11)) diff --git a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.types b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.types index b0f71137c2d23..49fb8e378ba14 100644 --- a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.types +++ b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts === +=== tests/cases/compiler/file1.ts === class C { >C : C diff --git a/tests/baselines/reference/duplicateExportAssignments.js b/tests/baselines/reference/duplicateExportAssignments.js index 3742a5f1fe54f..934ba3ae567e6 100644 --- a/tests/baselines/reference/duplicateExportAssignments.js +++ b/tests/baselines/reference/duplicateExportAssignments.js @@ -42,10 +42,12 @@ export = z; //// [foo1.js] +"use strict"; var x = 10; var y = 20; module.exports = x; //// [foo2.js] +"use strict"; var x = 10; var y = (function () { function y() { @@ -55,6 +57,7 @@ var y = (function () { ; module.exports = x; //// [foo3.js] +"use strict"; var x; (function (x_1) { x_1.x = 10; @@ -66,6 +69,7 @@ var y = (function () { })(); module.exports = x; //// [foo4.js] +"use strict"; function x() { return 42; } @@ -74,6 +78,7 @@ function y() { } module.exports = x; //// [foo5.js] +"use strict"; var x = 5; var y = "test"; var z = {}; diff --git a/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.js b/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.js index d86925f1fd328..97a51d7032de4 100644 --- a/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.js +++ b/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.js @@ -1,4 +1,4 @@ -//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts] +//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.ts] -//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.js] +//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.js] diff --git a/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.symbols b/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.symbols index 61cc569b965f5..81436a6e51041 100644 --- a/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.symbols +++ b/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.symbols @@ -1,3 +1,3 @@ -=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts === +=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.ts === No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.types b/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.types index 61cc569b965f5..81436a6e51041 100644 --- a/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.types +++ b/tests/baselines/reference/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.types @@ -1,3 +1,3 @@ -=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts === +=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.ts === No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLocalVariable1.js b/tests/baselines/reference/duplicateLocalVariable1.js index ecde1ff24077e..e155a2e50c9d1 100644 --- a/tests/baselines/reference/duplicateLocalVariable1.js +++ b/tests/baselines/reference/duplicateLocalVariable1.js @@ -346,6 +346,7 @@ export var tests: TestRunner = (function () { })(); //// [duplicateLocalVariable1.js] +"use strict"; / /; commonjs; var TestFileDir = ".\\TempTestFiles"; diff --git a/tests/baselines/reference/duplicateLocalVariable2.js b/tests/baselines/reference/duplicateLocalVariable2.js index a8370f317091e..b507e33725073 100644 --- a/tests/baselines/reference/duplicateLocalVariable2.js +++ b/tests/baselines/reference/duplicateLocalVariable2.js @@ -37,6 +37,7 @@ export var tests: TestRunner = (function () { //// [duplicateLocalVariable2.js] define(["require", "exports"], function (require, exports) { + "use strict"; var TestCase = (function () { function TestCase(name, test, errorMessageRegEx) { this.name = name; diff --git a/tests/baselines/reference/duplicateStringNamedProperty1.js b/tests/baselines/reference/duplicateStringNamedProperty1.js index f5e5f90c78d7b..102fba9c3d6ea 100644 --- a/tests/baselines/reference/duplicateStringNamedProperty1.js +++ b/tests/baselines/reference/duplicateStringNamedProperty1.js @@ -5,3 +5,4 @@ export interface Album { } //// [duplicateStringNamedProperty1.js] +"use strict"; diff --git a/tests/baselines/reference/duplicateSymbolsExportMatching.js b/tests/baselines/reference/duplicateSymbolsExportMatching.js index 45aee387cda86..8a8374a8dd4a6 100644 --- a/tests/baselines/reference/duplicateSymbolsExportMatching.js +++ b/tests/baselines/reference/duplicateSymbolsExportMatching.js @@ -67,6 +67,7 @@ export interface D { } //// [duplicateSymbolsExportMatching.js] define(["require", "exports"], function (require, exports) { + "use strict"; // Should report error only once for instantiated module var M; (function (M) { diff --git a/tests/baselines/reference/dynamicModuleTypecheckError.js b/tests/baselines/reference/dynamicModuleTypecheckError.js index 1a9e058971ed2..ef39270c9d1c9 100644 --- a/tests/baselines/reference/dynamicModuleTypecheckError.js +++ b/tests/baselines/reference/dynamicModuleTypecheckError.js @@ -9,6 +9,7 @@ for(var i = 0; i < 30; i++) { //// [dynamicModuleTypecheckError.js] +"use strict"; exports.x = 1; for (var i = 0; i < 30; i++) { exports.x = i * 1000; // should not be an error here diff --git a/tests/baselines/reference/elidingImportNames.js b/tests/baselines/reference/elidingImportNames.js index e07ee6fa54a79..573c86425dc9b 100644 --- a/tests/baselines/reference/elidingImportNames.js +++ b/tests/baselines/reference/elidingImportNames.js @@ -16,10 +16,13 @@ export var main = 10; export var main = 10; //// [elidingImportNames_main.js] +"use strict"; exports.main = 10; //// [elidingImportNames_main1.js] +"use strict"; exports.main = 10; //// [elidingImportNames_test.js] +"use strict"; var a = require('./elidingImportNames_main'); // alias used in typeof var b = a; var x; diff --git a/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.js b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.js index ece24d691da30..e7f88b92775a4 100644 --- a/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.js +++ b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.js @@ -10,16 +10,16 @@ class C { static get ["computedname"]() { return ""; } - get ["computedname"]() { + get ["computedname1"]() { return ""; } - get ["computedname"]() { + get ["computedname2"]() { return ""; } - set ["computedname"](x: any) { + set ["computedname3"](x: any) { } - set ["computedname"](y: string) { + set ["computedname4"](y: string) { } set foo(a: string) { } @@ -38,15 +38,15 @@ class C { static get ["computedname"]() { return ""; } - get ["computedname"]() { + get ["computedname1"]() { return ""; } - get ["computedname"]() { + get ["computedname2"]() { return ""; } - set ["computedname"](x) { + set ["computedname3"](x) { } - set ["computedname"](y) { + set ["computedname4"](y) { } set foo(a) { } static set bar(b) { } diff --git a/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.symbols b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.symbols index 2d249348f9bad..b2b1a000dc968 100644 --- a/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.symbols +++ b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.symbols @@ -21,18 +21,18 @@ class C { static get ["computedname"]() { return ""; } - get ["computedname"]() { + get ["computedname1"]() { return ""; } - get ["computedname"]() { + get ["computedname2"]() { return ""; } - set ["computedname"](x: any) { ->x : Symbol(x, Decl(emitClassDeclarationWithGetterSetterInES6.ts, 18, 25)) + set ["computedname3"](x: any) { +>x : Symbol(x, Decl(emitClassDeclarationWithGetterSetterInES6.ts, 18, 26)) } - set ["computedname"](y: string) { ->y : Symbol(y, Decl(emitClassDeclarationWithGetterSetterInES6.ts, 20, 25)) + set ["computedname4"](y: string) { +>y : Symbol(y, Decl(emitClassDeclarationWithGetterSetterInES6.ts, 20, 26)) } set foo(a: string) { } diff --git a/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types index 292fb961b10c4..e4f7d6c00b47b 100644 --- a/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types @@ -25,25 +25,25 @@ class C { return ""; >"" : string } - get ["computedname"]() { ->"computedname" : string + get ["computedname1"]() { +>"computedname1" : string return ""; >"" : string } - get ["computedname"]() { ->"computedname" : string + get ["computedname2"]() { +>"computedname2" : string return ""; >"" : string } - set ["computedname"](x: any) { ->"computedname" : string + set ["computedname3"](x: any) { +>"computedname3" : string >x : any } - set ["computedname"](y: string) { ->"computedname" : string + set ["computedname4"](y: string) { +>"computedname4" : string >y : string } diff --git a/tests/baselines/reference/emitClassDeclarationWithMethodInES6.js b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.js index fc0a510461bb1..8a79d45b6786c 100644 --- a/tests/baselines/reference/emitClassDeclarationWithMethodInES6.js +++ b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.js @@ -2,18 +2,18 @@ class D { _bar: string; foo() { } - ["computedName"]() { } - ["computedName"](a: string) { } - ["computedName"](a: string): number { return 1; } + ["computedName1"]() { } + ["computedName2"](a: string) { } + ["computedName3"](a: string): number { return 1; } bar(): string { return this._bar; } baz(a: any, x: string): string { return "HELLO"; } - static ["computedname"]() { } - static ["computedname"](a: string) { } - static ["computedname"](a: string): boolean { return true; } + static ["computedname4"]() { } + static ["computedname5"](a: string) { } + static ["computedname6"](a: string): boolean { return true; } static staticMethod() { var x = 1 + 2; return x @@ -25,18 +25,18 @@ class D { //// [emitClassDeclarationWithMethodInES6.js] class D { foo() { } - ["computedName"]() { } - ["computedName"](a) { } - ["computedName"](a) { return 1; } + ["computedName1"]() { } + ["computedName2"](a) { } + ["computedName3"](a) { return 1; } bar() { return this._bar; } baz(a, x) { return "HELLO"; } - static ["computedname"]() { } - static ["computedname"](a) { } - static ["computedname"](a) { return true; } + static ["computedname4"]() { } + static ["computedname5"](a) { } + static ["computedname6"](a) { return true; } static staticMethod() { var x = 1 + 2; return x; diff --git a/tests/baselines/reference/emitClassDeclarationWithMethodInES6.symbols b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.symbols index b7a4dbbf341a1..970076f6b7837 100644 --- a/tests/baselines/reference/emitClassDeclarationWithMethodInES6.symbols +++ b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.symbols @@ -8,15 +8,15 @@ class D { foo() { } >foo : Symbol(foo, Decl(emitClassDeclarationWithMethodInES6.ts, 1, 17)) - ["computedName"]() { } - ["computedName"](a: string) { } ->a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 4, 21)) + ["computedName1"]() { } + ["computedName2"](a: string) { } +>a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 4, 22)) - ["computedName"](a: string): number { return 1; } ->a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 5, 21)) + ["computedName3"](a: string): number { return 1; } +>a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 5, 22)) bar(): string { ->bar : Symbol(bar, Decl(emitClassDeclarationWithMethodInES6.ts, 5, 53)) +>bar : Symbol(bar, Decl(emitClassDeclarationWithMethodInES6.ts, 5, 54)) return this._bar; >this._bar : Symbol(_bar, Decl(emitClassDeclarationWithMethodInES6.ts, 0, 9)) @@ -30,15 +30,15 @@ class D { return "HELLO"; } - static ["computedname"]() { } - static ["computedname"](a: string) { } ->a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 13, 28)) + static ["computedname4"]() { } + static ["computedname5"](a: string) { } +>a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 13, 29)) - static ["computedname"](a: string): boolean { return true; } ->a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 14, 28)) + static ["computedname6"](a: string): boolean { return true; } +>a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 14, 29)) static staticMethod() { ->staticMethod : Symbol(D.staticMethod, Decl(emitClassDeclarationWithMethodInES6.ts, 14, 64)) +>staticMethod : Symbol(D.staticMethod, Decl(emitClassDeclarationWithMethodInES6.ts, 14, 65)) var x = 1 + 2; >x : Symbol(x, Decl(emitClassDeclarationWithMethodInES6.ts, 16, 11)) diff --git a/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types index 10ae930c24486..02a90729486a7 100644 --- a/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types +++ b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types @@ -8,15 +8,15 @@ class D { foo() { } >foo : () => void - ["computedName"]() { } ->"computedName" : string + ["computedName1"]() { } +>"computedName1" : string - ["computedName"](a: string) { } ->"computedName" : string + ["computedName2"](a: string) { } +>"computedName2" : string >a : string - ["computedName"](a: string): number { return 1; } ->"computedName" : string + ["computedName3"](a: string): number { return 1; } +>"computedName3" : string >a : string >1 : number @@ -36,15 +36,15 @@ class D { return "HELLO"; >"HELLO" : string } - static ["computedname"]() { } ->"computedname" : string + static ["computedname4"]() { } +>"computedname4" : string - static ["computedname"](a: string) { } ->"computedname" : string + static ["computedname5"](a: string) { } +>"computedname5" : string >a : string - static ["computedname"](a: string): boolean { return true; } ->"computedname" : string + static ["computedname6"](a: string): boolean { return true; } +>"computedname6" : string >a : string >true : boolean diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index bb870f717c1cd..892ce5f59b13c 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -4,6 +4,7 @@ class B extends A { } //// [emptyModuleName.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/enumFromExternalModule.js b/tests/baselines/reference/enumFromExternalModule.js index af04d9522b018..5561517341d5b 100644 --- a/tests/baselines/reference/enumFromExternalModule.js +++ b/tests/baselines/reference/enumFromExternalModule.js @@ -11,11 +11,13 @@ var x = f.Mode.Open; //// [enumFromExternalModule_0.js] +"use strict"; (function (Mode) { Mode[Mode["Open"] = 0] = "Open"; })(exports.Mode || (exports.Mode = {})); var Mode = exports.Mode; //// [enumFromExternalModule_1.js] +"use strict"; /// var f = require('./enumFromExternalModule_0'); var x = f.Mode.Open; diff --git a/tests/baselines/reference/errorElaboration.errors.txt b/tests/baselines/reference/errorElaboration.errors.txt new file mode 100644 index 0000000000000..94742d7d98bc4 --- /dev/null +++ b/tests/baselines/reference/errorElaboration.errors.txt @@ -0,0 +1,25 @@ +tests/cases/compiler/errorElaboration.ts(12,5): error TS2345: Argument of type '() => Container>' is not assignable to parameter of type '() => Container>'. + Type 'Container>' is not assignable to type 'Container>'. + Type 'Ref' is not assignable to type 'Ref'. + Type 'string' is not assignable to type 'number'. + + +==== tests/cases/compiler/errorElaboration.ts (1 errors) ==== + // Repro for #5712 + + interface Ref { + prop: T; + } + interface Container { + m1: Container>; + m2: T; + } + declare function foo(x: () => Container>): void; + let a: () => Container>; + foo(a); + ~ +!!! error TS2345: Argument of type '() => Container>' is not assignable to parameter of type '() => Container>'. +!!! error TS2345: Type 'Container>' is not assignable to type 'Container>'. +!!! error TS2345: Type 'Ref' is not assignable to type 'Ref'. +!!! error TS2345: Type 'string' is not assignable to type 'number'. + \ No newline at end of file diff --git a/tests/baselines/reference/errorElaboration.js b/tests/baselines/reference/errorElaboration.js new file mode 100644 index 0000000000000..eed8bbd7c6b89 --- /dev/null +++ b/tests/baselines/reference/errorElaboration.js @@ -0,0 +1,19 @@ +//// [errorElaboration.ts] +// Repro for #5712 + +interface Ref { + prop: T; +} +interface Container { + m1: Container>; + m2: T; +} +declare function foo(x: () => Container>): void; +let a: () => Container>; +foo(a); + + +//// [errorElaboration.js] +// Repro for #5712 +var a; +foo(a); diff --git a/tests/baselines/reference/errorOnInitializerInInterfaceProperty.errors.txt b/tests/baselines/reference/errorOnInitializerInInterfaceProperty.errors.txt new file mode 100644 index 0000000000000..03e899e7c2dee --- /dev/null +++ b/tests/baselines/reference/errorOnInitializerInInterfaceProperty.errors.txt @@ -0,0 +1,10 @@ +tests/cases/compiler/errorOnInitializerInInterfaceProperty.ts(2,19): error TS1246: An interface property cannot have an initializer. + + +==== tests/cases/compiler/errorOnInitializerInInterfaceProperty.ts (1 errors) ==== + interface Foo { + bar: number = 5; + ~ +!!! error TS1246: An interface property cannot have an initializer. + } + \ No newline at end of file diff --git a/tests/baselines/reference/errorOnInitializerInInterfaceProperty.js b/tests/baselines/reference/errorOnInitializerInInterfaceProperty.js new file mode 100644 index 0000000000000..c40a3cfb43d19 --- /dev/null +++ b/tests/baselines/reference/errorOnInitializerInInterfaceProperty.js @@ -0,0 +1,7 @@ +//// [errorOnInitializerInInterfaceProperty.ts] +interface Foo { + bar: number = 5; +} + + +//// [errorOnInitializerInInterfaceProperty.js] diff --git a/tests/baselines/reference/errorOnInitializerInObjectTypeLiteralProperty.errors.txt b/tests/baselines/reference/errorOnInitializerInObjectTypeLiteralProperty.errors.txt new file mode 100644 index 0000000000000..f6d10b92b2d8f --- /dev/null +++ b/tests/baselines/reference/errorOnInitializerInObjectTypeLiteralProperty.errors.txt @@ -0,0 +1,17 @@ +tests/cases/compiler/errorOnInitializerInObjectTypeLiteralProperty.ts(2,19): error TS1247: A type literal property cannot have an initializer. +tests/cases/compiler/errorOnInitializerInObjectTypeLiteralProperty.ts(6,19): error TS1247: A type literal property cannot have an initializer. + + +==== tests/cases/compiler/errorOnInitializerInObjectTypeLiteralProperty.ts (2 errors) ==== + var Foo: { + bar: number = 5; + ~ +!!! error TS1247: A type literal property cannot have an initializer. + }; + + let Bar: { + bar: number = 5; + ~ +!!! error TS1247: A type literal property cannot have an initializer. + }; + \ No newline at end of file diff --git a/tests/baselines/reference/errorOnInitializerInObjectTypeLiteralProperty.js b/tests/baselines/reference/errorOnInitializerInObjectTypeLiteralProperty.js new file mode 100644 index 0000000000000..4dcc0b7dce67c --- /dev/null +++ b/tests/baselines/reference/errorOnInitializerInObjectTypeLiteralProperty.js @@ -0,0 +1,13 @@ +//// [errorOnInitializerInObjectTypeLiteralProperty.ts] +var Foo: { + bar: number = 5; +}; + +let Bar: { + bar: number = 5; +}; + + +//// [errorOnInitializerInObjectTypeLiteralProperty.js] +var Foo; +var Bar; diff --git a/tests/baselines/reference/errorsOnImportedSymbol.js b/tests/baselines/reference/errorsOnImportedSymbol.js index 2c991ecd821eb..4c7dca8274e92 100644 --- a/tests/baselines/reference/errorsOnImportedSymbol.js +++ b/tests/baselines/reference/errorsOnImportedSymbol.js @@ -16,6 +16,8 @@ var y = Sammy.Sammy(); //// [errorsOnImportedSymbol_0.js] +"use strict"; //// [errorsOnImportedSymbol_1.js] +"use strict"; var x = new Sammy.Sammy(); var y = Sammy.Sammy(); diff --git a/tests/baselines/reference/es3-sourcemap-amd.js.map b/tests/baselines/reference/es3-sourcemap-amd.js.map index e11de86943736..aa9f7aefe09de 100644 --- a/tests/baselines/reference/es3-sourcemap-amd.js.map +++ b/tests/baselines/reference/es3-sourcemap-amd.js.map @@ -1,2 +1,2 @@ //// [es3-sourcemap-amd.js.map] -{"version":3,"file":"es3-sourcemap-amd.js","sourceRoot":"","sources":["es3-sourcemap-amd.ts"],"names":["A","A.constructor","A.B"],"mappings":"AACA;IAEIA;IAGAC,CAACA;IAEMD,aAACA,GAARA;QAEIE,MAAMA,CAACA,EAAEA,CAACA;IACdA,CAACA;IACLF,QAACA;AAADA,CAACA,AAXD,IAWC"} \ No newline at end of file +{"version":3,"file":"es3-sourcemap-amd.js","sourceRoot":"","sources":["es3-sourcemap-amd.ts"],"names":[],"mappings":"AACA;IAEI;IAGA,CAAC;IAEM,aAAC,GAAR;QAEI,MAAM,CAAC,EAAE,CAAC;IACd,CAAC;IACL,QAAC;AAAD,CAAC,AAXD,IAWC"} \ No newline at end of file diff --git a/tests/baselines/reference/es3-sourcemap-amd.sourcemap.txt b/tests/baselines/reference/es3-sourcemap-amd.sourcemap.txt index a20cfaa766dba..2a5a48fbe47b7 100644 --- a/tests/baselines/reference/es3-sourcemap-amd.sourcemap.txt +++ b/tests/baselines/reference/es3-sourcemap-amd.sourcemap.txt @@ -21,7 +21,7 @@ sourceFile:es3-sourcemap-amd.ts 1->class A >{ > -1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) name (A) +1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) --- >>> } 1->^^^^ @@ -32,8 +32,8 @@ sourceFile:es3-sourcemap-amd.ts > > 2 > } -1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) -2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) --- >>> A.prototype.B = function () { 1->^^^^ @@ -44,9 +44,9 @@ sourceFile:es3-sourcemap-amd.ts > public 2 > B 3 > -1->Emitted(4, 5) Source(9, 12) + SourceIndex(0) name (A) -2 >Emitted(4, 18) Source(9, 13) + SourceIndex(0) name (A) -3 >Emitted(4, 21) Source(9, 5) + SourceIndex(0) name (A) +1->Emitted(4, 5) Source(9, 12) + SourceIndex(0) +2 >Emitted(4, 18) Source(9, 13) + SourceIndex(0) +3 >Emitted(4, 21) Source(9, 5) + SourceIndex(0) --- >>> return 42; 1 >^^^^^^^^ @@ -61,11 +61,11 @@ sourceFile:es3-sourcemap-amd.ts 3 > 4 > 42 5 > ; -1 >Emitted(5, 9) Source(11, 9) + SourceIndex(0) name (A.B) -2 >Emitted(5, 15) Source(11, 15) + SourceIndex(0) name (A.B) -3 >Emitted(5, 16) Source(11, 16) + SourceIndex(0) name (A.B) -4 >Emitted(5, 18) Source(11, 18) + SourceIndex(0) name (A.B) -5 >Emitted(5, 19) Source(11, 19) + SourceIndex(0) name (A.B) +1 >Emitted(5, 9) Source(11, 9) + SourceIndex(0) +2 >Emitted(5, 15) Source(11, 15) + SourceIndex(0) +3 >Emitted(5, 16) Source(11, 16) + SourceIndex(0) +4 >Emitted(5, 18) Source(11, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(11, 19) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -74,8 +74,8 @@ sourceFile:es3-sourcemap-amd.ts 1 > > 2 > } -1 >Emitted(6, 5) Source(12, 5) + SourceIndex(0) name (A.B) -2 >Emitted(6, 6) Source(12, 6) + SourceIndex(0) name (A.B) +1 >Emitted(6, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(6, 6) Source(12, 6) + SourceIndex(0) --- >>> return A; 1->^^^^ @@ -83,8 +83,8 @@ sourceFile:es3-sourcemap-amd.ts 1-> > 2 > } -1->Emitted(7, 5) Source(13, 1) + SourceIndex(0) name (A) -2 >Emitted(7, 13) Source(13, 2) + SourceIndex(0) name (A) +1->Emitted(7, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(7, 13) Source(13, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -107,8 +107,8 @@ sourceFile:es3-sourcemap-amd.ts > return 42; > } > } -1 >Emitted(8, 1) Source(13, 1) + SourceIndex(0) name (A) -2 >Emitted(8, 2) Source(13, 2) + SourceIndex(0) name (A) +1 >Emitted(8, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(13, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(13, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/es3defaultAliasIsQuoted.js b/tests/baselines/reference/es3defaultAliasIsQuoted.js index 3ca828c1b4cd1..393302df51826 100644 --- a/tests/baselines/reference/es3defaultAliasIsQuoted.js +++ b/tests/baselines/reference/es3defaultAliasIsQuoted.js @@ -15,6 +15,7 @@ import {Foo, default as assert} from "./es3defaultAliasQuoted_file0"; assert(Foo.CONSTANT === "Foo"); //// [es3defaultAliasQuoted_file0.js] +"use strict"; var Foo = (function () { function Foo() { } @@ -29,5 +30,6 @@ function assert(value) { exports.__esModule = true; exports["default"] = assert; //// [es3defaultAliasQuoted_file1.js] +"use strict"; var es3defaultAliasQuoted_file0_1 = require("./es3defaultAliasQuoted_file0"); es3defaultAliasQuoted_file0_1["default"](es3defaultAliasQuoted_file0_1.Foo.CONSTANT === "Foo"); diff --git a/tests/baselines/reference/es5-commonjs.js b/tests/baselines/reference/es5-commonjs.js index 2a0c6d924ca49..da5bff3aea73c 100644 --- a/tests/baselines/reference/es5-commonjs.js +++ b/tests/baselines/reference/es5-commonjs.js @@ -15,6 +15,7 @@ export default class A //// [es5-commonjs.js] +"use strict"; var A = (function () { function A() { } diff --git a/tests/baselines/reference/es5-commonjs2.js b/tests/baselines/reference/es5-commonjs2.js index 174665b41255a..2c38edef6ae44 100644 --- a/tests/baselines/reference/es5-commonjs2.js +++ b/tests/baselines/reference/es5-commonjs2.js @@ -4,5 +4,6 @@ export default 1; //// [es5-commonjs2.js] +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = 1; diff --git a/tests/baselines/reference/es5-commonjs3.js b/tests/baselines/reference/es5-commonjs3.js index cc3d0b1527a2a..b2c1c5d68907b 100644 --- a/tests/baselines/reference/es5-commonjs3.js +++ b/tests/baselines/reference/es5-commonjs3.js @@ -5,5 +5,6 @@ export var __esModule = 1; //// [es5-commonjs3.js] +"use strict"; exports.default = "test"; exports.__esModule = 1; diff --git a/tests/baselines/reference/es5-commonjs4.js b/tests/baselines/reference/es5-commonjs4.js index 50a4c49e464f3..56bb5ba5f798d 100644 --- a/tests/baselines/reference/es5-commonjs4.js +++ b/tests/baselines/reference/es5-commonjs4.js @@ -16,6 +16,7 @@ export var __esModule = 1; //// [es5-commonjs4.js] +"use strict"; var A = (function () { function A() { } diff --git a/tests/baselines/reference/es5-commonjs5.js b/tests/baselines/reference/es5-commonjs5.js index ead6079eff13e..73c859bb7780f 100644 --- a/tests/baselines/reference/es5-commonjs5.js +++ b/tests/baselines/reference/es5-commonjs5.js @@ -6,6 +6,7 @@ export default function () { //// [es5-commonjs5.js] +"use strict"; function default_1() { return "test"; } diff --git a/tests/baselines/reference/es5-commonjs6.js b/tests/baselines/reference/es5-commonjs6.js index 7c2c8b21779d9..87d2f7d62a6fd 100644 --- a/tests/baselines/reference/es5-commonjs6.js +++ b/tests/baselines/reference/es5-commonjs6.js @@ -5,6 +5,7 @@ var __esModule = 1; //// [es5-commonjs6.js] +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = "test"; var __esModule = 1; diff --git a/tests/baselines/reference/es5-souremap-amd.js.map b/tests/baselines/reference/es5-souremap-amd.js.map index b8412bd1e72e9..4c7e152e95bc1 100644 --- a/tests/baselines/reference/es5-souremap-amd.js.map +++ b/tests/baselines/reference/es5-souremap-amd.js.map @@ -1,2 +1,2 @@ //// [es5-souremap-amd.js.map] -{"version":3,"file":"es5-souremap-amd.js","sourceRoot":"","sources":["es5-souremap-amd.ts"],"names":["A","A.constructor","A.B"],"mappings":"AACA;IAEIA;IAGAC,CAACA;IAEMD,aAACA,GAARA;QAEIE,MAAMA,CAACA,EAAEA,CAACA;IACdA,CAACA;IACLF,QAACA;AAADA,CAACA,AAXD,IAWC"} \ No newline at end of file +{"version":3,"file":"es5-souremap-amd.js","sourceRoot":"","sources":["es5-souremap-amd.ts"],"names":[],"mappings":"AACA;IAEI;IAGA,CAAC;IAEM,aAAC,GAAR;QAEI,MAAM,CAAC,EAAE,CAAC;IACd,CAAC;IACL,QAAC;AAAD,CAAC,AAXD,IAWC"} \ No newline at end of file diff --git a/tests/baselines/reference/es5-souremap-amd.sourcemap.txt b/tests/baselines/reference/es5-souremap-amd.sourcemap.txt index 9b6b4af56ca71..3b5226d31f19d 100644 --- a/tests/baselines/reference/es5-souremap-amd.sourcemap.txt +++ b/tests/baselines/reference/es5-souremap-amd.sourcemap.txt @@ -21,7 +21,7 @@ sourceFile:es5-souremap-amd.ts 1->class A >{ > -1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) name (A) +1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) --- >>> } 1->^^^^ @@ -32,8 +32,8 @@ sourceFile:es5-souremap-amd.ts > > 2 > } -1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) -2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) --- >>> A.prototype.B = function () { 1->^^^^ @@ -44,9 +44,9 @@ sourceFile:es5-souremap-amd.ts > public 2 > B 3 > -1->Emitted(4, 5) Source(9, 12) + SourceIndex(0) name (A) -2 >Emitted(4, 18) Source(9, 13) + SourceIndex(0) name (A) -3 >Emitted(4, 21) Source(9, 5) + SourceIndex(0) name (A) +1->Emitted(4, 5) Source(9, 12) + SourceIndex(0) +2 >Emitted(4, 18) Source(9, 13) + SourceIndex(0) +3 >Emitted(4, 21) Source(9, 5) + SourceIndex(0) --- >>> return 42; 1 >^^^^^^^^ @@ -61,11 +61,11 @@ sourceFile:es5-souremap-amd.ts 3 > 4 > 42 5 > ; -1 >Emitted(5, 9) Source(11, 9) + SourceIndex(0) name (A.B) -2 >Emitted(5, 15) Source(11, 15) + SourceIndex(0) name (A.B) -3 >Emitted(5, 16) Source(11, 16) + SourceIndex(0) name (A.B) -4 >Emitted(5, 18) Source(11, 18) + SourceIndex(0) name (A.B) -5 >Emitted(5, 19) Source(11, 19) + SourceIndex(0) name (A.B) +1 >Emitted(5, 9) Source(11, 9) + SourceIndex(0) +2 >Emitted(5, 15) Source(11, 15) + SourceIndex(0) +3 >Emitted(5, 16) Source(11, 16) + SourceIndex(0) +4 >Emitted(5, 18) Source(11, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(11, 19) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -74,8 +74,8 @@ sourceFile:es5-souremap-amd.ts 1 > > 2 > } -1 >Emitted(6, 5) Source(12, 5) + SourceIndex(0) name (A.B) -2 >Emitted(6, 6) Source(12, 6) + SourceIndex(0) name (A.B) +1 >Emitted(6, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(6, 6) Source(12, 6) + SourceIndex(0) --- >>> return A; 1->^^^^ @@ -83,8 +83,8 @@ sourceFile:es5-souremap-amd.ts 1-> > 2 > } -1->Emitted(7, 5) Source(13, 1) + SourceIndex(0) name (A) -2 >Emitted(7, 13) Source(13, 2) + SourceIndex(0) name (A) +1->Emitted(7, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(7, 13) Source(13, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -107,8 +107,8 @@ sourceFile:es5-souremap-amd.ts > return 42; > } > } -1 >Emitted(8, 1) Source(13, 1) + SourceIndex(0) name (A) -2 >Emitted(8, 2) Source(13, 2) + SourceIndex(0) name (A) +1 >Emitted(8, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(13, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(13, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/es5-system.js b/tests/baselines/reference/es5-system.js index 2674527722a9e..1fde76a762cc8 100644 --- a/tests/baselines/reference/es5-system.js +++ b/tests/baselines/reference/es5-system.js @@ -16,6 +16,7 @@ export default class A //// [es5-system.js] System.register([], function(exports_1) { + "use strict"; var A; return { setters:[], diff --git a/tests/baselines/reference/es5-umd2.js b/tests/baselines/reference/es5-umd2.js index 9b79f5f17b7e2..7a6dd8f10632e 100644 --- a/tests/baselines/reference/es5-umd2.js +++ b/tests/baselines/reference/es5-umd2.js @@ -23,6 +23,7 @@ export class A define(["require", "exports"], factory); } })(function (require, exports) { + "use strict"; var A = (function () { function A() { } diff --git a/tests/baselines/reference/es5-umd3.js b/tests/baselines/reference/es5-umd3.js index 042316b710ee1..0665c52696e9c 100644 --- a/tests/baselines/reference/es5-umd3.js +++ b/tests/baselines/reference/es5-umd3.js @@ -23,6 +23,7 @@ export default class A define(["require", "exports"], factory); } })(function (require, exports) { + "use strict"; var A = (function () { function A() { } diff --git a/tests/baselines/reference/es5-umd4.js b/tests/baselines/reference/es5-umd4.js index 81dcf440cb862..546b882cac823 100644 --- a/tests/baselines/reference/es5-umd4.js +++ b/tests/baselines/reference/es5-umd4.js @@ -25,6 +25,7 @@ export = A; define(["require", "exports"], factory); } })(function (require, exports) { + "use strict"; var A = (function () { function A() { } diff --git a/tests/baselines/reference/es5ExportDefaultClassDeclaration.js b/tests/baselines/reference/es5ExportDefaultClassDeclaration.js index 0d4076e39a183..ee513ea6e5fc6 100644 --- a/tests/baselines/reference/es5ExportDefaultClassDeclaration.js +++ b/tests/baselines/reference/es5ExportDefaultClassDeclaration.js @@ -6,6 +6,7 @@ export default class C { //// [es5ExportDefaultClassDeclaration.js] +"use strict"; var C = (function () { function C() { } diff --git a/tests/baselines/reference/es5ExportDefaultClassDeclaration2.js b/tests/baselines/reference/es5ExportDefaultClassDeclaration2.js index 5e5eeae1f0f93..bd348d978936b 100644 --- a/tests/baselines/reference/es5ExportDefaultClassDeclaration2.js +++ b/tests/baselines/reference/es5ExportDefaultClassDeclaration2.js @@ -6,6 +6,7 @@ export default class { //// [es5ExportDefaultClassDeclaration2.js] +"use strict"; var default_1 = (function () { function default_1() { } diff --git a/tests/baselines/reference/es5ExportDefaultClassDeclaration3.js b/tests/baselines/reference/es5ExportDefaultClassDeclaration3.js index a977447f9ad6d..bd03861330824 100644 --- a/tests/baselines/reference/es5ExportDefaultClassDeclaration3.js +++ b/tests/baselines/reference/es5ExportDefaultClassDeclaration3.js @@ -15,6 +15,7 @@ var t: typeof C = C; //// [es5ExportDefaultClassDeclaration3.js] +"use strict"; var before = new C(); var C = (function () { function C() { diff --git a/tests/baselines/reference/es5ExportDefaultExpression.js b/tests/baselines/reference/es5ExportDefaultExpression.js index a825e45971bb6..0821543134c8f 100644 --- a/tests/baselines/reference/es5ExportDefaultExpression.js +++ b/tests/baselines/reference/es5ExportDefaultExpression.js @@ -4,6 +4,7 @@ export default (1 + 2); //// [es5ExportDefaultExpression.js] +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = (1 + 2); diff --git a/tests/baselines/reference/es5ExportDefaultFunctionDeclaration.js b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration.js index afc44ac53f506..55de6b62b8366 100644 --- a/tests/baselines/reference/es5ExportDefaultFunctionDeclaration.js +++ b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration.js @@ -4,6 +4,7 @@ export default function f() { } //// [es5ExportDefaultFunctionDeclaration.js] +"use strict"; function f() { } Object.defineProperty(exports, "__esModule", { value: true }); exports.default = f; diff --git a/tests/baselines/reference/es5ExportDefaultFunctionDeclaration2.js b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration2.js index 10f1db6a0eb1d..e6007cc914751 100644 --- a/tests/baselines/reference/es5ExportDefaultFunctionDeclaration2.js +++ b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration2.js @@ -4,6 +4,7 @@ export default function () { } //// [es5ExportDefaultFunctionDeclaration2.js] +"use strict"; function default_1() { } Object.defineProperty(exports, "__esModule", { value: true }); exports.default = default_1; diff --git a/tests/baselines/reference/es5ExportDefaultFunctionDeclaration3.js b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration3.js index af437c087662e..54a2658470ecf 100644 --- a/tests/baselines/reference/es5ExportDefaultFunctionDeclaration3.js +++ b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration3.js @@ -9,6 +9,7 @@ export default function func(): typeof func { var after: typeof func = func(); //// [es5ExportDefaultFunctionDeclaration3.js] +"use strict"; var before = func(); function func() { return func; diff --git a/tests/baselines/reference/es5ExportDefaultIdentifier.js b/tests/baselines/reference/es5ExportDefaultIdentifier.js index c8fb6b3be2785..b3840caf14589 100644 --- a/tests/baselines/reference/es5ExportDefaultIdentifier.js +++ b/tests/baselines/reference/es5ExportDefaultIdentifier.js @@ -6,6 +6,7 @@ export default f; //// [es5ExportDefaultIdentifier.js] +"use strict"; function f() { } exports.f = f; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/es5ExportEquals.js b/tests/baselines/reference/es5ExportEquals.js index 88d1da4201d34..4697c61976b88 100644 --- a/tests/baselines/reference/es5ExportEquals.js +++ b/tests/baselines/reference/es5ExportEquals.js @@ -6,6 +6,7 @@ export = f; //// [es5ExportEquals.js] +"use strict"; function f() { } exports.f = f; module.exports = f; diff --git a/tests/baselines/reference/es5ExportEqualsDts.js b/tests/baselines/reference/es5ExportEqualsDts.js index 922d012be0ef4..3d2e493a5ac25 100644 --- a/tests/baselines/reference/es5ExportEqualsDts.js +++ b/tests/baselines/reference/es5ExportEqualsDts.js @@ -14,6 +14,7 @@ module A { export = A //// [es5ExportEqualsDts.js] +"use strict"; var A = (function () { function A() { } diff --git a/tests/baselines/reference/es5ModuleInternalNamedImports.js b/tests/baselines/reference/es5ModuleInternalNamedImports.js index d7d120e8af9c0..506f6bbed33e8 100644 --- a/tests/baselines/reference/es5ModuleInternalNamedImports.js +++ b/tests/baselines/reference/es5ModuleInternalNamedImports.js @@ -34,6 +34,7 @@ export module M { //// [es5ModuleInternalNamedImports.js] define(["require", "exports"], function (require, exports) { + "use strict"; var M; (function (M) { // variable diff --git a/tests/baselines/reference/es5ModuleWithModuleGenAmd.js b/tests/baselines/reference/es5ModuleWithModuleGenAmd.js index f4757b539eb49..22c34aa6fffbb 100644 --- a/tests/baselines/reference/es5ModuleWithModuleGenAmd.js +++ b/tests/baselines/reference/es5ModuleWithModuleGenAmd.js @@ -13,6 +13,7 @@ export class A //// [es5ModuleWithModuleGenAmd.js] define(["require", "exports"], function (require, exports) { + "use strict"; var A = (function () { function A() { } diff --git a/tests/baselines/reference/es5ModuleWithModuleGenCommonjs.js b/tests/baselines/reference/es5ModuleWithModuleGenCommonjs.js index b4ca020f56677..ec0c7fafc8559 100644 --- a/tests/baselines/reference/es5ModuleWithModuleGenCommonjs.js +++ b/tests/baselines/reference/es5ModuleWithModuleGenCommonjs.js @@ -12,6 +12,7 @@ export class A } //// [es5ModuleWithModuleGenCommonjs.js] +"use strict"; var A = (function () { function A() { } diff --git a/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.js b/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.js index 4f663875adee9..ae6bd73c1ccd0 100644 --- a/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.js +++ b/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.js @@ -12,6 +12,7 @@ export class A } //// [es5ModuleWithoutModuleGenTarget.js] +"use strict"; var A = (function () { function A() { } diff --git a/tests/baselines/reference/es6-sourcemap-amd.js.map b/tests/baselines/reference/es6-sourcemap-amd.js.map index 779c13b129698..5c62572f0a6bc 100644 --- a/tests/baselines/reference/es6-sourcemap-amd.js.map +++ b/tests/baselines/reference/es6-sourcemap-amd.js.map @@ -1,2 +1,2 @@ //// [es6-sourcemap-amd.js.map] -{"version":3,"file":"es6-sourcemap-amd.js","sourceRoot":"","sources":["es6-sourcemap-amd.ts"],"names":["A","A.constructor","A.B"],"mappings":"AACA;IAEIA;IAGAC,CAACA;IAEMD,CAACA;QAEJE,MAAMA,CAACA,EAAEA,CAACA;IACdA,CAACA;AACLF,CAACA;AAAA"} \ No newline at end of file +{"version":3,"file":"es6-sourcemap-amd.js","sourceRoot":"","sources":["es6-sourcemap-amd.ts"],"names":[],"mappings":"AACA;IAEI;IAGA,CAAC;IAEM,CAAC;QAEJ,MAAM,CAAC,EAAE,CAAC;IACd,CAAC;AACL,CAAC;AAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/es6-sourcemap-amd.sourcemap.txt b/tests/baselines/reference/es6-sourcemap-amd.sourcemap.txt index 179dd79ba1700..db329263ffa00 100644 --- a/tests/baselines/reference/es6-sourcemap-amd.sourcemap.txt +++ b/tests/baselines/reference/es6-sourcemap-amd.sourcemap.txt @@ -21,7 +21,7 @@ sourceFile:es6-sourcemap-amd.ts 1->class A >{ > -1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) name (A) +1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) --- >>> } 1->^^^^ @@ -32,8 +32,8 @@ sourceFile:es6-sourcemap-amd.ts > > 2 > } -1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) -2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) --- >>> B() { 1->^^^^ @@ -43,8 +43,8 @@ sourceFile:es6-sourcemap-amd.ts > > public 2 > B -1->Emitted(4, 5) Source(9, 12) + SourceIndex(0) name (A) -2 >Emitted(4, 6) Source(9, 13) + SourceIndex(0) name (A) +1->Emitted(4, 5) Source(9, 12) + SourceIndex(0) +2 >Emitted(4, 6) Source(9, 13) + SourceIndex(0) --- >>> return 42; 1->^^^^^^^^ @@ -59,11 +59,11 @@ sourceFile:es6-sourcemap-amd.ts 3 > 4 > 42 5 > ; -1->Emitted(5, 9) Source(11, 9) + SourceIndex(0) name (A.B) -2 >Emitted(5, 15) Source(11, 15) + SourceIndex(0) name (A.B) -3 >Emitted(5, 16) Source(11, 16) + SourceIndex(0) name (A.B) -4 >Emitted(5, 18) Source(11, 18) + SourceIndex(0) name (A.B) -5 >Emitted(5, 19) Source(11, 19) + SourceIndex(0) name (A.B) +1->Emitted(5, 9) Source(11, 9) + SourceIndex(0) +2 >Emitted(5, 15) Source(11, 15) + SourceIndex(0) +3 >Emitted(5, 16) Source(11, 16) + SourceIndex(0) +4 >Emitted(5, 18) Source(11, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(11, 19) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -71,8 +71,8 @@ sourceFile:es6-sourcemap-amd.ts 1 > > 2 > } -1 >Emitted(6, 5) Source(12, 5) + SourceIndex(0) name (A.B) -2 >Emitted(6, 6) Source(12, 6) + SourceIndex(0) name (A.B) +1 >Emitted(6, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(6, 6) Source(12, 6) + SourceIndex(0) --- >>>} 1 > @@ -81,8 +81,8 @@ sourceFile:es6-sourcemap-amd.ts 1 > > 2 >} -1 >Emitted(7, 1) Source(13, 1) + SourceIndex(0) name (A) -2 >Emitted(7, 2) Source(13, 2) + SourceIndex(0) name (A) +1 >Emitted(7, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(13, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=es6-sourcemap-amd.js.map1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> diff --git a/tests/baselines/reference/es6-umd2.js b/tests/baselines/reference/es6-umd2.js index b87027b21b190..1270ee1df536b 100644 --- a/tests/baselines/reference/es6-umd2.js +++ b/tests/baselines/reference/es6-umd2.js @@ -22,6 +22,7 @@ export class A define(["require", "exports"], factory); } })(function (require, exports) { + "use strict"; class A { constructor() { } diff --git a/tests/baselines/reference/es6ExportAllInEs5.js b/tests/baselines/reference/es6ExportAllInEs5.js index 73689019ed48f..fcd858bf457f7 100644 --- a/tests/baselines/reference/es6ExportAllInEs5.js +++ b/tests/baselines/reference/es6ExportAllInEs5.js @@ -17,6 +17,7 @@ export module uninstantiated { export * from "./server"; //// [server.js] +"use strict"; var c = (function () { function c() { } @@ -29,6 +30,7 @@ var m; })(m = exports.m || (exports.m = {})); exports.x = 10; //// [client.js] +"use strict"; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } diff --git a/tests/baselines/reference/es6ExportClause.js b/tests/baselines/reference/es6ExportClause.js index f0d9bbe8cfffe..742a39e1324e2 100644 --- a/tests/baselines/reference/es6ExportClause.js +++ b/tests/baselines/reference/es6ExportClause.js @@ -1,4 +1,4 @@ -//// [es6ExportClause.ts] +//// [server.ts] class c { } @@ -16,7 +16,7 @@ export { i, m as instantiatedModule }; export { uninstantiated }; export { x }; -//// [es6ExportClause.js] +//// [server.js] class c { } var m; @@ -30,7 +30,7 @@ export { m as instantiatedModule }; export { x }; -//// [es6ExportClause.d.ts] +//// [server.d.ts] declare class c { } interface i { diff --git a/tests/baselines/reference/es6ExportClause.symbols b/tests/baselines/reference/es6ExportClause.symbols index fe4de21a00f9c..1bacedec76c0f 100644 --- a/tests/baselines/reference/es6ExportClause.symbols +++ b/tests/baselines/reference/es6ExportClause.symbols @@ -1,38 +1,38 @@ -=== tests/cases/compiler/es6ExportClause.ts === +=== tests/cases/compiler/server.ts === class c { ->c : Symbol(c, Decl(es6ExportClause.ts, 0, 0)) +>c : Symbol(c, Decl(server.ts, 0, 0)) } interface i { ->i : Symbol(i, Decl(es6ExportClause.ts, 2, 1)) +>i : Symbol(i, Decl(server.ts, 2, 1)) } module m { ->m : Symbol(m, Decl(es6ExportClause.ts, 4, 1)) +>m : Symbol(m, Decl(server.ts, 4, 1)) export var x = 10; ->x : Symbol(x, Decl(es6ExportClause.ts, 6, 14)) +>x : Symbol(x, Decl(server.ts, 6, 14)) } var x = 10; ->x : Symbol(x, Decl(es6ExportClause.ts, 8, 3)) +>x : Symbol(x, Decl(server.ts, 8, 3)) module uninstantiated { ->uninstantiated : Symbol(uninstantiated, Decl(es6ExportClause.ts, 8, 11)) +>uninstantiated : Symbol(uninstantiated, Decl(server.ts, 8, 11)) } export { c }; ->c : Symbol(c, Decl(es6ExportClause.ts, 11, 8)) +>c : Symbol(c, Decl(server.ts, 11, 8)) export { c as c2 }; ->c : Symbol(c2, Decl(es6ExportClause.ts, 12, 8)) ->c2 : Symbol(c2, Decl(es6ExportClause.ts, 12, 8)) +>c : Symbol(c2, Decl(server.ts, 12, 8)) +>c2 : Symbol(c2, Decl(server.ts, 12, 8)) export { i, m as instantiatedModule }; ->i : Symbol(i, Decl(es6ExportClause.ts, 13, 8)) ->m : Symbol(instantiatedModule, Decl(es6ExportClause.ts, 13, 11)) ->instantiatedModule : Symbol(instantiatedModule, Decl(es6ExportClause.ts, 13, 11)) +>i : Symbol(i, Decl(server.ts, 13, 8)) +>m : Symbol(instantiatedModule, Decl(server.ts, 13, 11)) +>instantiatedModule : Symbol(instantiatedModule, Decl(server.ts, 13, 11)) export { uninstantiated }; ->uninstantiated : Symbol(uninstantiated, Decl(es6ExportClause.ts, 14, 8)) +>uninstantiated : Symbol(uninstantiated, Decl(server.ts, 14, 8)) export { x }; ->x : Symbol(x, Decl(es6ExportClause.ts, 15, 8)) +>x : Symbol(x, Decl(server.ts, 15, 8)) diff --git a/tests/baselines/reference/es6ExportClause.types b/tests/baselines/reference/es6ExportClause.types index b0d544201a4d3..5cab90d6a7f86 100644 --- a/tests/baselines/reference/es6ExportClause.types +++ b/tests/baselines/reference/es6ExportClause.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/es6ExportClause.ts === +=== tests/cases/compiler/server.ts === class c { >c : c diff --git a/tests/baselines/reference/es6ExportClauseInEs5.js b/tests/baselines/reference/es6ExportClauseInEs5.js index f987b48aecadd..9d30e585fdeb2 100644 --- a/tests/baselines/reference/es6ExportClauseInEs5.js +++ b/tests/baselines/reference/es6ExportClauseInEs5.js @@ -1,4 +1,4 @@ -//// [es6ExportClauseInEs5.ts] +//// [server.ts] class c { } @@ -16,7 +16,8 @@ export { i, m as instantiatedModule }; export { uninstantiated }; export { x }; -//// [es6ExportClauseInEs5.js] +//// [server.js] +"use strict"; var c = (function () { function c() { } @@ -33,7 +34,7 @@ var x = 10; exports.x = x; -//// [es6ExportClauseInEs5.d.ts] +//// [server.d.ts] declare class c { } interface i { diff --git a/tests/baselines/reference/es6ExportClauseInEs5.symbols b/tests/baselines/reference/es6ExportClauseInEs5.symbols index 5590b907eecb9..1bacedec76c0f 100644 --- a/tests/baselines/reference/es6ExportClauseInEs5.symbols +++ b/tests/baselines/reference/es6ExportClauseInEs5.symbols @@ -1,38 +1,38 @@ -=== tests/cases/compiler/es6ExportClauseInEs5.ts === +=== tests/cases/compiler/server.ts === class c { ->c : Symbol(c, Decl(es6ExportClauseInEs5.ts, 0, 0)) +>c : Symbol(c, Decl(server.ts, 0, 0)) } interface i { ->i : Symbol(i, Decl(es6ExportClauseInEs5.ts, 2, 1)) +>i : Symbol(i, Decl(server.ts, 2, 1)) } module m { ->m : Symbol(m, Decl(es6ExportClauseInEs5.ts, 4, 1)) +>m : Symbol(m, Decl(server.ts, 4, 1)) export var x = 10; ->x : Symbol(x, Decl(es6ExportClauseInEs5.ts, 6, 14)) +>x : Symbol(x, Decl(server.ts, 6, 14)) } var x = 10; ->x : Symbol(x, Decl(es6ExportClauseInEs5.ts, 8, 3)) +>x : Symbol(x, Decl(server.ts, 8, 3)) module uninstantiated { ->uninstantiated : Symbol(uninstantiated, Decl(es6ExportClauseInEs5.ts, 8, 11)) +>uninstantiated : Symbol(uninstantiated, Decl(server.ts, 8, 11)) } export { c }; ->c : Symbol(c, Decl(es6ExportClauseInEs5.ts, 11, 8)) +>c : Symbol(c, Decl(server.ts, 11, 8)) export { c as c2 }; ->c : Symbol(c2, Decl(es6ExportClauseInEs5.ts, 12, 8)) ->c2 : Symbol(c2, Decl(es6ExportClauseInEs5.ts, 12, 8)) +>c : Symbol(c2, Decl(server.ts, 12, 8)) +>c2 : Symbol(c2, Decl(server.ts, 12, 8)) export { i, m as instantiatedModule }; ->i : Symbol(i, Decl(es6ExportClauseInEs5.ts, 13, 8)) ->m : Symbol(instantiatedModule, Decl(es6ExportClauseInEs5.ts, 13, 11)) ->instantiatedModule : Symbol(instantiatedModule, Decl(es6ExportClauseInEs5.ts, 13, 11)) +>i : Symbol(i, Decl(server.ts, 13, 8)) +>m : Symbol(instantiatedModule, Decl(server.ts, 13, 11)) +>instantiatedModule : Symbol(instantiatedModule, Decl(server.ts, 13, 11)) export { uninstantiated }; ->uninstantiated : Symbol(uninstantiated, Decl(es6ExportClauseInEs5.ts, 14, 8)) +>uninstantiated : Symbol(uninstantiated, Decl(server.ts, 14, 8)) export { x }; ->x : Symbol(x, Decl(es6ExportClauseInEs5.ts, 15, 8)) +>x : Symbol(x, Decl(server.ts, 15, 8)) diff --git a/tests/baselines/reference/es6ExportClauseInEs5.types b/tests/baselines/reference/es6ExportClauseInEs5.types index c6ef9033bf180..5cab90d6a7f86 100644 --- a/tests/baselines/reference/es6ExportClauseInEs5.types +++ b/tests/baselines/reference/es6ExportClauseInEs5.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/es6ExportClauseInEs5.ts === +=== tests/cases/compiler/server.ts === class c { >c : c diff --git a/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifierInEs5.js b/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifierInEs5.js index 63ac2c04b3e69..83fb99134deea 100644 --- a/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifierInEs5.js +++ b/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifierInEs5.js @@ -21,6 +21,7 @@ export { uninstantiated } from "./server"; export { x } from "./server"; //// [server.js] +"use strict"; var c = (function () { function c() { } @@ -33,6 +34,7 @@ var m; })(m = exports.m || (exports.m = {})); exports.x = 10; //// [client.js] +"use strict"; var server_1 = require("./server"); exports.c = server_1.c; var server_2 = require("./server"); diff --git a/tests/baselines/reference/es6ExportEqualsInterop.js b/tests/baselines/reference/es6ExportEqualsInterop.js index 747b0b2beb808..3d9c1c95fcd17 100644 --- a/tests/baselines/reference/es6ExportEqualsInterop.js +++ b/tests/baselines/reference/es6ExportEqualsInterop.js @@ -209,6 +209,7 @@ export * from "class-module"; //// [main.js] /// +"use strict"; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } diff --git a/tests/baselines/reference/es6ImportDefaultBindingAmd.js b/tests/baselines/reference/es6ImportDefaultBindingAmd.js index 9c8cbec9db5cc..9de16453c6e1c 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingAmd.js +++ b/tests/baselines/reference/es6ImportDefaultBindingAmd.js @@ -13,12 +13,14 @@ import defaultBinding2 from "es6ImportDefaultBindingAmd_0"; // elide this import //// [es6ImportDefaultBindingAmd_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; var a = 10; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = a; }); //// [es6ImportDefaultBindingAmd_1.js] define(["require", "exports", "es6ImportDefaultBindingAmd_0"], function (require, exports, es6ImportDefaultBindingAmd_0_1) { + "use strict"; var x = es6ImportDefaultBindingAmd_0_1.default; }); diff --git a/tests/baselines/reference/es6ImportDefaultBindingDts.js b/tests/baselines/reference/es6ImportDefaultBindingDts.js index 5593d762f8522..7adac1fab327a 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingDts.js +++ b/tests/baselines/reference/es6ImportDefaultBindingDts.js @@ -12,6 +12,7 @@ import defaultBinding2 from "./server"; // elide this import since defaultBindin //// [server.js] +"use strict"; var c = (function () { function c() { } @@ -20,6 +21,7 @@ var c = (function () { Object.defineProperty(exports, "__esModule", { value: true }); exports.default = c; //// [client.js] +"use strict"; var server_1 = require("./server"); exports.x = new server_1.default(); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js index d6be494a8d1ad..51fc7bf68970b 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js @@ -23,11 +23,13 @@ var x1: number = m; //// [es6ImportDefaultBindingFollowedWithNamedImport_0.js] +"use strict"; exports.a = 10; exports.x = exports.a; exports.m = exports.a; exports.default = {}; //// [es6ImportDefaultBindingFollowedWithNamedImport_1.js] +"use strict"; var es6ImportDefaultBindingFollowedWithNamedImport_0_1 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_1.a; var es6ImportDefaultBindingFollowedWithNamedImport_0_2 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.js index 7eda76622defc..fde7556edea25 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.js @@ -21,10 +21,12 @@ var x: number = defaultBinding6; //// [es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0.js] +"use strict"; var a = 10; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = a; //// [es6ImportDefaultBindingFollowedWithNamedImport1InEs5_1.js] +"use strict"; var es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0_1 = require("./es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0"); var x = es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0_1.default; var es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0_2 = require("./es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0"); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.js index b83571066f051..6131ff4062453 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.js @@ -21,10 +21,12 @@ export var x1: number = defaultBinding6; //// [server.js] +"use strict"; var a = 10; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = a; //// [client.js] +"use strict"; var server_1 = require("./server"); exports.x1 = server_1.default; var server_2 = require("./server"); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js index 9314190e786e2..6618fcb9db701 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js @@ -25,6 +25,7 @@ export var x6 = new m(); //// [server.js] +"use strict"; var a = (function () { function a() { } @@ -62,6 +63,7 @@ var x11 = (function () { })(); exports.x11 = x11; //// [client.js] +"use strict"; var server_1 = require("./server"); exports.x1 = new server_1.a(); var server_2 = require("./server"); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts1.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts1.js index 71d35fd85a176..f2a50fb494b8d 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts1.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts1.js @@ -20,6 +20,7 @@ import defaultBinding6, { m, } from "./server"; export var x6 = new defaultBinding6(); //// [server.js] +"use strict"; var a = (function () { function a() { } @@ -28,6 +29,7 @@ var a = (function () { Object.defineProperty(exports, "__esModule", { value: true }); exports.default = a; //// [client.js] +"use strict"; var server_1 = require("./server"); exports.x1 = new server_1.default(); var server_2 = require("./server"); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js index 9674f8c12f432..c075c5c934fe6 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js @@ -22,10 +22,12 @@ var x1: number = m; //// [es6ImportDefaultBindingFollowedWithNamedImportInEs5_0.js] +"use strict"; exports.a = 10; exports.x = exports.a; exports.m = exports.a; //// [es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.js] +"use strict"; var es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_1 = require("./es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"); var x1 = es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_1.a; var es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_2 = require("./es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js index b7da05d7dbbb9..aa89c8d438080 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js @@ -24,6 +24,7 @@ export var x1: number = m; //// [server.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.a = 10; exports.x = exports.a; exports.m = exports.a; @@ -32,6 +33,7 @@ define(["require", "exports"], function (require, exports) { }); //// [client.js] define(["require", "exports", "server", "server", "server", "server", "server"], function (require, exports, server_1, server_2, server_3, server_4, server_5) { + "use strict"; exports.x1 = server_1.a; exports.x1 = server_2.a; exports.x1 = server_3.x; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1InEs5.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1InEs5.js index ada6e423e7350..d62cfbc2872da 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1InEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1InEs5.js @@ -10,10 +10,12 @@ import defaultBinding, * as nameSpaceBinding from "./es6ImportDefaultBindingFol var x: number = defaultBinding; //// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0.js] +"use strict"; var a = 10; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = a; //// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.js] +"use strict"; var es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0_1 = require("./es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"), nameSpaceBinding = es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0_1; var x = es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0_1.default; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.js index a032325fbb446..c19f68463fac3 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.js @@ -11,12 +11,14 @@ export var x: number = defaultBinding; //// [server.js] define(["require", "exports"], function (require, exports) { + "use strict"; var a = 10; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = a; }); //// [client.js] define(["require", "exports", "server"], function (require, exports, server_1) { + "use strict"; var nameSpaceBinding = server_1; exports.x = server_1.default; }); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js index 93918f6171a64..c4d43e40daf7f 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js @@ -9,6 +9,7 @@ import defaultBinding, * as nameSpaceBinding from "./server"; export var x = new nameSpaceBinding.a(); //// [server.js] +"use strict"; var a = (function () { function a() { } @@ -16,6 +17,7 @@ var a = (function () { })(); exports.a = a; //// [client.js] +"use strict"; var server_1 = require("./server"), nameSpaceBinding = server_1; exports.x = new nameSpaceBinding.a(); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts1.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts1.js index 639ffce59fd0b..94b3296f36318 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts1.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts1.js @@ -11,6 +11,7 @@ export var x = new defaultBinding(); //// [server.js] define(["require", "exports"], function (require, exports) { + "use strict"; var a = (function () { function a() { } @@ -21,6 +22,7 @@ define(["require", "exports"], function (require, exports) { }); //// [client.js] define(["require", "exports", "server"], function (require, exports, server_1) { + "use strict"; var nameSpaceBinding = server_1; exports.x = new server_1.default(); }); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js index 49717c588b707..2639291d854e4 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js @@ -9,8 +9,10 @@ import defaultBinding, * as nameSpaceBinding from "./es6ImportDefaultBindingFol var x: number = nameSpaceBinding.a; //// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0.js] +"use strict"; exports.a = 10; //// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.js] +"use strict"; var es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0_1 = require("./es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"), nameSpaceBinding = es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0_1; var x = nameSpaceBinding.a; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js index dec9b8cfebe0e..f417a086df790 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js @@ -9,8 +9,10 @@ export import defaultBinding, * as nameSpaceBinding from "./server"; export var x: number = nameSpaceBinding.a; //// [server.js] +"use strict"; exports.a = 10; //// [client.js] +"use strict"; var server_1 = require("./server"), nameSpaceBinding = server_1; exports.x = nameSpaceBinding.a; diff --git a/tests/baselines/reference/es6ImportDefaultBindingInEs5.js b/tests/baselines/reference/es6ImportDefaultBindingInEs5.js index 34323b2752bc3..257e76bfe028d 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingInEs5.js +++ b/tests/baselines/reference/es6ImportDefaultBindingInEs5.js @@ -9,9 +9,11 @@ export = a; import defaultBinding from "./es6ImportDefaultBindingInEs5_0"; //// [es6ImportDefaultBindingInEs5_0.js] +"use strict"; var a = 10; module.exports = a; //// [es6ImportDefaultBindingInEs5_1.js] +"use strict"; //// [es6ImportDefaultBindingInEs5_0.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.js b/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.js index fb80fdd3e4f5b..e686c3f33c9c6 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.js +++ b/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.js @@ -17,10 +17,12 @@ import defaultBinding3 from "./es6ImportDefaultBindingMergeErrors_0"; // SHould //// [es6ImportDefaultBindingMergeErrors_0.js] +"use strict"; var a = 10; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = a; //// [es6ImportDefaultBindingMergeErrors_1.js] +"use strict"; var es6ImportDefaultBindingMergeErrors_0_1 = require("./es6ImportDefaultBindingMergeErrors_0"); var x = es6ImportDefaultBindingMergeErrors_0_1.default; var defaultBinding2 = "hello world"; diff --git a/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.js b/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.js index 1c9ec4eeae529..5513ae565f222 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.js +++ b/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.js @@ -9,5 +9,7 @@ import defaultBinding from "./es6ImportDefaultBindingNoDefaultProperty_0"; //// [es6ImportDefaultBindingNoDefaultProperty_0.js] +"use strict"; exports.a = 10; //// [es6ImportDefaultBindingNoDefaultProperty_1.js] +"use strict"; diff --git a/tests/baselines/reference/es6ImportDefaultBindingWithExport.js b/tests/baselines/reference/es6ImportDefaultBindingWithExport.js index 2fb7f0644b9ca..cc90d28091478 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingWithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingWithExport.js @@ -12,12 +12,14 @@ export import defaultBinding2 from "server"; // non referenced //// [server.js] define(["require", "exports"], function (require, exports) { + "use strict"; var a = 10; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = a; }); //// [client.js] define(["require", "exports", "server"], function (require, exports, server_1) { + "use strict"; exports.x = server_1.default; }); diff --git a/tests/baselines/reference/es6ImportNameSpaceImport.js b/tests/baselines/reference/es6ImportNameSpaceImport.js index 32bdd78b32995..685e1cf643c24 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImport.js +++ b/tests/baselines/reference/es6ImportNameSpaceImport.js @@ -11,8 +11,10 @@ import * as nameSpaceBinding2 from "./es6ImportNameSpaceImport_0"; // elide this //// [es6ImportNameSpaceImport_0.js] +"use strict"; exports.a = 10; //// [es6ImportNameSpaceImport_1.js] +"use strict"; var nameSpaceBinding = require("./es6ImportNameSpaceImport_0"); var x = nameSpaceBinding.a; diff --git a/tests/baselines/reference/es6ImportNameSpaceImportAmd.js b/tests/baselines/reference/es6ImportNameSpaceImportAmd.js index e7d0eae9ca96b..093e8385baed2 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImportAmd.js +++ b/tests/baselines/reference/es6ImportNameSpaceImportAmd.js @@ -12,10 +12,12 @@ import * as nameSpaceBinding2 from "es6ImportNameSpaceImportAmd_0"; // elide thi //// [es6ImportNameSpaceImportAmd_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.a = 10; }); //// [es6ImportNameSpaceImportAmd_1.js] define(["require", "exports", "es6ImportNameSpaceImportAmd_0"], function (require, exports, nameSpaceBinding) { + "use strict"; var x = nameSpaceBinding.a; }); diff --git a/tests/baselines/reference/es6ImportNameSpaceImportDts.js b/tests/baselines/reference/es6ImportNameSpaceImportDts.js index dfdfe2602a30b..0e6252a76a5ef 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImportDts.js +++ b/tests/baselines/reference/es6ImportNameSpaceImportDts.js @@ -10,6 +10,7 @@ export var x = new nameSpaceBinding.c(); import * as nameSpaceBinding2 from "./server"; // unreferenced //// [server.js] +"use strict"; var c = (function () { function c() { } @@ -18,6 +19,7 @@ var c = (function () { exports.c = c; ; //// [client.js] +"use strict"; var nameSpaceBinding = require("./server"); exports.x = new nameSpaceBinding.c(); diff --git a/tests/baselines/reference/es6ImportNameSpaceImportInEs5.js b/tests/baselines/reference/es6ImportNameSpaceImportInEs5.js index dfc90c3e9af04..252d131f82447 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImportInEs5.js +++ b/tests/baselines/reference/es6ImportNameSpaceImportInEs5.js @@ -11,8 +11,10 @@ import * as nameSpaceBinding2 from "./es6ImportNameSpaceImportInEs5_0"; // elide //// [es6ImportNameSpaceImportInEs5_0.js] +"use strict"; exports.a = 10; //// [es6ImportNameSpaceImportInEs5_1.js] +"use strict"; var nameSpaceBinding = require("./es6ImportNameSpaceImportInEs5_0"); var x = nameSpaceBinding.a; diff --git a/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.js b/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.js index b94640349c0ca..9bdd0318310c2 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.js +++ b/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.js @@ -16,6 +16,8 @@ var nameSpaceBinding3 = 10; //// [es6ImportNameSpaceImportMergeErrors_0.js] +"use strict"; exports.a = 10; //// [es6ImportNameSpaceImportMergeErrors_1.js] +"use strict"; var nameSpaceBinding3 = 10; diff --git a/tests/baselines/reference/es6ImportNameSpaceImportNoNamedExports.js b/tests/baselines/reference/es6ImportNameSpaceImportNoNamedExports.js index efa3a04bc9a30..8ece816fd3b6c 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImportNoNamedExports.js +++ b/tests/baselines/reference/es6ImportNameSpaceImportNoNamedExports.js @@ -9,6 +9,8 @@ export = a; import * as nameSpaceBinding from "./es6ImportNameSpaceImportNoNamedExports_0"; // error //// [es6ImportNameSpaceImportNoNamedExports_0.js] +"use strict"; var a = 10; module.exports = a; //// [es6ImportNameSpaceImportNoNamedExports_1.js] +"use strict"; diff --git a/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js b/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js index 84f6936d4b0f1..e21ab603f82de 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js +++ b/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js @@ -12,10 +12,12 @@ export import * as nameSpaceBinding2 from "server"; // Not referenced imports //// [server.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.a = 10; }); //// [client.js] define(["require", "exports", "server"], function (require, exports, nameSpaceBinding) { + "use strict"; exports.x = nameSpaceBinding.a; }); diff --git a/tests/baselines/reference/es6ImportNamedImport.js b/tests/baselines/reference/es6ImportNamedImport.js index 3ed7a6adeb03d..73fe8f4ec1b4f 100644 --- a/tests/baselines/reference/es6ImportNamedImport.js +++ b/tests/baselines/reference/es6ImportNamedImport.js @@ -42,6 +42,7 @@ import { aaaa as bbbb } from "./es6ImportNamedImport_0"; //// [es6ImportNamedImport_0.js] +"use strict"; exports.a = 10; exports.x = exports.a; exports.m = exports.a; @@ -51,6 +52,7 @@ exports.z1 = 10; exports.z2 = 10; exports.aaaa = 10; //// [es6ImportNamedImport_1.js] +"use strict"; var es6ImportNamedImport_0_1 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_1.a; var es6ImportNamedImport_0_2 = require("./es6ImportNamedImport_0"); diff --git a/tests/baselines/reference/es6ImportNamedImportAmd.js b/tests/baselines/reference/es6ImportNamedImportAmd.js index c335337325e51..278e4ee07d28f 100644 --- a/tests/baselines/reference/es6ImportNamedImportAmd.js +++ b/tests/baselines/reference/es6ImportNamedImportAmd.js @@ -43,6 +43,7 @@ import { aaaa as bbbb } from "es6ImportNamedImportAmd_0"; //// [es6ImportNamedImportAmd_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.a = 10; exports.x = exports.a; exports.m = exports.a; @@ -54,6 +55,7 @@ define(["require", "exports"], function (require, exports) { }); //// [es6ImportNamedImportAmd_1.js] define(["require", "exports", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0"], function (require, exports, es6ImportNamedImportAmd_0_1, es6ImportNamedImportAmd_0_2, es6ImportNamedImportAmd_0_3, es6ImportNamedImportAmd_0_4, es6ImportNamedImportAmd_0_5, es6ImportNamedImportAmd_0_6, es6ImportNamedImportAmd_0_7, es6ImportNamedImportAmd_0_8, es6ImportNamedImportAmd_0_9) { + "use strict"; var xxxx = es6ImportNamedImportAmd_0_1.a; var xxxx = es6ImportNamedImportAmd_0_2.a; var xxxx = es6ImportNamedImportAmd_0_3.x; diff --git a/tests/baselines/reference/es6ImportNamedImportDts.js b/tests/baselines/reference/es6ImportNamedImportDts.js index 59b47635ba9e9..ceb8219b2fd78 100644 --- a/tests/baselines/reference/es6ImportNamedImportDts.js +++ b/tests/baselines/reference/es6ImportNamedImportDts.js @@ -47,6 +47,7 @@ import { aaaa1 as bbbb } from "./server"; //// [server.js] +"use strict"; var a = (function () { function a() { } @@ -132,6 +133,7 @@ var aaaa1 = (function () { })(); exports.aaaa1 = aaaa1; //// [client.js] +"use strict"; var server_1 = require("./server"); exports.xxxx = new server_1.a(); var server_2 = require("./server"); diff --git a/tests/baselines/reference/es6ImportNamedImportInEs5.js b/tests/baselines/reference/es6ImportNamedImportInEs5.js index ce2cbea3d3d05..3f3e4694758f7 100644 --- a/tests/baselines/reference/es6ImportNamedImportInEs5.js +++ b/tests/baselines/reference/es6ImportNamedImportInEs5.js @@ -42,6 +42,7 @@ import { aaaa as bbbb } from "./es6ImportNamedImportInEs5_0"; //// [es6ImportNamedImportInEs5_0.js] +"use strict"; exports.a = 10; exports.x = exports.a; exports.m = exports.a; @@ -51,6 +52,7 @@ exports.z1 = 10; exports.z2 = 10; exports.aaaa = 10; //// [es6ImportNamedImportInEs5_1.js] +"use strict"; var es6ImportNamedImportInEs5_0_1 = require("./es6ImportNamedImportInEs5_0"); var xxxx = es6ImportNamedImportInEs5_0_1.a; var es6ImportNamedImportInEs5_0_2 = require("./es6ImportNamedImportInEs5_0"); diff --git a/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js index 5bdbd89df0786..b67f61e88aece 100644 --- a/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js +++ b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js @@ -9,8 +9,10 @@ import { a } from "./es6ImportNamedImportInExportAssignment_0"; export = a; //// [es6ImportNamedImportInExportAssignment_0.js] +"use strict"; exports.a = 10; //// [es6ImportNamedImportInExportAssignment_1.js] +"use strict"; var es6ImportNamedImportInExportAssignment_0_1 = require("./es6ImportNamedImportInExportAssignment_0"); module.exports = es6ImportNamedImportInExportAssignment_0_1.a; diff --git a/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.js b/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.js index 418cd76c907b2..03c74489bfd36 100644 --- a/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.js +++ b/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.js @@ -13,6 +13,7 @@ import x = a; export = x; //// [es6ImportNamedImportInIndirectExportAssignment_0.js] +"use strict"; var a; (function (a) { var c = (function () { @@ -23,6 +24,7 @@ var a; a.c = c; })(a = exports.a || (exports.a = {})); //// [es6ImportNamedImportInIndirectExportAssignment_1.js] +"use strict"; var es6ImportNamedImportInIndirectExportAssignment_0_1 = require("./es6ImportNamedImportInIndirectExportAssignment_0"); var x = es6ImportNamedImportInIndirectExportAssignment_0_1.a; module.exports = x; diff --git a/tests/baselines/reference/es6ImportNamedImportMergeErrors.js b/tests/baselines/reference/es6ImportNamedImportMergeErrors.js index 63bf1127a53b6..002aa5a49ce71 100644 --- a/tests/baselines/reference/es6ImportNamedImportMergeErrors.js +++ b/tests/baselines/reference/es6ImportNamedImportMergeErrors.js @@ -21,10 +21,12 @@ import { z1 as z } from "./es6ImportNamedImportMergeErrors_0"; // should be erro //// [es6ImportNamedImportMergeErrors_0.js] +"use strict"; exports.a = 10; exports.x = exports.a; exports.z = exports.a; exports.z1 = exports.a; //// [es6ImportNamedImportMergeErrors_1.js] +"use strict"; var x = 10; var x44 = 10; diff --git a/tests/baselines/reference/es6ImportNamedImportNoExportMember.js b/tests/baselines/reference/es6ImportNamedImportNoExportMember.js index ba607b4626f1d..71159983b9afb 100644 --- a/tests/baselines/reference/es6ImportNamedImportNoExportMember.js +++ b/tests/baselines/reference/es6ImportNamedImportNoExportMember.js @@ -10,6 +10,8 @@ import { a1 } from "./es6ImportNamedImportNoExportMember_0"; import { x1 as x } from "./es6ImportNamedImportNoExportMember_0"; //// [es6ImportNamedImportNoExportMember_0.js] +"use strict"; exports.a = 10; exports.x = exports.a; //// [es6ImportNamedImport_1.js] +"use strict"; diff --git a/tests/baselines/reference/es6ImportNamedImportNoNamedExports.js b/tests/baselines/reference/es6ImportNamedImportNoNamedExports.js index 273f9a3fc3af2..2198df11f7876 100644 --- a/tests/baselines/reference/es6ImportNamedImportNoNamedExports.js +++ b/tests/baselines/reference/es6ImportNamedImportNoNamedExports.js @@ -10,6 +10,8 @@ import { a } from "./es6ImportNamedImportNoNamedExports_0"; import { a as x } from "./es6ImportNamedImportNoNamedExports_0"; //// [es6ImportNamedImportNoNamedExports_0.js] +"use strict"; var a = 10; module.exports = a; //// [es6ImportNamedImportNoNamedExports_1.js] +"use strict"; diff --git a/tests/baselines/reference/es6ImportNamedImportWithExport.js b/tests/baselines/reference/es6ImportNamedImportWithExport.js index 5175554f0f916..21ccb29a57bbf 100644 --- a/tests/baselines/reference/es6ImportNamedImportWithExport.js +++ b/tests/baselines/reference/es6ImportNamedImportWithExport.js @@ -41,6 +41,7 @@ export import { aaaa as bbbb } from "./server"; //// [server.js] +"use strict"; exports.a = 10; exports.x = exports.a; exports.m = exports.a; @@ -50,6 +51,7 @@ exports.z1 = 10; exports.z2 = 10; exports.aaaa = 10; //// [client.js] +"use strict"; var server_1 = require("./server"); exports.xxxx = server_1.a; var server_2 = require("./server"); diff --git a/tests/baselines/reference/es6ImportNamedImportWithTypesAndValues.js b/tests/baselines/reference/es6ImportNamedImportWithTypesAndValues.js index 8593f4e63431f..da401100405ea 100644 --- a/tests/baselines/reference/es6ImportNamedImportWithTypesAndValues.js +++ b/tests/baselines/reference/es6ImportNamedImportWithTypesAndValues.js @@ -21,6 +21,7 @@ export type cValInterface = I; export var cVal = new C(); //// [server.js] +"use strict"; var C = (function () { function C() { this.prop = "hello"; @@ -36,6 +37,7 @@ var C2 = (function () { })(); exports.C2 = C2; //// [client.js] +"use strict"; var server_1 = require("./server"); // Shouldnt emit I and C2 into the js file and emit C and I in .d.ts file exports.cVal = new server_1.C(); diff --git a/tests/baselines/reference/es6ImportWithoutFromClauseAmd.js b/tests/baselines/reference/es6ImportWithoutFromClauseAmd.js index b52c94a5c103f..39b6b04464c1f 100644 --- a/tests/baselines/reference/es6ImportWithoutFromClauseAmd.js +++ b/tests/baselines/reference/es6ImportWithoutFromClauseAmd.js @@ -15,14 +15,17 @@ var _b = 10; //// [es6ImportWithoutFromClauseAmd_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.a = 10; }); //// [es6ImportWithoutFromClauseAmd_1.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.b = 10; }); //// [es6ImportWithoutFromClauseAmd_2.js] define(["require", "exports", "es6ImportWithoutFromClauseAmd_0", "es6ImportWithoutFromClauseAmd_2"], function (require, exports) { + "use strict"; var _a = 10; var _b = 10; }); diff --git a/tests/baselines/reference/es6ImportWithoutFromClauseInEs5.js b/tests/baselines/reference/es6ImportWithoutFromClauseInEs5.js index aacb936ab3619..c39cd1172a0b3 100644 --- a/tests/baselines/reference/es6ImportWithoutFromClauseInEs5.js +++ b/tests/baselines/reference/es6ImportWithoutFromClauseInEs5.js @@ -8,8 +8,10 @@ export var a = 10; import "es6ImportWithoutFromClauseInEs5_0"; //// [es6ImportWithoutFromClauseInEs5_0.js] +"use strict"; exports.a = 10; //// [es6ImportWithoutFromClauseInEs5_1.js] +"use strict"; require("es6ImportWithoutFromClauseInEs5_0"); diff --git a/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js b/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js index 208f71bcbfe9f..5ff5b62d8ecda 100644 --- a/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js +++ b/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js @@ -8,8 +8,10 @@ export var a = 10; export import "server"; //// [server.js] +"use strict"; exports.a = 10; //// [client.js] +"use strict"; require("server"); diff --git a/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.js b/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.js index dec8de1e36ee1..172ce2a8729d1 100644 --- a/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.js +++ b/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.js @@ -13,6 +13,7 @@ export class A //// [es6ModuleWithModuleGenTargetAmd.js] define(["require", "exports"], function (require, exports) { + "use strict"; class A { constructor() { } diff --git a/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.js b/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.js index 36e66cb572135..f932bb7072ff6 100644 --- a/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.js +++ b/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.js @@ -12,6 +12,7 @@ export class A } //// [es6ModuleWithModuleGenTargetCommonjs.js] +"use strict"; class A { constructor() { } diff --git a/tests/baselines/reference/exportAndImport-es3-amd.js b/tests/baselines/reference/exportAndImport-es3-amd.js index d2293a56e2365..5f37f0f022030 100644 --- a/tests/baselines/reference/exportAndImport-es3-amd.js +++ b/tests/baselines/reference/exportAndImport-es3-amd.js @@ -14,6 +14,7 @@ export default function f2() { //// [m1.js] define(["require", "exports"], function (require, exports) { + "use strict"; function f1() { } exports.__esModule = true; @@ -21,6 +22,7 @@ define(["require", "exports"], function (require, exports) { }); //// [m2.js] define(["require", "exports", "./m1"], function (require, exports, m1_1) { + "use strict"; function f2() { m1_1["default"](); } diff --git a/tests/baselines/reference/exportAndImport-es3.js b/tests/baselines/reference/exportAndImport-es3.js index 1be548bc9305c..ee1f562258f2b 100644 --- a/tests/baselines/reference/exportAndImport-es3.js +++ b/tests/baselines/reference/exportAndImport-es3.js @@ -13,11 +13,13 @@ export default function f2() { //// [m1.js] +"use strict"; function f1() { } exports.__esModule = true; exports["default"] = f1; //// [m2.js] +"use strict"; var m1_1 = require("./m1"); function f2() { m1_1["default"](); diff --git a/tests/baselines/reference/exportAndImport-es5-amd.js b/tests/baselines/reference/exportAndImport-es5-amd.js index 447356b12302a..0e2cb890d2a7c 100644 --- a/tests/baselines/reference/exportAndImport-es5-amd.js +++ b/tests/baselines/reference/exportAndImport-es5-amd.js @@ -14,6 +14,7 @@ export default function f2() { //// [m1.js] define(["require", "exports"], function (require, exports) { + "use strict"; function f1() { } Object.defineProperty(exports, "__esModule", { value: true }); @@ -21,6 +22,7 @@ define(["require", "exports"], function (require, exports) { }); //// [m2.js] define(["require", "exports", "./m1"], function (require, exports, m1_1) { + "use strict"; function f2() { m1_1.default(); } diff --git a/tests/baselines/reference/exportAndImport-es5.js b/tests/baselines/reference/exportAndImport-es5.js index c0bacb94aeef0..1d2511735c7f9 100644 --- a/tests/baselines/reference/exportAndImport-es5.js +++ b/tests/baselines/reference/exportAndImport-es5.js @@ -13,11 +13,13 @@ export default function f2() { //// [m1.js] +"use strict"; function f1() { } Object.defineProperty(exports, "__esModule", { value: true }); exports.default = f1; //// [m2.js] +"use strict"; var m1_1 = require("./m1"); function f2() { m1_1.default(); diff --git a/tests/baselines/reference/exportAssignClassAndModule.js b/tests/baselines/reference/exportAssignClassAndModule.js index d440fb9a8e5ed..0fbfcc939482a 100644 --- a/tests/baselines/reference/exportAssignClassAndModule.js +++ b/tests/baselines/reference/exportAssignClassAndModule.js @@ -19,6 +19,7 @@ var zz: Foo; zz.x; //// [exportAssignClassAndModule_0.js] +"use strict"; var Foo = (function () { function Foo() { } @@ -26,6 +27,7 @@ var Foo = (function () { })(); module.exports = Foo; //// [exportAssignClassAndModule_1.js] +"use strict"; var z; var zz; zz.x; diff --git a/tests/baselines/reference/exportAssignDottedName.js b/tests/baselines/reference/exportAssignDottedName.js index 5784f9116f1f9..39fd33b01319d 100644 --- a/tests/baselines/reference/exportAssignDottedName.js +++ b/tests/baselines/reference/exportAssignDottedName.js @@ -11,10 +11,12 @@ export = foo1.x; // Ok //// [foo1.js] +"use strict"; function x() { return true; } exports.x = x; //// [foo2.js] +"use strict"; var foo1 = require('./foo1'); module.exports = foo1.x; diff --git a/tests/baselines/reference/exportAssignImportedIdentifier.js b/tests/baselines/reference/exportAssignImportedIdentifier.js index b371e4db5e06d..334f33fdc3444 100644 --- a/tests/baselines/reference/exportAssignImportedIdentifier.js +++ b/tests/baselines/reference/exportAssignImportedIdentifier.js @@ -15,14 +15,17 @@ import foo2 = require('./foo2'); var x = foo2(); // should be boolean //// [foo1.js] +"use strict"; function x() { return true; } exports.x = x; //// [foo2.js] +"use strict"; var foo1 = require('./foo1'); var x = foo1.x; module.exports = x; //// [foo3.js] +"use strict"; var foo2 = require('./foo2'); var x = foo2(); // should be boolean diff --git a/tests/baselines/reference/exportAssignNonIdentifier.js b/tests/baselines/reference/exportAssignNonIdentifier.js index 343405c862494..8a266a35396bf 100644 --- a/tests/baselines/reference/exportAssignNonIdentifier.js +++ b/tests/baselines/reference/exportAssignNonIdentifier.js @@ -28,23 +28,31 @@ export = null; // Ok //// [foo1.js] +"use strict"; var x = 10; module.exports = typeof x; //// [foo2.js] +"use strict"; module.exports = "sausages"; //// [foo3.js] +"use strict"; module.exports = (function () { function Foo3() { } return Foo3; })(); //// [foo4.js] +"use strict"; module.exports = true; //// [foo5.js] +"use strict"; module.exports = undefined; //// [foo6.js] +"use strict"; module.exports = void ; //// [foo7.js] +"use strict"; module.exports = Date || String; //// [foo8.js] +"use strict"; module.exports = null; diff --git a/tests/baselines/reference/exportAssignTypes.js b/tests/baselines/reference/exportAssignTypes.js index e898f798a7c50..60cf4e7eef54f 100644 --- a/tests/baselines/reference/exportAssignTypes.js +++ b/tests/baselines/reference/exportAssignTypes.js @@ -54,29 +54,37 @@ var v7: {(p1: x): x} = iGeneric; //// [expString.js] +"use strict"; var x = "test"; module.exports = x; //// [expNumber.js] +"use strict"; var x = 42; module.exports = x; //// [expBoolean.js] +"use strict"; var x = true; module.exports = x; //// [expArray.js] +"use strict"; var x = [1, 2]; module.exports = x; //// [expObject.js] +"use strict"; var x = { answer: 42, when: 1776 }; module.exports = x; //// [expAny.js] +"use strict"; var x; module.exports = x; //// [expGeneric.js] +"use strict"; function x(a) { return a; } module.exports = x; //// [consumer.js] +"use strict"; var iString = require('./expString'); var v1 = iString; var iNumber = require('./expNumber'); diff --git a/tests/baselines/reference/exportAssignValueAndType.js b/tests/baselines/reference/exportAssignValueAndType.js index 016ce6f24c1cf..70be1ce722b74 100644 --- a/tests/baselines/reference/exportAssignValueAndType.js +++ b/tests/baselines/reference/exportAssignValueAndType.js @@ -15,6 +15,7 @@ export = server; //// [exportAssignValueAndType.js] +"use strict"; var x = 5; var server = new Date(); module.exports = server; diff --git a/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.js b/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.js index 40a370caf4181..26a43e10c6cf7 100644 --- a/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.js +++ b/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.js @@ -16,8 +16,10 @@ var t2: test; // should not raise a 'container type' error //// [exportAssignedTypeAsTypeAnnotation_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [exportAssignedTypeAsTypeAnnotation_1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var t2; // should not raise a 'container type' error }); diff --git a/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt b/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt index bb228caa0c914..5a84a27912260 100644 --- a/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt +++ b/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/externalModules/exportAssignmentAndDeclaration.ts(10,1): error TS2309: An export assignment cannot be used in a module with other exported elements. +tests/cases/conformance/externalModules/foo_0.ts(10,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -==== tests/cases/conformance/externalModules/exportAssignmentAndDeclaration.ts (1 errors) ==== +==== tests/cases/conformance/externalModules/foo_0.ts (1 errors) ==== export enum E1 { A,B,C } diff --git a/tests/baselines/reference/exportAssignmentAndDeclaration.js b/tests/baselines/reference/exportAssignmentAndDeclaration.js index ed9f92d88ef86..b2202df50e6fa 100644 --- a/tests/baselines/reference/exportAssignmentAndDeclaration.js +++ b/tests/baselines/reference/exportAssignmentAndDeclaration.js @@ -1,4 +1,4 @@ -//// [exportAssignmentAndDeclaration.ts] +//// [foo_0.ts] export enum E1 { A,B,C } @@ -10,8 +10,9 @@ class C1 { // Invalid, as there is already an exported member. export = C1; -//// [exportAssignmentAndDeclaration.js] +//// [foo_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; (function (E1) { E1[E1["A"] = 0] = "A"; E1[E1["B"] = 1] = "B"; diff --git a/tests/baselines/reference/exportAssignmentCircularModules.js b/tests/baselines/reference/exportAssignmentCircularModules.js index 7634418179bca..73338840590ac 100644 --- a/tests/baselines/reference/exportAssignmentCircularModules.js +++ b/tests/baselines/reference/exportAssignmentCircularModules.js @@ -24,6 +24,7 @@ export = Foo; //// [foo_1.js] define(["require", "exports", "./foo_2"], function (require, exports, foo2) { + "use strict"; var Foo; (function (Foo) { Foo.x = foo2.x; @@ -32,6 +33,7 @@ define(["require", "exports", "./foo_2"], function (require, exports, foo2) { }); //// [foo_0.js] define(["require", "exports", './foo_1'], function (require, exports, foo1) { + "use strict"; var Foo; (function (Foo) { Foo.x = foo1.x; @@ -40,6 +42,7 @@ define(["require", "exports", './foo_1'], function (require, exports, foo1) { }); //// [foo_2.js] define(["require", "exports", "./foo_0"], function (require, exports, foo0) { + "use strict"; var Foo; (function (Foo) { Foo.x = foo0.x; diff --git a/tests/baselines/reference/exportAssignmentClass.js b/tests/baselines/reference/exportAssignmentClass.js index a010a1e1cd2f4..000684f1a9fbb 100644 --- a/tests/baselines/reference/exportAssignmentClass.js +++ b/tests/baselines/reference/exportAssignmentClass.js @@ -13,6 +13,7 @@ var x = d.p; //// [exportAssignmentClass_A.js] define(["require", "exports"], function (require, exports) { + "use strict"; var C = (function () { function C() { this.p = 0; @@ -23,6 +24,7 @@ define(["require", "exports"], function (require, exports) { }); //// [exportAssignmentClass_B.js] define(["require", "exports", "exportAssignmentClass_A"], function (require, exports, D) { + "use strict"; var d = new D(); var x = d.p; }); diff --git a/tests/baselines/reference/exportAssignmentConstrainedGenericType.js b/tests/baselines/reference/exportAssignmentConstrainedGenericType.js index b62cc8251beed..08c1adb3a04c1 100644 --- a/tests/baselines/reference/exportAssignmentConstrainedGenericType.js +++ b/tests/baselines/reference/exportAssignmentConstrainedGenericType.js @@ -15,6 +15,7 @@ var y = new foo({a: "test", b: 42}); // Should be OK var z: number = y.test.b; //// [foo_0.js] +"use strict"; var Foo = (function () { function Foo(x) { } @@ -22,6 +23,7 @@ var Foo = (function () { })(); module.exports = Foo; //// [foo_1.js] +"use strict"; var foo = require("./foo_0"); var x = new foo(true); // Should error var y = new foo({ a: "test", b: 42 }); // Should be OK diff --git a/tests/baselines/reference/exportAssignmentEnum.js b/tests/baselines/reference/exportAssignmentEnum.js index 06438fb2b5300..a4ae6898bce75 100644 --- a/tests/baselines/reference/exportAssignmentEnum.js +++ b/tests/baselines/reference/exportAssignmentEnum.js @@ -17,6 +17,7 @@ var b = EnumE.B; var c = EnumE.C; //// [exportAssignmentEnum_A.js] +"use strict"; var E; (function (E) { E[E["A"] = 0] = "A"; @@ -25,6 +26,7 @@ var E; })(E || (E = {})); module.exports = E; //// [exportAssignmentEnum_B.js] +"use strict"; var EnumE = require("./exportAssignmentEnum_A"); var a = EnumE.A; var b = EnumE.B; diff --git a/tests/baselines/reference/exportAssignmentError.js b/tests/baselines/reference/exportAssignmentError.js index 777a9fab04825..41485d228e550 100644 --- a/tests/baselines/reference/exportAssignmentError.js +++ b/tests/baselines/reference/exportAssignmentError.js @@ -1,4 +1,4 @@ -//// [exportAssignmentError.ts] +//// [exportEqualsModule_A.ts] module M { export var x; } @@ -8,8 +8,9 @@ import M2 = M; export = M2; // should not error -//// [exportAssignmentError.js] +//// [exportEqualsModule_A.js] define(["require", "exports"], function (require, exports) { + "use strict"; var M; (function (M) { })(M || (M = {})); diff --git a/tests/baselines/reference/exportAssignmentError.symbols b/tests/baselines/reference/exportAssignmentError.symbols index 482ad586dc2c4..e10556360a4d8 100644 --- a/tests/baselines/reference/exportAssignmentError.symbols +++ b/tests/baselines/reference/exportAssignmentError.symbols @@ -1,15 +1,15 @@ -=== tests/cases/compiler/exportAssignmentError.ts === +=== tests/cases/compiler/exportEqualsModule_A.ts === module M { ->M : Symbol(M, Decl(exportAssignmentError.ts, 0, 0)) +>M : Symbol(M, Decl(exportEqualsModule_A.ts, 0, 0)) export var x; ->x : Symbol(x, Decl(exportAssignmentError.ts, 1, 11)) +>x : Symbol(x, Decl(exportEqualsModule_A.ts, 1, 11)) } import M2 = M; ->M2 : Symbol(M2, Decl(exportAssignmentError.ts, 2, 1)) ->M : Symbol(M, Decl(exportAssignmentError.ts, 0, 0)) +>M2 : Symbol(M2, Decl(exportEqualsModule_A.ts, 2, 1)) +>M : Symbol(M, Decl(exportEqualsModule_A.ts, 0, 0)) export = M2; // should not error ->M2 : Symbol(M2, Decl(exportAssignmentError.ts, 2, 1)) +>M2 : Symbol(M2, Decl(exportEqualsModule_A.ts, 2, 1)) diff --git a/tests/baselines/reference/exportAssignmentError.types b/tests/baselines/reference/exportAssignmentError.types index 89e7d461fb20a..96f92c8571b50 100644 --- a/tests/baselines/reference/exportAssignmentError.types +++ b/tests/baselines/reference/exportAssignmentError.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/exportAssignmentError.ts === +=== tests/cases/compiler/exportEqualsModule_A.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/exportAssignmentFunction.js b/tests/baselines/reference/exportAssignmentFunction.js index 825d0f983ea4e..c8e90571cdbc9 100644 --- a/tests/baselines/reference/exportAssignmentFunction.js +++ b/tests/baselines/reference/exportAssignmentFunction.js @@ -12,10 +12,12 @@ var n: number = fooFunc(); //// [exportAssignmentFunction_A.js] define(["require", "exports"], function (require, exports) { + "use strict"; function foo() { return 0; } return foo; }); //// [exportAssignmentFunction_B.js] define(["require", "exports", "exportAssignmentFunction_A"], function (require, exports, fooFunc) { + "use strict"; var n = fooFunc(); }); diff --git a/tests/baselines/reference/exportAssignmentGenericType.js b/tests/baselines/reference/exportAssignmentGenericType.js index b087287c34f58..e9c6e82152207 100644 --- a/tests/baselines/reference/exportAssignmentGenericType.js +++ b/tests/baselines/reference/exportAssignmentGenericType.js @@ -13,6 +13,7 @@ var y:number = x.test; //// [foo_0.js] +"use strict"; var Foo = (function () { function Foo() { } @@ -20,6 +21,7 @@ var Foo = (function () { })(); module.exports = Foo; //// [foo_1.js] +"use strict"; var foo = require("./foo_0"); var x = new foo(); var y = x.test; diff --git a/tests/baselines/reference/exportAssignmentInterface.js b/tests/baselines/reference/exportAssignmentInterface.js index 22b30c03db6b4..be3f696b19b75 100644 --- a/tests/baselines/reference/exportAssignmentInterface.js +++ b/tests/baselines/reference/exportAssignmentInterface.js @@ -16,9 +16,11 @@ var n: number = i.p1; //// [exportAssignmentInterface_A.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [exportAssignmentInterface_B.js] define(["require", "exports"], function (require, exports) { + "use strict"; var i; var n = i.p1; }); diff --git a/tests/baselines/reference/exportAssignmentInternalModule.js b/tests/baselines/reference/exportAssignmentInternalModule.js index 3426519e626a4..7b2443fc26d6f 100644 --- a/tests/baselines/reference/exportAssignmentInternalModule.js +++ b/tests/baselines/reference/exportAssignmentInternalModule.js @@ -14,6 +14,7 @@ var n: number = modM.x; //// [exportAssignmentInternalModule_A.js] define(["require", "exports"], function (require, exports) { + "use strict"; var M; (function (M) { })(M || (M = {})); @@ -21,5 +22,6 @@ define(["require", "exports"], function (require, exports) { }); //// [exportAssignmentInternalModule_B.js] define(["require", "exports", "exportAssignmentInternalModule_A"], function (require, exports, modM) { + "use strict"; var n = modM.x; }); diff --git a/tests/baselines/reference/exportAssignmentMergedInterface.js b/tests/baselines/reference/exportAssignmentMergedInterface.js index f99d7f3a46555..97c6941cc338f 100644 --- a/tests/baselines/reference/exportAssignmentMergedInterface.js +++ b/tests/baselines/reference/exportAssignmentMergedInterface.js @@ -24,9 +24,11 @@ z = x.d; //// [foo_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [foo_1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var x; x("test"); x(42); diff --git a/tests/baselines/reference/exportAssignmentMergedModule.js b/tests/baselines/reference/exportAssignmentMergedModule.js index 51413796eb249..8d78799a05b51 100644 --- a/tests/baselines/reference/exportAssignmentMergedModule.js +++ b/tests/baselines/reference/exportAssignmentMergedModule.js @@ -25,6 +25,7 @@ if(!!foo.b){ } //// [foo_0.js] +"use strict"; var Foo; (function (Foo) { function a() { @@ -46,6 +47,7 @@ var Foo; })(Foo || (Foo = {})); module.exports = Foo; //// [foo_1.js] +"use strict"; var foo = require("./foo_0"); var a = foo.a(); if (!!foo.b) { diff --git a/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.js b/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.js index 460707a3502ca..a2ddd50511ca7 100644 --- a/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.js +++ b/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.js @@ -17,7 +17,9 @@ var a = new z(); // constructor - no error var b = z(); // call signature - no error //// [exportAssignmentOfDeclaredExternalModule_0.js] +"use strict"; //// [exportAssignmentOfDeclaredExternalModule_1.js] +"use strict"; var x = new Sammy(); // error to use as constructor as there is not constructor symbol var y = Sammy(); // error to use interface name as call target var z; // no error - z is of type interface Sammy from module 'M' diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 59fa01f2ca035..54d936a410181 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -15,6 +15,7 @@ var r: string = m.foo; //// [exportAssignmentOfGenericType1_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; var T = (function () { function T() { } @@ -29,6 +30,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; define(["require", "exports", "exportAssignmentOfGenericType1_0"], function (require, exports, q) { + "use strict"; var M = (function (_super) { __extends(M, _super); function M() { diff --git a/tests/baselines/reference/exportAssignmentTopLevelClodule.js b/tests/baselines/reference/exportAssignmentTopLevelClodule.js index e0946dc48f2a2..28075a7e55b3b 100644 --- a/tests/baselines/reference/exportAssignmentTopLevelClodule.js +++ b/tests/baselines/reference/exportAssignmentTopLevelClodule.js @@ -18,6 +18,7 @@ if(foo.answer === 42){ //// [foo_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; var Foo = (function () { function Foo() { this.test = "test"; @@ -32,6 +33,7 @@ define(["require", "exports"], function (require, exports) { }); //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { + "use strict"; if (foo.answer === 42) { var x = new foo(); } diff --git a/tests/baselines/reference/exportAssignmentTopLevelEnumdule.js b/tests/baselines/reference/exportAssignmentTopLevelEnumdule.js index 791fc4fbd7f96..2516b1b0e2877 100644 --- a/tests/baselines/reference/exportAssignmentTopLevelEnumdule.js +++ b/tests/baselines/reference/exportAssignmentTopLevelEnumdule.js @@ -19,6 +19,7 @@ if(color === foo.green){ //// [foo_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; var foo; (function (foo) { foo[foo["red"] = 0] = "red"; @@ -33,6 +34,7 @@ define(["require", "exports"], function (require, exports) { }); //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { + "use strict"; var color; if (color === foo.green) { color = foo.answer; diff --git a/tests/baselines/reference/exportAssignmentTopLevelFundule.js b/tests/baselines/reference/exportAssignmentTopLevelFundule.js index cccde9ede3af6..d151a61d53930 100644 --- a/tests/baselines/reference/exportAssignmentTopLevelFundule.js +++ b/tests/baselines/reference/exportAssignmentTopLevelFundule.js @@ -18,6 +18,7 @@ if(foo.answer === 42){ //// [foo_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; function foo() { return "test"; } @@ -29,6 +30,7 @@ define(["require", "exports"], function (require, exports) { }); //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { + "use strict"; if (foo.answer === 42) { var x = foo(); } diff --git a/tests/baselines/reference/exportAssignmentTopLevelIdentifier.js b/tests/baselines/reference/exportAssignmentTopLevelIdentifier.js index a89559a055024..03b4ae26af9a6 100644 --- a/tests/baselines/reference/exportAssignmentTopLevelIdentifier.js +++ b/tests/baselines/reference/exportAssignmentTopLevelIdentifier.js @@ -15,6 +15,7 @@ if(foo.answer === 42){ //// [foo_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; var Foo; (function (Foo) { Foo.answer = 42; @@ -23,6 +24,7 @@ define(["require", "exports"], function (require, exports) { }); //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { + "use strict"; if (foo.answer === 42) { } }); diff --git a/tests/baselines/reference/exportAssignmentVariable.js b/tests/baselines/reference/exportAssignmentVariable.js index 8afbf222e6d9c..68a195230df60 100644 --- a/tests/baselines/reference/exportAssignmentVariable.js +++ b/tests/baselines/reference/exportAssignmentVariable.js @@ -11,8 +11,10 @@ import y = require("./exportAssignmentVariable_A"); var n: number = y; //// [exportAssignmentVariable_A.js] +"use strict"; var x = 0; module.exports = x; //// [exportAssignmentVariable_B.js] +"use strict"; var y = require("./exportAssignmentVariable_A"); var n = y; diff --git a/tests/baselines/reference/exportAssignmentWithDeclareAndExportModifiers.js b/tests/baselines/reference/exportAssignmentWithDeclareAndExportModifiers.js index 74396bb951bf8..b5329b78bcb9e 100644 --- a/tests/baselines/reference/exportAssignmentWithDeclareAndExportModifiers.js +++ b/tests/baselines/reference/exportAssignmentWithDeclareAndExportModifiers.js @@ -3,5 +3,6 @@ var x; export declare export = x; //// [exportAssignmentWithDeclareAndExportModifiers.js] +"use strict"; var x; module.exports = x; diff --git a/tests/baselines/reference/exportAssignmentWithDeclareModifier.js b/tests/baselines/reference/exportAssignmentWithDeclareModifier.js index 711538616aa46..9cade7577bcce 100644 --- a/tests/baselines/reference/exportAssignmentWithDeclareModifier.js +++ b/tests/baselines/reference/exportAssignmentWithDeclareModifier.js @@ -3,5 +3,6 @@ var x; declare export = x; //// [exportAssignmentWithDeclareModifier.js] +"use strict"; var x; module.exports = x; diff --git a/tests/baselines/reference/exportAssignmentWithExportModifier.js b/tests/baselines/reference/exportAssignmentWithExportModifier.js index 9d94cc8db7530..1a2f5c40ab864 100644 --- a/tests/baselines/reference/exportAssignmentWithExportModifier.js +++ b/tests/baselines/reference/exportAssignmentWithExportModifier.js @@ -3,5 +3,6 @@ var x; export export = x; //// [exportAssignmentWithExportModifier.js] +"use strict"; var x; module.exports = x; diff --git a/tests/baselines/reference/exportAssignmentWithExports.js b/tests/baselines/reference/exportAssignmentWithExports.js index 65d2253e3f86d..9f43a515ad06a 100644 --- a/tests/baselines/reference/exportAssignmentWithExports.js +++ b/tests/baselines/reference/exportAssignmentWithExports.js @@ -4,6 +4,7 @@ class D { } export = D; //// [exportAssignmentWithExports.js] +"use strict"; var C = (function () { function C() { } diff --git a/tests/baselines/reference/exportAssignmentWithImportStatementPrivacyError.js b/tests/baselines/reference/exportAssignmentWithImportStatementPrivacyError.js index adfb85ae4bcb9..3e8c46cca11ba 100644 --- a/tests/baselines/reference/exportAssignmentWithImportStatementPrivacyError.js +++ b/tests/baselines/reference/exportAssignmentWithImportStatementPrivacyError.js @@ -23,6 +23,7 @@ export = M; //// [exportAssignmentWithImportStatementPrivacyError.js] define(["require", "exports"], function (require, exports) { + "use strict"; var M; (function (M) { })(M || (M = {})); diff --git a/tests/baselines/reference/exportAssignmentWithPrivacyError.js b/tests/baselines/reference/exportAssignmentWithPrivacyError.js index 57d3ae6c487ff..69daab5ac5b1d 100644 --- a/tests/baselines/reference/exportAssignmentWithPrivacyError.js +++ b/tests/baselines/reference/exportAssignmentWithPrivacyError.js @@ -19,6 +19,7 @@ export = server; //// [exportAssignmentWithPrivacyError.js] define(["require", "exports"], function (require, exports) { + "use strict"; var server; return server; }); diff --git a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.js b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.js index 4929eaffd6b3c..1be46dddd35ca 100644 --- a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.js +++ b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.js @@ -9,6 +9,7 @@ export = new Greeter(); //// [exportAssignmentWithoutIdentifier1.js] +"use strict"; function Greeter() { //... } diff --git a/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.js b/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.js index a6700fb5e5931..19f872bad270e 100644 --- a/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.js +++ b/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.js @@ -21,14 +21,19 @@ export { x as a, } from "./t1"; //// [t1.js] +"use strict"; exports.x = "x"; //// [t2.js] +"use strict"; var t1_1 = require("./t1"); exports.x = t1_1.x; //// [t3.js] +"use strict"; //// [t4.js] +"use strict"; var t1_1 = require("./t1"); exports.a = t1_1.x; //// [t5.js] +"use strict"; var t1_1 = require("./t1"); exports.a = t1_1.x; diff --git a/tests/baselines/reference/exportDeclareClass1.js b/tests/baselines/reference/exportDeclareClass1.js index 121db110cc148..18ced8df9d683 100644 --- a/tests/baselines/reference/exportDeclareClass1.js +++ b/tests/baselines/reference/exportDeclareClass1.js @@ -11,6 +11,7 @@ //// [exportDeclareClass1.js] define(["require", "exports"], function (require, exports) { + "use strict"; ; ; }); diff --git a/tests/baselines/reference/exportDeclaredModule.js b/tests/baselines/reference/exportDeclaredModule.js index 7aa75288bff11..af0f1b9eca150 100644 --- a/tests/baselines/reference/exportDeclaredModule.js +++ b/tests/baselines/reference/exportDeclaredModule.js @@ -13,7 +13,9 @@ import foo1 = require('./foo1'); var x: number = foo1.b(); //// [foo1.js] +"use strict"; module.exports = M1; //// [foo2.js] +"use strict"; var foo1 = require('./foo1'); var x = foo1.b(); diff --git a/tests/baselines/reference/exportEqualCallable.js b/tests/baselines/reference/exportEqualCallable.js index 34df64f5e482b..681c3ca4c19b0 100644 --- a/tests/baselines/reference/exportEqualCallable.js +++ b/tests/baselines/reference/exportEqualCallable.js @@ -15,10 +15,12 @@ connect(); //// [exportEqualCallable_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; var server; return server; }); //// [exportEqualCallable_1.js] define(["require", "exports", 'exportEqualCallable_0'], function (require, exports, connect) { + "use strict"; connect(); }); diff --git a/tests/baselines/reference/exportEqualErrorType.js b/tests/baselines/reference/exportEqualErrorType.js index 533a2c2501ce6..653c705215331 100644 --- a/tests/baselines/reference/exportEqualErrorType.js +++ b/tests/baselines/reference/exportEqualErrorType.js @@ -23,10 +23,12 @@ connect().use(connect.static('foo')); // Error 1 The property 'static' doe //// [exportEqualErrorType_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; var server; return server; }); //// [exportEqualErrorType_1.js] define(["require", "exports", 'exportEqualErrorType_0'], function (require, exports, connect) { + "use strict"; connect().use(connect.static('foo')); // Error 1 The property 'static' does not exist on value of type ''. }); diff --git a/tests/baselines/reference/exportEqualMemberMissing.js b/tests/baselines/reference/exportEqualMemberMissing.js index 85972ce094588..b25ef1d3083d4 100644 --- a/tests/baselines/reference/exportEqualMemberMissing.js +++ b/tests/baselines/reference/exportEqualMemberMissing.js @@ -22,9 +22,11 @@ connect().use(connect.static('foo')); // Error 1 The property 'static' does not //// [exportEqualMemberMissing_0.js] +"use strict"; var server; module.exports = server; //// [exportEqualMemberMissing_1.js] +"use strict"; /// var connect = require('./exportEqualMemberMissing_0'); connect().use(connect.static('foo')); // Error 1 The property 'static' does not exist on value of type ''. diff --git a/tests/baselines/reference/exportEqualNamespaces.js b/tests/baselines/reference/exportEqualNamespaces.js index a95d1fd3d58e3..75189a78ccb6c 100644 --- a/tests/baselines/reference/exportEqualNamespaces.js +++ b/tests/baselines/reference/exportEqualNamespaces.js @@ -15,6 +15,7 @@ export = server; //// [exportEqualNamespaces.js] define(["require", "exports"], function (require, exports) { + "use strict"; var x = 5; var server = new Date(); return server; diff --git a/tests/baselines/reference/exportImport.js b/tests/baselines/reference/exportImport.js index 6d8748516aed1..0177bbbecaaf7 100644 --- a/tests/baselines/reference/exportImport.js +++ b/tests/baselines/reference/exportImport.js @@ -17,6 +17,7 @@ export function w(): e.w { // Should be OK //// [w1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var Widget1 = (function () { function Widget1() { this.name = 'one'; @@ -27,10 +28,12 @@ define(["require", "exports"], function (require, exports) { }); //// [exporter.js] define(["require", "exports", './w1'], function (require, exports, w) { + "use strict"; exports.w = w; }); //// [consumer.js] define(["require", "exports", './exporter'], function (require, exports, e) { + "use strict"; function w() { return new e.w(); } diff --git a/tests/baselines/reference/exportImportMultipleFiles.js b/tests/baselines/reference/exportImportMultipleFiles.js index 10909808ffc29..6a0bf61459e35 100644 --- a/tests/baselines/reference/exportImportMultipleFiles.js +++ b/tests/baselines/reference/exportImportMultipleFiles.js @@ -14,15 +14,18 @@ lib.math.add(3, 4); // Shouldnt be error //// [exportImportMultipleFiles_math.js] define(["require", "exports"], function (require, exports) { + "use strict"; function add(a, b) { return a + b; } exports.add = add; }); //// [exportImportMultipleFiles_library.js] define(["require", "exports", "exportImportMultipleFiles_math"], function (require, exports, math) { + "use strict"; exports.math = math; exports.math.add(3, 4); // OK }); //// [exportImportMultipleFiles_userCode.js] define(["require", "exports", './exportImportMultipleFiles_library'], function (require, exports, lib) { + "use strict"; lib.math.add(3, 4); // Shouldnt be error }); diff --git a/tests/baselines/reference/exportImportNonInstantiatedModule2.js b/tests/baselines/reference/exportImportNonInstantiatedModule2.js index 2782a6f6f67bf..401183a5ead58 100644 --- a/tests/baselines/reference/exportImportNonInstantiatedModule2.js +++ b/tests/baselines/reference/exportImportNonInstantiatedModule2.js @@ -17,12 +17,15 @@ export function w(): e.w { // Should be OK //// [w1.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [exporter.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [consumer.js] define(["require", "exports"], function (require, exports) { + "use strict"; function w() { return { name: 'value' }; } diff --git a/tests/baselines/reference/exportNonInitializedVariablesAMD.js b/tests/baselines/reference/exportNonInitializedVariablesAMD.js index 3b61281eaba23..9759f41831b66 100644 --- a/tests/baselines/reference/exportNonInitializedVariablesAMD.js +++ b/tests/baselines/reference/exportNonInitializedVariablesAMD.js @@ -36,6 +36,7 @@ export let h1: D = new D; //// [exportNonInitializedVariablesAMD.js] define(["require", "exports"], function (require, exports) { + "use strict"; var ; let; var ; diff --git a/tests/baselines/reference/exportNonInitializedVariablesCommonJS.js b/tests/baselines/reference/exportNonInitializedVariablesCommonJS.js index c1d308b1b9419..047b22c2ce1d9 100644 --- a/tests/baselines/reference/exportNonInitializedVariablesCommonJS.js +++ b/tests/baselines/reference/exportNonInitializedVariablesCommonJS.js @@ -35,6 +35,7 @@ export let h1: D = new D; //// [exportNonInitializedVariablesCommonJS.js] +"use strict"; var ; let; var ; diff --git a/tests/baselines/reference/exportNonInitializedVariablesSystem.js b/tests/baselines/reference/exportNonInitializedVariablesSystem.js index 3b9c5d759dc0e..c2b78f35cc2e8 100644 --- a/tests/baselines/reference/exportNonInitializedVariablesSystem.js +++ b/tests/baselines/reference/exportNonInitializedVariablesSystem.js @@ -36,6 +36,7 @@ export let h1: D = new D; //// [exportNonInitializedVariablesSystem.js] System.register([], function(exports_1) { + "use strict"; var a, b, c, d, A, e, f, B, C, a1, b1, c1, d1, D, e1, f1, g1, h1; return { setters:[], diff --git a/tests/baselines/reference/exportNonInitializedVariablesUMD.js b/tests/baselines/reference/exportNonInitializedVariablesUMD.js index 4b1e671669c89..2567fb57ecfe2 100644 --- a/tests/baselines/reference/exportNonInitializedVariablesUMD.js +++ b/tests/baselines/reference/exportNonInitializedVariablesUMD.js @@ -43,6 +43,7 @@ export let h1: D = new D; define(["require", "exports"], factory); } })(function (require, exports) { + "use strict"; var ; let; var ; diff --git a/tests/baselines/reference/exportNonVisibleType.js b/tests/baselines/reference/exportNonVisibleType.js index 101c356d582a5..ad2b2a9d910a8 100644 --- a/tests/baselines/reference/exportNonVisibleType.js +++ b/tests/baselines/reference/exportNonVisibleType.js @@ -36,9 +36,11 @@ export = C1; // Should work, private type I1 of visible class C1 only used in pr //// [foo1.js] +"use strict"; var x = { a: "test", b: 42 }; module.exports = x; //// [foo2.js] +"use strict"; var C1 = (function () { function C1() { } @@ -46,6 +48,7 @@ var C1 = (function () { })(); module.exports = C1; //// [foo3.js] +"use strict"; var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/exportSameNameFuncVar.js b/tests/baselines/reference/exportSameNameFuncVar.js index 600bdf1223476..2bc77e079fbd1 100644 --- a/tests/baselines/reference/exportSameNameFuncVar.js +++ b/tests/baselines/reference/exportSameNameFuncVar.js @@ -5,6 +5,7 @@ export function a() { //// [exportSameNameFuncVar.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.a = 10; function a() { } diff --git a/tests/baselines/reference/exportSpecifierForAGlobal.js b/tests/baselines/reference/exportSpecifierForAGlobal.js index 6b4343a299bb3..ac79a9bf69dac 100644 --- a/tests/baselines/reference/exportSpecifierForAGlobal.js +++ b/tests/baselines/reference/exportSpecifierForAGlobal.js @@ -13,6 +13,7 @@ export function f() { //// [b.js] +"use strict"; function f() { var x; return x; diff --git a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.js b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.js index e8e9678408363..cb06a818b08b2 100644 --- a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.js +++ b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.js @@ -9,3 +9,4 @@ export declare function foo(): X.bar; //// [exportSpecifierReferencingOuterDeclaration2_A.js] //// [exportSpecifierReferencingOuterDeclaration2_B.js] +"use strict"; diff --git a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration4.js b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration4.js index 4edb5f711a6b5..1badf46999668 100644 --- a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration4.js +++ b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration4.js @@ -11,3 +11,4 @@ export declare function bar(): X.bar; // error //// [exportSpecifierReferencingOuterDeclaration2_A.js] //// [exportSpecifierReferencingOuterDeclaration2_B.js] +"use strict"; diff --git a/tests/baselines/reference/exportStar-amd.js b/tests/baselines/reference/exportStar-amd.js index 534a23b4d5bd7..bd4c112ff2e6a 100644 --- a/tests/baselines/reference/exportStar-amd.js +++ b/tests/baselines/reference/exportStar-amd.js @@ -31,11 +31,13 @@ foo; //// [t1.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.x = 1; exports.y = 2; }); //// [t2.js] define(["require", "exports"], function (require, exports) { + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = "hello"; function foo() { } @@ -43,6 +45,7 @@ define(["require", "exports"], function (require, exports) { }); //// [t3.js] define(["require", "exports"], function (require, exports) { + "use strict"; var x = "x"; exports.x = x; var y = "y"; @@ -52,6 +55,7 @@ define(["require", "exports"], function (require, exports) { }); //// [t4.js] define(["require", "exports", "./t1", "./t2", "./t3"], function (require, exports, t1_1, t2_1, t3_1) { + "use strict"; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } @@ -61,6 +65,7 @@ define(["require", "exports", "./t1", "./t2", "./t3"], function (require, export }); //// [main.js] define(["require", "exports", "./t4"], function (require, exports, t4_1) { + "use strict"; t4_1.default; t4_1.x; t4_1.y; diff --git a/tests/baselines/reference/exportStar.js b/tests/baselines/reference/exportStar.js index 74cf24a0f9718..a2bc44720fb69 100644 --- a/tests/baselines/reference/exportStar.js +++ b/tests/baselines/reference/exportStar.js @@ -30,14 +30,17 @@ foo; //// [t1.js] +"use strict"; exports.x = 1; exports.y = 2; //// [t2.js] +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = "hello"; function foo() { } exports.foo = foo; //// [t3.js] +"use strict"; var x = "x"; exports.x = x; var y = "y"; @@ -45,6 +48,7 @@ exports.y = y; var z = "z"; exports.z = z; //// [t4.js] +"use strict"; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } @@ -52,6 +56,7 @@ __export(require("./t1")); __export(require("./t2")); __export(require("./t3")); //// [main.js] +"use strict"; var t4_1 = require("./t4"); t4_1.default; t4_1.x; diff --git a/tests/baselines/reference/exportStarFromEmptyModule.js b/tests/baselines/reference/exportStarFromEmptyModule.js index d433e7b3682c8..e131d5ae8d986 100644 --- a/tests/baselines/reference/exportStarFromEmptyModule.js +++ b/tests/baselines/reference/exportStarFromEmptyModule.js @@ -24,6 +24,7 @@ X.A.q; X.A.r; // Error //// [exportStarFromEmptyModule_module1.js] +"use strict"; var A = (function () { function A() { } @@ -33,6 +34,7 @@ exports.A = A; //// [exportStarFromEmptyModule_module2.js] // empty //// [exportStarFromEmptyModule_module3.js] +"use strict"; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } @@ -45,6 +47,7 @@ var A = (function () { })(); exports.A = A; //// [exportStarFromEmptyModule_module4.js] +"use strict"; var X = require("./exportStarFromEmptyModule_module3"); var s; X.A.q; diff --git a/tests/baselines/reference/exportVisibility.js b/tests/baselines/reference/exportVisibility.js index a18d54d8e4880..f4c7e97b29729 100644 --- a/tests/baselines/reference/exportVisibility.js +++ b/tests/baselines/reference/exportVisibility.js @@ -10,6 +10,7 @@ export function test(foo: Foo) { //// [exportVisibility.js] +"use strict"; var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/exportedBlockScopedDeclarations.js b/tests/baselines/reference/exportedBlockScopedDeclarations.js index 81399ddafb53b..3e77c3c684b4c 100644 --- a/tests/baselines/reference/exportedBlockScopedDeclarations.js +++ b/tests/baselines/reference/exportedBlockScopedDeclarations.js @@ -19,6 +19,7 @@ namespace NS1 { //// [exportedBlockScopedDeclarations.js] define(["require", "exports"], function (require, exports) { + "use strict"; var foo = foo; // compile error exports.bar = exports.bar; // should be compile error function f() { diff --git a/tests/baselines/reference/exportedInterfaceInaccessibleInCallbackInModule.js b/tests/baselines/reference/exportedInterfaceInaccessibleInCallbackInModule.js index 341de323694cc..6c39978e37d3c 100644 --- a/tests/baselines/reference/exportedInterfaceInaccessibleInCallbackInModule.js +++ b/tests/baselines/reference/exportedInterfaceInaccessibleInCallbackInModule.js @@ -14,4 +14,5 @@ export declare class TPromise { //// [exportedInterfaceInaccessibleInCallbackInModule.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/exportedVariable1.js b/tests/baselines/reference/exportedVariable1.js index 39eea8d34b584..da472fc879014 100644 --- a/tests/baselines/reference/exportedVariable1.js +++ b/tests/baselines/reference/exportedVariable1.js @@ -5,6 +5,7 @@ var upper = foo.name.toUpperCase(); //// [exportedVariable1.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.foo = { name: "Bill" }; var upper = exports.foo.name.toUpperCase(); }); diff --git a/tests/baselines/reference/exportingContainingVisibleType.js b/tests/baselines/reference/exportingContainingVisibleType.js index 2246a63bc49b3..0742731636a94 100644 --- a/tests/baselines/reference/exportingContainingVisibleType.js +++ b/tests/baselines/reference/exportingContainingVisibleType.js @@ -12,6 +12,7 @@ export var x = 5; //// [exportingContainingVisibleType.js] define(["require", "exports"], function (require, exports) { + "use strict"; var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/exportsAndImports1-amd.js b/tests/baselines/reference/exportsAndImports1-amd.js index 39744c7f142eb..555a56ce31f0e 100644 --- a/tests/baselines/reference/exportsAndImports1-amd.js +++ b/tests/baselines/reference/exportsAndImports1-amd.js @@ -36,6 +36,7 @@ export { v, f, C, I, E, D, M, N, T, a }; //// [t1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var v = 1; exports.v = v; function f() { } @@ -62,6 +63,7 @@ define(["require", "exports"], function (require, exports) { }); //// [t2.js] define(["require", "exports", "./t1"], function (require, exports, t1_1) { + "use strict"; exports.v = t1_1.v; exports.f = t1_1.f; exports.C = t1_1.C; @@ -71,6 +73,7 @@ define(["require", "exports", "./t1"], function (require, exports, t1_1) { }); //// [t3.js] define(["require", "exports", "./t1"], function (require, exports, t1_1) { + "use strict"; exports.v = t1_1.v; exports.f = t1_1.f; exports.C = t1_1.C; diff --git a/tests/baselines/reference/exportsAndImports1-es6.js b/tests/baselines/reference/exportsAndImports1-es6.js index 5610968bf7925..ece98a80318c8 100644 --- a/tests/baselines/reference/exportsAndImports1-es6.js +++ b/tests/baselines/reference/exportsAndImports1-es6.js @@ -35,6 +35,7 @@ export { v, f, C, I, E, D, M, N, T, a }; //// [t1.js] +"use strict"; var v = 1; exports.v = v; function f() { } @@ -56,6 +57,7 @@ exports.M = M; var a = M.x; exports.a = a; //// [t2.js] +"use strict"; var t1_1 = require("./t1"); exports.v = t1_1.v; exports.f = t1_1.f; @@ -64,6 +66,7 @@ exports.E = t1_1.E; exports.M = t1_1.M; exports.a = t1_1.a; //// [t3.js] +"use strict"; var t1_1 = require("./t1"); exports.v = t1_1.v; exports.f = t1_1.f; diff --git a/tests/baselines/reference/exportsAndImports1.js b/tests/baselines/reference/exportsAndImports1.js index cd7db07b5694a..312b379dde1f8 100644 --- a/tests/baselines/reference/exportsAndImports1.js +++ b/tests/baselines/reference/exportsAndImports1.js @@ -35,6 +35,7 @@ export { v, f, C, I, E, D, M, N, T, a }; //// [t1.js] +"use strict"; var v = 1; exports.v = v; function f() { } @@ -59,6 +60,7 @@ exports.M = M; var a = M.x; exports.a = a; //// [t2.js] +"use strict"; var t1_1 = require("./t1"); exports.v = t1_1.v; exports.f = t1_1.f; @@ -67,6 +69,7 @@ exports.E = t1_1.E; exports.M = t1_1.M; exports.a = t1_1.a; //// [t3.js] +"use strict"; var t1_1 = require("./t1"); exports.v = t1_1.v; exports.f = t1_1.f; diff --git a/tests/baselines/reference/exportsAndImports2-amd.js b/tests/baselines/reference/exportsAndImports2-amd.js index 10f524de68441..18803de4004a7 100644 --- a/tests/baselines/reference/exportsAndImports2-amd.js +++ b/tests/baselines/reference/exportsAndImports2-amd.js @@ -15,16 +15,19 @@ export { x as y, y as x }; //// [t1.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.x = "x"; exports.y = "y"; }); //// [t2.js] define(["require", "exports", "./t1"], function (require, exports, t1_1) { + "use strict"; exports.y = t1_1.x; exports.x = t1_1.y; }); //// [t3.js] define(["require", "exports", "./t1"], function (require, exports, t1_1) { + "use strict"; exports.y = t1_1.x; exports.x = t1_1.y; }); diff --git a/tests/baselines/reference/exportsAndImports2-es6.js b/tests/baselines/reference/exportsAndImports2-es6.js index aa58c0d890237..865534b285137 100644 --- a/tests/baselines/reference/exportsAndImports2-es6.js +++ b/tests/baselines/reference/exportsAndImports2-es6.js @@ -14,13 +14,16 @@ export { x as y, y as x }; //// [t1.js] +"use strict"; exports.x = "x"; exports.y = "y"; //// [t2.js] +"use strict"; var t1_1 = require("./t1"); exports.y = t1_1.x; exports.x = t1_1.y; //// [t3.js] +"use strict"; var t1_1 = require("./t1"); exports.y = t1_1.x; exports.x = t1_1.y; diff --git a/tests/baselines/reference/exportsAndImports2.js b/tests/baselines/reference/exportsAndImports2.js index 96a3b838ed1ec..3790510979c85 100644 --- a/tests/baselines/reference/exportsAndImports2.js +++ b/tests/baselines/reference/exportsAndImports2.js @@ -14,13 +14,16 @@ export { x as y, y as x }; //// [t1.js] +"use strict"; exports.x = "x"; exports.y = "y"; //// [t2.js] +"use strict"; var t1_1 = require("./t1"); exports.y = t1_1.x; exports.x = t1_1.y; //// [t3.js] +"use strict"; var t1_1 = require("./t1"); exports.y = t1_1.x; exports.x = t1_1.y; diff --git a/tests/baselines/reference/exportsAndImports3-amd.js b/tests/baselines/reference/exportsAndImports3-amd.js index 3a33b12c7ffbe..be86b9ba7b8fb 100644 --- a/tests/baselines/reference/exportsAndImports3-amd.js +++ b/tests/baselines/reference/exportsAndImports3-amd.js @@ -36,6 +36,7 @@ export { v, f, C, I, E, D, M, N, T, a }; //// [t1.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.v = 1; exports.v1 = exports.v; function f() { } @@ -64,6 +65,7 @@ define(["require", "exports"], function (require, exports) { }); //// [t2.js] define(["require", "exports", "./t1"], function (require, exports, t1_1) { + "use strict"; exports.v = t1_1.v1; exports.f = t1_1.f1; exports.C = t1_1.C1; @@ -73,6 +75,7 @@ define(["require", "exports", "./t1"], function (require, exports, t1_1) { }); //// [t3.js] define(["require", "exports", "./t1"], function (require, exports, t1_1) { + "use strict"; exports.v = t1_1.v1; exports.f = t1_1.f1; exports.C = t1_1.C1; diff --git a/tests/baselines/reference/exportsAndImports3-es6.js b/tests/baselines/reference/exportsAndImports3-es6.js index d8e142de41ddd..ed509d31437b6 100644 --- a/tests/baselines/reference/exportsAndImports3-es6.js +++ b/tests/baselines/reference/exportsAndImports3-es6.js @@ -35,6 +35,7 @@ export { v, f, C, I, E, D, M, N, T, a }; //// [t1.js] +"use strict"; exports.v = 1; exports.v1 = exports.v; function f() { } @@ -58,6 +59,7 @@ exports.M1 = M; exports.a = M.x; exports.a1 = exports.a; //// [t2.js] +"use strict"; var t1_1 = require("./t1"); exports.v = t1_1.v1; exports.f = t1_1.f1; @@ -66,6 +68,7 @@ exports.E = t1_1.E1; exports.M = t1_1.M1; exports.a = t1_1.a1; //// [t3.js] +"use strict"; var t1_1 = require("./t1"); exports.v = t1_1.v1; exports.f = t1_1.f1; diff --git a/tests/baselines/reference/exportsAndImports3.js b/tests/baselines/reference/exportsAndImports3.js index 47491ccbc04af..e29f403a5e0fe 100644 --- a/tests/baselines/reference/exportsAndImports3.js +++ b/tests/baselines/reference/exportsAndImports3.js @@ -35,6 +35,7 @@ export { v, f, C, I, E, D, M, N, T, a }; //// [t1.js] +"use strict"; exports.v = 1; exports.v1 = exports.v; function f() { } @@ -61,6 +62,7 @@ exports.M1 = M; exports.a = M.x; exports.a1 = exports.a; //// [t2.js] +"use strict"; var t1_1 = require("./t1"); exports.v = t1_1.v1; exports.f = t1_1.f1; @@ -69,6 +71,7 @@ exports.E = t1_1.E1; exports.M = t1_1.M1; exports.a = t1_1.a1; //// [t3.js] +"use strict"; var t1_1 = require("./t1"); exports.v = t1_1.v1; exports.f = t1_1.f1; diff --git a/tests/baselines/reference/exportsAndImports4-amd.js b/tests/baselines/reference/exportsAndImports4-amd.js index e6a431854b27b..3ed3f9bf9107b 100644 --- a/tests/baselines/reference/exportsAndImports4-amd.js +++ b/tests/baselines/reference/exportsAndImports4-amd.js @@ -41,11 +41,13 @@ export { a, b, c, d, e1, e2, f1, f2 }; //// [t1.js] define(["require", "exports"], function (require, exports) { + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = "hello"; }); //// [t3.js] define(["require", "exports", "./t1", "./t1", "./t1", "./t1", "./t1", "./t1"], function (require, exports, a, t1_1, c, t1_2, t1_3, t1_4) { + "use strict"; exports.a = a; a.default; exports.b = t1_1.default; diff --git a/tests/baselines/reference/exportsAndImports4-es6.js b/tests/baselines/reference/exportsAndImports4-es6.js index 7cae0c0148917..3d3278b4462a8 100644 --- a/tests/baselines/reference/exportsAndImports4-es6.js +++ b/tests/baselines/reference/exportsAndImports4-es6.js @@ -40,8 +40,10 @@ export { a, b, c, d, e1, e2, f1, f2 }; //// [t1.js] +"use strict"; exports.default = "hello"; //// [t3.js] +"use strict"; var a = require("./t1"); exports.a = a; a.default; diff --git a/tests/baselines/reference/exportsAndImports4.js b/tests/baselines/reference/exportsAndImports4.js index 7358b31eacec3..361d1305bdab1 100644 --- a/tests/baselines/reference/exportsAndImports4.js +++ b/tests/baselines/reference/exportsAndImports4.js @@ -40,9 +40,11 @@ export { a, b, c, d, e1, e2, f1, f2 }; //// [t1.js] +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = "hello"; //// [t3.js] +"use strict"; var a = require("./t1"); exports.a = a; a.default; diff --git a/tests/baselines/reference/exportsAndImportsWithContextualKeywordNames01.js b/tests/baselines/reference/exportsAndImportsWithContextualKeywordNames01.js index 4b1564b5ab289..fb6946ce928a1 100644 --- a/tests/baselines/reference/exportsAndImportsWithContextualKeywordNames01.js +++ b/tests/baselines/reference/exportsAndImportsWithContextualKeywordNames01.js @@ -20,6 +20,7 @@ import { set as yield } from "./t1"; import { get } from "./t1"; //// [t1.js] +"use strict"; var set = { set foo(x) { } @@ -28,5 +29,8 @@ exports.set = set; var get = 10; exports.get = get; //// [t2.js] +"use strict"; //// [t3.js] +"use strict"; //// [t4.js] +"use strict"; diff --git a/tests/baselines/reference/exportsAndImportsWithContextualKeywordNames02.js b/tests/baselines/reference/exportsAndImportsWithContextualKeywordNames02.js index e9a0b45446ff3..219916b304750 100644 --- a/tests/baselines/reference/exportsAndImportsWithContextualKeywordNames02.js +++ b/tests/baselines/reference/exportsAndImportsWithContextualKeywordNames02.js @@ -18,12 +18,16 @@ import { as as as } from "./t1"; import { as } from "./t1"; //// [t1.js] +"use strict"; var as = 100; exports.return = as; exports.as = as; //// [t2.js] +"use strict"; var as = require("./t1"); var x = as.as; var y = as.return; //// [t3.js] +"use strict"; //// [t4.js] +"use strict"; diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index cbd36f7e7998a..0c137f54486e5 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -12,6 +12,7 @@ class y extends x {} //// [foo1.js] +"use strict"; var x = (function () { function x() { } @@ -19,6 +20,7 @@ var x = (function () { })(); module.exports = x; //// [foo2.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index 3c05ccc6866e6..004c89be3fbb5 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -33,6 +33,7 @@ var moduleName: string; var visModel = new moduleMap[moduleName].VisualizationModel(); //// [extendingClassFromAliasAndUsageInIndexer_backbone.js] +"use strict"; var Model = (function () { function Model() { } @@ -40,6 +41,7 @@ var Model = (function () { })(); exports.Model = Model; //// [extendingClassFromAliasAndUsageInIndexer_moduleA.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } @@ -55,6 +57,7 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_moduleB.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } @@ -70,6 +73,7 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_main.js] +"use strict"; var moduleA = require("./extendingClassFromAliasAndUsageInIndexer_moduleA"); var moduleB = require("./extendingClassFromAliasAndUsageInIndexer_moduleB"); var moduleATyped = moduleA; diff --git a/tests/baselines/reference/externalModuleAssignToVar.js b/tests/baselines/reference/externalModuleAssignToVar.js index e41719ef88a8b..dc74c9446e251 100644 --- a/tests/baselines/reference/externalModuleAssignToVar.js +++ b/tests/baselines/reference/externalModuleAssignToVar.js @@ -28,6 +28,7 @@ y3 = ext3; // ok //// [externalModuleAssignToVar_core_require.js] define(["require", "exports"], function (require, exports) { + "use strict"; var C = (function () { function C() { } @@ -37,6 +38,7 @@ define(["require", "exports"], function (require, exports) { }); //// [externalModuleAssignToVar_core_require2.js] define(["require", "exports"], function (require, exports) { + "use strict"; var C = (function () { function C() { } @@ -46,6 +48,7 @@ define(["require", "exports"], function (require, exports) { }); //// [externalModuleAssignToVar_ext.js] define(["require", "exports"], function (require, exports) { + "use strict"; var D = (function () { function D() { } @@ -55,6 +58,7 @@ define(["require", "exports"], function (require, exports) { }); //// [externalModuleAssignToVar_core.js] define(["require", "exports", 'externalModuleAssignToVar_core_require', 'externalModuleAssignToVar_core_require2', 'externalModuleAssignToVar_ext'], function (require, exports, ext, ext2, ext3) { + "use strict"; var y1 = ext; y1 = ext; // ok var y2 = ext2; diff --git a/tests/baselines/reference/externalModuleExportingGenericClass.js b/tests/baselines/reference/externalModuleExportingGenericClass.js index 5dc1e9bea1dd0..78608c08c5692 100644 --- a/tests/baselines/reference/externalModuleExportingGenericClass.js +++ b/tests/baselines/reference/externalModuleExportingGenericClass.js @@ -16,6 +16,7 @@ var v3: number = (new a()).foo; //// [externalModuleExportingGenericClass_file0.js] +"use strict"; var C = (function () { function C() { } @@ -23,6 +24,7 @@ var C = (function () { })(); module.exports = C; //// [externalModuleExportingGenericClass_file1.js] +"use strict"; var a = require('./externalModuleExportingGenericClass_file0'); var v; // this should report error var v2 = (new a()).foo; diff --git a/tests/baselines/reference/externalModuleImmutableBindings.js b/tests/baselines/reference/externalModuleImmutableBindings.js index 47d83ded80c98..4193a71cc9051 100644 --- a/tests/baselines/reference/externalModuleImmutableBindings.js +++ b/tests/baselines/reference/externalModuleImmutableBindings.js @@ -52,8 +52,10 @@ for ((stuff[n]) of []) {} //// [f1.js] +"use strict"; exports.x = 1; //// [f2.js] +"use strict"; // all mutations below are illegal and should be fixed var stuff = require('./f1'); var n = 'baz'; diff --git a/tests/baselines/reference/externalModuleQualification.js b/tests/baselines/reference/externalModuleQualification.js index f8ddbfae1405f..3f9978c7b0ae6 100644 --- a/tests/baselines/reference/externalModuleQualification.js +++ b/tests/baselines/reference/externalModuleQualification.js @@ -12,6 +12,7 @@ class NavigateAction { //// [externalModuleQualification.js] +"use strict"; exports.ID = "test"; var DiffEditor = (function () { function DiffEditor(id) { diff --git a/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js b/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js index f9c83c83cf081..cdcc0842b085e 100644 --- a/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js +++ b/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js @@ -10,12 +10,14 @@ file1.foo(); //// [externalModuleReferenceOfImportDeclarationWithExportModifier_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; function foo() { } exports.foo = foo; ; }); //// [externalModuleReferenceOfImportDeclarationWithExportModifier_1.js] define(["require", "exports", 'externalModuleReferenceOfImportDeclarationWithExportModifier_0'], function (require, exports, file1) { + "use strict"; exports.file1 = file1; exports.file1.foo(); }); diff --git a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js index 48411da4a0269..1b5d41d8be4e9 100644 --- a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js +++ b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js @@ -19,10 +19,12 @@ file1.bar(); //// [externalModuleRefernceResolutionOrderInImportDeclaration_file2.js] //// [externalModuleRefernceResolutionOrderInImportDeclaration_file1.js] +"use strict"; function foo() { } exports.foo = foo; ; //// [externalModuleRefernceResolutionOrderInImportDeclaration_file3.js] +"use strict"; /// var file1 = require('./externalModuleRefernceResolutionOrderInImportDeclaration_file1'); file1.foo(); diff --git a/tests/baselines/reference/externalModuleResolution.js b/tests/baselines/reference/externalModuleResolution.js index 04dc4289bb687..20dc7fa8ddae1 100644 --- a/tests/baselines/reference/externalModuleResolution.js +++ b/tests/baselines/reference/externalModuleResolution.js @@ -17,11 +17,13 @@ import x = require('./foo'); x.Y // .ts should be picked //// [foo.js] +"use strict"; var M2; (function (M2) { M2.Y = 1; })(M2 || (M2 = {})); module.exports = M2; //// [consumer.js] +"use strict"; var x = require('./foo'); x.Y; // .ts should be picked diff --git a/tests/baselines/reference/externalModuleResolution2.js b/tests/baselines/reference/externalModuleResolution2.js index 9d35f8e61e145..13560105544e0 100644 --- a/tests/baselines/reference/externalModuleResolution2.js +++ b/tests/baselines/reference/externalModuleResolution2.js @@ -18,11 +18,13 @@ import x = require('./foo'); x.X // .ts should be picked //// [foo.js] +"use strict"; var M2; (function (M2) { M2.X = 1; })(M2 || (M2 = {})); module.exports = M2; //// [consumer.js] +"use strict"; var x = require('./foo'); x.X; // .ts should be picked diff --git a/tests/baselines/reference/externalModuleWithoutCompilerFlag1.js b/tests/baselines/reference/externalModuleWithoutCompilerFlag1.js index b5c939453e666..0b1f17612b01d 100644 --- a/tests/baselines/reference/externalModuleWithoutCompilerFlag1.js +++ b/tests/baselines/reference/externalModuleWithoutCompilerFlag1.js @@ -5,3 +5,4 @@ } //// [externalModuleWithoutCompilerFlag1.js] +"use strict"; diff --git a/tests/baselines/reference/fieldAndGetterWithSameName.js b/tests/baselines/reference/fieldAndGetterWithSameName.js index ddd95b9e8f244..a43e9cf0a1b13 100644 --- a/tests/baselines/reference/fieldAndGetterWithSameName.js +++ b/tests/baselines/reference/fieldAndGetterWithSameName.js @@ -6,6 +6,7 @@ export class C { //// [fieldAndGetterWithSameName.js] define(["require", "exports"], function (require, exports) { + "use strict"; var C = (function () { function C() { } diff --git a/tests/baselines/reference/fileReferencesWithNoExtensions.js b/tests/baselines/reference/fileReferencesWithNoExtensions.js new file mode 100644 index 0000000000000..48421954c3a49 --- /dev/null +++ b/tests/baselines/reference/fileReferencesWithNoExtensions.js @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/fileReferencesWithNoExtensions.ts] //// + +//// [t.ts] +/// +/// +/// +var a = aa; // Check that a.ts is referenced +var b = bb; // Check that b.d.ts is referenced +var c = cc; // Check that c.ts has precedence over c.d.ts + +//// [a.ts] +var aa = 1; + +//// [b.d.ts] +declare var bb: number; + +//// [c.ts] +var cc = 1; + +//// [c.d.ts] +declare var xx: number; + + +//// [a.js] +var aa = 1; +//// [c.js] +var cc = 1; +//// [t.js] +/// +/// +/// +var a = aa; // Check that a.ts is referenced +var b = bb; // Check that b.d.ts is referenced +var c = cc; // Check that c.ts has precedence over c.d.ts diff --git a/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt b/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt new file mode 100644 index 0000000000000..013a1445b0d3e --- /dev/null +++ b/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt @@ -0,0 +1,12 @@ +error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. + + +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/a.tsx (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.js b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.js new file mode 100644 index 0000000000000..164fd091c16c2 --- /dev/null +++ b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts] //// + +//// [a.ts] +export class c { +} + +//// [b.ts] +function foo() { +} + + +//// [a.js] +define("tests/cases/compiler/a", ["require", "exports"], function (require, exports) { + "use strict"; + var c = (function () { + function c() { + } + return c; + })(); + exports.c = c; +}); +function foo() { +} diff --git a/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.symbols b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.symbols new file mode 100644 index 0000000000000..5c60c022e033c --- /dev/null +++ b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.symbols @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.ts === +export class c { +>c : Symbol(c, Decl(a.ts, 0, 0)) +} + +=== tests/cases/compiler/b.ts === +function foo() { +>foo : Symbol(foo, Decl(b.ts, 0, 0)) +} + diff --git a/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.types b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.types new file mode 100644 index 0000000000000..3cc407bfd0b82 --- /dev/null +++ b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.ts === +export class c { +>c : c +} + +=== tests/cases/compiler/b.ts === +function foo() { +>foo : () => void +} + diff --git a/tests/baselines/reference/functionVariableInReturnTypeAnnotation.errors.txt b/tests/baselines/reference/functionVariableInReturnTypeAnnotation.errors.txt new file mode 100644 index 0000000000000..93a35292b7062 --- /dev/null +++ b/tests/baselines/reference/functionVariableInReturnTypeAnnotation.errors.txt @@ -0,0 +1,10 @@ +tests/cases/compiler/functionVariableInReturnTypeAnnotation.ts(1,24): error TS2304: Cannot find name 'b'. + + +==== tests/cases/compiler/functionVariableInReturnTypeAnnotation.ts (1 errors) ==== + function bar(): typeof b { + ~ +!!! error TS2304: Cannot find name 'b'. + var b = 1; + return undefined; + } \ No newline at end of file diff --git a/tests/baselines/reference/functionVariableInReturnTypeAnnotation.js b/tests/baselines/reference/functionVariableInReturnTypeAnnotation.js new file mode 100644 index 0000000000000..191255e52c22c --- /dev/null +++ b/tests/baselines/reference/functionVariableInReturnTypeAnnotation.js @@ -0,0 +1,11 @@ +//// [functionVariableInReturnTypeAnnotation.ts] +function bar(): typeof b { + var b = 1; + return undefined; +} + +//// [functionVariableInReturnTypeAnnotation.js] +function bar() { + var b = 1; + return undefined; +} diff --git a/tests/baselines/reference/genericArrayExtenstions.js b/tests/baselines/reference/genericArrayExtenstions.js index 774e512d48fe3..63c67a1376074 100644 --- a/tests/baselines/reference/genericArrayExtenstions.js +++ b/tests/baselines/reference/genericArrayExtenstions.js @@ -6,3 +6,4 @@ concat(...items: T[]): T[]; //// [genericArrayExtenstions.js] +"use strict"; diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js new file mode 100644 index 0000000000000..bb45587eea144 --- /dev/null +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -0,0 +1,104 @@ +//// [genericClassExpressionInFunction.ts] +class A { + genericVar: T +} +function B1() { + // class expression can use T + return class extends A { } +} +class B2 { + anon = class extends A { } +} +function B3() { + return class Inner extends A { } +} +// extends can call B +class K extends B1() { + namae: string; +} +class C extends (new B2().anon) { + name: string; +} +let b3Number = B3(); +class S extends b3Number { + nom: string; +} +var c = new C(); +var k = new K(); +var s = new S(); +c.genericVar = 12; +k.genericVar = 12; +s.genericVar = 12; + + +//// [genericClassExpressionInFunction.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var A = (function () { + function A() { + } + return A; +})(); +function B1() { + // class expression can use T + return (function (_super) { + __extends(class_1, _super); + function class_1() { + _super.apply(this, arguments); + } + return class_1; + })(A); +} +var B2 = (function () { + function B2() { + this.anon = (function (_super) { + __extends(class_2, _super); + function class_2() { + _super.apply(this, arguments); + } + return class_2; + })(A); + } + return B2; +})(); +function B3() { + return (function (_super) { + __extends(Inner, _super); + function Inner() { + _super.apply(this, arguments); + } + return Inner; + })(A); +} +// extends can call B +var K = (function (_super) { + __extends(K, _super); + function K() { + _super.apply(this, arguments); + } + return K; +})(B1()); +var C = (function (_super) { + __extends(C, _super); + function C() { + _super.apply(this, arguments); + } + return C; +})((new B2().anon)); +var b3Number = B3(); +var S = (function (_super) { + __extends(S, _super); + function S() { + _super.apply(this, arguments); + } + return S; +})(b3Number); +var c = new C(); +var k = new K(); +var s = new S(); +c.genericVar = 12; +k.genericVar = 12; +s.genericVar = 12; diff --git a/tests/baselines/reference/genericClassExpressionInFunction.symbols b/tests/baselines/reference/genericClassExpressionInFunction.symbols new file mode 100644 index 0000000000000..b5a6b8c6c7043 --- /dev/null +++ b/tests/baselines/reference/genericClassExpressionInFunction.symbols @@ -0,0 +1,92 @@ +=== tests/cases/conformance/classes/classExpressions/genericClassExpressionInFunction.ts === +class A { +>A : Symbol(A, Decl(genericClassExpressionInFunction.ts, 0, 0)) +>T : Symbol(T, Decl(genericClassExpressionInFunction.ts, 0, 8)) + + genericVar: T +>genericVar : Symbol(genericVar, Decl(genericClassExpressionInFunction.ts, 0, 12)) +>T : Symbol(T, Decl(genericClassExpressionInFunction.ts, 0, 8)) +} +function B1() { +>B1 : Symbol(B1, Decl(genericClassExpressionInFunction.ts, 2, 1)) +>U : Symbol(U, Decl(genericClassExpressionInFunction.ts, 3, 12)) + + // class expression can use T + return class extends A { } +>A : Symbol(A, Decl(genericClassExpressionInFunction.ts, 0, 0)) +>U : Symbol(U, Decl(genericClassExpressionInFunction.ts, 3, 12)) +} +class B2 { +>B2 : Symbol(B2, Decl(genericClassExpressionInFunction.ts, 6, 1)) +>V : Symbol(V, Decl(genericClassExpressionInFunction.ts, 7, 9)) + + anon = class extends A { } +>anon : Symbol(anon, Decl(genericClassExpressionInFunction.ts, 7, 13)) +>A : Symbol(A, Decl(genericClassExpressionInFunction.ts, 0, 0)) +>V : Symbol(V, Decl(genericClassExpressionInFunction.ts, 7, 9)) +} +function B3() { +>B3 : Symbol(B3, Decl(genericClassExpressionInFunction.ts, 9, 1)) +>W : Symbol(W, Decl(genericClassExpressionInFunction.ts, 10, 12)) + + return class Inner extends A { } +>Inner : Symbol(Inner, Decl(genericClassExpressionInFunction.ts, 11, 10)) +>TInner : Symbol(TInner, Decl(genericClassExpressionInFunction.ts, 11, 23)) +>A : Symbol(A, Decl(genericClassExpressionInFunction.ts, 0, 0)) +>W : Symbol(W, Decl(genericClassExpressionInFunction.ts, 10, 12)) +} +// extends can call B +class K extends B1() { +>K : Symbol(K, Decl(genericClassExpressionInFunction.ts, 12, 1)) +>B1 : Symbol(B1, Decl(genericClassExpressionInFunction.ts, 2, 1)) + + namae: string; +>namae : Symbol(namae, Decl(genericClassExpressionInFunction.ts, 14, 30)) +} +class C extends (new B2().anon) { +>C : Symbol(C, Decl(genericClassExpressionInFunction.ts, 16, 1)) +>new B2().anon : Symbol(B2.anon, Decl(genericClassExpressionInFunction.ts, 7, 13)) +>B2 : Symbol(B2, Decl(genericClassExpressionInFunction.ts, 6, 1)) +>anon : Symbol(B2.anon, Decl(genericClassExpressionInFunction.ts, 7, 13)) + + name: string; +>name : Symbol(name, Decl(genericClassExpressionInFunction.ts, 17, 41)) +} +let b3Number = B3(); +>b3Number : Symbol(b3Number, Decl(genericClassExpressionInFunction.ts, 20, 3)) +>B3 : Symbol(B3, Decl(genericClassExpressionInFunction.ts, 9, 1)) + +class S extends b3Number { +>S : Symbol(S, Decl(genericClassExpressionInFunction.ts, 20, 28)) +>b3Number : Symbol(b3Number, Decl(genericClassExpressionInFunction.ts, 20, 3)) + + nom: string; +>nom : Symbol(nom, Decl(genericClassExpressionInFunction.ts, 21, 34)) +} +var c = new C(); +>c : Symbol(c, Decl(genericClassExpressionInFunction.ts, 24, 3)) +>C : Symbol(C, Decl(genericClassExpressionInFunction.ts, 16, 1)) + +var k = new K(); +>k : Symbol(k, Decl(genericClassExpressionInFunction.ts, 25, 3)) +>K : Symbol(K, Decl(genericClassExpressionInFunction.ts, 12, 1)) + +var s = new S(); +>s : Symbol(s, Decl(genericClassExpressionInFunction.ts, 26, 3)) +>S : Symbol(S, Decl(genericClassExpressionInFunction.ts, 20, 28)) + +c.genericVar = 12; +>c.genericVar : Symbol(A.genericVar, Decl(genericClassExpressionInFunction.ts, 0, 12)) +>c : Symbol(c, Decl(genericClassExpressionInFunction.ts, 24, 3)) +>genericVar : Symbol(A.genericVar, Decl(genericClassExpressionInFunction.ts, 0, 12)) + +k.genericVar = 12; +>k.genericVar : Symbol(A.genericVar, Decl(genericClassExpressionInFunction.ts, 0, 12)) +>k : Symbol(k, Decl(genericClassExpressionInFunction.ts, 25, 3)) +>genericVar : Symbol(A.genericVar, Decl(genericClassExpressionInFunction.ts, 0, 12)) + +s.genericVar = 12; +>s.genericVar : Symbol(A.genericVar, Decl(genericClassExpressionInFunction.ts, 0, 12)) +>s : Symbol(s, Decl(genericClassExpressionInFunction.ts, 26, 3)) +>genericVar : Symbol(A.genericVar, Decl(genericClassExpressionInFunction.ts, 0, 12)) + diff --git a/tests/baselines/reference/genericClassExpressionInFunction.types b/tests/baselines/reference/genericClassExpressionInFunction.types new file mode 100644 index 0000000000000..943391fdd59b8 --- /dev/null +++ b/tests/baselines/reference/genericClassExpressionInFunction.types @@ -0,0 +1,108 @@ +=== tests/cases/conformance/classes/classExpressions/genericClassExpressionInFunction.ts === +class A { +>A : A +>T : T + + genericVar: T +>genericVar : T +>T : T +} +function B1() { +>B1 : () => typeof (Anonymous class) +>U : U + + // class expression can use T + return class extends A { } +>class extends A { } : typeof (Anonymous class) +>A : A +>U : U +} +class B2 { +>B2 : B2 +>V : V + + anon = class extends A { } +>anon : typeof (Anonymous class) +>class extends A { } : typeof (Anonymous class) +>A : A +>V : V +} +function B3() { +>B3 : () => typeof Inner +>W : W + + return class Inner extends A { } +>class Inner extends A { } : typeof Inner +>Inner : typeof Inner +>TInner : TInner +>A : A +>W : W +} +// extends can call B +class K extends B1() { +>K : K +>B1() : B1.(Anonymous class) +>B1 : () => typeof (Anonymous class) + + namae: string; +>namae : string +} +class C extends (new B2().anon) { +>C : C +>(new B2().anon) : B2.(Anonymous class) +>new B2().anon : typeof (Anonymous class) +>new B2() : B2 +>B2 : typeof B2 +>anon : typeof (Anonymous class) + + name: string; +>name : string +} +let b3Number = B3(); +>b3Number : typeof Inner +>B3() : typeof Inner +>B3 : () => typeof Inner + +class S extends b3Number { +>S : S +>b3Number : B3.Inner + + nom: string; +>nom : string +} +var c = new C(); +>c : C +>new C() : C +>C : typeof C + +var k = new K(); +>k : K +>new K() : K +>K : typeof K + +var s = new S(); +>s : S +>new S() : S +>S : typeof S + +c.genericVar = 12; +>c.genericVar = 12 : number +>c.genericVar : number +>c : C +>genericVar : number +>12 : number + +k.genericVar = 12; +>k.genericVar = 12 : number +>k.genericVar : number +>k : K +>genericVar : number +>12 : number + +s.genericVar = 12; +>s.genericVar = 12 : number +>s.genericVar : number +>s : S +>genericVar : number +>12 : number + diff --git a/tests/baselines/reference/genericClassesInModule2.js b/tests/baselines/reference/genericClassesInModule2.js index bd4c5a5e33adf..1ec61d098646e 100644 --- a/tests/baselines/reference/genericClassesInModule2.js +++ b/tests/baselines/reference/genericClassesInModule2.js @@ -22,6 +22,7 @@ export class B { //// [genericClassesInModule2.js] define(["require", "exports"], function (require, exports) { + "use strict"; var A = (function () { function A(callback) { this.callback = callback; diff --git a/tests/baselines/reference/genericInterfaceFunctionTypeParameter.js b/tests/baselines/reference/genericInterfaceFunctionTypeParameter.js index 30c7aa72e576b..4f3895a33b865 100644 --- a/tests/baselines/reference/genericInterfaceFunctionTypeParameter.js +++ b/tests/baselines/reference/genericInterfaceFunctionTypeParameter.js @@ -9,6 +9,7 @@ export function foo(fn: (ifoo: IFoo) => void) { //// [genericInterfaceFunctionTypeParameter.js] define(["require", "exports"], function (require, exports) { + "use strict"; function foo(fn) { foo(fn); // Invocation is necessary to repro (!) } diff --git a/tests/baselines/reference/genericMemberFunction.js b/tests/baselines/reference/genericMemberFunction.js index 06c33c1585220..b442b2f8757ba 100644 --- a/tests/baselines/reference/genericMemberFunction.js +++ b/tests/baselines/reference/genericMemberFunction.js @@ -24,6 +24,7 @@ export class BuildResult{ //// [genericMemberFunction.js] define(["require", "exports"], function (require, exports) { + "use strict"; var BuildError = (function () { function BuildError() { } diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.js index d6c0e686ce054..f9bcc86194c76 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.js @@ -15,4 +15,5 @@ export declare module TypeScript { //// [genericRecursiveImplicitConstructorErrors1.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/genericReturnTypeFromGetter1.js b/tests/baselines/reference/genericReturnTypeFromGetter1.js index 741c721834574..76b60435f5571 100644 --- a/tests/baselines/reference/genericReturnTypeFromGetter1.js +++ b/tests/baselines/reference/genericReturnTypeFromGetter1.js @@ -10,6 +10,7 @@ export class DbSet { //// [genericReturnTypeFromGetter1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var DbSet = (function () { function DbSet() { } diff --git a/tests/baselines/reference/genericTypeWithMultipleBases1.js b/tests/baselines/reference/genericTypeWithMultipleBases1.js index 8f136e58efdac..2ee085ef07ee8 100644 --- a/tests/baselines/reference/genericTypeWithMultipleBases1.js +++ b/tests/baselines/reference/genericTypeWithMultipleBases1.js @@ -20,6 +20,7 @@ x.m2(); //// [genericTypeWithMultipleBases1.js] +"use strict"; var x; x.p1; x.m1(); diff --git a/tests/baselines/reference/genericTypeWithMultipleBases2.js b/tests/baselines/reference/genericTypeWithMultipleBases2.js index 8101b7a479156..4a31e354de612 100644 --- a/tests/baselines/reference/genericTypeWithMultipleBases2.js +++ b/tests/baselines/reference/genericTypeWithMultipleBases2.js @@ -20,6 +20,7 @@ x.m2(); //// [genericTypeWithMultipleBases2.js] define(["require", "exports"], function (require, exports) { + "use strict"; var x; x.p1; x.m1(); diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index 2457d4a534e11..1a536132d15c9 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -21,6 +21,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; define(["require", "exports"], function (require, exports) { + "use strict"; var Collection = (function () { function Collection() { } diff --git a/tests/baselines/reference/getEmitOutputMapRoots.baseline b/tests/baselines/reference/getEmitOutputMapRoots.baseline index 66130347d2d09..2c814ddb9b479 100644 --- a/tests/baselines/reference/getEmitOutputMapRoots.baseline +++ b/tests/baselines/reference/getEmitOutputMapRoots.baseline @@ -1,6 +1,6 @@ EmitSkipped: false FileName : declSingleFile.js.map -{"version":3,"file":"declSingleFile.js","sourceRoot":"","sources":["../inputFile.ts"],"names":["M","M.constructor"],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB;IAAAA;IAGAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : declSingleFile.js +{"version":3,"file":"declSingleFile.js","sourceRoot":"","sources":["../inputFile.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB;IAAA;IAGA,CAAC;IAAD,QAAC;AAAD,CAAC,AAHD,IAGC"}FileName : declSingleFile.js var x = 109; var foo = "hello world"; var M = (function () { diff --git a/tests/baselines/reference/getEmitOutputSingleFile2.baseline b/tests/baselines/reference/getEmitOutputSingleFile2.baseline index c9409c5ca8cbf..21e28eb7feb4a 100644 --- a/tests/baselines/reference/getEmitOutputSingleFile2.baseline +++ b/tests/baselines/reference/getEmitOutputSingleFile2.baseline @@ -1,8 +1,30 @@ EmitSkipped: false -FileName : tests/cases/fourslash/inputFile3.js -exports.foo = 10; -exports.bar = "hello world"; -FileName : tests/cases/fourslash/inputFile3.d.ts -export declare var foo: number; -export declare var bar: string; +FileName : declSingleFile.js +var x = 5; +var Bar = (function () { + function Bar() { + } + return Bar; +})(); +var x1 = "hello world"; +var Foo = (function () { + function Foo() { + } + return Foo; +})(); +FileName : declSingleFile.d.ts +declare var x: number; +declare class Bar { + x: string; + y: number; +} +declare var x1: string; +declare class Foo { + x: string; + y: number; +} +declare module "inputFile3" { + export var foo: number; + export var bar: string; +} diff --git a/tests/baselines/reference/getEmitOutputSourceMap.baseline b/tests/baselines/reference/getEmitOutputSourceMap.baseline index 1f7056989e986..5859da0bb3eeb 100644 --- a/tests/baselines/reference/getEmitOutputSourceMap.baseline +++ b/tests/baselines/reference/getEmitOutputSourceMap.baseline @@ -1,6 +1,6 @@ EmitSkipped: false FileName : tests/cases/fourslash/inputFile.js.map -{"version":3,"file":"inputFile.js","sourceRoot":"","sources":["inputFile.ts"],"names":["M","M.constructor"],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB;IAAAA;IAGAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile.js +{"version":3,"file":"inputFile.js","sourceRoot":"","sources":["inputFile.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB;IAAA;IAGA,CAAC;IAAD,QAAC;AAAD,CAAC,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile.js var x = 109; var foo = "hello world"; var M = (function () { diff --git a/tests/baselines/reference/getEmitOutputSourceMap2.baseline b/tests/baselines/reference/getEmitOutputSourceMap2.baseline index df59ca001622f..c07c134519f6b 100644 --- a/tests/baselines/reference/getEmitOutputSourceMap2.baseline +++ b/tests/baselines/reference/getEmitOutputSourceMap2.baseline @@ -1,6 +1,6 @@ EmitSkipped: false FileName : sample/outDir/inputFile1.js.map -{"version":3,"file":"inputFile1.js","sourceRoot":"","sources":["../../tests/cases/fourslash/inputFile1.ts"],"names":["M","M.constructor"],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB;IAAAA;IAGAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : sample/outDir/inputFile1.js +{"version":3,"file":"inputFile1.js","sourceRoot":"","sources":["../../tests/cases/fourslash/inputFile1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB;IAAA;IAGA,CAAC;IAAD,QAAC;AAAD,CAAC,AAHD,IAGC"}FileName : sample/outDir/inputFile1.js var x = 109; var foo = "hello world"; var M = (function () { diff --git a/tests/baselines/reference/getEmitOutputSourceRoot.baseline b/tests/baselines/reference/getEmitOutputSourceRoot.baseline index 7b56ee5a4d82f..2c5e963b8b519 100644 --- a/tests/baselines/reference/getEmitOutputSourceRoot.baseline +++ b/tests/baselines/reference/getEmitOutputSourceRoot.baseline @@ -1,6 +1,6 @@ EmitSkipped: false FileName : tests/cases/fourslash/inputFile.js.map -{"version":3,"file":"inputFile.js","sourceRoot":"sourceRootDir/","sources":["inputFile.ts"],"names":["M","M.constructor"],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB;IAAAA;IAGAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile.js +{"version":3,"file":"inputFile.js","sourceRoot":"sourceRootDir/","sources":["inputFile.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB;IAAA;IAGA,CAAC;IAAD,QAAC;AAAD,CAAC,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile.js var x = 109; var foo = "hello world"; var M = (function () { diff --git a/tests/baselines/reference/getEmitOutputSourceRootMultiFiles.baseline b/tests/baselines/reference/getEmitOutputSourceRootMultiFiles.baseline index 9df4711b3e165..fa4f33168226d 100644 --- a/tests/baselines/reference/getEmitOutputSourceRootMultiFiles.baseline +++ b/tests/baselines/reference/getEmitOutputSourceRootMultiFiles.baseline @@ -1,6 +1,6 @@ EmitSkipped: false FileName : tests/cases/fourslash/inputFile1.js.map -{"version":3,"file":"inputFile1.js","sourceRoot":"sourceRootDir/","sources":["inputFile1.ts"],"names":["M","M.constructor"],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB;IAAAA;IAGAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile1.js +{"version":3,"file":"inputFile1.js","sourceRoot":"sourceRootDir/","sources":["inputFile1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB;IAAA;IAGA,CAAC;IAAD,QAAC;AAAD,CAAC,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile1.js var x = 109; var foo = "hello world"; var M = (function () { @@ -11,7 +11,7 @@ var M = (function () { //# sourceMappingURL=inputFile1.js.map EmitSkipped: false FileName : tests/cases/fourslash/inputFile2.js.map -{"version":3,"file":"inputFile2.js","sourceRoot":"sourceRootDir/","sources":["inputFile2.ts"],"names":["C","C.constructor"],"mappings":"AAAA,IAAI,GAAG,GAAG,wBAAwB,CAAC;AACnC;IAAAA;IAGAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile2.js +{"version":3,"file":"inputFile2.js","sourceRoot":"sourceRootDir/","sources":["inputFile2.ts"],"names":[],"mappings":"AAAA,IAAI,GAAG,GAAG,wBAAwB,CAAC;AACnC;IAAA;IAGA,CAAC;IAAD,QAAC;AAAD,CAAC,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile2.js var bar = "hello world Typescript"; var C = (function () { function C() { diff --git a/tests/baselines/reference/getEmitOutputTsxFile_Preserve.baseline b/tests/baselines/reference/getEmitOutputTsxFile_Preserve.baseline index 2ae820dd53886..72167679f58f3 100644 --- a/tests/baselines/reference/getEmitOutputTsxFile_Preserve.baseline +++ b/tests/baselines/reference/getEmitOutputTsxFile_Preserve.baseline @@ -1,6 +1,6 @@ EmitSkipped: false FileName : tests/cases/fourslash/inputFile1.js.map -{"version":3,"file":"inputFile1.js","sourceRoot":"","sources":["inputFile1.ts"],"names":["Bar","Bar.constructor"],"mappings":"AAAA,kBAAkB;AACjB,IAAI,CAAC,GAAW,CAAC,CAAC;AAClB;IAAAA;IAGAC,CAACA;IAADD,UAACA;AAADA,CAACA,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile1.js +{"version":3,"file":"inputFile1.js","sourceRoot":"","sources":["inputFile1.ts"],"names":[],"mappings":"AAAA,kBAAkB;AACjB,IAAI,CAAC,GAAW,CAAC,CAAC;AAClB;IAAA;IAGA,CAAC;IAAD,UAAC;AAAD,CAAC,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile1.js // regular ts file var t = 5; var Bar = (function () { diff --git a/tests/baselines/reference/getEmitOutputTsxFile_React.baseline b/tests/baselines/reference/getEmitOutputTsxFile_React.baseline index c796f8e78bc85..2606ea7adbb90 100644 --- a/tests/baselines/reference/getEmitOutputTsxFile_React.baseline +++ b/tests/baselines/reference/getEmitOutputTsxFile_React.baseline @@ -1,6 +1,6 @@ EmitSkipped: false FileName : tests/cases/fourslash/inputFile1.js.map -{"version":3,"file":"inputFile1.js","sourceRoot":"","sources":["inputFile1.ts"],"names":["Bar","Bar.constructor"],"mappings":"AAAA,kBAAkB;AACjB,IAAI,CAAC,GAAW,CAAC,CAAC;AAClB;IAAAA;IAGAC,CAACA;IAADD,UAACA;AAADA,CAACA,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile1.js +{"version":3,"file":"inputFile1.js","sourceRoot":"","sources":["inputFile1.ts"],"names":[],"mappings":"AAAA,kBAAkB;AACjB,IAAI,CAAC,GAAW,CAAC,CAAC;AAClB;IAAA;IAGA,CAAC;IAAD,UAAC;AAAD,CAAC,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile1.js // regular ts file var t = 5; var Bar = (function () { @@ -17,10 +17,11 @@ declare class Bar { EmitSkipped: false FileName : tests/cases/fourslash/inputFile2.js.map -{"version":3,"file":"inputFile2.js","sourceRoot":"","sources":["inputFile2.tsx"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,QAAQ,CAAC;AACjB,IAAI,CAAC,GAAG,qBAAC,GAAG,KAAC,IAAI,GAAG,CAAE,EAAG,CAAA"}FileName : tests/cases/fourslash/inputFile2.js +{"version":3,"file":"inputFile2.js","sourceRoot":"","sources":["inputFile2.tsx"],"names":[],"mappings":"AACA,IAAI,CAAC,GAAG,QAAQ,CAAC;AACjB,IAAI,CAAC,GAAG,qBAAC,GAAG,IAAC,IAAI,EAAG,CAAE,EAAG,CAAA"}FileName : tests/cases/fourslash/inputFile2.js var y = "my div"; -var x = React.createElement("div", {"name": y}); +var x = React.createElement("div", {name: y}); //# sourceMappingURL=inputFile2.js.mapFileName : tests/cases/fourslash/inputFile2.d.ts +declare var React: any; declare var y: string; declare var x: any; diff --git a/tests/baselines/reference/getEmitOutputWithDeclarationFile2.baseline b/tests/baselines/reference/getEmitOutputWithDeclarationFile2.baseline index 4582af47f5a1c..3f2e0064fc7f4 100644 --- a/tests/baselines/reference/getEmitOutputWithDeclarationFile2.baseline +++ b/tests/baselines/reference/getEmitOutputWithDeclarationFile2.baseline @@ -2,6 +2,7 @@ EmitSkipped: false EmitSkipped: false FileName : tests/cases/fourslash/inputFile2.js +"use strict"; var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/getEmitOutputWithEmitterErrors.baseline b/tests/baselines/reference/getEmitOutputWithEmitterErrors.baseline index f854a619a4717..2f27152892b67 100644 --- a/tests/baselines/reference/getEmitOutputWithEmitterErrors.baseline +++ b/tests/baselines/reference/getEmitOutputWithEmitterErrors.baseline @@ -1,4 +1,6 @@ -EmitSkipped: false +EmitSkipped: true +Diagnostics: + Exported variable 'foo' has or is using private name 'C'. FileName : tests/cases/fourslash/inputFile.js var M; (function (M) { diff --git a/tests/baselines/reference/getEmitOutputWithEmitterErrors2.baseline b/tests/baselines/reference/getEmitOutputWithEmitterErrors2.baseline index 463dfe6899a4c..915eb121f5f67 100644 --- a/tests/baselines/reference/getEmitOutputWithEmitterErrors2.baseline +++ b/tests/baselines/reference/getEmitOutputWithEmitterErrors2.baseline @@ -1,6 +1,9 @@ -EmitSkipped: false +EmitSkipped: true +Diagnostics: + Exported variable 'foo' has or is using private name 'C'. FileName : tests/cases/fourslash/inputFile.js define(["require", "exports"], function (require, exports) { + "use strict"; var C = (function () { function C() { } diff --git a/tests/baselines/reference/giant.js b/tests/baselines/reference/giant.js index 46bdaf827d5c5..75387f6f2c23a 100644 --- a/tests/baselines/reference/giant.js +++ b/tests/baselines/reference/giant.js @@ -683,6 +683,7 @@ export declare module eaM { //// [giant.js] define(["require", "exports"], function (require, exports) { + "use strict"; /* Prefixes p -> public diff --git a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js index 3329fb810a738..81b0d2fdac9af 100644 --- a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js +++ b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js @@ -15,12 +15,14 @@ module m_private { //// [importAliasAnExternalModuleInsideAnInternalModule_file0.js] +"use strict"; var m; (function (m) { function foo() { } m.foo = foo; })(m = exports.m || (exports.m = {})); //// [importAliasAnExternalModuleInsideAnInternalModule_file1.js] +"use strict"; var r = require('importAliasAnExternalModuleInsideAnInternalModule_file0'); var m_private; (function (m_private) { diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index 57d71af2cda7c..5340c3049a213 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -11,6 +11,7 @@ class Hello extends Greeter { } //// [importAsBaseClass_0.js] +"use strict"; var Greeter = (function () { function Greeter() { } @@ -19,6 +20,7 @@ var Greeter = (function () { })(); exports.Greeter = Greeter; //// [importAsBaseClass_1.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/importDecl.js b/tests/baselines/reference/importDecl.js index 4b2672c413503..c7cc4fe8332b6 100644 --- a/tests/baselines/reference/importDecl.js +++ b/tests/baselines/reference/importDecl.js @@ -82,6 +82,7 @@ export var useMultiImport_m4_f4 = multiImport_m4.foo(); //// [importDecl_require.js] +"use strict"; var d = (function () { function d() { } @@ -91,6 +92,7 @@ exports.d = d; function foo() { return null; } exports.foo = foo; //// [importDecl_require1.js] +"use strict"; var d = (function () { function d() { } @@ -101,6 +103,7 @@ var x; function foo() { return null; } exports.foo = foo; //// [importDecl_require2.js] +"use strict"; var d = (function () { function d() { } @@ -110,6 +113,7 @@ exports.d = d; function foo() { return null; } exports.foo = foo; //// [importDecl_require3.js] +"use strict"; var d = (function () { function d() { } @@ -119,9 +123,11 @@ exports.d = d; function foo() { return null; } exports.foo = foo; //// [importDecl_require4.js] +"use strict"; function foo2() { return null; } exports.foo2 = foo2; //// [importDecl_1.js] +"use strict"; /// /// /// diff --git a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.js b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.js index 34a662d6451fa..383c6629ed19f 100644 --- a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.js +++ b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.js @@ -6,3 +6,4 @@ declare module "m1" { //// [importDeclRefereingExternalModuleWithNoResolve.js] +"use strict"; diff --git a/tests/baselines/reference/importDeclWithClassModifiers.js b/tests/baselines/reference/importDeclWithClassModifiers.js index c8aefe03babb4..ce074cf696da1 100644 --- a/tests/baselines/reference/importDeclWithClassModifiers.js +++ b/tests/baselines/reference/importDeclWithClassModifiers.js @@ -11,5 +11,6 @@ var b: a; //// [importDeclWithClassModifiers.js] define(["require", "exports"], function (require, exports) { + "use strict"; var b; }); diff --git a/tests/baselines/reference/importDeclWithDeclareModifier.js b/tests/baselines/reference/importDeclWithDeclareModifier.js index 3c80e47a90f1d..e5267678a49dd 100644 --- a/tests/baselines/reference/importDeclWithDeclareModifier.js +++ b/tests/baselines/reference/importDeclWithDeclareModifier.js @@ -8,4 +8,5 @@ var b: a; //// [importDeclWithDeclareModifier.js] +"use strict"; var b; diff --git a/tests/baselines/reference/importDeclWithExportModifier.js b/tests/baselines/reference/importDeclWithExportModifier.js index dd2e1e11111f6..4ff25cfa37d14 100644 --- a/tests/baselines/reference/importDeclWithExportModifier.js +++ b/tests/baselines/reference/importDeclWithExportModifier.js @@ -9,5 +9,6 @@ var b: a; //// [importDeclWithExportModifier.js] define(["require", "exports"], function (require, exports) { + "use strict"; var b; }); diff --git a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.js b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.js index a8d2e94980587..f4264878076bd 100644 --- a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.js +++ b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.js @@ -7,3 +7,4 @@ export import a = x.c; export = x; //// [importDeclWithExportModifierAndExportAssignment.js] +"use strict"; diff --git a/tests/baselines/reference/importDeclarationUsedAsTypeQuery.js b/tests/baselines/reference/importDeclarationUsedAsTypeQuery.js index 51839c35df2b5..958b154cd282c 100644 --- a/tests/baselines/reference/importDeclarationUsedAsTypeQuery.js +++ b/tests/baselines/reference/importDeclarationUsedAsTypeQuery.js @@ -12,6 +12,7 @@ export var x: typeof a; //// [importDeclarationUsedAsTypeQuery_require.js] +"use strict"; var B = (function () { function B() { } @@ -19,6 +20,7 @@ var B = (function () { })(); exports.B = B; //// [importDeclarationUsedAsTypeQuery_1.js] +"use strict"; //// [importDeclarationUsedAsTypeQuery_require.d.ts] diff --git a/tests/baselines/reference/importImportOnlyModule.js b/tests/baselines/reference/importImportOnlyModule.js index bbb450f2849b7..31932455784d6 100644 --- a/tests/baselines/reference/importImportOnlyModule.js +++ b/tests/baselines/reference/importImportOnlyModule.js @@ -17,6 +17,7 @@ var x = foo; // Cause a runtime dependency //// [foo_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; var C1 = (function () { function C1() { this.m1 = 42; @@ -28,9 +29,11 @@ define(["require", "exports"], function (require, exports) { }); //// [foo_1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var answer = 42; // No exports }); //// [foo_2.js] define(["require", "exports", "./foo_1"], function (require, exports, foo) { + "use strict"; var x = foo; // Cause a runtime dependency }); diff --git a/tests/baselines/reference/importInsideModule.js b/tests/baselines/reference/importInsideModule.js index 5151e01f764e1..d4f12d0c1b622 100644 --- a/tests/baselines/reference/importInsideModule.js +++ b/tests/baselines/reference/importInsideModule.js @@ -10,6 +10,7 @@ export module myModule { } //// [importInsideModule_file2.js] +"use strict"; var myModule; (function (myModule) { var a = foo.x; diff --git a/tests/baselines/reference/importNonExternalModule.js b/tests/baselines/reference/importNonExternalModule.js index 002c1da7dfcf2..2a8e679286072 100644 --- a/tests/baselines/reference/importNonExternalModule.js +++ b/tests/baselines/reference/importNonExternalModule.js @@ -20,6 +20,7 @@ var foo; })(foo || (foo = {})); //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { + "use strict"; // Import should fail. foo_0 not an external module if (foo.answer === 42) { } diff --git a/tests/baselines/reference/importNonStringLiteral.errors.txt b/tests/baselines/reference/importNonStringLiteral.errors.txt index 7138680d709ec..97470e6408d6b 100644 --- a/tests/baselines/reference/importNonStringLiteral.errors.txt +++ b/tests/baselines/reference/importNonStringLiteral.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/externalModules/importNonStringLiteral.ts(2,22): error TS1141: String literal expected. +tests/cases/conformance/externalModules/vs/foo_0.ts(2,22): error TS1141: String literal expected. -==== tests/cases/conformance/externalModules/importNonStringLiteral.ts (1 errors) ==== +==== tests/cases/conformance/externalModules/vs/foo_0.ts (1 errors) ==== var x = "filename"; import foo = require(x); // invalid ~ diff --git a/tests/baselines/reference/importNonStringLiteral.js b/tests/baselines/reference/importNonStringLiteral.js index 52ef5a10a67d5..002092d816222 100644 --- a/tests/baselines/reference/importNonStringLiteral.js +++ b/tests/baselines/reference/importNonStringLiteral.js @@ -1,7 +1,8 @@ -//// [importNonStringLiteral.ts] +//// [foo_0.ts] var x = "filename"; import foo = require(x); // invalid -//// [importNonStringLiteral.js] +//// [foo_0.js] +"use strict"; var x = "filename"; diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js index fe37e938a5a8f..cd0cd1791eb4c 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -12,6 +12,7 @@ export = Bar; //// [Foo.js] define(["require", "exports"], function (require, exports) { + "use strict"; var Foo = (function () { function Foo() { } @@ -26,6 +27,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; define(["require", "exports", 'Foo'], function (require, exports, Error) { + "use strict"; var Bar = (function (_super) { __extends(Bar, _super); function Bar() { diff --git a/tests/baselines/reference/importTsBeforeDTs.js b/tests/baselines/reference/importTsBeforeDTs.js index 138ff7b755ade..b57df50499354 100644 --- a/tests/baselines/reference/importTsBeforeDTs.js +++ b/tests/baselines/reference/importTsBeforeDTs.js @@ -14,8 +14,10 @@ var z2 = foo.y + 10; // Should resolve //// [foo_0.js] +"use strict"; exports.y = 42; //// [foo_1.js] +"use strict"; var foo = require("./foo_0"); var z1 = foo.x + 10; // Should error, as .ts preferred over .d.ts var z2 = foo.y + 10; // Should resolve diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index 129e7b44fd760..7fa341cd28a53 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -12,6 +12,7 @@ var r: string = s.foo; //// [importUsedInExtendsList1_require.js] +"use strict"; var Super = (function () { function Super() { } @@ -19,6 +20,7 @@ var Super = (function () { })(); exports.Super = Super; //// [importUsedInExtendsList1_1.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/import_reference-exported-alias.js b/tests/baselines/reference/import_reference-exported-alias.js index db6e10107fd8d..68d2ee34671dd 100644 --- a/tests/baselines/reference/import_reference-exported-alias.js +++ b/tests/baselines/reference/import_reference-exported-alias.js @@ -23,6 +23,7 @@ var x = new UserServices().getUserName(); //// [file1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var App; (function (App) { var Services; @@ -43,6 +44,7 @@ define(["require", "exports"], function (require, exports) { }); //// [file2.js] define(["require", "exports", "file1"], function (require, exports, appJs) { + "use strict"; var Services = appJs.Services; var UserServices = Services.UserServices; var x = new UserServices().getUserName(); diff --git a/tests/baselines/reference/import_reference-to-type-alias.js b/tests/baselines/reference/import_reference-to-type-alias.js index 6d5415bcd2aff..6f329afbf54d8 100644 --- a/tests/baselines/reference/import_reference-to-type-alias.js +++ b/tests/baselines/reference/import_reference-to-type-alias.js @@ -19,6 +19,7 @@ var x = new Services.UserServices().getUserName(); //// [file1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var App; (function (App) { var Services; @@ -37,6 +38,7 @@ define(["require", "exports"], function (require, exports) { }); //// [file2.js] define(["require", "exports", "file1"], function (require, exports, appJs) { + "use strict"; var Services = appJs.App.Services; var x = new Services.UserServices().getUserName(); }); diff --git a/tests/baselines/reference/import_unneeded-require-when-referenecing-aliased-type-throug-array.js b/tests/baselines/reference/import_unneeded-require-when-referenecing-aliased-type-throug-array.js index a438daec3f22d..157702acd1e1b 100644 --- a/tests/baselines/reference/import_unneeded-require-when-referenecing-aliased-type-throug-array.js +++ b/tests/baselines/reference/import_unneeded-require-when-referenecing-aliased-type-throug-array.js @@ -18,6 +18,7 @@ var p = testData[0].name; //// [b.js] //// [a.js] define(["require", "exports"], function (require, exports) { + "use strict"; var testData; var p = testData[0].name; }); diff --git a/tests/baselines/reference/import_var-referencing-an-imported-module-alias.js b/tests/baselines/reference/import_var-referencing-an-imported-module-alias.js index 6b37f631efc92..ed6470751ed08 100644 --- a/tests/baselines/reference/import_var-referencing-an-imported-module-alias.js +++ b/tests/baselines/reference/import_var-referencing-an-imported-module-alias.js @@ -12,6 +12,7 @@ var v = new hostVar.Host(); //// [host.js] define(["require", "exports"], function (require, exports) { + "use strict"; var Host = (function () { function Host() { } @@ -21,6 +22,7 @@ define(["require", "exports"], function (require, exports) { }); //// [consumer.js] define(["require", "exports", "host"], function (require, exports, host) { + "use strict"; var hostVar = host; var v = new hostVar.Host(); }); diff --git a/tests/baselines/reference/importedAliasesInTypePositions.js b/tests/baselines/reference/importedAliasesInTypePositions.js index fb56b1ac0d7fa..d342deedef278 100644 --- a/tests/baselines/reference/importedAliasesInTypePositions.js +++ b/tests/baselines/reference/importedAliasesInTypePositions.js @@ -20,6 +20,7 @@ export module ImportingModule { //// [file1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var elaborate; (function (elaborate) { var nested; @@ -43,6 +44,7 @@ define(["require", "exports"], function (require, exports) { }); //// [file2.js] define(["require", "exports"], function (require, exports) { + "use strict"; var ImportingModule; (function (ImportingModule) { var UsesReferredType = (function () { diff --git a/tests/baselines/reference/importedModuleClassNameClash.js b/tests/baselines/reference/importedModuleClassNameClash.js index c67af2089faf9..a12ab331c48f7 100644 --- a/tests/baselines/reference/importedModuleClassNameClash.js +++ b/tests/baselines/reference/importedModuleClassNameClash.js @@ -8,6 +8,7 @@ class foo { } //// [importedModuleClassNameClash.js] define(["require", "exports"], function (require, exports) { + "use strict"; var foo = (function () { function foo() { } diff --git a/tests/baselines/reference/inheritedOverloadedSpecializedSignatures.types b/tests/baselines/reference/inheritedOverloadedSpecializedSignatures.types index dc8b9b465d81f..563cb58a755e0 100644 --- a/tests/baselines/reference/inheritedOverloadedSpecializedSignatures.types +++ b/tests/baselines/reference/inheritedOverloadedSpecializedSignatures.types @@ -11,7 +11,7 @@ interface B extends A { >A : A (key:'foo'):string; ->key : 'foo' +>key : "foo" } var b:B; @@ -24,7 +24,7 @@ b('foo').charAt(0); >b('foo').charAt : (pos: number) => string >b('foo') : string >b : B ->'foo' : string +>'foo' : "foo" >charAt : (pos: number) => string >0 : number @@ -32,7 +32,7 @@ interface A { >A : A (x: 'A1'): string; ->x : 'A1' +>x : "A1" (x: string): void; >x : string @@ -43,21 +43,21 @@ interface B extends A { >A : A (x: 'B1'): number; ->x : 'B1' +>x : "B1" } interface A { >A : A (x: 'A2'): boolean; ->x : 'A2' +>x : "A2" } interface B { >B : B (x: 'B2'): string[]; ->x : 'B2' +>x : "B2" } interface C1 extends B { @@ -65,7 +65,7 @@ interface C1 extends B { >B : B (x: 'C1'): number[]; ->x : 'C1' +>x : "C1" } interface C2 extends B { @@ -73,7 +73,7 @@ interface C2 extends B { >B : B (x: 'C2'): boolean[]; ->x : 'C2' +>x : "C2" } interface C extends C1, C2 { @@ -82,7 +82,7 @@ interface C extends C1, C2 { >C2 : C2 (x: 'C'): string; ->x : 'C' +>x : "C" } var c: C; @@ -94,25 +94,25 @@ var x1: string[] = c('B2'); >x1 : string[] >c('B2') : string[] >c : C ->'B2' : string +>'B2' : "B2" var x2: number = c('B1'); >x2 : number >c('B1') : number >c : C ->'B1' : string +>'B1' : "B1" var x3: boolean = c('A2'); >x3 : boolean >c('A2') : boolean >c : C ->'A2' : string +>'A2' : "A2" var x4: string = c('A1'); >x4 : string >c('A1') : string >c : C ->'A1' : string +>'A1' : "A1" var x5: void = c('A0'); >x5 : void @@ -124,19 +124,19 @@ var x6: number[] = c('C1'); >x6 : number[] >c('C1') : number[] >c : C ->'C1' : string +>'C1' : "C1" var x7: boolean[] = c('C2'); >x7 : boolean[] >c('C2') : boolean[] >c : C ->'C2' : string +>'C2' : "C2" var x8: string = c('C'); >x8 : string >c('C') : string >c : C ->'C' : string +>'C' : "C" var x9: void = c('generic'); >x9 : void diff --git a/tests/baselines/reference/initializersInDeclarations.errors.txt b/tests/baselines/reference/initializersInDeclarations.errors.txt index a3eeecfe253d3..c8b307cb21cd6 100644 --- a/tests/baselines/reference/initializersInDeclarations.errors.txt +++ b/tests/baselines/reference/initializersInDeclarations.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/externalModules/initializersInDeclarations.ts(5,9): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(6,16): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(7,16): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(12,15): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(13,15): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(16,2): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(18,16): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(5,9): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(6,16): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(7,16): error TS1183: An implementation cannot be declared in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(12,15): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(13,15): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(16,2): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/conformance/externalModules/file1.d.ts(18,16): error TS1039: Initializers are not allowed in ambient contexts. -==== tests/cases/conformance/externalModules/initializersInDeclarations.ts (7 errors) ==== +==== tests/cases/conformance/externalModules/file1.d.ts (7 errors) ==== // Errors: Initializers & statements in declaration file diff --git a/tests/baselines/reference/initializersInDeclarations.js b/tests/baselines/reference/initializersInDeclarations.js deleted file mode 100644 index 0506c72fc5664..0000000000000 --- a/tests/baselines/reference/initializersInDeclarations.js +++ /dev/null @@ -1,23 +0,0 @@ -//// [initializersInDeclarations.ts] - -// Errors: Initializers & statements in declaration file - -declare class Foo { - name = "test"; - "some prop" = 42; - fn(): boolean { - return false; - } -} - -declare var x = []; -declare var y = {}; - -declare module M1 { - while(true); - - export var v1 = () => false; -} - -//// [initializersInDeclarations.js] -// Errors: Initializers & statements in declaration file diff --git a/tests/baselines/reference/inlineSourceMap.sourcemap.txt b/tests/baselines/reference/inlineSourceMap.sourcemap.txt index 6625cc46b21c7..35bee4f1d4a95 100644 --- a/tests/baselines/reference/inlineSourceMap.sourcemap.txt +++ b/tests/baselines/reference/inlineSourceMap.sourcemap.txt @@ -1,6 +1,6 @@ =================================================================== JsFile: inlineSourceMap.js -mapUrl: inlineSourceMap.js.map +mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lU291cmNlTWFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaW5saW5lU291cmNlTWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMifQ== sourceRoot: sources: inlineSourceMap.ts =================================================================== diff --git a/tests/baselines/reference/inlineSourceMap2.errors.txt b/tests/baselines/reference/inlineSourceMap2.errors.txt index 24b0fddf942f1..26db1415593d0 100644 --- a/tests/baselines/reference/inlineSourceMap2.errors.txt +++ b/tests/baselines/reference/inlineSourceMap2.errors.txt @@ -1,12 +1,10 @@ error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. -error TS5053: Option 'sourceRoot' cannot be specified with option 'inlineSourceMap'. tests/cases/compiler/inlineSourceMap2.ts(5,1): error TS2304: Cannot find name 'console'. !!! error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. !!! error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. -!!! error TS5053: Option 'sourceRoot' cannot be specified with option 'inlineSourceMap'. ==== tests/cases/compiler/inlineSourceMap2.ts (1 errors) ==== // configuration errors diff --git a/tests/baselines/reference/inlineSourceMap2.sourcemap.txt b/tests/baselines/reference/inlineSourceMap2.sourcemap.txt index 4d7f499b55a4b..e292a9b96b2a4 100644 --- a/tests/baselines/reference/inlineSourceMap2.sourcemap.txt +++ b/tests/baselines/reference/inlineSourceMap2.sourcemap.txt @@ -1,6 +1,6 @@ =================================================================== JsFile: outfile.js -mapUrl: file:///folder/outfile.js.map +mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0ZmlsZS5qcyIsInNvdXJjZVJvb3QiOiJmaWxlOi8vL2ZvbGRlci8iLCJzb3VyY2VzIjpbImlubGluZVNvdXJjZU1hcDIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsdUJBQXVCO0FBRXZCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMifQ== sourceRoot: file:///folder/ sources: inlineSourceMap2.ts =================================================================== diff --git a/tests/baselines/reference/inlineSources2.sourcemap.txt b/tests/baselines/reference/inlineSources2.sourcemap.txt index e3e14d01e9ee7..e09af2f4221b6 100644 --- a/tests/baselines/reference/inlineSources2.sourcemap.txt +++ b/tests/baselines/reference/inlineSources2.sourcemap.txt @@ -1,6 +1,6 @@ =================================================================== JsFile: out.js -mapUrl: out.js.map +mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidGVzdHMvY2FzZXMvY29tcGlsZXIvYS50cyIsInRlc3RzL2Nhc2VzL2NvbXBpbGVyL2IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQ0ZmLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJcbnZhciBhID0gMDtcbmNvbnNvbGUubG9nKGEpO1xuIiwidmFyIGIgPSAwO1xuY29uc29sZS5sb2coYik7Il19 sourceRoot: sources: tests/cases/compiler/a.ts,tests/cases/compiler/b.ts sourcesContent: ["\nvar a = 0;\nconsole.log(a);\n","var b = 0;\nconsole.log(b);"] diff --git a/tests/baselines/reference/instanceOfInExternalModules.js b/tests/baselines/reference/instanceOfInExternalModules.js index e4ebccc365f88..02c0eb0eea49a 100644 --- a/tests/baselines/reference/instanceOfInExternalModules.js +++ b/tests/baselines/reference/instanceOfInExternalModules.js @@ -13,6 +13,7 @@ function IsFoo(value: any): boolean { //// [instanceOfInExternalModules_require.js] define(["require", "exports"], function (require, exports) { + "use strict"; var Foo = (function () { function Foo() { } @@ -22,6 +23,7 @@ define(["require", "exports"], function (require, exports) { }); //// [instanceOfInExternalModules_1.js] define(["require", "exports", "instanceOfInExternalModules_require"], function (require, exports, Bar) { + "use strict"; function IsFoo(value) { return value instanceof Bar.Foo; } diff --git a/tests/baselines/reference/interfaceContextualType.js b/tests/baselines/reference/interfaceContextualType.js index 2dbdb958d6b2d..a0012121c0d3a 100644 --- a/tests/baselines/reference/interfaceContextualType.js +++ b/tests/baselines/reference/interfaceContextualType.js @@ -22,6 +22,7 @@ class Bug { //// [interfaceContextualType.js] +"use strict"; var Bug = (function () { function Bug() { } diff --git a/tests/baselines/reference/interfaceDeclaration3.js b/tests/baselines/reference/interfaceDeclaration3.js index 4984bc48126dd..c3cbf47771d5d 100644 --- a/tests/baselines/reference/interfaceDeclaration3.js +++ b/tests/baselines/reference/interfaceDeclaration3.js @@ -57,6 +57,7 @@ interface I2 extends I1 { item:string; } //// [interfaceDeclaration3.js] define(["require", "exports"], function (require, exports) { + "use strict"; var M1; (function (M1) { var C1 = (function () { diff --git a/tests/baselines/reference/interfaceDeclaration5.js b/tests/baselines/reference/interfaceDeclaration5.js index acb40160d842b..6a643e4b066b2 100644 --- a/tests/baselines/reference/interfaceDeclaration5.js +++ b/tests/baselines/reference/interfaceDeclaration5.js @@ -5,6 +5,7 @@ export class C1 { } //// [interfaceDeclaration5.js] define(["require", "exports"], function (require, exports) { + "use strict"; var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/interfaceImplementation6.js b/tests/baselines/reference/interfaceImplementation6.js index 4feb6804db35a..e21499a20f470 100644 --- a/tests/baselines/reference/interfaceImplementation6.js +++ b/tests/baselines/reference/interfaceImplementation6.js @@ -26,6 +26,7 @@ export class Test { //// [interfaceImplementation6.js] define(["require", "exports"], function (require, exports) { + "use strict"; var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/interfaceWithSpecializedCallAndConstructSignatures.types b/tests/baselines/reference/interfaceWithSpecializedCallAndConstructSignatures.types index 971b5e56907fa..5288d9f15a434 100644 --- a/tests/baselines/reference/interfaceWithSpecializedCallAndConstructSignatures.types +++ b/tests/baselines/reference/interfaceWithSpecializedCallAndConstructSignatures.types @@ -3,13 +3,13 @@ interface Foo { >Foo : Foo (x: 'a'): number; ->x : 'a' +>x : "a" (x: string): any; >x : string new (x: 'a'): any; ->x : 'a' +>x : "a" new (x: string): Object; >x : string @@ -24,7 +24,7 @@ var r = f('a'); >r : number >f('a') : number >f : Foo ->'a' : string +>'a' : "a" var r2 = f('A'); >r2 : any @@ -36,7 +36,7 @@ var r3 = new f('a'); >r3 : any >new f('a') : any >f : Foo ->'a' : string +>'a' : "a" var r4 = new f('A'); >r4 : Object diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.js index c240f97b3c9bd..6714c10411eea 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] +"use strict"; var x; (function (x) { var c = (function () { diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.js index 1685843d11390..64bfe61fa6a03 100644 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.js @@ -16,6 +16,7 @@ export module m2 { } //// [internalAliasClassInsideLocalModuleWithoutExport.js] +"use strict"; var x; (function (x) { var c = (function () { diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.js index d8af951b7e810..49b784a9e99f6 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] +"use strict"; var x; (function (x) { var c = (function () { diff --git a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.js index ef13909e48c83..1fa90e62b82f0 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] +"use strict"; var x; (function (x) { var c = (function () { diff --git a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.js index 156ca84dfb2bf..d4e1f3fc8e394 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] +"use strict"; var x; (function (x) { var c = (function () { diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js index f2223b197e00f..dd30dc814aed3 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js @@ -14,6 +14,7 @@ export module c { //// [internalAliasEnumInsideLocalModuleWithExport.js] +"use strict"; var a; (function (a) { (function (weekend) { diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js index afd6597869be6..7f00d69a8d6f9 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js @@ -14,6 +14,7 @@ export module c { //// [internalAliasEnumInsideLocalModuleWithoutExport.js] +"use strict"; var a; (function (a) { (function (weekend) { diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js index acd3f4c61b185..8612e74f82955 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] +"use strict"; var a; (function (a) { (function (weekend) { diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js index 96e17c6f6e305..c7396fded2ac2 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) { + "use strict"; var a; (function (a) { (function (weekend) { diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js index b224c22f45e1a..1cf1b0b8b1633 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) { + "use strict"; var a; (function (a) { (function (weekend) { diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.js index e7b536f3107f4..b96586dfa8eb6 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.js @@ -13,6 +13,7 @@ export module c { //// [internalAliasFunctionInsideLocalModuleWithExport.js] +"use strict"; var a; (function (a) { function foo(x) { diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js index da24367ad503a..dca4287815782 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js @@ -13,6 +13,7 @@ export module c { //// [internalAliasFunctionInsideLocalModuleWithoutExport.js] +"use strict"; var a; (function (a) { function foo(x) { diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js index dd1eaa222c21e..62e5f622ae7f9 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js @@ -13,6 +13,7 @@ export module c { var d = c.b(11); //// [internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js] +"use strict"; var a; (function (a) { function foo(x) { diff --git a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.js index cfcb7737be680..be096720e5e10 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.js @@ -12,6 +12,7 @@ export var bVal2 = b; //// [internalAliasFunctionInsideTopLevelModuleWithExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; var a; (function (a) { function foo(x) { diff --git a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.js index 1d33505c1030b..ec702b7e0218b 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.js @@ -11,6 +11,7 @@ export var bVal2 = b; //// [internalAliasFunctionInsideTopLevelModuleWithoutExport.js] +"use strict"; var a; (function (a) { function foo(x) { diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.js index ca8ad55cdcd38..0906321df884f 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.js @@ -13,6 +13,7 @@ export module c { //// [internalAliasInitializedModuleInsideLocalModuleWithExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; var a; (function (a) { var b; diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js index c50324562afe6..212f4f841eb13 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js @@ -12,6 +12,7 @@ export module c { } //// [internalAliasInitializedModuleInsideLocalModuleWithoutExport.js] +"use strict"; var a; (function (a) { var b; diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js index 5088566306235..e6a3cd9f93804 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js @@ -14,6 +14,7 @@ export module c { export var d = new c.b.c(); //// [internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js] +"use strict"; var a; (function (a) { var b; diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js index cf1e82bb72583..ea7681a2a503f 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js @@ -10,6 +10,7 @@ export import b = a.b; export var x: b.c = new b.c(); //// [internalAliasInitializedModuleInsideTopLevelModuleWithExport.js] +"use strict"; var a; (function (a) { var b; diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js index 8c905bd554304..90fd7212794ef 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js @@ -11,6 +11,7 @@ export var x: b.c = new b.c(); //// [internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; var a; (function (a) { var b; diff --git a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithExport.js index 8db0ad7f49e25..044b393b36775 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithExport.js @@ -12,6 +12,7 @@ export module c { //// [internalAliasInterfaceInsideLocalModuleWithExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; var c; (function (c) { })(c = exports.c || (exports.c = {})); diff --git a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExport.js index 047553fa66810..78bfc72a789bf 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExport.js @@ -12,6 +12,7 @@ export module c { //// [internalAliasInterfaceInsideLocalModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; var c; (function (c) { })(c = exports.c || (exports.c = {})); diff --git a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js index e5ac69a44c122..d0c4543c194ec 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js @@ -13,6 +13,7 @@ var x: c.b; //// [internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js] define(["require", "exports"], function (require, exports) { + "use strict"; var c; (function (c) { })(c = exports.c || (exports.c = {})); diff --git a/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithExport.js index 912336068da63..1d6cb8c07e968 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithExport.js @@ -9,6 +9,7 @@ export var x: b; //// [internalAliasInterfaceInsideTopLevelModuleWithExport.js] +"use strict"; //// [internalAliasInterfaceInsideTopLevelModuleWithExport.d.ts] diff --git a/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithoutExport.js index 3964e539fdf10..fb666a9cad20f 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithoutExport.js @@ -10,6 +10,7 @@ export var x: b; //// [internalAliasInterfaceInsideTopLevelModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithExport.js index f6faee442c427..38e0c38728652 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithExport.js @@ -14,6 +14,7 @@ export module c { } //// [internalAliasUninitializedModuleInsideLocalModuleWithExport.js] +"use strict"; var c; (function (c) { c.x.foo(); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js index 2ef3c5320a86b..4912293d48c95 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js @@ -14,6 +14,7 @@ export module c { } //// [internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js] +"use strict"; var c; (function (c) { c.x.foo(); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js index ea13aae8aa13b..1015e2a1d63a0 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js @@ -18,6 +18,7 @@ export var z: c.b.I; //// [internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js] define(["require", "exports"], function (require, exports) { + "use strict"; var c; (function (c) { c.x.foo(); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js index edfc3be8e6966..dac3821a30d5e 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js @@ -14,6 +14,7 @@ x.foo(); //// [internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.x.foo(); }); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js index 6e484e67cdba9..dc1029c666410 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js @@ -13,6 +13,7 @@ x.foo(); //// [internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js] +"use strict"; exports.x.foo(); diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.js index ab8cae0691059..a2921311e539c 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.js @@ -11,6 +11,7 @@ export module c { //// [internalAliasVarInsideLocalModuleWithExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; var a; (function (a) { a.x = 10; diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.js index ac6f282ba817e..8718dc18fdd29 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.js @@ -11,6 +11,7 @@ export module c { //// [internalAliasVarInsideLocalModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; var a; (function (a) { a.x = 10; diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.js index 604a9a2a41408..aa61fc77216b7 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.js @@ -11,6 +11,7 @@ export module c { export var z = c.b; //// [internalAliasVarInsideLocalModuleWithoutExportAccessError.js] +"use strict"; var a; (function (a) { a.x = 10; diff --git a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.js index 3dbc9b6a94a96..5427dbf026f1f 100644 --- a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.js @@ -10,6 +10,7 @@ export var bVal = b; //// [internalAliasVarInsideTopLevelModuleWithExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; var a; (function (a) { a.x = 10; diff --git a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.js index 8ce6f91d040f2..7c7c2cd327e7f 100644 --- a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.js @@ -9,6 +9,7 @@ export var bVal = b; //// [internalAliasVarInsideTopLevelModuleWithoutExport.js] +"use strict"; var a; (function (a) { a.x = 10; diff --git a/tests/baselines/reference/isolatedModulesAmbientConstEnum.errors.txt b/tests/baselines/reference/isolatedModulesAmbientConstEnum.errors.txt index bb8a5202bc508..e0eef7d892d0b 100644 --- a/tests/baselines/reference/isolatedModulesAmbientConstEnum.errors.txt +++ b/tests/baselines/reference/isolatedModulesAmbientConstEnum.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/isolatedModulesAmbientConstEnum.ts(3,20): error TS1209: Ambient const enums are not allowed when the '--isolatedModules' flag is provided. +tests/cases/compiler/file1.ts(3,20): error TS1209: Ambient const enums are not allowed when the '--isolatedModules' flag is provided. -==== tests/cases/compiler/isolatedModulesAmbientConstEnum.ts (1 errors) ==== +==== tests/cases/compiler/file1.ts (1 errors) ==== declare const enum E { X = 1} diff --git a/tests/baselines/reference/isolatedModulesAmbientConstEnum.js b/tests/baselines/reference/isolatedModulesAmbientConstEnum.js index 7742122b68794..6d9fc540d9a44 100644 --- a/tests/baselines/reference/isolatedModulesAmbientConstEnum.js +++ b/tests/baselines/reference/isolatedModulesAmbientConstEnum.js @@ -1,8 +1,8 @@ -//// [isolatedModulesAmbientConstEnum.ts] +//// [file1.ts] declare const enum E { X = 1} export var y; -//// [isolatedModulesAmbientConstEnum.js] +//// [file1.js] export var y; diff --git a/tests/baselines/reference/isolatedModulesDeclaration.errors.txt b/tests/baselines/reference/isolatedModulesDeclaration.errors.txt index 749e86116e863..2997acd58ac5b 100644 --- a/tests/baselines/reference/isolatedModulesDeclaration.errors.txt +++ b/tests/baselines/reference/isolatedModulesDeclaration.errors.txt @@ -2,6 +2,6 @@ error TS5053: Option 'declaration' cannot be specified with option 'isolatedModu !!! error TS5053: Option 'declaration' cannot be specified with option 'isolatedModules'. -==== tests/cases/compiler/isolatedModulesDeclaration.ts (0 errors) ==== +==== tests/cases/compiler/file1.ts (0 errors) ==== export var x; \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesDeclaration.js b/tests/baselines/reference/isolatedModulesDeclaration.js index 12e6f23f92e14..bb3e560a2f83e 100644 --- a/tests/baselines/reference/isolatedModulesDeclaration.js +++ b/tests/baselines/reference/isolatedModulesDeclaration.js @@ -1,10 +1,10 @@ -//// [isolatedModulesDeclaration.ts] +//// [file1.ts] export var x; -//// [isolatedModulesDeclaration.js] +//// [file1.js] export var x; -//// [isolatedModulesDeclaration.d.ts] +//// [file1.d.ts] export declare var x: any; diff --git a/tests/baselines/reference/isolatedModulesES6.js b/tests/baselines/reference/isolatedModulesES6.js index eb2ee3ee33ae7..2963a9d694fbf 100644 --- a/tests/baselines/reference/isolatedModulesES6.js +++ b/tests/baselines/reference/isolatedModulesES6.js @@ -1,5 +1,5 @@ -//// [isolatedModulesES6.ts] +//// [file1.ts] export var x; -//// [isolatedModulesES6.js] +//// [file1.js] export var x; diff --git a/tests/baselines/reference/isolatedModulesES6.symbols b/tests/baselines/reference/isolatedModulesES6.symbols index c705cbc5af843..625dbfbe699b8 100644 --- a/tests/baselines/reference/isolatedModulesES6.symbols +++ b/tests/baselines/reference/isolatedModulesES6.symbols @@ -1,4 +1,4 @@ -=== tests/cases/compiler/isolatedModulesES6.ts === +=== tests/cases/compiler/file1.ts === export var x; ->x : Symbol(x, Decl(isolatedModulesES6.ts, 0, 10)) +>x : Symbol(x, Decl(file1.ts, 0, 10)) diff --git a/tests/baselines/reference/isolatedModulesES6.types b/tests/baselines/reference/isolatedModulesES6.types index 898b9715ca42b..27dca700bb904 100644 --- a/tests/baselines/reference/isolatedModulesES6.types +++ b/tests/baselines/reference/isolatedModulesES6.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/isolatedModulesES6.ts === +=== tests/cases/compiler/file1.ts === export var x; >x : any diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.errors.txt b/tests/baselines/reference/isolatedModulesImportExportElision.errors.txt index 8c6881a9bc113..60d2ca987e438 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.errors.txt +++ b/tests/baselines/reference/isolatedModulesImportExportElision.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/isolatedModulesImportExportElision.ts(2,17): error TS2307: Cannot find module 'module'. -tests/cases/compiler/isolatedModulesImportExportElision.ts(3,18): error TS2307: Cannot find module 'module'. -tests/cases/compiler/isolatedModulesImportExportElision.ts(4,21): error TS2307: Cannot find module 'module'. -tests/cases/compiler/isolatedModulesImportExportElision.ts(12,18): error TS2307: Cannot find module 'module'. +tests/cases/compiler/file1.ts(2,17): error TS2307: Cannot find module 'module'. +tests/cases/compiler/file1.ts(3,18): error TS2307: Cannot find module 'module'. +tests/cases/compiler/file1.ts(4,21): error TS2307: Cannot find module 'module'. +tests/cases/compiler/file1.ts(12,18): error TS2307: Cannot find module 'module'. -==== tests/cases/compiler/isolatedModulesImportExportElision.ts (4 errors) ==== +==== tests/cases/compiler/file1.ts (4 errors) ==== import {c} from "module" ~~~~~~~~ diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index 8cb65747e6f16..f5dcb65bc9a8f 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -1,4 +1,4 @@ -//// [isolatedModulesImportExportElision.ts] +//// [file1.ts] import {c} from "module" import {c2} from "module" @@ -13,7 +13,8 @@ let y = ns.value; export {c1} from "module"; export var z = x; -//// [isolatedModulesImportExportElision.js] +//// [file1.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/isolatedModulesNoEmitOnError.errors.txt b/tests/baselines/reference/isolatedModulesNoEmitOnError.errors.txt index 337fcb16ba315..2579ffc4a9029 100644 --- a/tests/baselines/reference/isolatedModulesNoEmitOnError.errors.txt +++ b/tests/baselines/reference/isolatedModulesNoEmitOnError.errors.txt @@ -2,6 +2,6 @@ error TS5053: Option 'noEmitOnError' cannot be specified with option 'isolatedMo !!! error TS5053: Option 'noEmitOnError' cannot be specified with option 'isolatedModules'. -==== tests/cases/compiler/isolatedModulesNoEmitOnError.ts (0 errors) ==== +==== tests/cases/compiler/file1.ts (0 errors) ==== export var x; \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesNoExternalModule.errors.txt b/tests/baselines/reference/isolatedModulesNoExternalModule.errors.txt index d00520a0618f0..29353b3284a58 100644 --- a/tests/baselines/reference/isolatedModulesNoExternalModule.errors.txt +++ b/tests/baselines/reference/isolatedModulesNoExternalModule.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/isolatedModulesNoExternalModule.ts(2,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided. +tests/cases/compiler/file1.ts(2,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided. -==== tests/cases/compiler/isolatedModulesNoExternalModule.ts (1 errors) ==== +==== tests/cases/compiler/file1.ts (1 errors) ==== var x; ~~~ diff --git a/tests/baselines/reference/isolatedModulesNoExternalModule.js b/tests/baselines/reference/isolatedModulesNoExternalModule.js index dd5d23a538cac..52cdbaa140253 100644 --- a/tests/baselines/reference/isolatedModulesNoExternalModule.js +++ b/tests/baselines/reference/isolatedModulesNoExternalModule.js @@ -1,6 +1,6 @@ -//// [isolatedModulesNoExternalModule.ts] +//// [file1.ts] var x; -//// [isolatedModulesNoExternalModule.js] +//// [file1.js] var x; diff --git a/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.js b/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.js index efdba17dc9342..396fc5979115d 100644 --- a/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.js +++ b/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.js @@ -1,10 +1,10 @@ -//// [isolatedModulesNonAmbientConstEnum.ts] +//// [file1.ts] const enum E { X = 100 }; var e = E.X; export var x; -//// [isolatedModulesNonAmbientConstEnum.js] +//// [file1.js] var E; (function (E) { E[E["X"] = 100] = "X"; diff --git a/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.symbols b/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.symbols index 5e30fd0b2ff38..4755208b21a31 100644 --- a/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.symbols +++ b/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.symbols @@ -1,15 +1,15 @@ -=== tests/cases/compiler/isolatedModulesNonAmbientConstEnum.ts === +=== tests/cases/compiler/file1.ts === const enum E { X = 100 }; ->E : Symbol(E, Decl(isolatedModulesNonAmbientConstEnum.ts, 0, 0)) ->X : Symbol(E.X, Decl(isolatedModulesNonAmbientConstEnum.ts, 1, 14)) +>E : Symbol(E, Decl(file1.ts, 0, 0)) +>X : Symbol(E.X, Decl(file1.ts, 1, 14)) var e = E.X; ->e : Symbol(e, Decl(isolatedModulesNonAmbientConstEnum.ts, 2, 3)) ->E.X : Symbol(E.X, Decl(isolatedModulesNonAmbientConstEnum.ts, 1, 14)) ->E : Symbol(E, Decl(isolatedModulesNonAmbientConstEnum.ts, 0, 0)) ->X : Symbol(E.X, Decl(isolatedModulesNonAmbientConstEnum.ts, 1, 14)) +>e : Symbol(e, Decl(file1.ts, 2, 3)) +>E.X : Symbol(E.X, Decl(file1.ts, 1, 14)) +>E : Symbol(E, Decl(file1.ts, 0, 0)) +>X : Symbol(E.X, Decl(file1.ts, 1, 14)) export var x; ->x : Symbol(x, Decl(isolatedModulesNonAmbientConstEnum.ts, 3, 10)) +>x : Symbol(x, Decl(file1.ts, 3, 10)) diff --git a/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.types b/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.types index d7e83b81070ca..4583a1c073070 100644 --- a/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.types +++ b/tests/baselines/reference/isolatedModulesNonAmbientConstEnum.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/isolatedModulesNonAmbientConstEnum.ts === +=== tests/cases/compiler/file1.ts === const enum E { X = 100 }; >E : E diff --git a/tests/baselines/reference/isolatedModulesPlainFile-AMD.js b/tests/baselines/reference/isolatedModulesPlainFile-AMD.js index 7f4f4219123f8..1e45ee159d673 100644 --- a/tests/baselines/reference/isolatedModulesPlainFile-AMD.js +++ b/tests/baselines/reference/isolatedModulesPlainFile-AMD.js @@ -6,5 +6,6 @@ run(1); //// [isolatedModulesPlainFile-AMD.js] define(["require", "exports"], function (require, exports) { + "use strict"; run(1); }); diff --git a/tests/baselines/reference/isolatedModulesPlainFile-CommonJS.js b/tests/baselines/reference/isolatedModulesPlainFile-CommonJS.js index 7026a7d9bed2d..f40d217368525 100644 --- a/tests/baselines/reference/isolatedModulesPlainFile-CommonJS.js +++ b/tests/baselines/reference/isolatedModulesPlainFile-CommonJS.js @@ -5,4 +5,5 @@ run(1); //// [isolatedModulesPlainFile-CommonJS.js] +"use strict"; run(1); diff --git a/tests/baselines/reference/isolatedModulesPlainFile-System.js b/tests/baselines/reference/isolatedModulesPlainFile-System.js index b924a3b21f991..b66bd49781026 100644 --- a/tests/baselines/reference/isolatedModulesPlainFile-System.js +++ b/tests/baselines/reference/isolatedModulesPlainFile-System.js @@ -6,6 +6,7 @@ run(1); //// [isolatedModulesPlainFile-System.js] System.register([], function(exports_1) { + "use strict"; return { setters:[], execute: function() { diff --git a/tests/baselines/reference/isolatedModulesPlainFile-UMD.js b/tests/baselines/reference/isolatedModulesPlainFile-UMD.js index b4f8cf436ecbc..08ec75c48f089 100644 --- a/tests/baselines/reference/isolatedModulesPlainFile-UMD.js +++ b/tests/baselines/reference/isolatedModulesPlainFile-UMD.js @@ -13,5 +13,6 @@ run(1); define(["require", "exports"], factory); } })(function (require, exports) { + "use strict"; run(1); }); diff --git a/tests/baselines/reference/isolatedModulesSourceMap.js b/tests/baselines/reference/isolatedModulesSourceMap.js index 2722a3ce7abcd..02d394752d1d6 100644 --- a/tests/baselines/reference/isolatedModulesSourceMap.js +++ b/tests/baselines/reference/isolatedModulesSourceMap.js @@ -1,7 +1,7 @@ -//// [isolatedModulesSourceMap.ts] +//// [file1.ts] export var x = 1; -//// [isolatedModulesSourceMap.js] +//// [file1.js] export var x = 1; -//# sourceMappingURL=isolatedModulesSourceMap.js.map \ No newline at end of file +//# sourceMappingURL=file1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesSourceMap.js.map b/tests/baselines/reference/isolatedModulesSourceMap.js.map index 9fa3e0da0d6bc..3d86a0a714444 100644 --- a/tests/baselines/reference/isolatedModulesSourceMap.js.map +++ b/tests/baselines/reference/isolatedModulesSourceMap.js.map @@ -1,2 +1,2 @@ -//// [isolatedModulesSourceMap.js.map] -{"version":3,"file":"isolatedModulesSourceMap.js","sourceRoot":"","sources":["isolatedModulesSourceMap.ts"],"names":[],"mappings":"AACA,WAAW,CAAC,GAAG,CAAC,CAAC"} \ No newline at end of file +//// [file1.js.map] +{"version":3,"file":"file1.js","sourceRoot":"","sources":["file1.ts"],"names":[],"mappings":"AACA,WAAW,CAAC,GAAG,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesSourceMap.sourcemap.txt b/tests/baselines/reference/isolatedModulesSourceMap.sourcemap.txt index d31445505f7e1..7edf071f5d199 100644 --- a/tests/baselines/reference/isolatedModulesSourceMap.sourcemap.txt +++ b/tests/baselines/reference/isolatedModulesSourceMap.sourcemap.txt @@ -1,12 +1,12 @@ =================================================================== -JsFile: isolatedModulesSourceMap.js -mapUrl: isolatedModulesSourceMap.js.map +JsFile: file1.js +mapUrl: file1.js.map sourceRoot: -sources: isolatedModulesSourceMap.ts +sources: file1.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/compiler/isolatedModulesSourceMap.js -sourceFile:isolatedModulesSourceMap.ts +emittedFile:tests/cases/compiler/file1.js +sourceFile:file1.ts ------------------------------------------------------------------- >>>export var x = 1; 1 > @@ -15,7 +15,7 @@ sourceFile:isolatedModulesSourceMap.ts 4 > ^^^ 5 > ^ 6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^^-> 1 > > 2 >export var @@ -30,4 +30,4 @@ sourceFile:isolatedModulesSourceMap.ts 5 >Emitted(1, 17) Source(2, 17) + SourceIndex(0) 6 >Emitted(1, 18) Source(2, 18) + SourceIndex(0) --- ->>>//# sourceMappingURL=isolatedModulesSourceMap.js.map \ No newline at end of file +>>>//# sourceMappingURL=file1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesSourceMap.symbols b/tests/baselines/reference/isolatedModulesSourceMap.symbols index d4ae3c34cf10e..2f2d16d8ad0dc 100644 --- a/tests/baselines/reference/isolatedModulesSourceMap.symbols +++ b/tests/baselines/reference/isolatedModulesSourceMap.symbols @@ -1,5 +1,5 @@ -=== tests/cases/compiler/isolatedModulesSourceMap.ts === +=== tests/cases/compiler/file1.ts === export var x = 1; ->x : Symbol(x, Decl(isolatedModulesSourceMap.ts, 1, 10)) +>x : Symbol(x, Decl(file1.ts, 1, 10)) diff --git a/tests/baselines/reference/isolatedModulesSourceMap.types b/tests/baselines/reference/isolatedModulesSourceMap.types index 1955fe5da6ed9..d2a474c023d06 100644 --- a/tests/baselines/reference/isolatedModulesSourceMap.types +++ b/tests/baselines/reference/isolatedModulesSourceMap.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/isolatedModulesSourceMap.ts === +=== tests/cases/compiler/file1.ts === export var x = 1; >x : number diff --git a/tests/baselines/reference/isolatedModulesSpecifiedModule.js b/tests/baselines/reference/isolatedModulesSpecifiedModule.js index 95e4ec88d923e..89547811855f7 100644 --- a/tests/baselines/reference/isolatedModulesSpecifiedModule.js +++ b/tests/baselines/reference/isolatedModulesSpecifiedModule.js @@ -1,4 +1,5 @@ -//// [isolatedModulesSpecifiedModule.ts] +//// [file1.ts] export var x; -//// [isolatedModulesSpecifiedModule.js] +//// [file1.js] +"use strict"; diff --git a/tests/baselines/reference/isolatedModulesSpecifiedModule.symbols b/tests/baselines/reference/isolatedModulesSpecifiedModule.symbols index 91ede682d7cab..625dbfbe699b8 100644 --- a/tests/baselines/reference/isolatedModulesSpecifiedModule.symbols +++ b/tests/baselines/reference/isolatedModulesSpecifiedModule.symbols @@ -1,4 +1,4 @@ -=== tests/cases/compiler/isolatedModulesSpecifiedModule.ts === +=== tests/cases/compiler/file1.ts === export var x; ->x : Symbol(x, Decl(isolatedModulesSpecifiedModule.ts, 0, 10)) +>x : Symbol(x, Decl(file1.ts, 0, 10)) diff --git a/tests/baselines/reference/isolatedModulesSpecifiedModule.types b/tests/baselines/reference/isolatedModulesSpecifiedModule.types index 8dee90a199f83..27dca700bb904 100644 --- a/tests/baselines/reference/isolatedModulesSpecifiedModule.types +++ b/tests/baselines/reference/isolatedModulesSpecifiedModule.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/isolatedModulesSpecifiedModule.ts === +=== tests/cases/compiler/file1.ts === export var x; >x : any diff --git a/tests/baselines/reference/isolatedModulesUnspecifiedModule.errors.txt b/tests/baselines/reference/isolatedModulesUnspecifiedModule.errors.txt index 1abc6ca47d433..fbb2f0041d603 100644 --- a/tests/baselines/reference/isolatedModulesUnspecifiedModule.errors.txt +++ b/tests/baselines/reference/isolatedModulesUnspecifiedModule.errors.txt @@ -2,5 +2,5 @@ error TS5047: Option 'isolatedModules' can only be used when either option '--mo !!! error TS5047: Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher. -==== tests/cases/compiler/isolatedModulesUnspecifiedModule.ts (0 errors) ==== +==== tests/cases/compiler/file1.ts (0 errors) ==== export var x; \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesUnspecifiedModule.js b/tests/baselines/reference/isolatedModulesUnspecifiedModule.js index 68b9bfb62db04..89547811855f7 100644 --- a/tests/baselines/reference/isolatedModulesUnspecifiedModule.js +++ b/tests/baselines/reference/isolatedModulesUnspecifiedModule.js @@ -1,4 +1,5 @@ -//// [isolatedModulesUnspecifiedModule.ts] +//// [file1.ts] export var x; -//// [isolatedModulesUnspecifiedModule.js] +//// [file1.js] +"use strict"; diff --git a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt new file mode 100644 index 0000000000000..19bfd5d1c0205 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,1): error TS8009: 'declare' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + declare var v; + ~~~~~~~ +!!! error TS8009: 'declare' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationBindErrors.js b/tests/baselines/reference/jsFileCompilationBindErrors.js new file mode 100644 index 0000000000000..e4b515e2b698a --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationBindErrors.js @@ -0,0 +1,25 @@ +//// [a.js] +let C = "sss"; +let C = 0; // Error: Cannot redeclare block-scoped variable 'C'. + +function f() { + return; + return; // Error: Unreachable code detected. +} + +function b() { + "use strict"; + var arguments = 0; // Error: Invalid use of 'arguments' in strict mode. +} + +//// [a.js] +var C = "sss"; +var C = 0; // Error: Cannot redeclare block-scoped variable 'C'. +function f() { + return; + return; // Error: Unreachable code detected. +} +function b() { + "use strict"; + var arguments = 0; // Error: Invalid use of 'arguments' in strict mode. +} diff --git a/tests/baselines/reference/jsFileCompilationBindErrors.symbols b/tests/baselines/reference/jsFileCompilationBindErrors.symbols new file mode 100644 index 0000000000000..6ad06da1df61c --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationBindErrors.symbols @@ -0,0 +1,21 @@ +=== tests/cases/compiler/a.js === +let C = "sss"; +>C : Symbol(C, Decl(a.js, 0, 3)) + +let C = 0; // Error: Cannot redeclare block-scoped variable 'C'. +>C : Symbol(C, Decl(a.js, 1, 3)) + +function f() { +>f : Symbol(f, Decl(a.js, 1, 10)) + + return; + return; // Error: Unreachable code detected. +} + +function b() { +>b : Symbol(b, Decl(a.js, 6, 1)) + + "use strict"; + var arguments = 0; // Error: Invalid use of 'arguments' in strict mode. +>arguments : Symbol(arguments, Decl(a.js, 10, 7)) +} diff --git a/tests/baselines/reference/jsFileCompilationBindErrors.types b/tests/baselines/reference/jsFileCompilationBindErrors.types new file mode 100644 index 0000000000000..113bcd08bc91b --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationBindErrors.types @@ -0,0 +1,26 @@ +=== tests/cases/compiler/a.js === +let C = "sss"; +>C : string +>"sss" : string + +let C = 0; // Error: Cannot redeclare block-scoped variable 'C'. +>C : number +>0 : number + +function f() { +>f : () => void + + return; + return; // Error: Unreachable code detected. +} + +function b() { +>b : () => void + + "use strict"; +>"use strict" : string + + var arguments = 0; // Error: Invalid use of 'arguments' in strict mode. +>arguments : number +>0 : number +} diff --git a/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.js b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.js new file mode 100644 index 0000000000000..836b39380eafb --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.js @@ -0,0 +1,18 @@ +//// [a.js] + +class c { + method(a) { + let x = a => this.method(a); + } +} + +//// [out.js] +var c = (function () { + function c() { + } + c.prototype.method = function (a) { + var _this = this; + var x = function (a) { return _this.method(a); }; + }; + return c; +})(); diff --git a/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.symbols b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.symbols new file mode 100644 index 0000000000000..8db5aa87a5ba7 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.symbols @@ -0,0 +1,18 @@ +=== tests/cases/compiler/a.js === + +class c { +>c : Symbol(c, Decl(a.js, 0, 0)) + + method(a) { +>method : Symbol(method, Decl(a.js, 1, 9)) +>a : Symbol(a, Decl(a.js, 2, 11)) + + let x = a => this.method(a); +>x : Symbol(x, Decl(a.js, 3, 11)) +>a : Symbol(a, Decl(a.js, 3, 15)) +>this.method : Symbol(method, Decl(a.js, 1, 9)) +>this : Symbol(c, Decl(a.js, 0, 0)) +>method : Symbol(method, Decl(a.js, 1, 9)) +>a : Symbol(a, Decl(a.js, 3, 15)) + } +} diff --git a/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.types b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.types new file mode 100644 index 0000000000000..f429cc8851687 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationClassMethodContainingArrowFunction.types @@ -0,0 +1,20 @@ +=== tests/cases/compiler/a.js === + +class c { +>c : c + + method(a) { +>method : (a: any) => void +>a : any + + let x = a => this.method(a); +>x : (a: any) => void +>a => this.method(a) : (a: any) => void +>a : any +>this.method(a) : void +>this.method : (a: any) => void +>this : this +>method : (a: any) => void +>a : any + } +} diff --git a/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt new file mode 100644 index 0000000000000..a39d2e1665cf9 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,1): error TS8017: 'decorators' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + @internal class C { } + ~~~~~~~~~ +!!! error TS8017: 'decorators' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.errors.txt b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.errors.txt new file mode 100644 index 0000000000000..b05fc6fa6d944 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.errors.txt @@ -0,0 +1,17 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +tests/cases/compiler/a.ts(1,10): error TS2393: Duplicate function implementation. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/b.js (0 errors) ==== + function foo() { + return 10; + } +==== tests/cases/compiler/a.ts (1 errors) ==== + function foo() { + ~~~ +!!! error TS2393: Duplicate function implementation. + return 30; + } + + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js new file mode 100644 index 0000000000000..9b64450936186 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementation.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts] //// + +//// [b.js] +function foo() { + return 10; +} +//// [a.ts] +function foo() { + return 30; +} + + + +//// [out.js] +function foo() { + return 10; +} +function foo() { + return 30; +} + + +//// [out.d.ts] diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt new file mode 100644 index 0000000000000..82dbc27db0f40 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt @@ -0,0 +1,18 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +tests/cases/compiler/a.ts(1,10): error TS2393: Duplicate function implementation. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/a.ts (1 errors) ==== + function foo() { + ~~~ +!!! error TS2393: Duplicate function implementation. + return 30; + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function foo() { + return 10; + } + + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js new file mode 100644 index 0000000000000..d7965e91be1d3 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts] //// + +//// [a.ts] +function foo() { + return 30; +} + +//// [b.js] +function foo() { + return 10; +} + + + +//// [out.js] +function foo() { + return 30; +} +function foo() { + return 10; +} + + +//// [out.d.ts] diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariable.errors.txt b/tests/baselines/reference/jsFileCompilationDuplicateVariable.errors.txt new file mode 100644 index 0000000000000..f8ae4a1ba74cd --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariable.errors.txt @@ -0,0 +1,9 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/a.ts (0 errors) ==== + var x = 10; + +==== tests/cases/compiler/b.js (0 errors) ==== + var x = "hello"; // No error is recorded here and declaration file will show this as number \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariable.js b/tests/baselines/reference/jsFileCompilationDuplicateVariable.js new file mode 100644 index 0000000000000..a70637bc7c066 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariable.js @@ -0,0 +1,15 @@ +//// [tests/cases/compiler/jsFileCompilationDuplicateVariable.ts] //// + +//// [a.ts] +var x = 10; + +//// [b.js] +var x = "hello"; // No error is recorded here and declaration file will show this as number + +//// [out.js] +var x = 10; +var x = "hello"; // No error is recorded here and declaration file will show this as number + + +//// [out.d.ts] +declare var x: number; diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.errors.txt b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.errors.txt new file mode 100644 index 0000000000000..f1374d957673f --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.errors.txt @@ -0,0 +1,12 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +tests/cases/compiler/a.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'number'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/b.js (0 errors) ==== + var x = "hello"; + +==== tests/cases/compiler/a.ts (1 errors) ==== + var x = 10; // Error reported so no declaration file generated? + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js new file mode 100644 index 0000000000000..fd9da7c71066b --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationDuplicateVariableErrorReported.js @@ -0,0 +1,15 @@ +//// [tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts] //// + +//// [b.js] +var x = "hello"; + +//// [a.ts] +var x = 10; // Error reported so no declaration file generated? + +//// [out.js] +var x = "hello"; +var x = 10; // Error reported so no declaration file generated? + + +//// [out.d.ts] +declare var x: string; diff --git a/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt new file mode 100644 index 0000000000000..0aa9d5733d532 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt @@ -0,0 +1,19 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.ts (0 errors) ==== + // this should be emitted + class d { + } + +==== tests/cases/compiler/a.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.js b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.js new file mode 100644 index 0000000000000..ea9c9f62b8d64 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts] //// + +//// [a.ts] +class c { +} + +//// [b.ts] +// this should be emitted +class d { +} + +//// [a.js] +function foo() { +} + + +//// [b.js] +// this should be emitted +var d = (function () { + function d() { + } + return d; +})(); diff --git a/tests/baselines/reference/jsFileCompilationEmitDeclarations.errors.txt b/tests/baselines/reference/jsFileCompilationEmitDeclarations.errors.txt new file mode 100644 index 0000000000000..3e89f9c9436f5 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitDeclarations.errors.txt @@ -0,0 +1,12 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationEmitDeclarations.js b/tests/baselines/reference/jsFileCompilationEmitDeclarations.js new file mode 100644 index 0000000000000..d45ae325b0a76 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitDeclarations.js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/jsFileCompilationEmitDeclarations.ts] //// + +//// [a.ts] +class c { +} + +//// [b.js] +function foo() { +} + + +//// [out.js] +var c = (function () { + function c() { + } + return c; +})(); +function foo() { +} + + +//// [out.d.ts] +declare class c { +} diff --git a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.errors.txt b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.errors.txt new file mode 100644 index 0000000000000..0cefa2eedac20 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.errors.txt @@ -0,0 +1,16 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + /// + function foo() { + } + +==== tests/cases/compiler/c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js new file mode 100644 index 0000000000000..2d7d2743805ec --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEmitTrippleSlashReference.js @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts] //// + +//// [a.ts] +class c { +} + +//// [b.js] +/// +function foo() { +} + +//// [c.js] +function bar() { +} + +//// [out.js] +var c = (function () { + function c() { + } + return c; +})(); +function bar() { +} +/// +function foo() { +} + + +//// [out.d.ts] +declare class c { +} diff --git a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt new file mode 100644 index 0000000000000..538dfb38972bc --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,6): error TS8015: 'enum declarations' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + enum E { } + ~ +!!! error TS8015: 'enum declarations' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt new file mode 100644 index 0000000000000..641731936f84a --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -0,0 +1,19 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +error TS5055: Cannot write file 'tests/cases/compiler/c.js' because it would overwrite input file. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +!!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' because it would overwrite input file. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.ts (0 errors) ==== + /// + // b.d.ts should have c.js as the reference path since we dont emit declarations for js files + function foo() { + } + +==== tests/cases/compiler/c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js new file mode 100644 index 0000000000000..cf2caab36003a --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts] //// + +//// [a.ts] +class c { +} + +//// [b.ts] +/// +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files +function foo() { +} + +//// [c.js] +function bar() { +} + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); +//// [b.js] +/// +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files +function foo() { +} + + +//// [a.d.ts] +declare class c { +} +//// [b.d.ts] +/// +declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt new file mode 100644 index 0000000000000..441514014799d --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt @@ -0,0 +1,17 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.ts (0 errors) ==== + /// + // error on above reference when emitting declarations + function foo() { + } + +==== tests/cases/compiler/c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js new file mode 100644 index 0000000000000..67989f3e3e7da --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.js @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts] //// + +//// [a.ts] +class c { +} + +//// [b.ts] +/// +// error on above reference when emitting declarations +function foo() { +} + +//// [c.js] +function bar() { +} + +//// [out.js] +var c = (function () { + function c() { + } + return c; +})(); +function bar() { +} +/// +// error on above reference when emitting declarations +function foo() { +} + + +//// [out.d.ts] +declare class c { +} +declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.errors.txt new file mode 100644 index 0000000000000..fb6c801b42e7c --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.errors.txt @@ -0,0 +1,17 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.ts (0 errors) ==== + /// + // b.d.ts should have c.js as the reference path since we dont emit declarations for js files + function foo() { + } + +==== tests/cases/compiler/c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js new file mode 100644 index 0000000000000..afed8cd42e34e --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js @@ -0,0 +1,38 @@ +//// [tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.ts] //// + +//// [a.ts] +class c { +} + +//// [b.ts] +/// +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files +function foo() { +} + +//// [c.js] +function bar() { +} + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); +//// [c.js] +function bar() { +} +//// [b.js] +/// +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files +function foo() { +} + + +//// [a.d.ts] +declare class c { +} +//// [b.d.ts] +/// +declare function foo(): void; diff --git a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt new file mode 100644 index 0000000000000..f537941c55cf1 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + export = b; + ~~~~~~~~~~~ +!!! error TS8003: 'export=' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt new file mode 100644 index 0000000000000..33b8a45f1aab0 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,9): error TS8005: 'implements clauses' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + class C implements D { } + ~~~~~~~~~~~~ +!!! error TS8005: 'implements clauses' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt new file mode 100644 index 0000000000000..b416136703755 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,1): error TS8002: 'import ... =' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + import a = b; + ~~~~~~~~~~~~~ +!!! error TS8002: 'import ... =' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt new file mode 100644 index 0000000000000..17fb8fcb18741 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,11): error TS8006: 'interface declarations' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + interface I { } + ~ +!!! error TS8006: 'interface declarations' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationLetBeingRenamed.js b/tests/baselines/reference/jsFileCompilationLetBeingRenamed.js new file mode 100644 index 0000000000000..c9e16f359816d --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetBeingRenamed.js @@ -0,0 +1,13 @@ +//// [a.js] + +function foo(a) { + for (let a = 0; a < 10; a++) { + // do something + } +} + +//// [out.js] +function foo(a) { + for (var a_1 = 0; a_1 < 10; a_1++) { + } +} diff --git a/tests/baselines/reference/jsFileCompilationLetBeingRenamed.symbols b/tests/baselines/reference/jsFileCompilationLetBeingRenamed.symbols new file mode 100644 index 0000000000000..6b0934c659104 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetBeingRenamed.symbols @@ -0,0 +1,14 @@ +=== tests/cases/compiler/a.js === + +function foo(a) { +>foo : Symbol(foo, Decl(a.js, 0, 0)) +>a : Symbol(a, Decl(a.js, 1, 13)) + + for (let a = 0; a < 10; a++) { +>a : Symbol(a, Decl(a.js, 2, 12)) +>a : Symbol(a, Decl(a.js, 2, 12)) +>a : Symbol(a, Decl(a.js, 2, 12)) + + // do something + } +} diff --git a/tests/baselines/reference/jsFileCompilationLetBeingRenamed.types b/tests/baselines/reference/jsFileCompilationLetBeingRenamed.types new file mode 100644 index 0000000000000..094f59d20225f --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetBeingRenamed.types @@ -0,0 +1,18 @@ +=== tests/cases/compiler/a.js === + +function foo(a) { +>foo : (a: any) => void +>a : any + + for (let a = 0; a < 10; a++) { +>a : number +>0 : number +>a < 10 : boolean +>a : number +>10 : number +>a++ : number +>a : number + + // do something + } +} diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.errors.txt b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.errors.txt new file mode 100644 index 0000000000000..20a9c81ea9c62 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.errors.txt @@ -0,0 +1,12 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/b.js (0 errors) ==== + let a = 10; + b = 30; + +==== tests/cases/compiler/a.ts (0 errors) ==== + let b = 30; + a = 10; + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.js b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.js new file mode 100644 index 0000000000000..16e4b7a3011f2 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder.js @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts] //// + +//// [b.js] +let a = 10; +b = 30; + +//// [a.ts] +let b = 30; +a = 10; + + +//// [out.js] +var a = 10; +b = 30; +var b = 30; +a = 10; + + +//// [out.d.ts] +declare let b: number; diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.errors.txt b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.errors.txt new file mode 100644 index 0000000000000..b88c73e043918 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.errors.txt @@ -0,0 +1,14 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +tests/cases/compiler/a.ts(2,1): error TS2448: Block-scoped variable 'a' used before its declaration. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== tests/cases/compiler/a.ts (1 errors) ==== + let b = 30; + a = 10; + ~ +!!! error TS2448: Block-scoped variable 'a' used before its declaration. +==== tests/cases/compiler/b.js (0 errors) ==== + let a = 10; + b = 30; + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js new file mode 100644 index 0000000000000..890b1c22f717e --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationLetDeclarationOrder2.js @@ -0,0 +1,19 @@ +//// [tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts] //// + +//// [a.ts] +let b = 30; +a = 10; +//// [b.js] +let a = 10; +b = 30; + + +//// [out.js] +var b = 30; +a = 10; +var a = 10; +b = 30; + + +//// [out.d.ts] +declare let b: number; diff --git a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt new file mode 100644 index 0000000000000..662028c53ed93 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,8): error TS8007: 'module declarations' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + module M { } + ~ +!!! error TS8007: 'module declarations' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt new file mode 100644 index 0000000000000..f2f4142b99380 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -0,0 +1,17 @@ +error TS5055: Cannot write file 'tests/cases/compiler/c.js' because it would overwrite input file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' because it would overwrite input file. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.ts (0 errors) ==== + /// + // no error on above reference path since not emitting declarations + function foo() { + } + +==== tests/cases/compiler/c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js new file mode 100644 index 0000000000000..2d84420798686 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts] //// + +//// [a.ts] +class c { +} + +//// [b.ts] +/// +// no error on above reference path since not emitting declarations +function foo() { +} + +//// [c.js] +function bar() { +} + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); +//// [b.js] +/// +// no error on above reference path since not emitting declarations +function foo() { +} diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.js b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.js new file mode 100644 index 0000000000000..fae4936b6c916 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.js @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts] //// + +//// [a.ts] +class c { +} + +//// [b.ts] +/// +//no error on above reference since not emitting declarations +function foo() { +} + +//// [c.js] +function bar() { +} + +//// [out.js] +var c = (function () { + function c() { + } + return c; +})(); +function bar() { +} +/// +//no error on above reference since not emitting declarations +function foo() { +} diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.symbols b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.symbols new file mode 100644 index 0000000000000..2f3cf3e078567 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.symbols @@ -0,0 +1,16 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : Symbol(c, Decl(a.ts, 0, 0)) +} + +=== tests/cases/compiler/b.ts === +/// +//no error on above reference since not emitting declarations +function foo() { +>foo : Symbol(foo, Decl(b.ts, 0, 0)) +} + +=== tests/cases/compiler/c.js === +function bar() { +>bar : Symbol(bar, Decl(c.js, 0, 0)) +} diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.types b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.types new file mode 100644 index 0000000000000..cd9a6dfafba38 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.types @@ -0,0 +1,16 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : c +} + +=== tests/cases/compiler/b.ts === +/// +//no error on above reference since not emitting declarations +function foo() { +>foo : () => void +} + +=== tests/cases/compiler/c.js === +function bar() { +>bar : () => void +} diff --git a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt new file mode 100644 index 0000000000000..295f827dd2d7c --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,13): error TS8009: '?' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + function F(p?) { } + ~ +!!! error TS8009: '?' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt new file mode 100644 index 0000000000000..fd5ea666459c1 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,11): error TS8014: 'property declarations' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + class C { v } + ~ +!!! error TS8014: 'property declarations' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt new file mode 100644 index 0000000000000..d67c9baea70e5 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt @@ -0,0 +1,12 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(2,5): error TS8009: 'public' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + class C { + public foo() { + ~~~~~~ +!!! error TS8009: 'public' can only be used in a .ts file. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt new file mode 100644 index 0000000000000..bc4913f6217b4 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,23): error TS8012: 'parameter modifiers' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + class C { constructor(public x) { }} + ~~~~~~ +!!! error TS8012: 'parameter modifiers' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationRestParameter.js b/tests/baselines/reference/jsFileCompilationRestParameter.js new file mode 100644 index 0000000000000..bcba97af02497 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationRestParameter.js @@ -0,0 +1,5 @@ +//// [a.js] +function foo(...a) { } + +//// [b.js] +function foo(...a) { } diff --git a/tests/baselines/reference/jsFileCompilationRestParameter.symbols b/tests/baselines/reference/jsFileCompilationRestParameter.symbols new file mode 100644 index 0000000000000..4ce7529b83d20 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationRestParameter.symbols @@ -0,0 +1,5 @@ +=== tests/cases/compiler/a.js === +function foo(...a) { } +>foo : Symbol(foo, Decl(a.js, 0, 0)) +>a : Symbol(a, Decl(a.js, 0, 13)) + diff --git a/tests/baselines/reference/jsFileCompilationRestParameter.types b/tests/baselines/reference/jsFileCompilationRestParameter.types new file mode 100644 index 0000000000000..54d0ec8631f40 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationRestParameter.types @@ -0,0 +1,5 @@ +=== tests/cases/compiler/a.js === +function foo(...a) { } +>foo : (...a: any[]) => void +>a : any[] + diff --git a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt new file mode 100644 index 0000000000000..6dad5a294854c --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + function F(): number { } + ~~~~~~ +!!! error TS8010: 'types' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationShortHandProperty.js b/tests/baselines/reference/jsFileCompilationShortHandProperty.js new file mode 100644 index 0000000000000..1dc269146a63d --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationShortHandProperty.js @@ -0,0 +1,20 @@ +//// [a.js] + +function foo() { + var a = 10; + var b = "Hello"; + return { + a, + b + }; +} + +//// [out.js] +function foo() { + var a = 10; + var b = "Hello"; + return { + a: a, + b: b + }; +} diff --git a/tests/baselines/reference/jsFileCompilationShortHandProperty.symbols b/tests/baselines/reference/jsFileCompilationShortHandProperty.symbols new file mode 100644 index 0000000000000..fb42d121c8055 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationShortHandProperty.symbols @@ -0,0 +1,20 @@ +=== tests/cases/compiler/a.js === + +function foo() { +>foo : Symbol(foo, Decl(a.js, 0, 0)) + + var a = 10; +>a : Symbol(a, Decl(a.js, 2, 7)) + + var b = "Hello"; +>b : Symbol(b, Decl(a.js, 3, 7)) + + return { + a, +>a : Symbol(a, Decl(a.js, 4, 12)) + + b +>b : Symbol(b, Decl(a.js, 5, 10)) + + }; +} diff --git a/tests/baselines/reference/jsFileCompilationShortHandProperty.types b/tests/baselines/reference/jsFileCompilationShortHandProperty.types new file mode 100644 index 0000000000000..e4dd1755cebb7 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationShortHandProperty.types @@ -0,0 +1,24 @@ +=== tests/cases/compiler/a.js === + +function foo() { +>foo : () => { a: number; b: string; } + + var a = 10; +>a : number +>10 : number + + var b = "Hello"; +>b : string +>"Hello" : string + + return { +>{ a, b } : { a: number; b: string; } + + a, +>a : number + + b +>b : string + + }; +} diff --git a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt new file mode 100644 index 0000000000000..6e55ff30f04fd --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt @@ -0,0 +1,14 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(3,6): error TS1223: 'type' tag already specified. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + /** + * @type {number} + * @type {string} + ~~~~ +!!! error TS1223: 'type' tag already specified. + */ + var v; + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt new file mode 100644 index 0000000000000..bc4d8e903ad62 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,1): error TS8008: 'type aliases' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + type a = b; + ~~~~~~~~~~~ +!!! error TS8008: 'type aliases' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt new file mode 100644 index 0000000000000..8ac59196ed960 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,5): error TS8011: 'type arguments' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + Foo(); + ~~~~~~ +!!! error TS8011: 'type arguments' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt new file mode 100644 index 0000000000000..e73ee46fb89c9 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,10): error TS8016: 'type assertion expressions' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + var v = undefined; + ~~~~~~ +!!! error TS8016: 'type assertion expressions' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt new file mode 100644 index 0000000000000..680b32a64f1ad --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + function F(a: number) { } + ~~~~~~ +!!! error TS8010: 'types' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt new file mode 100644 index 0000000000000..161c832ffd5d4 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,9): error TS8004: 'type parameter declarations' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + class C { } + ~ +!!! error TS8004: 'type parameter declarations' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt new file mode 100644 index 0000000000000..d7626f68564cf --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,12): error TS8004: 'type parameter declarations' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + function F() { } + ~ +!!! error TS8004: 'type parameter declarations' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt new file mode 100644 index 0000000000000..2c6ac3771bef8 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt @@ -0,0 +1,9 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +tests/cases/compiler/a.js(1,8): error TS8010: 'types' can only be used in a .ts file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +==== tests/cases/compiler/a.js (1 errors) ==== + var v: () => number; + ~~~~~~~~~~~~ +!!! error TS8010: 'types' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt new file mode 100644 index 0000000000000..84900bccc8848 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt @@ -0,0 +1,10 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' because it would overwrite input file. + + +!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/a.d.ts (0 errors) ==== + declare function isC(): boolean; \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.js b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.js new file mode 100644 index 0000000000000..a7ba8b49985a9 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.js @@ -0,0 +1,15 @@ +//// [tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts] //// + +//// [a.ts] +class c { +} + +//// [a.d.ts] +declare function isC(): boolean; + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); diff --git a/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt b/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt new file mode 100644 index 0000000000000..4cc2cc2ab4547 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt @@ -0,0 +1,14 @@ +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/a.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt new file mode 100644 index 0000000000000..06186b9f0b2fc --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt @@ -0,0 +1,18 @@ +error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. +error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. +!!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. +==== tests/cases/compiler/a.ts (0 errors) ==== + + class c { + } + +==== tests/cases/compiler/b.js.map (0 errors) ==== + function foo() { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js new file mode 100644 index 0000000000000..a5351de087c7d --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts] //// + +//// [a.ts] + +class c { +} + +//// [b.js.map] +function foo() { +} + +//// [b.js] +function bar() { +} + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); +//# sourceMappingURL=a.js.map \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js.map b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js.map new file mode 100644 index 0000000000000..d56cd75b1c2d9 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.js.map @@ -0,0 +1,2 @@ +//// [a.js.map] +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AACA;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.sourcemap.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.sourcemap.txt new file mode 100644 index 0000000000000..db0f57e590959 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.sourcemap.txt @@ -0,0 +1,58 @@ +=================================================================== +JsFile: a.js +mapUrl: a.js.map +sourceRoot: +sources: a.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/a.js +sourceFile:a.ts +------------------------------------------------------------------- +>>>var c = (function () { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +--- +>>> function c() { +1->^^^^ +2 > ^^-> +1-> +1->Emitted(2, 5) Source(2, 1) + SourceIndex(0) +--- +>>> } +1->^^^^ +2 > ^ +3 > ^^^^^^^^^-> +1->class c { + > +2 > } +1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(3, 2) + SourceIndex(0) +--- +>>> return c; +1->^^^^ +2 > ^^^^^^^^ +1-> +2 > } +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) +2 >Emitted(4, 13) Source(3, 2) + SourceIndex(0) +--- +>>>})(); +1 > +2 >^ +3 > +4 > ^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +4 > class c { + > } +1 >Emitted(5, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(3, 2) + SourceIndex(0) +3 >Emitted(5, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(5, 6) Source(3, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=a.js.map \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt new file mode 100644 index 0000000000000..06186b9f0b2fc --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt @@ -0,0 +1,18 @@ +error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. +error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. +!!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. +==== tests/cases/compiler/a.ts (0 errors) ==== + + class c { + } + +==== tests/cases/compiler/b.js.map (0 errors) ==== + function foo() { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js new file mode 100644 index 0000000000000..e0395e553c56e --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts] //// + +//// [a.ts] + +class c { +} + +//// [b.js.map] +function foo() { +} + +//// [b.js] +function bar() { +} + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0E7SUFBQTtJQUNBLENBQUM7SUFBRCxRQUFDO0FBQUQsQ0FBQyxBQURELElBQ0MifQ== \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt new file mode 100644 index 0000000000000..41b2ac54f0ace --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt @@ -0,0 +1,58 @@ +=================================================================== +JsFile: a.js +mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0E7SUFBQTtJQUNBLENBQUM7SUFBRCxRQUFDO0FBQUQsQ0FBQyxBQURELElBQ0MifQ== +sourceRoot: +sources: a.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/a.js +sourceFile:a.ts +------------------------------------------------------------------- +>>>var c = (function () { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +--- +>>> function c() { +1->^^^^ +2 > ^^-> +1-> +1->Emitted(2, 5) Source(2, 1) + SourceIndex(0) +--- +>>> } +1->^^^^ +2 > ^ +3 > ^^^^^^^^^-> +1->class c { + > +2 > } +1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(3, 2) + SourceIndex(0) +--- +>>> return c; +1->^^^^ +2 > ^^^^^^^^ +1-> +2 > } +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) +2 >Emitted(4, 13) Source(3, 2) + SourceIndex(0) +--- +>>>})(); +1 > +2 >^ +3 > +4 > ^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +4 > class c { + > } +1 >Emitted(5, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(3, 2) + SourceIndex(0) +3 >Emitted(5, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(5, 6) Source(3, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0E7SUFBQTtJQUNBLENBQUM7SUFBRCxRQUFDO0FBQUQsQ0FBQyxBQURELElBQ0MifQ== \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.errors.txt new file mode 100644 index 0000000000000..c9a4408f4233c --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.errors.txt @@ -0,0 +1,18 @@ +error TS6054: File 'tests/cases/compiler/b.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. +error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. + + +!!! error TS6054: File 'tests/cases/compiler/b.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. +!!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. +==== tests/cases/compiler/a.ts (0 errors) ==== + + class c { + } + +==== tests/cases/compiler/b.js.map (0 errors) ==== + function foo() { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js new file mode 100644 index 0000000000000..742e7af2799b6 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts] //// + +//// [a.ts] + +class c { +} + +//// [b.js.map] +function foo() { +} + +//// [b.js] +function bar() { +} + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); +//# sourceMappingURL=a.js.map \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map new file mode 100644 index 0000000000000..4b90f5d778ccb --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map @@ -0,0 +1,2 @@ +//// [a.js.map] +{"version":3,"file":"a.js","sourceRoot":"","sources":["../tests/cases/compiler/a.ts"],"names":[],"mappings":"AACA;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt new file mode 100644 index 0000000000000..762af7a798aad --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt @@ -0,0 +1,58 @@ +=================================================================== +JsFile: a.js +mapUrl: a.js.map +sourceRoot: +sources: ../tests/cases/compiler/a.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:out/a.js +sourceFile:../tests/cases/compiler/a.ts +------------------------------------------------------------------- +>>>var c = (function () { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +--- +>>> function c() { +1->^^^^ +2 > ^^-> +1-> +1->Emitted(2, 5) Source(2, 1) + SourceIndex(0) +--- +>>> } +1->^^^^ +2 > ^ +3 > ^^^^^^^^^-> +1->class c { + > +2 > } +1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(3, 2) + SourceIndex(0) +--- +>>> return c; +1->^^^^ +2 > ^^^^^^^^ +1-> +2 > } +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) +2 >Emitted(4, 13) Source(3, 2) + SourceIndex(0) +--- +>>>})(); +1 > +2 >^ +3 > +4 > ^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +4 > class c { + > } +1 >Emitted(5, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(3, 2) + SourceIndex(0) +3 >Emitted(5, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(5, 6) Source(3, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=a.js.map \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithOut.js b/tests/baselines/reference/jsFileCompilationWithOut.js new file mode 100644 index 0000000000000..32d0261061f6f --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithOut.js @@ -0,0 +1,19 @@ +//// [tests/cases/compiler/jsFileCompilationWithOut.ts] //// + +//// [a.ts] +class c { +} + +//// [b.js] +function foo() { +} + + +//// [out.js] +var c = (function () { + function c() { + } + return c; +})(); +function foo() { +} diff --git a/tests/baselines/reference/jsFileCompilationWithOut.symbols b/tests/baselines/reference/jsFileCompilationWithOut.symbols new file mode 100644 index 0000000000000..5260b8d6cf36a --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithOut.symbols @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : Symbol(c, Decl(a.ts, 0, 0)) +} + +=== tests/cases/compiler/b.js === +function foo() { +>foo : Symbol(foo, Decl(b.js, 0, 0)) +} + diff --git a/tests/baselines/reference/jsFileCompilationWithOut.types b/tests/baselines/reference/jsFileCompilationWithOut.types new file mode 100644 index 0000000000000..dce83eeb8ebb7 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithOut.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.ts === +class c { +>c : c +} + +=== tests/cases/compiler/b.js === +function foo() { +>foo : () => void +} + diff --git a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt new file mode 100644 index 0000000000000..826f906538fd1 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt @@ -0,0 +1,10 @@ +error TS5055: Cannot write file 'tests/cases/compiler/b.d.ts' because it would overwrite input file. + + +!!! error TS5055: Cannot write file 'b.d.ts' because it would overwrite input file. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.d.ts (0 errors) ==== + declare function foo(): boolean; \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.js b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.js new file mode 100644 index 0000000000000..d3b2f788d6605 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.js @@ -0,0 +1,15 @@ +//// [tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts] //// + +//// [a.ts] +class c { +} + +//// [b.d.ts] +declare function foo(): boolean; + +//// [b.js] +var c = (function () { + function c() { + } + return c; +})(); diff --git a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt new file mode 100644 index 0000000000000..0f6852b21a0a2 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt @@ -0,0 +1,12 @@ +error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithoutJsExtensions.errors.txt b/tests/baselines/reference/jsFileCompilationWithoutJsExtensions.errors.txt new file mode 100644 index 0000000000000..0b1a757d4fd6f --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithoutJsExtensions.errors.txt @@ -0,0 +1,6 @@ +error TS6054: File 'tests/cases/compiler/a.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. + + +!!! error TS6054: File 'tests/cases/compiler/a.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. +==== tests/cases/compiler/a.js (0 errors) ==== + declare var v; \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt new file mode 100644 index 0000000000000..0f6852b21a0a2 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt @@ -0,0 +1,12 @@ +error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. + + +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. +==== tests/cases/compiler/a.ts (0 errors) ==== + class c { + } + +==== tests/cases/compiler/b.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.js b/tests/baselines/reference/jsFileCompilationWithoutOut.js new file mode 100644 index 0000000000000..4a60c54c3aba3 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationWithoutOut.js @@ -0,0 +1,17 @@ +//// [tests/cases/compiler/jsFileCompilationWithoutOut.ts] //// + +//// [a.ts] +class c { +} + +//// [b.js] +function foo() { +} + + +//// [a.js] +var c = (function () { + function c() { + } + return c; +})(); diff --git a/tests/baselines/reference/jsxImportInAttribute.js b/tests/baselines/reference/jsxImportInAttribute.js index 40b21e87c3fd2..552c7e26f12f2 100644 --- a/tests/baselines/reference/jsxImportInAttribute.js +++ b/tests/baselines/reference/jsxImportInAttribute.js @@ -15,6 +15,7 @@ let x = Test; // emit test_1.default //// [consumer.jsx] +"use strict"; /// var Test_1 = require('Test'); var x = Test_1["default"]; // emit test_1.default diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index 6bf61af67f5fb..c980dc256c625 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -24,6 +24,7 @@ class TestComponent extends React.Component { //// [consumer.jsx] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/keywordInJsxIdentifier.js b/tests/baselines/reference/keywordInJsxIdentifier.js index 677a79138e6ff..39f33449dadf3 100644 --- a/tests/baselines/reference/keywordInJsxIdentifier.js +++ b/tests/baselines/reference/keywordInJsxIdentifier.js @@ -9,6 +9,6 @@ declare var React: any; //// [keywordInJsxIdentifier.js] React.createElement("foo", {"class-id": true}); -React.createElement("foo", {"class": true}); +React.createElement("foo", {class: true}); React.createElement("foo", {"class-id": "1"}); -React.createElement("foo", {"class": "1"}); +React.createElement("foo", {class: "1"}); diff --git a/tests/baselines/reference/literalsInComputedProperties1.errors.txt b/tests/baselines/reference/literalsInComputedProperties1.errors.txt new file mode 100644 index 0000000000000..e9972229f795f --- /dev/null +++ b/tests/baselines/reference/literalsInComputedProperties1.errors.txt @@ -0,0 +1,66 @@ +tests/cases/compiler/literalsInComputedProperties1.ts(40,5): error TS2452: An enum member cannot have a numeric name. +tests/cases/compiler/literalsInComputedProperties1.ts(41,5): error TS2452: An enum member cannot have a numeric name. +tests/cases/compiler/literalsInComputedProperties1.ts(42,5): error TS2452: An enum member cannot have a numeric name. +tests/cases/compiler/literalsInComputedProperties1.ts(43,5): error TS2452: An enum member cannot have a numeric name. + + +==== tests/cases/compiler/literalsInComputedProperties1.ts (4 errors) ==== + + let x = { + 1:1, + [2]:1, + "3":1, + ["4"]:1 + } + x[1].toExponential(); + x[2].toExponential(); + x[3].toExponential(); + x[4].toExponential(); + + interface A { + 1:number; + [2]:number; + "3":number; + ["4"]:number; + } + + let y:A; + y[1].toExponential(); + y[2].toExponential(); + y[3].toExponential(); + y[4].toExponential(); + + class C { + 1:number; + [2]:number; + "3":number; + ["4"]:number; + } + + let z:C; + z[1].toExponential(); + z[2].toExponential(); + z[3].toExponential(); + z[4].toExponential(); + + enum X { + 1 = 1, + ~ +!!! error TS2452: An enum member cannot have a numeric name. + [2] = 2, + ~~~ +!!! error TS2452: An enum member cannot have a numeric name. + "3" = 3, + ~~~ +!!! error TS2452: An enum member cannot have a numeric name. + ["4"] = 4, + ~~~~~ +!!! error TS2452: An enum member cannot have a numeric name. + "foo" = 5, + ["bar"] = 6 + } + + let a = X["foo"]; + let a0 = X["bar"]; + + // TODO: make sure that enum still disallow template literals as member names \ No newline at end of file diff --git a/tests/baselines/reference/literalsInComputedProperties1.js b/tests/baselines/reference/literalsInComputedProperties1.js new file mode 100644 index 0000000000000..ef11dbff6ea4a --- /dev/null +++ b/tests/baselines/reference/literalsInComputedProperties1.js @@ -0,0 +1,94 @@ +//// [literalsInComputedProperties1.ts] + +let x = { + 1:1, + [2]:1, + "3":1, + ["4"]:1 +} +x[1].toExponential(); +x[2].toExponential(); +x[3].toExponential(); +x[4].toExponential(); + +interface A { + 1:number; + [2]:number; + "3":number; + ["4"]:number; +} + +let y:A; +y[1].toExponential(); +y[2].toExponential(); +y[3].toExponential(); +y[4].toExponential(); + +class C { + 1:number; + [2]:number; + "3":number; + ["4"]:number; +} + +let z:C; +z[1].toExponential(); +z[2].toExponential(); +z[3].toExponential(); +z[4].toExponential(); + +enum X { + 1 = 1, + [2] = 2, + "3" = 3, + ["4"] = 4, + "foo" = 5, + ["bar"] = 6 +} + +let a = X["foo"]; +let a0 = X["bar"]; + +// TODO: make sure that enum still disallow template literals as member names + +//// [literalsInComputedProperties1.js] +var x = (_a = { + 1: 1 + }, + _a[2] = 1, + _a["3"] = 1, + _a["4"] = 1, + _a +); +x[1].toExponential(); +x[2].toExponential(); +x[3].toExponential(); +x[4].toExponential(); +var y; +y[1].toExponential(); +y[2].toExponential(); +y[3].toExponential(); +y[4].toExponential(); +var C = (function () { + function C() { + } + return C; +})(); +var z; +z[1].toExponential(); +z[2].toExponential(); +z[3].toExponential(); +z[4].toExponential(); +var X; +(function (X) { + X[X["1"] = 1] = "1"; + X[X[2] = 2] = 2; + X[X["3"] = 3] = "3"; + X[X["4"] = 4] = "4"; + X[X["foo"] = 5] = "foo"; + X[X["bar"] = 6] = "bar"; +})(X || (X = {})); +var a = X["foo"]; +var a0 = X["bar"]; +var _a; +// TODO: make sure that enum still disallow template literals as member names diff --git a/tests/baselines/reference/localAliasExportAssignment.js b/tests/baselines/reference/localAliasExportAssignment.js index 686ab4126a27b..4a8c519dc7734 100644 --- a/tests/baselines/reference/localAliasExportAssignment.js +++ b/tests/baselines/reference/localAliasExportAssignment.js @@ -17,9 +17,11 @@ connect(); //// [localAliasExportAssignment_0.js] +"use strict"; var server; module.exports = server; //// [localAliasExportAssignment_1.js] +"use strict"; /// var connect = require('./localAliasExportAssignment_0'); connect(); diff --git a/tests/baselines/reference/memberAccessMustUseModuleInstances.js b/tests/baselines/reference/memberAccessMustUseModuleInstances.js index b6c26e908f725..bbeafeab3462a 100644 --- a/tests/baselines/reference/memberAccessMustUseModuleInstances.js +++ b/tests/baselines/reference/memberAccessMustUseModuleInstances.js @@ -16,6 +16,7 @@ WinJS.Promise.timeout(10); //// [memberAccessMustUseModuleInstances_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; var Promise = (function () { function Promise() { } @@ -28,5 +29,6 @@ define(["require", "exports"], function (require, exports) { }); //// [memberAccessMustUseModuleInstances_1.js] define(["require", "exports", 'memberAccessMustUseModuleInstances_0'], function (require, exports, WinJS) { + "use strict"; WinJS.Promise.timeout(10); }); diff --git a/tests/baselines/reference/memberFunctionsWithPublicOverloads.types b/tests/baselines/reference/memberFunctionsWithPublicOverloads.types index 7cbc2aca1ffb8..bcd937e9cfc2b 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicOverloads.types +++ b/tests/baselines/reference/memberFunctionsWithPublicOverloads.types @@ -17,20 +17,20 @@ class C { >y : any public bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } ->x : 'hi' +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>x : "hi" public bar(x: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } >x : string public bar(x: number, y: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } >x : number >y : string public bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } >x : any >y : any @@ -49,20 +49,20 @@ class C { >y : any public static bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } ->x : 'hi' +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>x : "hi" public static bar(x: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } >x : string public static bar(x: number, y: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } >x : number >y : string public static bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } >x : any >y : any } @@ -88,22 +88,22 @@ class D { >y : any public bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } ->x : 'hi' +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } +>x : "hi" public bar(x: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } >x : string public bar(x: T, y: T); ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } >x : T >T : T >y : T >T : T public bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; } >x : any >y : any @@ -122,20 +122,20 @@ class D { >y : any public static bar(x: 'hi'); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } ->x : 'hi' +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } +>x : "hi" public static bar(x: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } >x : string public static bar(x: number, y: string); ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } >x : number >y : string public static bar(x: any, y?: any) { } ->bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; } +>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; } >x : any >y : any diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen.js index d5cda7c91099d..64a4b9d00bd89 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen.js @@ -16,6 +16,7 @@ export module X { } //// [mergedModuleDeclarationCodeGen.js] +"use strict"; var X; (function (X) { var Y; diff --git a/tests/baselines/reference/missingImportAfterModuleImport.js b/tests/baselines/reference/missingImportAfterModuleImport.js index 1d4f55a4df1f3..5312f8b0cf6ee 100644 --- a/tests/baselines/reference/missingImportAfterModuleImport.js +++ b/tests/baselines/reference/missingImportAfterModuleImport.js @@ -25,6 +25,7 @@ export = MainModule; //// [missingImportAfterModuleImport_0.js] //// [missingImportAfterModuleImport_1.js] +"use strict"; var MainModule = (function () { function MainModule() { } diff --git a/tests/baselines/reference/mixedStaticAndInstanceClassMembers.errors.txt b/tests/baselines/reference/mixedStaticAndInstanceClassMembers.errors.txt new file mode 100644 index 0000000000000..d52b17a58a034 --- /dev/null +++ b/tests/baselines/reference/mixedStaticAndInstanceClassMembers.errors.txt @@ -0,0 +1,27 @@ +tests/cases/compiler/mixedStaticAndInstanceClassMembers.ts(4,5): error TS2387: Function overload must be static. +tests/cases/compiler/mixedStaticAndInstanceClassMembers.ts(12,12): error TS2388: Function overload must not be static. +tests/cases/compiler/mixedStaticAndInstanceClassMembers.ts(13,5): error TS2387: Function overload must be static. + + +==== tests/cases/compiler/mixedStaticAndInstanceClassMembers.ts (3 errors) ==== + class A { + f() {} + static m1 (a: string): void; + m1 (a: number): void; + ~~ +!!! error TS2387: Function overload must be static. + m1 (a: any): void { + } + } + + class B { + f() {} + m1 (a: string): void; + static m1 (a: number): void; + ~~ +!!! error TS2388: Function overload must not be static. + m1 (a: any): void { + ~~ +!!! error TS2387: Function overload must be static. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/mixedStaticAndInstanceClassMembers.js b/tests/baselines/reference/mixedStaticAndInstanceClassMembers.js new file mode 100644 index 0000000000000..427bbf65aa19b --- /dev/null +++ b/tests/baselines/reference/mixedStaticAndInstanceClassMembers.js @@ -0,0 +1,34 @@ +//// [mixedStaticAndInstanceClassMembers.ts] +class A { + f() {} + static m1 (a: string): void; + m1 (a: number): void; + m1 (a: any): void { + } +} + +class B { + f() {} + m1 (a: string): void; + static m1 (a: number): void; + m1 (a: any): void { + } +} + +//// [mixedStaticAndInstanceClassMembers.js] +var A = (function () { + function A() { + } + A.prototype.f = function () { }; + A.prototype.m1 = function (a) { + }; + return A; +})(); +var B = (function () { + function B() { + } + B.prototype.f = function () { }; + B.prototype.m1 = function (a) { + }; + return B; +})(); diff --git a/tests/baselines/reference/moduleAliasAsFunctionArgument.js b/tests/baselines/reference/moduleAliasAsFunctionArgument.js index ae95e2f7361d8..3706eae6ae24a 100644 --- a/tests/baselines/reference/moduleAliasAsFunctionArgument.js +++ b/tests/baselines/reference/moduleAliasAsFunctionArgument.js @@ -16,9 +16,11 @@ fn(a); // Error: property 'x' is missing from 'a' //// [moduleAliasAsFunctionArgument_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [moduleAliasAsFunctionArgument_1.js] define(["require", "exports", 'moduleAliasAsFunctionArgument_0'], function (require, exports, a) { + "use strict"; function fn(arg) { } a.x; // OK diff --git a/tests/baselines/reference/moduleCodeGenTest5.js b/tests/baselines/reference/moduleCodeGenTest5.js index afc1ce23e3707..bfb1d0e56c358 100644 --- a/tests/baselines/reference/moduleCodeGenTest5.js +++ b/tests/baselines/reference/moduleCodeGenTest5.js @@ -22,6 +22,7 @@ var v = E2.B; //// [moduleCodeGenTest5.js] +"use strict"; exports.x = 0; var y = 0; function f1() { } diff --git a/tests/baselines/reference/moduleCodegenTest4.js b/tests/baselines/reference/moduleCodegenTest4.js index 884b88e0160c8..362785a5d6805 100644 --- a/tests/baselines/reference/moduleCodegenTest4.js +++ b/tests/baselines/reference/moduleCodegenTest4.js @@ -5,6 +5,7 @@ Baz.x = "goodbye"; void 0; //// [moduleCodegenTest4.js] +"use strict"; var Baz; (function (Baz) { Baz.x = "hello"; diff --git a/tests/baselines/reference/moduleExports1.js b/tests/baselines/reference/moduleExports1.js index 70ed9380c592f..724237c35cf27 100644 --- a/tests/baselines/reference/moduleExports1.js +++ b/tests/baselines/reference/moduleExports1.js @@ -15,6 +15,7 @@ if (!module.exports) module.exports = ""; //// [moduleExports1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var TypeScript; (function (TypeScript) { var Strasse; diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index 9b7449b95ca81..81be08f21c2ad 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -13,6 +13,7 @@ class Test1 extends C1 { //// [moduleImportedForTypeArgumentPosition_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [moduleImportedForTypeArgumentPosition_1.js] var __extends = (this && this.__extends) || function (d, b) { @@ -21,6 +22,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; define(["require", "exports"], function (require, exports) { + "use strict"; var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/moduleInTypePosition1.js b/tests/baselines/reference/moduleInTypePosition1.js index bcce5f7463259..970cc300b178e 100644 --- a/tests/baselines/reference/moduleInTypePosition1.js +++ b/tests/baselines/reference/moduleInTypePosition1.js @@ -12,6 +12,7 @@ var x = (w1: WinJS) => { }; //// [moduleInTypePosition1_0.js] +"use strict"; var Promise = (function () { function Promise() { } @@ -19,4 +20,5 @@ var Promise = (function () { })(); exports.Promise = Promise; //// [moduleInTypePosition1_1.js] +"use strict"; var x = function (w1) { }; diff --git a/tests/baselines/reference/moduleMergeConstructor.js b/tests/baselines/reference/moduleMergeConstructor.js index f47e579111713..70e43e25bbbc6 100644 --- a/tests/baselines/reference/moduleMergeConstructor.js +++ b/tests/baselines/reference/moduleMergeConstructor.js @@ -29,6 +29,7 @@ class Test { //// [index.js] define(["require", "exports", "foo"], function (require, exports, foo) { + "use strict"; var Test = (function () { function Test() { this.bar = new foo.Foo(); diff --git a/tests/baselines/reference/moduleResolutionNoResolve.js b/tests/baselines/reference/moduleResolutionNoResolve.js index 9f0537a5ad5c2..c73be6b6981f1 100644 --- a/tests/baselines/reference/moduleResolutionNoResolve.js +++ b/tests/baselines/reference/moduleResolutionNoResolve.js @@ -9,5 +9,7 @@ export var c = ''; //// [a.js] +"use strict"; //// [b.js] +"use strict"; exports.c = ''; diff --git a/tests/baselines/reference/moduleScoping.js b/tests/baselines/reference/moduleScoping.js index cbe435e570c97..adfcd3673a86c 100644 --- a/tests/baselines/reference/moduleScoping.js +++ b/tests/baselines/reference/moduleScoping.js @@ -28,9 +28,11 @@ var v1 = "sausages"; // Global scope var v2 = 42; // Global scope var v4 = function () { return 5; }; //// [file3.js] +"use strict"; exports.v3 = true; var v2 = [1, 2, 3]; // Module scope. Should not appear in global scope //// [file4.js] +"use strict"; var file3 = require('./file3'); var t1 = v1; var t2 = v2; diff --git a/tests/baselines/reference/moduledecl.errors.txt b/tests/baselines/reference/moduledecl.errors.txt deleted file mode 100644 index 2ef60f058c2ac..0000000000000 --- a/tests/baselines/reference/moduledecl.errors.txt +++ /dev/null @@ -1,241 +0,0 @@ -tests/cases/compiler/moduledecl.ts(164,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/moduledecl.ts(172,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/moduledecl.ts (2 errors) ==== - module a { - } - - module b.a { - } - - module c.a.b { - import ma = a; - } - - module mImport { - import d = a; - import e = b.a; - import d1 = a; - import e1 = b.a; - } - - module m0 { - function f1() { - } - - function f2(s: string); - function f2(n: number); - function f2(ns: any) { - } - - class c1 { - public a : ()=>string; - private b: ()=>number; - private static s1; - public static s2; - } - - interface i1 { - () : Object; - [n: number]: c1; - } - - import m2 = a; - import m3 = b; - import m4 = b.a; - import m5 = c; - import m6 = c.a; - import m7 = c.a.b; - } - - module m1 { - export function f1() { - } - - export function f2(s: string); - export function f2(n: number); - export function f2(ns: any) { - } - - export class c1 { - public a: () =>string; - private b: () =>number; - private static s1; - public static s2; - - public d() { - return "Hello"; - } - - public e: { x: number; y: string; }; - constructor (public n, public n2: number, private n3, private n4: string) { - } - } - - export interface i1 { - () : Object; - [n: number]: c1; - } - - import m2 = a; - import m3 = b; - import m4 = b.a; - import m5 = c; - import m6 = c.a; - import m7 = c.a.b; - } - - module m { - export module m2 { - var a = 10; - export var b: number; - } - - export module m3 { - export var c: number; - } - } - - module m { - - export module m25 { - export module m5 { - export var c: number; - } - } - } - - module m13 { - export module m4 { - export module m2 { - export module m3 { - export var c: number; - } - } - - export function f() { - return 20; - } - } - } - - declare module m4 { - export var b; - } - - declare module m5 { - export var c; - } - - declare module m43 { - export var b; - } - - declare module m55 { - export var c; - } - - declare module "m3" { - export var b: number; - } - - module exportTests { - export class C1_public { - private f2() { - return 30; - } - - public f3() { - return "string"; - } - } - class C2_private { - private f2() { - return 30; - } - - public f3() { - return "string"; - } - } - - export class C3_public { - private getC2_private() { - return new C2_private(); - } - private setC2_private(arg: C2_private) { - } - private get c2() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return new C2_private(); - } - public getC1_public() { - return new C1_public(); - } - public setC1_public(arg: C1_public) { - } - public get c1() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return new C1_public(); - } - } - } - - declare module mAmbient { - class C { - public myProp: number; - } - - function foo() : C; - var aVar: C; - interface B { - x: number; - y: C; - } - enum e { - x, - y, - z - } - - module m3 { - class C { - public myProp: number; - } - - function foo(): C; - var aVar: C; - interface B { - x: number; - y: C; - } - enum e { - x, - y, - z - } - } - } - - function foo() { - return mAmbient.foo(); - } - - var cVar = new mAmbient.C(); - var aVar = mAmbient.aVar; - var bB: mAmbient.B; - var eVar: mAmbient.e; - - function m3foo() { - return mAmbient.m3.foo(); - } - - var m3cVar = new mAmbient.m3.C(); - var m3aVar = mAmbient.m3.aVar; - var m3bB: mAmbient.m3.B; - var m3eVar: mAmbient.m3.e; - - \ No newline at end of file diff --git a/tests/baselines/reference/moduledecl.js b/tests/baselines/reference/moduledecl.js index ef3b9a2965c3f..f835729dc4db2 100644 --- a/tests/baselines/reference/moduledecl.js +++ b/tests/baselines/reference/moduledecl.js @@ -1,4 +1,5 @@ //// [moduledecl.ts] + module a { } diff --git a/tests/baselines/reference/moduledecl.symbols b/tests/baselines/reference/moduledecl.symbols new file mode 100644 index 0000000000000..178c406f8cdb3 --- /dev/null +++ b/tests/baselines/reference/moduledecl.symbols @@ -0,0 +1,536 @@ +=== tests/cases/compiler/moduledecl.ts === + +module a { +>a : Symbol(a, Decl(moduledecl.ts, 0, 0)) +} + +module b.a { +>b : Symbol(b, Decl(moduledecl.ts, 2, 1)) +>a : Symbol(a, Decl(moduledecl.ts, 4, 9)) +} + +module c.a.b { +>c : Symbol(c, Decl(moduledecl.ts, 5, 1)) +>a : Symbol(a, Decl(moduledecl.ts, 7, 9)) +>b : Symbol(ma.b, Decl(moduledecl.ts, 7, 11)) + + import ma = a; +>ma : Symbol(ma, Decl(moduledecl.ts, 7, 14)) +>a : Symbol(ma, Decl(moduledecl.ts, 7, 9)) +} + +module mImport { +>mImport : Symbol(mImport, Decl(moduledecl.ts, 9, 1)) + + import d = a; +>d : Symbol(d, Decl(moduledecl.ts, 11, 16)) +>a : Symbol(d, Decl(moduledecl.ts, 0, 0)) + + import e = b.a; +>e : Symbol(e, Decl(moduledecl.ts, 12, 17)) +>b : Symbol(b, Decl(moduledecl.ts, 2, 1)) +>a : Symbol(e, Decl(moduledecl.ts, 4, 9)) + + import d1 = a; +>d1 : Symbol(d1, Decl(moduledecl.ts, 13, 19)) +>a : Symbol(d, Decl(moduledecl.ts, 0, 0)) + + import e1 = b.a; +>e1 : Symbol(e1, Decl(moduledecl.ts, 14, 18)) +>b : Symbol(b, Decl(moduledecl.ts, 2, 1)) +>a : Symbol(e, Decl(moduledecl.ts, 4, 9)) +} + +module m0 { +>m0 : Symbol(m0, Decl(moduledecl.ts, 16, 1)) + + function f1() { +>f1 : Symbol(f1, Decl(moduledecl.ts, 18, 11)) + } + + function f2(s: string); +>f2 : Symbol(f2, Decl(moduledecl.ts, 20, 5), Decl(moduledecl.ts, 22, 27), Decl(moduledecl.ts, 23, 27)) +>s : Symbol(s, Decl(moduledecl.ts, 22, 16)) + + function f2(n: number); +>f2 : Symbol(f2, Decl(moduledecl.ts, 20, 5), Decl(moduledecl.ts, 22, 27), Decl(moduledecl.ts, 23, 27)) +>n : Symbol(n, Decl(moduledecl.ts, 23, 16)) + + function f2(ns: any) { +>f2 : Symbol(f2, Decl(moduledecl.ts, 20, 5), Decl(moduledecl.ts, 22, 27), Decl(moduledecl.ts, 23, 27)) +>ns : Symbol(ns, Decl(moduledecl.ts, 24, 16)) + } + + class c1 { +>c1 : Symbol(c1, Decl(moduledecl.ts, 25, 5)) + + public a : ()=>string; +>a : Symbol(a, Decl(moduledecl.ts, 27, 14)) + + private b: ()=>number; +>b : Symbol(b, Decl(moduledecl.ts, 28, 30)) + + private static s1; +>s1 : Symbol(c1.s1, Decl(moduledecl.ts, 29, 30)) + + public static s2; +>s2 : Symbol(c1.s2, Decl(moduledecl.ts, 30, 26)) + } + + interface i1 { +>i1 : Symbol(i1, Decl(moduledecl.ts, 32, 5)) + + () : Object; +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + [n: number]: c1; +>n : Symbol(n, Decl(moduledecl.ts, 36, 9)) +>c1 : Symbol(c1, Decl(moduledecl.ts, 25, 5)) + } + + import m2 = a; +>m2 : Symbol(m2, Decl(moduledecl.ts, 37, 5)) +>a : Symbol(m2, Decl(moduledecl.ts, 0, 0)) + + import m3 = b; +>m3 : Symbol(m3, Decl(moduledecl.ts, 39, 18)) +>b : Symbol(m3, Decl(moduledecl.ts, 2, 1)) + + import m4 = b.a; +>m4 : Symbol(m4, Decl(moduledecl.ts, 40, 18)) +>b : Symbol(m3, Decl(moduledecl.ts, 2, 1)) +>a : Symbol(m3.a, Decl(moduledecl.ts, 4, 9)) + + import m5 = c; +>m5 : Symbol(m5, Decl(moduledecl.ts, 41, 20)) +>c : Symbol(m5, Decl(moduledecl.ts, 5, 1)) + + import m6 = c.a; +>m6 : Symbol(m6, Decl(moduledecl.ts, 42, 18)) +>c : Symbol(m5, Decl(moduledecl.ts, 5, 1)) +>a : Symbol(m5.a, Decl(moduledecl.ts, 7, 9)) + + import m7 = c.a.b; +>m7 : Symbol(m7, Decl(moduledecl.ts, 43, 20)) +>c : Symbol(m5, Decl(moduledecl.ts, 5, 1)) +>a : Symbol(m5.a, Decl(moduledecl.ts, 7, 9)) +>b : Symbol(m6.b, Decl(moduledecl.ts, 7, 11)) +} + +module m1 { +>m1 : Symbol(m1, Decl(moduledecl.ts, 45, 1)) + + export function f1() { +>f1 : Symbol(f1, Decl(moduledecl.ts, 47, 11)) + } + + export function f2(s: string); +>f2 : Symbol(f2, Decl(moduledecl.ts, 49, 5), Decl(moduledecl.ts, 51, 34), Decl(moduledecl.ts, 52, 34)) +>s : Symbol(s, Decl(moduledecl.ts, 51, 23)) + + export function f2(n: number); +>f2 : Symbol(f2, Decl(moduledecl.ts, 49, 5), Decl(moduledecl.ts, 51, 34), Decl(moduledecl.ts, 52, 34)) +>n : Symbol(n, Decl(moduledecl.ts, 52, 23)) + + export function f2(ns: any) { +>f2 : Symbol(f2, Decl(moduledecl.ts, 49, 5), Decl(moduledecl.ts, 51, 34), Decl(moduledecl.ts, 52, 34)) +>ns : Symbol(ns, Decl(moduledecl.ts, 53, 23)) + } + + export class c1 { +>c1 : Symbol(c1, Decl(moduledecl.ts, 54, 5)) + + public a: () =>string; +>a : Symbol(a, Decl(moduledecl.ts, 56, 21)) + + private b: () =>number; +>b : Symbol(b, Decl(moduledecl.ts, 57, 30)) + + private static s1; +>s1 : Symbol(c1.s1, Decl(moduledecl.ts, 58, 31)) + + public static s2; +>s2 : Symbol(c1.s2, Decl(moduledecl.ts, 59, 26)) + + public d() { +>d : Symbol(d, Decl(moduledecl.ts, 60, 25)) + + return "Hello"; + } + + public e: { x: number; y: string; }; +>e : Symbol(e, Decl(moduledecl.ts, 64, 9)) +>x : Symbol(x, Decl(moduledecl.ts, 66, 19)) +>y : Symbol(y, Decl(moduledecl.ts, 66, 30)) + + constructor (public n, public n2: number, private n3, private n4: string) { +>n : Symbol(n, Decl(moduledecl.ts, 67, 21)) +>n2 : Symbol(n2, Decl(moduledecl.ts, 67, 30)) +>n3 : Symbol(n3, Decl(moduledecl.ts, 67, 49)) +>n4 : Symbol(n4, Decl(moduledecl.ts, 67, 61)) + } + } + + export interface i1 { +>i1 : Symbol(i1, Decl(moduledecl.ts, 69, 5)) + + () : Object; +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + [n: number]: c1; +>n : Symbol(n, Decl(moduledecl.ts, 73, 9)) +>c1 : Symbol(c1, Decl(moduledecl.ts, 54, 5)) + } + + import m2 = a; +>m2 : Symbol(m2, Decl(moduledecl.ts, 74, 5)) +>a : Symbol(m2, Decl(moduledecl.ts, 0, 0)) + + import m3 = b; +>m3 : Symbol(m3, Decl(moduledecl.ts, 76, 18)) +>b : Symbol(m3, Decl(moduledecl.ts, 2, 1)) + + import m4 = b.a; +>m4 : Symbol(m4, Decl(moduledecl.ts, 77, 18)) +>b : Symbol(m3, Decl(moduledecl.ts, 2, 1)) +>a : Symbol(m3.a, Decl(moduledecl.ts, 4, 9)) + + import m5 = c; +>m5 : Symbol(m5, Decl(moduledecl.ts, 78, 20)) +>c : Symbol(m5, Decl(moduledecl.ts, 5, 1)) + + import m6 = c.a; +>m6 : Symbol(m6, Decl(moduledecl.ts, 79, 18)) +>c : Symbol(m5, Decl(moduledecl.ts, 5, 1)) +>a : Symbol(m5.a, Decl(moduledecl.ts, 7, 9)) + + import m7 = c.a.b; +>m7 : Symbol(m7, Decl(moduledecl.ts, 80, 20)) +>c : Symbol(m5, Decl(moduledecl.ts, 5, 1)) +>a : Symbol(m5.a, Decl(moduledecl.ts, 7, 9)) +>b : Symbol(m6.b, Decl(moduledecl.ts, 7, 11)) +} + +module m { +>m : Symbol(m, Decl(moduledecl.ts, 82, 1), Decl(moduledecl.ts, 93, 1)) + + export module m2 { +>m2 : Symbol(m2, Decl(moduledecl.ts, 84, 10)) + + var a = 10; +>a : Symbol(a, Decl(moduledecl.ts, 86, 11)) + + export var b: number; +>b : Symbol(b, Decl(moduledecl.ts, 87, 18)) + } + + export module m3 { +>m3 : Symbol(m3, Decl(moduledecl.ts, 88, 5)) + + export var c: number; +>c : Symbol(c, Decl(moduledecl.ts, 91, 18)) + } +} + +module m { +>m : Symbol(m, Decl(moduledecl.ts, 82, 1), Decl(moduledecl.ts, 93, 1)) + + export module m25 { +>m25 : Symbol(m25, Decl(moduledecl.ts, 95, 10)) + + export module m5 { +>m5 : Symbol(m5, Decl(moduledecl.ts, 97, 23)) + + export var c: number; +>c : Symbol(c, Decl(moduledecl.ts, 99, 22)) + } + } +} + +module m13 { +>m13 : Symbol(m13, Decl(moduledecl.ts, 102, 1)) + + export module m4 { +>m4 : Symbol(m4, Decl(moduledecl.ts, 104, 12)) + + export module m2 { +>m2 : Symbol(m2, Decl(moduledecl.ts, 105, 22)) + + export module m3 { +>m3 : Symbol(m3, Decl(moduledecl.ts, 106, 26)) + + export var c: number; +>c : Symbol(c, Decl(moduledecl.ts, 108, 26)) + } + } + + export function f() { +>f : Symbol(f, Decl(moduledecl.ts, 110, 9)) + + return 20; + } + } +} + +declare module m4 { +>m4 : Symbol(m4, Decl(moduledecl.ts, 116, 1)) + + export var b; +>b : Symbol(b, Decl(moduledecl.ts, 119, 14)) +} + +declare module m5 { +>m5 : Symbol(m5, Decl(moduledecl.ts, 120, 1)) + + export var c; +>c : Symbol(c, Decl(moduledecl.ts, 123, 14)) +} + +declare module m43 { +>m43 : Symbol(m43, Decl(moduledecl.ts, 124, 1)) + + export var b; +>b : Symbol(b, Decl(moduledecl.ts, 127, 14)) +} + +declare module m55 { +>m55 : Symbol(m55, Decl(moduledecl.ts, 128, 1)) + + export var c; +>c : Symbol(c, Decl(moduledecl.ts, 131, 14)) +} + +declare module "m3" { + export var b: number; +>b : Symbol(b, Decl(moduledecl.ts, 135, 14)) +} + +module exportTests { +>exportTests : Symbol(exportTests, Decl(moduledecl.ts, 136, 1)) + + export class C1_public { +>C1_public : Symbol(C1_public, Decl(moduledecl.ts, 138, 20)) + + private f2() { +>f2 : Symbol(f2, Decl(moduledecl.ts, 139, 28)) + + return 30; + } + + public f3() { +>f3 : Symbol(f3, Decl(moduledecl.ts, 142, 9)) + + return "string"; + } + } + class C2_private { +>C2_private : Symbol(C2_private, Decl(moduledecl.ts, 147, 5)) + + private f2() { +>f2 : Symbol(f2, Decl(moduledecl.ts, 148, 22)) + + return 30; + } + + public f3() { +>f3 : Symbol(f3, Decl(moduledecl.ts, 151, 9)) + + return "string"; + } + } + + export class C3_public { +>C3_public : Symbol(C3_public, Decl(moduledecl.ts, 156, 5)) + + private getC2_private() { +>getC2_private : Symbol(getC2_private, Decl(moduledecl.ts, 158, 28)) + + return new C2_private(); +>C2_private : Symbol(C2_private, Decl(moduledecl.ts, 147, 5)) + } + private setC2_private(arg: C2_private) { +>setC2_private : Symbol(setC2_private, Decl(moduledecl.ts, 161, 9)) +>arg : Symbol(arg, Decl(moduledecl.ts, 162, 30)) +>C2_private : Symbol(C2_private, Decl(moduledecl.ts, 147, 5)) + } + private get c2() { +>c2 : Symbol(c2, Decl(moduledecl.ts, 163, 9)) + + return new C2_private(); +>C2_private : Symbol(C2_private, Decl(moduledecl.ts, 147, 5)) + } + public getC1_public() { +>getC1_public : Symbol(getC1_public, Decl(moduledecl.ts, 166, 9)) + + return new C1_public(); +>C1_public : Symbol(C1_public, Decl(moduledecl.ts, 138, 20)) + } + public setC1_public(arg: C1_public) { +>setC1_public : Symbol(setC1_public, Decl(moduledecl.ts, 169, 9)) +>arg : Symbol(arg, Decl(moduledecl.ts, 170, 28)) +>C1_public : Symbol(C1_public, Decl(moduledecl.ts, 138, 20)) + } + public get c1() { +>c1 : Symbol(c1, Decl(moduledecl.ts, 171, 9)) + + return new C1_public(); +>C1_public : Symbol(C1_public, Decl(moduledecl.ts, 138, 20)) + } + } +} + +declare module mAmbient { +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) + + class C { +>C : Symbol(C, Decl(moduledecl.ts, 178, 25)) + + public myProp: number; +>myProp : Symbol(myProp, Decl(moduledecl.ts, 179, 13)) + } + + function foo() : C; +>foo : Symbol(foo, Decl(moduledecl.ts, 181, 5)) +>C : Symbol(C, Decl(moduledecl.ts, 178, 25)) + + var aVar: C; +>aVar : Symbol(aVar, Decl(moduledecl.ts, 184, 7)) +>C : Symbol(C, Decl(moduledecl.ts, 178, 25)) + + interface B { +>B : Symbol(B, Decl(moduledecl.ts, 184, 16)) + + x: number; +>x : Symbol(x, Decl(moduledecl.ts, 185, 17)) + + y: C; +>y : Symbol(y, Decl(moduledecl.ts, 186, 18)) +>C : Symbol(C, Decl(moduledecl.ts, 178, 25)) + } + enum e { +>e : Symbol(e, Decl(moduledecl.ts, 188, 5)) + + x, +>x : Symbol(e.x, Decl(moduledecl.ts, 189, 12)) + + y, +>y : Symbol(e.y, Decl(moduledecl.ts, 190, 10)) + + z +>z : Symbol(e.z, Decl(moduledecl.ts, 191, 10)) + } + + module m3 { +>m3 : Symbol(m3, Decl(moduledecl.ts, 193, 5)) + + class C { +>C : Symbol(C, Decl(moduledecl.ts, 195, 15)) + + public myProp: number; +>myProp : Symbol(myProp, Decl(moduledecl.ts, 196, 17)) + } + + function foo(): C; +>foo : Symbol(foo, Decl(moduledecl.ts, 198, 9)) +>C : Symbol(C, Decl(moduledecl.ts, 195, 15)) + + var aVar: C; +>aVar : Symbol(aVar, Decl(moduledecl.ts, 201, 11)) +>C : Symbol(C, Decl(moduledecl.ts, 195, 15)) + + interface B { +>B : Symbol(B, Decl(moduledecl.ts, 201, 20)) + + x: number; +>x : Symbol(x, Decl(moduledecl.ts, 202, 21)) + + y: C; +>y : Symbol(y, Decl(moduledecl.ts, 203, 22)) +>C : Symbol(C, Decl(moduledecl.ts, 195, 15)) + } + enum e { +>e : Symbol(e, Decl(moduledecl.ts, 205, 9)) + + x, +>x : Symbol(e.x, Decl(moduledecl.ts, 206, 16)) + + y, +>y : Symbol(e.y, Decl(moduledecl.ts, 207, 14)) + + z +>z : Symbol(e.z, Decl(moduledecl.ts, 208, 14)) + } + } +} + +function foo() { +>foo : Symbol(foo, Decl(moduledecl.ts, 212, 1)) + + return mAmbient.foo(); +>mAmbient.foo : Symbol(mAmbient.foo, Decl(moduledecl.ts, 181, 5)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>foo : Symbol(mAmbient.foo, Decl(moduledecl.ts, 181, 5)) +} + +var cVar = new mAmbient.C(); +>cVar : Symbol(cVar, Decl(moduledecl.ts, 218, 3)) +>mAmbient.C : Symbol(mAmbient.C, Decl(moduledecl.ts, 178, 25)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>C : Symbol(mAmbient.C, Decl(moduledecl.ts, 178, 25)) + +var aVar = mAmbient.aVar; +>aVar : Symbol(aVar, Decl(moduledecl.ts, 219, 3)) +>mAmbient.aVar : Symbol(mAmbient.aVar, Decl(moduledecl.ts, 184, 7)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>aVar : Symbol(mAmbient.aVar, Decl(moduledecl.ts, 184, 7)) + +var bB: mAmbient.B; +>bB : Symbol(bB, Decl(moduledecl.ts, 220, 3)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>B : Symbol(mAmbient.B, Decl(moduledecl.ts, 184, 16)) + +var eVar: mAmbient.e; +>eVar : Symbol(eVar, Decl(moduledecl.ts, 221, 3)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>e : Symbol(mAmbient.e, Decl(moduledecl.ts, 188, 5)) + +function m3foo() { +>m3foo : Symbol(m3foo, Decl(moduledecl.ts, 221, 21)) + + return mAmbient.m3.foo(); +>mAmbient.m3.foo : Symbol(mAmbient.m3.foo, Decl(moduledecl.ts, 198, 9)) +>mAmbient.m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>foo : Symbol(mAmbient.m3.foo, Decl(moduledecl.ts, 198, 9)) +} + +var m3cVar = new mAmbient.m3.C(); +>m3cVar : Symbol(m3cVar, Decl(moduledecl.ts, 227, 3)) +>mAmbient.m3.C : Symbol(mAmbient.m3.C, Decl(moduledecl.ts, 195, 15)) +>mAmbient.m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>C : Symbol(mAmbient.m3.C, Decl(moduledecl.ts, 195, 15)) + +var m3aVar = mAmbient.m3.aVar; +>m3aVar : Symbol(m3aVar, Decl(moduledecl.ts, 228, 3)) +>mAmbient.m3.aVar : Symbol(mAmbient.m3.aVar, Decl(moduledecl.ts, 201, 11)) +>mAmbient.m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>aVar : Symbol(mAmbient.m3.aVar, Decl(moduledecl.ts, 201, 11)) + +var m3bB: mAmbient.m3.B; +>m3bB : Symbol(m3bB, Decl(moduledecl.ts, 229, 3)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>B : Symbol(mAmbient.m3.B, Decl(moduledecl.ts, 201, 20)) + +var m3eVar: mAmbient.m3.e; +>m3eVar : Symbol(m3eVar, Decl(moduledecl.ts, 230, 3)) +>mAmbient : Symbol(mAmbient, Decl(moduledecl.ts, 176, 1)) +>m3 : Symbol(mAmbient.m3, Decl(moduledecl.ts, 193, 5)) +>e : Symbol(mAmbient.m3.e, Decl(moduledecl.ts, 205, 9)) + + diff --git a/tests/baselines/reference/moduledecl.types b/tests/baselines/reference/moduledecl.types new file mode 100644 index 0000000000000..0c117fb51840d --- /dev/null +++ b/tests/baselines/reference/moduledecl.types @@ -0,0 +1,551 @@ +=== tests/cases/compiler/moduledecl.ts === + +module a { +>a : any +} + +module b.a { +>b : any +>a : any +} + +module c.a.b { +>c : any +>a : any +>b : any + + import ma = a; +>ma : any +>a : any +} + +module mImport { +>mImport : any + + import d = a; +>d : any +>a : any + + import e = b.a; +>e : any +>b : any +>a : any + + import d1 = a; +>d1 : any +>a : any + + import e1 = b.a; +>e1 : any +>b : any +>a : any +} + +module m0 { +>m0 : typeof m0 + + function f1() { +>f1 : () => void + } + + function f2(s: string); +>f2 : { (s: string): any; (n: number): any; } +>s : string + + function f2(n: number); +>f2 : { (s: string): any; (n: number): any; } +>n : number + + function f2(ns: any) { +>f2 : { (s: string): any; (n: number): any; } +>ns : any + } + + class c1 { +>c1 : c1 + + public a : ()=>string; +>a : () => string + + private b: ()=>number; +>b : () => number + + private static s1; +>s1 : any + + public static s2; +>s2 : any + } + + interface i1 { +>i1 : i1 + + () : Object; +>Object : Object + + [n: number]: c1; +>n : number +>c1 : c1 + } + + import m2 = a; +>m2 : any +>a : any + + import m3 = b; +>m3 : any +>b : any + + import m4 = b.a; +>m4 : any +>b : any +>a : any + + import m5 = c; +>m5 : any +>c : any + + import m6 = c.a; +>m6 : any +>c : any +>a : any + + import m7 = c.a.b; +>m7 : any +>c : any +>a : any +>b : any +} + +module m1 { +>m1 : typeof m1 + + export function f1() { +>f1 : () => void + } + + export function f2(s: string); +>f2 : { (s: string): any; (n: number): any; } +>s : string + + export function f2(n: number); +>f2 : { (s: string): any; (n: number): any; } +>n : number + + export function f2(ns: any) { +>f2 : { (s: string): any; (n: number): any; } +>ns : any + } + + export class c1 { +>c1 : c1 + + public a: () =>string; +>a : () => string + + private b: () =>number; +>b : () => number + + private static s1; +>s1 : any + + public static s2; +>s2 : any + + public d() { +>d : () => string + + return "Hello"; +>"Hello" : string + } + + public e: { x: number; y: string; }; +>e : { x: number; y: string; } +>x : number +>y : string + + constructor (public n, public n2: number, private n3, private n4: string) { +>n : any +>n2 : number +>n3 : any +>n4 : string + } + } + + export interface i1 { +>i1 : i1 + + () : Object; +>Object : Object + + [n: number]: c1; +>n : number +>c1 : c1 + } + + import m2 = a; +>m2 : any +>a : any + + import m3 = b; +>m3 : any +>b : any + + import m4 = b.a; +>m4 : any +>b : any +>a : any + + import m5 = c; +>m5 : any +>c : any + + import m6 = c.a; +>m6 : any +>c : any +>a : any + + import m7 = c.a.b; +>m7 : any +>c : any +>a : any +>b : any +} + +module m { +>m : typeof m + + export module m2 { +>m2 : typeof m2 + + var a = 10; +>a : number +>10 : number + + export var b: number; +>b : number + } + + export module m3 { +>m3 : typeof m3 + + export var c: number; +>c : number + } +} + +module m { +>m : typeof m + + export module m25 { +>m25 : typeof m25 + + export module m5 { +>m5 : typeof m5 + + export var c: number; +>c : number + } + } +} + +module m13 { +>m13 : typeof m13 + + export module m4 { +>m4 : typeof m4 + + export module m2 { +>m2 : typeof m2 + + export module m3 { +>m3 : typeof m3 + + export var c: number; +>c : number + } + } + + export function f() { +>f : () => number + + return 20; +>20 : number + } + } +} + +declare module m4 { +>m4 : typeof m4 + + export var b; +>b : any +} + +declare module m5 { +>m5 : typeof m5 + + export var c; +>c : any +} + +declare module m43 { +>m43 : typeof m43 + + export var b; +>b : any +} + +declare module m55 { +>m55 : typeof m55 + + export var c; +>c : any +} + +declare module "m3" { + export var b: number; +>b : number +} + +module exportTests { +>exportTests : typeof exportTests + + export class C1_public { +>C1_public : C1_public + + private f2() { +>f2 : () => number + + return 30; +>30 : number + } + + public f3() { +>f3 : () => string + + return "string"; +>"string" : string + } + } + class C2_private { +>C2_private : C2_private + + private f2() { +>f2 : () => number + + return 30; +>30 : number + } + + public f3() { +>f3 : () => string + + return "string"; +>"string" : string + } + } + + export class C3_public { +>C3_public : C3_public + + private getC2_private() { +>getC2_private : () => C2_private + + return new C2_private(); +>new C2_private() : C2_private +>C2_private : typeof C2_private + } + private setC2_private(arg: C2_private) { +>setC2_private : (arg: C2_private) => void +>arg : C2_private +>C2_private : C2_private + } + private get c2() { +>c2 : C2_private + + return new C2_private(); +>new C2_private() : C2_private +>C2_private : typeof C2_private + } + public getC1_public() { +>getC1_public : () => C1_public + + return new C1_public(); +>new C1_public() : C1_public +>C1_public : typeof C1_public + } + public setC1_public(arg: C1_public) { +>setC1_public : (arg: C1_public) => void +>arg : C1_public +>C1_public : C1_public + } + public get c1() { +>c1 : C1_public + + return new C1_public(); +>new C1_public() : C1_public +>C1_public : typeof C1_public + } + } +} + +declare module mAmbient { +>mAmbient : typeof mAmbient + + class C { +>C : C + + public myProp: number; +>myProp : number + } + + function foo() : C; +>foo : () => C +>C : C + + var aVar: C; +>aVar : C +>C : C + + interface B { +>B : B + + x: number; +>x : number + + y: C; +>y : C +>C : C + } + enum e { +>e : e + + x, +>x : e + + y, +>y : e + + z +>z : e + } + + module m3 { +>m3 : typeof m3 + + class C { +>C : C + + public myProp: number; +>myProp : number + } + + function foo(): C; +>foo : () => C +>C : C + + var aVar: C; +>aVar : C +>C : C + + interface B { +>B : B + + x: number; +>x : number + + y: C; +>y : C +>C : C + } + enum e { +>e : e + + x, +>x : e + + y, +>y : e + + z +>z : e + } + } +} + +function foo() { +>foo : () => mAmbient.C + + return mAmbient.foo(); +>mAmbient.foo() : mAmbient.C +>mAmbient.foo : () => mAmbient.C +>mAmbient : typeof mAmbient +>foo : () => mAmbient.C +} + +var cVar = new mAmbient.C(); +>cVar : mAmbient.C +>new mAmbient.C() : mAmbient.C +>mAmbient.C : typeof mAmbient.C +>mAmbient : typeof mAmbient +>C : typeof mAmbient.C + +var aVar = mAmbient.aVar; +>aVar : mAmbient.C +>mAmbient.aVar : mAmbient.C +>mAmbient : typeof mAmbient +>aVar : mAmbient.C + +var bB: mAmbient.B; +>bB : mAmbient.B +>mAmbient : any +>B : mAmbient.B + +var eVar: mAmbient.e; +>eVar : mAmbient.e +>mAmbient : any +>e : mAmbient.e + +function m3foo() { +>m3foo : () => mAmbient.m3.C + + return mAmbient.m3.foo(); +>mAmbient.m3.foo() : mAmbient.m3.C +>mAmbient.m3.foo : () => mAmbient.m3.C +>mAmbient.m3 : typeof mAmbient.m3 +>mAmbient : typeof mAmbient +>m3 : typeof mAmbient.m3 +>foo : () => mAmbient.m3.C +} + +var m3cVar = new mAmbient.m3.C(); +>m3cVar : mAmbient.m3.C +>new mAmbient.m3.C() : mAmbient.m3.C +>mAmbient.m3.C : typeof mAmbient.m3.C +>mAmbient.m3 : typeof mAmbient.m3 +>mAmbient : typeof mAmbient +>m3 : typeof mAmbient.m3 +>C : typeof mAmbient.m3.C + +var m3aVar = mAmbient.m3.aVar; +>m3aVar : mAmbient.m3.C +>mAmbient.m3.aVar : mAmbient.m3.C +>mAmbient.m3 : typeof mAmbient.m3 +>mAmbient : typeof mAmbient +>m3 : typeof mAmbient.m3 +>aVar : mAmbient.m3.C + +var m3bB: mAmbient.m3.B; +>m3bB : mAmbient.m3.B +>mAmbient : any +>m3 : any +>B : mAmbient.m3.B + +var m3eVar: mAmbient.m3.e; +>m3eVar : mAmbient.m3.e +>mAmbient : any +>m3 : any +>e : mAmbient.m3.e + + diff --git a/tests/baselines/reference/multiImportExport.js b/tests/baselines/reference/multiImportExport.js index 5a03f3c848d1f..28ebecdd0f0ae 100644 --- a/tests/baselines/reference/multiImportExport.js +++ b/tests/baselines/reference/multiImportExport.js @@ -26,6 +26,7 @@ class Adder { export = Adder; //// [Adder.js] +"use strict"; var Adder = (function () { function Adder() { } @@ -35,14 +36,17 @@ var Adder = (function () { })(); module.exports = Adder; //// [Math.js] +"use strict"; var Adder = require('./Adder'); var Math = { Adder: Adder }; module.exports = Math; //// [Drawing.js] +"use strict"; exports.Math = require('./Math/Math'); //// [consumer.js] +"use strict"; var Drawing = require('./Drawing'); var addr = new Drawing.Math.Adder(); diff --git a/tests/baselines/reference/multipleDefaultExports01.js b/tests/baselines/reference/multipleDefaultExports01.js index b1ff3b4353cd8..2a9dc18ca7779 100644 --- a/tests/baselines/reference/multipleDefaultExports01.js +++ b/tests/baselines/reference/multipleDefaultExports01.js @@ -19,6 +19,7 @@ import Entity from "./m1" Entity(); //// [m1.js] +"use strict"; var foo = (function () { function foo() { } @@ -34,5 +35,6 @@ var x = 10; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = x; //// [m2.js] +"use strict"; var m1_1 = require("./m1"); m1_1.default(); diff --git a/tests/baselines/reference/multipleDefaultExports02.js b/tests/baselines/reference/multipleDefaultExports02.js index 7b43c43ee603f..0e9fed272cde6 100644 --- a/tests/baselines/reference/multipleDefaultExports02.js +++ b/tests/baselines/reference/multipleDefaultExports02.js @@ -16,6 +16,7 @@ import Entity from "./m1" Entity(); //// [m1.js] +"use strict"; function foo() { } Object.defineProperty(exports, "__esModule", { value: true }); @@ -25,5 +26,6 @@ function bar() { Object.defineProperty(exports, "__esModule", { value: true }); exports.default = bar; //// [m2.js] +"use strict"; var m1_1 = require("./m1"); m1_1.default(); diff --git a/tests/baselines/reference/multipleDefaultExports03.js b/tests/baselines/reference/multipleDefaultExports03.js index 2824c7a5ac124..d5699d850c0e4 100644 --- a/tests/baselines/reference/multipleDefaultExports03.js +++ b/tests/baselines/reference/multipleDefaultExports03.js @@ -7,6 +7,7 @@ export default class C { } //// [multipleDefaultExports03.js] +"use strict"; var C = (function () { function C() { } diff --git a/tests/baselines/reference/multipleDefaultExports04.js b/tests/baselines/reference/multipleDefaultExports04.js index 73582d7389eff..020f9b758bb27 100644 --- a/tests/baselines/reference/multipleDefaultExports04.js +++ b/tests/baselines/reference/multipleDefaultExports04.js @@ -7,6 +7,7 @@ export default function f() { } //// [multipleDefaultExports04.js] +"use strict"; function f() { } Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/multipleExportAssignments.js b/tests/baselines/reference/multipleExportAssignments.js index 4068cb7a04d2b..e7ee549a1210e 100644 --- a/tests/baselines/reference/multipleExportAssignments.js +++ b/tests/baselines/reference/multipleExportAssignments.js @@ -17,5 +17,6 @@ export = connectExport; //// [multipleExportAssignments.js] +"use strict"; var server; module.exports = server; diff --git a/tests/baselines/reference/multipleExports.js b/tests/baselines/reference/multipleExports.js index ec795ef9913e1..c70a5005aab11 100644 --- a/tests/baselines/reference/multipleExports.js +++ b/tests/baselines/reference/multipleExports.js @@ -13,6 +13,7 @@ export module M { //// [multipleExports.js] +"use strict"; var M; (function (M) { M.v = 0; diff --git a/tests/baselines/reference/nameDelimitedBySlashes.js b/tests/baselines/reference/nameDelimitedBySlashes.js index 3088545261f7f..6d00b54d69b30 100644 --- a/tests/baselines/reference/nameDelimitedBySlashes.js +++ b/tests/baselines/reference/nameDelimitedBySlashes.js @@ -9,7 +9,9 @@ var x = foo.foo + 42; //// [foo_0.js] +"use strict"; exports.foo = 42; //// [foo_1.js] +"use strict"; var foo = require('./test/foo_0'); var x = foo.foo + 42; diff --git a/tests/baselines/reference/nameWithFileExtension.js b/tests/baselines/reference/nameWithFileExtension.js index 9f601e19aef3e..2d487ede24572 100644 --- a/tests/baselines/reference/nameWithFileExtension.js +++ b/tests/baselines/reference/nameWithFileExtension.js @@ -9,5 +9,6 @@ var x = foo.foo + 42; //// [foo_1.js] +"use strict"; var foo = require('./foo_0.js'); var x = foo.foo + 42; diff --git a/tests/baselines/reference/nameWithRelativePaths.js b/tests/baselines/reference/nameWithRelativePaths.js index c0793e31ab6ca..e348c5b1cedcf 100644 --- a/tests/baselines/reference/nameWithRelativePaths.js +++ b/tests/baselines/reference/nameWithRelativePaths.js @@ -24,18 +24,22 @@ if(foo2.M2.x){ //// [foo_0.js] +"use strict"; exports.foo = 42; //// [foo_1.js] +"use strict"; function f() { return 42; } exports.f = f; //// [foo_2.js] +"use strict"; var M2; (function (M2) { M2.x = true; })(M2 = exports.M2 || (exports.M2 = {})); //// [foo_3.js] +"use strict"; var foo0 = require('../foo_0'); var foo1 = require('./test/foo_1'); var foo2 = require('./.././test/foo_2'); diff --git a/tests/baselines/reference/nodeResolution1.js b/tests/baselines/reference/nodeResolution1.js index 3516342e3b22f..deda55cef0f59 100644 --- a/tests/baselines/reference/nodeResolution1.js +++ b/tests/baselines/reference/nodeResolution1.js @@ -8,5 +8,7 @@ export var x = 1; import y = require("./a"); //// [a.js] +"use strict"; exports.x = 1; //// [b.js] +"use strict"; diff --git a/tests/baselines/reference/nodeResolution2.js b/tests/baselines/reference/nodeResolution2.js index a5935461088c9..a139eaf62cf7b 100644 --- a/tests/baselines/reference/nodeResolution2.js +++ b/tests/baselines/reference/nodeResolution2.js @@ -8,3 +8,4 @@ export var x: number; import y = require("a"); //// [b.js] +"use strict"; diff --git a/tests/baselines/reference/nodeResolution3.js b/tests/baselines/reference/nodeResolution3.js index 6e0ec60832301..99b6a69281915 100644 --- a/tests/baselines/reference/nodeResolution3.js +++ b/tests/baselines/reference/nodeResolution3.js @@ -8,3 +8,4 @@ export var x: number; import y = require("b"); //// [a.js] +"use strict"; diff --git a/tests/baselines/reference/nodeResolution4.js b/tests/baselines/reference/nodeResolution4.js index 0965c257da9fe..7678b7c1c5cf8 100644 --- a/tests/baselines/reference/nodeResolution4.js +++ b/tests/baselines/reference/nodeResolution4.js @@ -14,4 +14,6 @@ import y = require("./a"); //// [ref.js] var x = 1; //// [a.js] +"use strict"; //// [b.js] +"use strict"; diff --git a/tests/baselines/reference/nodeResolution5.js b/tests/baselines/reference/nodeResolution5.js index 2bc009c15223f..766d4118e97d8 100644 --- a/tests/baselines/reference/nodeResolution5.js +++ b/tests/baselines/reference/nodeResolution5.js @@ -11,3 +11,4 @@ import y = require("a"); //// [b.js] +"use strict"; diff --git a/tests/baselines/reference/nodeResolution6.js b/tests/baselines/reference/nodeResolution6.js index 140edd61f5a9f..58a9b907250d2 100644 --- a/tests/baselines/reference/nodeResolution6.js +++ b/tests/baselines/reference/nodeResolution6.js @@ -16,3 +16,4 @@ import y = require("a"); //// [ref.js] var x = 1; //// [b.js] +"use strict"; diff --git a/tests/baselines/reference/nodeResolution7.js b/tests/baselines/reference/nodeResolution7.js index abfbbad52a628..028d7ed2e8117 100644 --- a/tests/baselines/reference/nodeResolution7.js +++ b/tests/baselines/reference/nodeResolution7.js @@ -11,3 +11,4 @@ import y = require("a"); //// [b.js] +"use strict"; diff --git a/tests/baselines/reference/nodeResolution8.js b/tests/baselines/reference/nodeResolution8.js index aa67f4bf9ccb5..36b53eec553ef 100644 --- a/tests/baselines/reference/nodeResolution8.js +++ b/tests/baselines/reference/nodeResolution8.js @@ -15,3 +15,4 @@ import y = require("a"); //// [ref.js] var x = 1; //// [b.js] +"use strict"; diff --git a/tests/baselines/reference/nonMergedDeclarationsAndOverloads.errors.txt b/tests/baselines/reference/nonMergedDeclarationsAndOverloads.errors.txt new file mode 100644 index 0000000000000..252cd6880d47c --- /dev/null +++ b/tests/baselines/reference/nonMergedDeclarationsAndOverloads.errors.txt @@ -0,0 +1,23 @@ +tests/cases/compiler/nonMergedDeclarationsAndOverloads.ts(2,5): error TS2300: Duplicate identifier 'm1'. +tests/cases/compiler/nonMergedDeclarationsAndOverloads.ts(4,5): error TS2300: Duplicate identifier 'm1'. +tests/cases/compiler/nonMergedDeclarationsAndOverloads.ts(5,5): error TS2300: Duplicate identifier 'm1'. +tests/cases/compiler/nonMergedDeclarationsAndOverloads.ts(6,5): error TS2300: Duplicate identifier 'm1'. + + +==== tests/cases/compiler/nonMergedDeclarationsAndOverloads.ts (4 errors) ==== + class A { + m1: string; + ~~ +!!! error TS2300: Duplicate identifier 'm1'. + f() {} + m1 (a: string): void; + ~~ +!!! error TS2300: Duplicate identifier 'm1'. + m1 (a: number): void; + ~~ +!!! error TS2300: Duplicate identifier 'm1'. + m1 (a: any): void { + ~~ +!!! error TS2300: Duplicate identifier 'm1'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/nonMergedDeclarationsAndOverloads.js b/tests/baselines/reference/nonMergedDeclarationsAndOverloads.js new file mode 100644 index 0000000000000..3ca6a96351523 --- /dev/null +++ b/tests/baselines/reference/nonMergedDeclarationsAndOverloads.js @@ -0,0 +1,19 @@ +//// [nonMergedDeclarationsAndOverloads.ts] +class A { + m1: string; + f() {} + m1 (a: string): void; + m1 (a: number): void; + m1 (a: any): void { + } +} + +//// [nonMergedDeclarationsAndOverloads.js] +var A = (function () { + function A() { + } + A.prototype.f = function () { }; + A.prototype.m1 = function (a) { + }; + return A; +})(); diff --git a/tests/baselines/reference/nonMergedOverloads.errors.txt b/tests/baselines/reference/nonMergedOverloads.errors.txt new file mode 100644 index 0000000000000..9a38ebdc3b311 --- /dev/null +++ b/tests/baselines/reference/nonMergedOverloads.errors.txt @@ -0,0 +1,20 @@ +tests/cases/compiler/nonMergedOverloads.ts(1,5): error TS2300: Duplicate identifier 'f'. +tests/cases/compiler/nonMergedOverloads.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. +tests/cases/compiler/nonMergedOverloads.ts(3,17): error TS2300: Duplicate identifier 'f'. +tests/cases/compiler/nonMergedOverloads.ts(4,17): error TS2300: Duplicate identifier 'f'. + + +==== tests/cases/compiler/nonMergedOverloads.ts (4 errors) ==== + var f = 10; + ~ +!!! error TS2300: Duplicate identifier 'f'. + + export function f(); + ~ +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. + ~ +!!! error TS2300: Duplicate identifier 'f'. + export function f() { + ~ +!!! error TS2300: Duplicate identifier 'f'. + } \ No newline at end of file diff --git a/tests/baselines/reference/nonMergedOverloads.js b/tests/baselines/reference/nonMergedOverloads.js new file mode 100644 index 0000000000000..a577329f1cf26 --- /dev/null +++ b/tests/baselines/reference/nonMergedOverloads.js @@ -0,0 +1,13 @@ +//// [nonMergedOverloads.ts] +var f = 10; + +export function f(); +export function f() { +} + +//// [nonMergedOverloads.js] +"use strict"; +var f = 10; +function f() { +} +exports.f = f; diff --git a/tests/baselines/reference/objectIndexer.js b/tests/baselines/reference/objectIndexer.js index 27dc6e2bd1a89..1e58f89501f5e 100644 --- a/tests/baselines/reference/objectIndexer.js +++ b/tests/baselines/reference/objectIndexer.js @@ -17,6 +17,7 @@ class Emitter { //// [objectIndexer.js] define(["require", "exports"], function (require, exports) { + "use strict"; var Emitter = (function () { function Emitter() { this.listeners = {}; diff --git a/tests/baselines/reference/optionsInlineSourceMapMapRoot.errors.txt b/tests/baselines/reference/optionsInlineSourceMapMapRoot.errors.txt new file mode 100644 index 0000000000000..a9efb0e297179 --- /dev/null +++ b/tests/baselines/reference/optionsInlineSourceMapMapRoot.errors.txt @@ -0,0 +1,9 @@ +error TS5052: Option 'mapRoot' cannot be specified without specifying option 'sourceMap'. +error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. + + +!!! error TS5052: Option 'mapRoot' cannot be specified without specifying option 'sourceMap'. +!!! error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. +==== tests/cases/compiler/optionsInlineSourceMapMapRoot.ts (0 errors) ==== + + var a = 10; \ No newline at end of file diff --git a/tests/baselines/reference/optionsInlineSourceMapMapRoot.js b/tests/baselines/reference/optionsInlineSourceMapMapRoot.js new file mode 100644 index 0000000000000..c165c49ec2947 --- /dev/null +++ b/tests/baselines/reference/optionsInlineSourceMapMapRoot.js @@ -0,0 +1,7 @@ +//// [optionsInlineSourceMapMapRoot.ts] + +var a = 10; + +//// [optionsInlineSourceMapMapRoot.js] +var a = 10; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uc0lubGluZVNvdXJjZU1hcE1hcFJvb3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9vcHRpb25zSW5saW5lU291cmNlTWFwTWFwUm9vdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUMifQ== \ No newline at end of file diff --git a/tests/baselines/reference/optionsInlineSourceMapMapRoot.sourcemap.txt b/tests/baselines/reference/optionsInlineSourceMapMapRoot.sourcemap.txt new file mode 100644 index 0000000000000..66d860c22b2b0 --- /dev/null +++ b/tests/baselines/reference/optionsInlineSourceMapMapRoot.sourcemap.txt @@ -0,0 +1,33 @@ +=================================================================== +JsFile: optionsInlineSourceMapMapRoot.js +mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uc0lubGluZVNvdXJjZU1hcE1hcFJvb3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9vcHRpb25zSW5saW5lU291cmNlTWFwTWFwUm9vdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUMifQ== +sourceRoot: +sources: ../optionsInlineSourceMapMapRoot.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/optionsInlineSourceMapMapRoot.js +sourceFile:../optionsInlineSourceMapMapRoot.ts +------------------------------------------------------------------- +>>>var a = 10; +1 > +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >var +3 > a +4 > = +5 > 10 +6 > ; +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(2, 5) + SourceIndex(0) +3 >Emitted(1, 6) Source(2, 6) + SourceIndex(0) +4 >Emitted(1, 9) Source(2, 9) + SourceIndex(0) +5 >Emitted(1, 11) Source(2, 11) + SourceIndex(0) +6 >Emitted(1, 12) Source(2, 12) + SourceIndex(0) +--- +>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uc0lubGluZVNvdXJjZU1hcE1hcFJvb3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9vcHRpb25zSW5saW5lU291cmNlTWFwTWFwUm9vdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUMifQ== \ No newline at end of file diff --git a/tests/baselines/reference/optionsInlineSourceMapSourceRoot.js b/tests/baselines/reference/optionsInlineSourceMapSourceRoot.js new file mode 100644 index 0000000000000..748fae7320ccb --- /dev/null +++ b/tests/baselines/reference/optionsInlineSourceMapSourceRoot.js @@ -0,0 +1,7 @@ +//// [optionsInlineSourceMapSourceRoot.ts] + +var a = 10; + +//// [optionsInlineSourceMapSourceRoot.js] +var a = 10; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uc0lubGluZVNvdXJjZU1hcFNvdXJjZVJvb3QuanMiLCJzb3VyY2VSb290IjoibG9jYWwvIiwic291cmNlcyI6WyJvcHRpb25zSW5saW5lU291cmNlTWFwU291cmNlUm9vdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUMifQ== \ No newline at end of file diff --git a/tests/baselines/reference/optionsInlineSourceMapSourceRoot.sourcemap.txt b/tests/baselines/reference/optionsInlineSourceMapSourceRoot.sourcemap.txt new file mode 100644 index 0000000000000..6178766b21c95 --- /dev/null +++ b/tests/baselines/reference/optionsInlineSourceMapSourceRoot.sourcemap.txt @@ -0,0 +1,33 @@ +=================================================================== +JsFile: optionsInlineSourceMapSourceRoot.js +mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uc0lubGluZVNvdXJjZU1hcFNvdXJjZVJvb3QuanMiLCJzb3VyY2VSb290IjoibG9jYWwvIiwic291cmNlcyI6WyJvcHRpb25zSW5saW5lU291cmNlTWFwU291cmNlUm9vdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUMifQ== +sourceRoot: local/ +sources: optionsInlineSourceMapSourceRoot.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/optionsInlineSourceMapSourceRoot.js +sourceFile:optionsInlineSourceMapSourceRoot.ts +------------------------------------------------------------------- +>>>var a = 10; +1 > +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >var +3 > a +4 > = +5 > 10 +6 > ; +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(2, 5) + SourceIndex(0) +3 >Emitted(1, 6) Source(2, 6) + SourceIndex(0) +4 >Emitted(1, 9) Source(2, 9) + SourceIndex(0) +5 >Emitted(1, 11) Source(2, 11) + SourceIndex(0) +6 >Emitted(1, 12) Source(2, 12) + SourceIndex(0) +--- +>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uc0lubGluZVNvdXJjZU1hcFNvdXJjZVJvb3QuanMiLCJzb3VyY2VSb290IjoibG9jYWwvIiwic291cmNlcyI6WyJvcHRpb25zSW5saW5lU291cmNlTWFwU291cmNlUm9vdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUMifQ== \ No newline at end of file diff --git a/tests/baselines/reference/optionsInlineSourceMapSourceRoot.symbols b/tests/baselines/reference/optionsInlineSourceMapSourceRoot.symbols new file mode 100644 index 0000000000000..cf8c0826d8ee0 --- /dev/null +++ b/tests/baselines/reference/optionsInlineSourceMapSourceRoot.symbols @@ -0,0 +1,5 @@ +=== tests/cases/compiler/optionsInlineSourceMapSourceRoot.ts === + +var a = 10; +>a : Symbol(a, Decl(optionsInlineSourceMapSourceRoot.ts, 1, 3)) + diff --git a/tests/baselines/reference/optionsInlineSourceMapSourceRoot.types b/tests/baselines/reference/optionsInlineSourceMapSourceRoot.types new file mode 100644 index 0000000000000..1f6a5fc9dc609 --- /dev/null +++ b/tests/baselines/reference/optionsInlineSourceMapSourceRoot.types @@ -0,0 +1,6 @@ +=== tests/cases/compiler/optionsInlineSourceMapSourceRoot.ts === + +var a = 10; +>a : number +>10 : number + diff --git a/tests/baselines/reference/optionsInlineSourceMapSourcemap.errors.txt b/tests/baselines/reference/optionsInlineSourceMapSourcemap.errors.txt new file mode 100644 index 0000000000000..e91781ccd776a --- /dev/null +++ b/tests/baselines/reference/optionsInlineSourceMapSourcemap.errors.txt @@ -0,0 +1,7 @@ +error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. + + +!!! error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. +==== tests/cases/compiler/optionsInlineSourceMapSourcemap.ts (0 errors) ==== + + var a = 10; \ No newline at end of file diff --git a/tests/baselines/reference/optionsInlineSourceMapSourcemap.js b/tests/baselines/reference/optionsInlineSourceMapSourcemap.js new file mode 100644 index 0000000000000..96d468d27daf3 --- /dev/null +++ b/tests/baselines/reference/optionsInlineSourceMapSourcemap.js @@ -0,0 +1,7 @@ +//// [optionsInlineSourceMapSourcemap.ts] + +var a = 10; + +//// [optionsInlineSourceMapSourcemap.js] +var a = 10; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uc0lubGluZVNvdXJjZU1hcFNvdXJjZW1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm9wdGlvbnNJbmxpbmVTb3VyY2VNYXBTb3VyY2VtYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDIn0= \ No newline at end of file diff --git a/tests/baselines/reference/optionsInlineSourceMapSourcemap.sourcemap.txt b/tests/baselines/reference/optionsInlineSourceMapSourcemap.sourcemap.txt new file mode 100644 index 0000000000000..6ca02eb22d12f --- /dev/null +++ b/tests/baselines/reference/optionsInlineSourceMapSourcemap.sourcemap.txt @@ -0,0 +1,33 @@ +=================================================================== +JsFile: optionsInlineSourceMapSourcemap.js +mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uc0lubGluZVNvdXJjZU1hcFNvdXJjZW1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm9wdGlvbnNJbmxpbmVTb3VyY2VNYXBTb3VyY2VtYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDIn0= +sourceRoot: +sources: optionsInlineSourceMapSourcemap.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/optionsInlineSourceMapSourcemap.js +sourceFile:optionsInlineSourceMapSourcemap.ts +------------------------------------------------------------------- +>>>var a = 10; +1 > +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >var +3 > a +4 > = +5 > 10 +6 > ; +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(2, 5) + SourceIndex(0) +3 >Emitted(1, 6) Source(2, 6) + SourceIndex(0) +4 >Emitted(1, 9) Source(2, 9) + SourceIndex(0) +5 >Emitted(1, 11) Source(2, 11) + SourceIndex(0) +6 >Emitted(1, 12) Source(2, 12) + SourceIndex(0) +--- +>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uc0lubGluZVNvdXJjZU1hcFNvdXJjZW1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm9wdGlvbnNJbmxpbmVTb3VyY2VNYXBTb3VyY2VtYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDIn0= \ No newline at end of file diff --git a/tests/baselines/reference/optionsSourcemapInlineSources.js b/tests/baselines/reference/optionsSourcemapInlineSources.js new file mode 100644 index 0000000000000..029575ab99259 --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSources.js @@ -0,0 +1,7 @@ +//// [optionsSourcemapInlineSources.ts] + +var a = 10; + +//// [optionsSourcemapInlineSources.js] +var a = 10; +//# sourceMappingURL=optionsSourcemapInlineSources.js.map \ No newline at end of file diff --git a/tests/baselines/reference/optionsSourcemapInlineSources.js.map b/tests/baselines/reference/optionsSourcemapInlineSources.js.map new file mode 100644 index 0000000000000..2be063325733a --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSources.js.map @@ -0,0 +1,2 @@ +//// [optionsSourcemapInlineSources.js.map] +{"version":3,"file":"optionsSourcemapInlineSources.js","sourceRoot":"","sources":["optionsSourcemapInlineSources.ts"],"names":[],"mappings":"AACA,IAAI,CAAC,GAAG,EAAE,CAAC","sourcesContent":["\nvar a = 10;"]} \ No newline at end of file diff --git a/tests/baselines/reference/optionsSourcemapInlineSources.sourcemap.txt b/tests/baselines/reference/optionsSourcemapInlineSources.sourcemap.txt new file mode 100644 index 0000000000000..79119d8c68714 --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSources.sourcemap.txt @@ -0,0 +1,34 @@ +=================================================================== +JsFile: optionsSourcemapInlineSources.js +mapUrl: optionsSourcemapInlineSources.js.map +sourceRoot: +sources: optionsSourcemapInlineSources.ts +sourcesContent: ["\nvar a = 10;"] +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/optionsSourcemapInlineSources.js +sourceFile:optionsSourcemapInlineSources.ts +------------------------------------------------------------------- +>>>var a = 10; +1 > +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >var +3 > a +4 > = +5 > 10 +6 > ; +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(2, 5) + SourceIndex(0) +3 >Emitted(1, 6) Source(2, 6) + SourceIndex(0) +4 >Emitted(1, 9) Source(2, 9) + SourceIndex(0) +5 >Emitted(1, 11) Source(2, 11) + SourceIndex(0) +6 >Emitted(1, 12) Source(2, 12) + SourceIndex(0) +--- +>>>//# sourceMappingURL=optionsSourcemapInlineSources.js.map \ No newline at end of file diff --git a/tests/baselines/reference/optionsSourcemapInlineSources.symbols b/tests/baselines/reference/optionsSourcemapInlineSources.symbols new file mode 100644 index 0000000000000..50649b86a0ddc --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSources.symbols @@ -0,0 +1,5 @@ +=== tests/cases/compiler/optionsSourcemapInlineSources.ts === + +var a = 10; +>a : Symbol(a, Decl(optionsSourcemapInlineSources.ts, 1, 3)) + diff --git a/tests/baselines/reference/optionsSourcemapInlineSources.types b/tests/baselines/reference/optionsSourcemapInlineSources.types new file mode 100644 index 0000000000000..42fa1839371b9 --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSources.types @@ -0,0 +1,6 @@ +=== tests/cases/compiler/optionsSourcemapInlineSources.ts === + +var a = 10; +>a : number +>10 : number + diff --git a/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.js b/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.js new file mode 100644 index 0000000000000..f7100140850f6 --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.js @@ -0,0 +1,7 @@ +//// [optionsSourcemapInlineSourcesMapRoot.ts] + +var a = 10; + +//// [optionsSourcemapInlineSourcesMapRoot.js] +var a = 10; +//# sourceMappingURL=local/optionsSourcemapInlineSourcesMapRoot.js.map \ No newline at end of file diff --git a/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.js.map b/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.js.map new file mode 100644 index 0000000000000..e99843b577f73 --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.js.map @@ -0,0 +1,2 @@ +//// [optionsSourcemapInlineSourcesMapRoot.js.map] +{"version":3,"file":"optionsSourcemapInlineSourcesMapRoot.js","sourceRoot":"","sources":["../optionsSourcemapInlineSourcesMapRoot.ts"],"names":[],"mappings":"AACA,IAAI,CAAC,GAAG,EAAE,CAAC","sourcesContent":["\nvar a = 10;"]} \ No newline at end of file diff --git a/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.sourcemap.txt b/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.sourcemap.txt new file mode 100644 index 0000000000000..a00040a9c93c4 --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.sourcemap.txt @@ -0,0 +1,34 @@ +=================================================================== +JsFile: optionsSourcemapInlineSourcesMapRoot.js +mapUrl: local/optionsSourcemapInlineSourcesMapRoot.js.map +sourceRoot: +sources: ../optionsSourcemapInlineSourcesMapRoot.ts +sourcesContent: ["\nvar a = 10;"] +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/optionsSourcemapInlineSourcesMapRoot.js +sourceFile:../optionsSourcemapInlineSourcesMapRoot.ts +------------------------------------------------------------------- +>>>var a = 10; +1 > +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >var +3 > a +4 > = +5 > 10 +6 > ; +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(2, 5) + SourceIndex(0) +3 >Emitted(1, 6) Source(2, 6) + SourceIndex(0) +4 >Emitted(1, 9) Source(2, 9) + SourceIndex(0) +5 >Emitted(1, 11) Source(2, 11) + SourceIndex(0) +6 >Emitted(1, 12) Source(2, 12) + SourceIndex(0) +--- +>>>//# sourceMappingURL=local/optionsSourcemapInlineSourcesMapRoot.js.map \ No newline at end of file diff --git a/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.symbols b/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.symbols new file mode 100644 index 0000000000000..57833abe2eeba --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.symbols @@ -0,0 +1,5 @@ +=== tests/cases/compiler/optionsSourcemapInlineSourcesMapRoot.ts === + +var a = 10; +>a : Symbol(a, Decl(optionsSourcemapInlineSourcesMapRoot.ts, 1, 3)) + diff --git a/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.types b/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.types new file mode 100644 index 0000000000000..77abb6f7b11a3 --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSourcesMapRoot.types @@ -0,0 +1,6 @@ +=== tests/cases/compiler/optionsSourcemapInlineSourcesMapRoot.ts === + +var a = 10; +>a : number +>10 : number + diff --git a/tests/baselines/reference/optionsSourcemapInlineSourcesSourceRoot.errors.txt b/tests/baselines/reference/optionsSourcemapInlineSourcesSourceRoot.errors.txt new file mode 100644 index 0000000000000..bfa77ff5a3e9b --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSourcesSourceRoot.errors.txt @@ -0,0 +1,7 @@ +error TS5053: Option 'sourceRoot' cannot be specified with option 'inlineSources'. + + +!!! error TS5053: Option 'sourceRoot' cannot be specified with option 'inlineSources'. +==== tests/cases/compiler/optionsSourcemapInlineSourcesSourceRoot.ts (0 errors) ==== + + var a = 10; \ No newline at end of file diff --git a/tests/baselines/reference/optionsSourcemapInlineSourcesSourceRoot.js b/tests/baselines/reference/optionsSourcemapInlineSourcesSourceRoot.js new file mode 100644 index 0000000000000..948d6536f46a7 --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSourcesSourceRoot.js @@ -0,0 +1,7 @@ +//// [optionsSourcemapInlineSourcesSourceRoot.ts] + +var a = 10; + +//// [optionsSourcemapInlineSourcesSourceRoot.js] +var a = 10; +//# sourceMappingURL=optionsSourcemapInlineSourcesSourceRoot.js.map \ No newline at end of file diff --git a/tests/baselines/reference/optionsSourcemapInlineSourcesSourceRoot.js.map b/tests/baselines/reference/optionsSourcemapInlineSourcesSourceRoot.js.map new file mode 100644 index 0000000000000..ad373e11aab4e --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSourcesSourceRoot.js.map @@ -0,0 +1,2 @@ +//// [optionsSourcemapInlineSourcesSourceRoot.js.map] +{"version":3,"file":"optionsSourcemapInlineSourcesSourceRoot.js","sourceRoot":"local/","sources":["optionsSourcemapInlineSourcesSourceRoot.ts"],"names":[],"mappings":"AACA,IAAI,CAAC,GAAG,EAAE,CAAC","sourcesContent":["\nvar a = 10;"]} \ No newline at end of file diff --git a/tests/baselines/reference/optionsSourcemapInlineSourcesSourceRoot.sourcemap.txt b/tests/baselines/reference/optionsSourcemapInlineSourcesSourceRoot.sourcemap.txt new file mode 100644 index 0000000000000..55102f5c1cdfa --- /dev/null +++ b/tests/baselines/reference/optionsSourcemapInlineSourcesSourceRoot.sourcemap.txt @@ -0,0 +1,34 @@ +=================================================================== +JsFile: optionsSourcemapInlineSourcesSourceRoot.js +mapUrl: optionsSourcemapInlineSourcesSourceRoot.js.map +sourceRoot: local/ +sources: optionsSourcemapInlineSourcesSourceRoot.ts +sourcesContent: ["\nvar a = 10;"] +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/optionsSourcemapInlineSourcesSourceRoot.js +sourceFile:optionsSourcemapInlineSourcesSourceRoot.ts +------------------------------------------------------------------- +>>>var a = 10; +1 > +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >var +3 > a +4 > = +5 > 10 +6 > ; +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(2, 5) + SourceIndex(0) +3 >Emitted(1, 6) Source(2, 6) + SourceIndex(0) +4 >Emitted(1, 9) Source(2, 9) + SourceIndex(0) +5 >Emitted(1, 11) Source(2, 11) + SourceIndex(0) +6 >Emitted(1, 12) Source(2, 12) + SourceIndex(0) +--- +>>>//# sourceMappingURL=optionsSourcemapInlineSourcesSourceRoot.js.map \ No newline at end of file diff --git a/tests/baselines/reference/out-flag.js.map b/tests/baselines/reference/out-flag.js.map index 1d33d382ebacb..5d3af0ec652ae 100644 --- a/tests/baselines/reference/out-flag.js.map +++ b/tests/baselines/reference/out-flag.js.map @@ -1,2 +1,2 @@ //// [out-flag.js.map] -{"version":3,"file":"out-flag.js","sourceRoot":"","sources":["out-flag.ts"],"names":["MyClass","MyClass.constructor","MyClass.Count","MyClass.SetCount"],"mappings":"AAAA,eAAe;AAEf,oBAAoB;AACpB;IAAAA;IAYAC,CAACA;IAVGD,uBAAuBA;IAChBA,uBAAKA,GAAZA;QAEIE,MAAMA,CAACA,EAAEA,CAACA;IACdA,CAACA;IAEMF,0BAAQA,GAAfA,UAAgBA,KAAaA;QAEzBG,EAAEA;IACNA,CAACA;IACLH,cAACA;AAADA,CAACA,AAZD,IAYC"} \ No newline at end of file +{"version":3,"file":"out-flag.js","sourceRoot":"","sources":["out-flag.ts"],"names":[],"mappings":"AAAA,eAAe;AAEf,oBAAoB;AACpB;IAAA;IAYA,CAAC;IAVG,uBAAuB;IAChB,uBAAK,GAAZ;QAEI,MAAM,CAAC,EAAE,CAAC;IACd,CAAC;IAEM,0BAAQ,GAAf,UAAgB,KAAa;QAEzB,EAAE;IACN,CAAC;IACL,cAAC;AAAD,CAAC,AAZD,IAYC"} \ No newline at end of file diff --git a/tests/baselines/reference/out-flag.sourcemap.txt b/tests/baselines/reference/out-flag.sourcemap.txt index 397cfe346a386..82989f69583e7 100644 --- a/tests/baselines/reference/out-flag.sourcemap.txt +++ b/tests/baselines/reference/out-flag.sourcemap.txt @@ -39,7 +39,7 @@ sourceFile:out-flag.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (MyClass) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -59,8 +59,8 @@ sourceFile:out-flag.ts > } > 2 > } -1->Emitted(5, 5) Source(16, 1) + SourceIndex(0) name (MyClass.constructor) -2 >Emitted(5, 6) Source(16, 2) + SourceIndex(0) name (MyClass.constructor) +1->Emitted(5, 5) Source(16, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(16, 2) + SourceIndex(0) --- >>> // my function comments 1->^^^^ @@ -68,8 +68,8 @@ sourceFile:out-flag.ts 3 > ^^^^^^^^^^^^^^^^^-> 1-> 2 > // my function comments -1->Emitted(6, 5) Source(6, 5) + SourceIndex(0) name (MyClass) -2 >Emitted(6, 28) Source(6, 28) + SourceIndex(0) name (MyClass) +1->Emitted(6, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(6, 28) Source(6, 28) + SourceIndex(0) --- >>> MyClass.prototype.Count = function () { 1->^^^^ @@ -79,9 +79,9 @@ sourceFile:out-flag.ts > public 2 > Count 3 > -1->Emitted(7, 5) Source(7, 12) + SourceIndex(0) name (MyClass) -2 >Emitted(7, 28) Source(7, 17) + SourceIndex(0) name (MyClass) -3 >Emitted(7, 31) Source(7, 5) + SourceIndex(0) name (MyClass) +1->Emitted(7, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(7, 28) Source(7, 17) + SourceIndex(0) +3 >Emitted(7, 31) Source(7, 5) + SourceIndex(0) --- >>> return 42; 1 >^^^^^^^^ @@ -96,11 +96,11 @@ sourceFile:out-flag.ts 3 > 4 > 42 5 > ; -1 >Emitted(8, 9) Source(9, 9) + SourceIndex(0) name (MyClass.Count) -2 >Emitted(8, 15) Source(9, 15) + SourceIndex(0) name (MyClass.Count) -3 >Emitted(8, 16) Source(9, 16) + SourceIndex(0) name (MyClass.Count) -4 >Emitted(8, 18) Source(9, 18) + SourceIndex(0) name (MyClass.Count) -5 >Emitted(8, 19) Source(9, 19) + SourceIndex(0) name (MyClass.Count) +1 >Emitted(8, 9) Source(9, 9) + SourceIndex(0) +2 >Emitted(8, 15) Source(9, 15) + SourceIndex(0) +3 >Emitted(8, 16) Source(9, 16) + SourceIndex(0) +4 >Emitted(8, 18) Source(9, 18) + SourceIndex(0) +5 >Emitted(8, 19) Source(9, 19) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -109,8 +109,8 @@ sourceFile:out-flag.ts 1 > > 2 > } -1 >Emitted(9, 5) Source(10, 5) + SourceIndex(0) name (MyClass.Count) -2 >Emitted(9, 6) Source(10, 6) + SourceIndex(0) name (MyClass.Count) +1 >Emitted(9, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(9, 6) Source(10, 6) + SourceIndex(0) --- >>> MyClass.prototype.SetCount = function (value) { 1->^^^^ @@ -125,11 +125,11 @@ sourceFile:out-flag.ts 3 > 4 > public SetCount( 5 > value: number -1->Emitted(10, 5) Source(12, 12) + SourceIndex(0) name (MyClass) -2 >Emitted(10, 31) Source(12, 20) + SourceIndex(0) name (MyClass) -3 >Emitted(10, 34) Source(12, 5) + SourceIndex(0) name (MyClass) -4 >Emitted(10, 44) Source(12, 21) + SourceIndex(0) name (MyClass) -5 >Emitted(10, 49) Source(12, 34) + SourceIndex(0) name (MyClass) +1->Emitted(10, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(10, 31) Source(12, 20) + SourceIndex(0) +3 >Emitted(10, 34) Source(12, 5) + SourceIndex(0) +4 >Emitted(10, 44) Source(12, 21) + SourceIndex(0) +5 >Emitted(10, 49) Source(12, 34) + SourceIndex(0) --- >>> // 1 >^^^^^^^^ @@ -138,8 +138,8 @@ sourceFile:out-flag.ts > { > 2 > // -1 >Emitted(11, 9) Source(14, 9) + SourceIndex(0) name (MyClass.SetCount) -2 >Emitted(11, 11) Source(14, 11) + SourceIndex(0) name (MyClass.SetCount) +1 >Emitted(11, 9) Source(14, 9) + SourceIndex(0) +2 >Emitted(11, 11) Source(14, 11) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -148,8 +148,8 @@ sourceFile:out-flag.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(15, 5) + SourceIndex(0) name (MyClass.SetCount) -2 >Emitted(12, 6) Source(15, 6) + SourceIndex(0) name (MyClass.SetCount) +1 >Emitted(12, 5) Source(15, 5) + SourceIndex(0) +2 >Emitted(12, 6) Source(15, 6) + SourceIndex(0) --- >>> return MyClass; 1->^^^^ @@ -157,8 +157,8 @@ sourceFile:out-flag.ts 1-> > 2 > } -1->Emitted(13, 5) Source(16, 1) + SourceIndex(0) name (MyClass) -2 >Emitted(13, 19) Source(16, 2) + SourceIndex(0) name (MyClass) +1->Emitted(13, 5) Source(16, 1) + SourceIndex(0) +2 >Emitted(13, 19) Source(16, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -182,8 +182,8 @@ sourceFile:out-flag.ts > // > } > } -1 >Emitted(14, 1) Source(16, 1) + SourceIndex(0) name (MyClass) -2 >Emitted(14, 2) Source(16, 2) + SourceIndex(0) name (MyClass) +1 >Emitted(14, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(16, 2) + SourceIndex(0) 3 >Emitted(14, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(14, 6) Source(16, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/out-flag2.js.map b/tests/baselines/reference/out-flag2.js.map index c1523e7578492..2c2f112b23855 100644 --- a/tests/baselines/reference/out-flag2.js.map +++ b/tests/baselines/reference/out-flag2.js.map @@ -1,2 +1,2 @@ //// [c.js.map] -{"version":3,"file":"c.js","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/b.ts"],"names":["A","A.constructor","B","B.constructor"],"mappings":"AACA;IAAAA;IAAUC,CAACA;IAADD,QAACA;AAADA,CAACA,AAAX,IAAW;ACDX;IAAAE;IAAUC,CAACA;IAADD,QAACA;AAADA,CAACA,AAAX,IAAW"} \ No newline at end of file +{"version":3,"file":"c.js","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":"AACA;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW;ACDX;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW"} \ No newline at end of file diff --git a/tests/baselines/reference/out-flag2.sourcemap.txt b/tests/baselines/reference/out-flag2.sourcemap.txt index 6a67e61bc918d..160e00bd28ecf 100644 --- a/tests/baselines/reference/out-flag2.sourcemap.txt +++ b/tests/baselines/reference/out-flag2.sourcemap.txt @@ -19,7 +19,7 @@ sourceFile:tests/cases/compiler/a.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(2, 5) Source(2, 1) + SourceIndex(0) name (A) +1->Emitted(2, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -27,16 +27,16 @@ sourceFile:tests/cases/compiler/a.ts 3 > ^^^^^^^^^-> 1->class A { 2 > } -1->Emitted(3, 5) Source(2, 11) + SourceIndex(0) name (A.constructor) -2 >Emitted(3, 6) Source(2, 12) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(2, 11) + SourceIndex(0) +2 >Emitted(3, 6) Source(2, 12) + SourceIndex(0) --- >>> return A; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(4, 5) Source(2, 11) + SourceIndex(0) name (A) -2 >Emitted(4, 13) Source(2, 12) + SourceIndex(0) name (A) +1->Emitted(4, 5) Source(2, 11) + SourceIndex(0) +2 >Emitted(4, 13) Source(2, 12) + SourceIndex(0) --- >>>})(); 1 > @@ -48,8 +48,8 @@ sourceFile:tests/cases/compiler/a.ts 2 >} 3 > 4 > class A { } -1 >Emitted(5, 1) Source(2, 11) + SourceIndex(0) name (A) -2 >Emitted(5, 2) Source(2, 12) + SourceIndex(0) name (A) +1 >Emitted(5, 1) Source(2, 11) + SourceIndex(0) +2 >Emitted(5, 2) Source(2, 12) + SourceIndex(0) 3 >Emitted(5, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(5, 6) Source(2, 12) + SourceIndex(0) --- @@ -67,7 +67,7 @@ sourceFile:tests/cases/compiler/b.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(7, 5) Source(1, 1) + SourceIndex(1) name (B) +1->Emitted(7, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -75,16 +75,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->class B { 2 > } -1->Emitted(8, 5) Source(1, 11) + SourceIndex(1) name (B.constructor) -2 >Emitted(8, 6) Source(1, 12) + SourceIndex(1) name (B.constructor) +1->Emitted(8, 5) Source(1, 11) + SourceIndex(1) +2 >Emitted(8, 6) Source(1, 12) + SourceIndex(1) --- >>> return B; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(9, 5) Source(1, 11) + SourceIndex(1) name (B) -2 >Emitted(9, 13) Source(1, 12) + SourceIndex(1) name (B) +1->Emitted(9, 5) Source(1, 11) + SourceIndex(1) +2 >Emitted(9, 13) Source(1, 12) + SourceIndex(1) --- >>>})(); 1 > @@ -96,8 +96,8 @@ sourceFile:tests/cases/compiler/b.ts 2 >} 3 > 4 > class B { } -1 >Emitted(10, 1) Source(1, 11) + SourceIndex(1) name (B) -2 >Emitted(10, 2) Source(1, 12) + SourceIndex(1) name (B) +1 >Emitted(10, 1) Source(1, 11) + SourceIndex(1) +2 >Emitted(10, 2) Source(1, 12) + SourceIndex(1) 3 >Emitted(10, 2) Source(1, 1) + SourceIndex(1) 4 >Emitted(10, 6) Source(1, 12) + SourceIndex(1) --- diff --git a/tests/baselines/reference/out-flag3.js.map b/tests/baselines/reference/out-flag3.js.map index a52d66589c7ac..5fb864821b7f2 100644 --- a/tests/baselines/reference/out-flag3.js.map +++ b/tests/baselines/reference/out-flag3.js.map @@ -1,2 +1,2 @@ //// [c.js.map] -{"version":3,"file":"c.js","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/b.ts"],"names":["A","A.constructor","B","B.constructor"],"mappings":"AACA,4BAA4B;AAE5B;IAAAA;IAAUC,CAACA;IAADD,QAACA;AAADA,CAACA,AAAX,IAAW;ACHX;IAAAE;IAAUC,CAACA;IAADD,QAACA;AAADA,CAACA,AAAX,IAAW"} \ No newline at end of file +{"version":3,"file":"c.js","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":"AACA,4BAA4B;AAE5B;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW;ACHX;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW"} \ No newline at end of file diff --git a/tests/baselines/reference/out-flag3.sourcemap.txt b/tests/baselines/reference/out-flag3.sourcemap.txt index c30c9f63020cc..a14ca70e61756 100644 --- a/tests/baselines/reference/out-flag3.sourcemap.txt +++ b/tests/baselines/reference/out-flag3.sourcemap.txt @@ -29,7 +29,7 @@ sourceFile:tests/cases/compiler/a.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) name (A) +1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -37,16 +37,16 @@ sourceFile:tests/cases/compiler/a.ts 3 > ^^^^^^^^^-> 1->class A { 2 > } -1->Emitted(4, 5) Source(4, 11) + SourceIndex(0) name (A.constructor) -2 >Emitted(4, 6) Source(4, 12) + SourceIndex(0) name (A.constructor) +1->Emitted(4, 5) Source(4, 11) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 12) + SourceIndex(0) --- >>> return A; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 11) + SourceIndex(0) name (A) -2 >Emitted(5, 13) Source(4, 12) + SourceIndex(0) name (A) +1->Emitted(5, 5) Source(4, 11) + SourceIndex(0) +2 >Emitted(5, 13) Source(4, 12) + SourceIndex(0) --- >>>})(); 1 > @@ -58,8 +58,8 @@ sourceFile:tests/cases/compiler/a.ts 2 >} 3 > 4 > class A { } -1 >Emitted(6, 1) Source(4, 11) + SourceIndex(0) name (A) -2 >Emitted(6, 2) Source(4, 12) + SourceIndex(0) name (A) +1 >Emitted(6, 1) Source(4, 11) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 12) + SourceIndex(0) 3 >Emitted(6, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 12) + SourceIndex(0) --- @@ -77,7 +77,7 @@ sourceFile:tests/cases/compiler/b.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(8, 5) Source(1, 1) + SourceIndex(1) name (B) +1->Emitted(8, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -85,16 +85,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->class B { 2 > } -1->Emitted(9, 5) Source(1, 11) + SourceIndex(1) name (B.constructor) -2 >Emitted(9, 6) Source(1, 12) + SourceIndex(1) name (B.constructor) +1->Emitted(9, 5) Source(1, 11) + SourceIndex(1) +2 >Emitted(9, 6) Source(1, 12) + SourceIndex(1) --- >>> return B; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(10, 5) Source(1, 11) + SourceIndex(1) name (B) -2 >Emitted(10, 13) Source(1, 12) + SourceIndex(1) name (B) +1->Emitted(10, 5) Source(1, 11) + SourceIndex(1) +2 >Emitted(10, 13) Source(1, 12) + SourceIndex(1) --- >>>})(); 1 > @@ -106,8 +106,8 @@ sourceFile:tests/cases/compiler/b.ts 2 >} 3 > 4 > class B { } -1 >Emitted(11, 1) Source(1, 11) + SourceIndex(1) name (B) -2 >Emitted(11, 2) Source(1, 12) + SourceIndex(1) name (B) +1 >Emitted(11, 1) Source(1, 11) + SourceIndex(1) +2 >Emitted(11, 2) Source(1, 12) + SourceIndex(1) 3 >Emitted(11, 2) Source(1, 1) + SourceIndex(1) 4 >Emitted(11, 6) Source(1, 12) + SourceIndex(1) --- diff --git a/tests/baselines/reference/outModuleConcatAmd.js b/tests/baselines/reference/outModuleConcatAmd.js index a1c874abb7cdd..cfcd1bad9b8b1 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -15,6 +15,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; define("tests/cases/compiler/ref/a", ["require", "exports"], function (require, exports) { + "use strict"; var A = (function () { function A() { } @@ -23,6 +24,7 @@ define("tests/cases/compiler/ref/a", ["require", "exports"], function (require, exports.A = A; }); define("tests/cases/compiler/b", ["require", "exports", "tests/cases/compiler/ref/a"], function (require, exports, a_1) { + "use strict"; var B = (function (_super) { __extends(B, _super); function B() { diff --git a/tests/baselines/reference/outModuleConcatAmd.js.map b/tests/baselines/reference/outModuleConcatAmd.js.map index 44cd5ce9955bd..963fba4a8479d 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js.map +++ b/tests/baselines/reference/outModuleConcatAmd.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":["A","A.constructor","B","B.constructor"],"mappings":";;;;;;IACA;QAAAA;QAAiBC,CAACA;QAADD,QAACA;IAADA,CAACA,AAAlB,IAAkB;IAAL,SAAC,IAAI,CAAA;;;ICAlB;QAAuBE,qBAACA;QAAxBA;YAAuBC,8BAACA;QAAGA,CAACA;QAADD,QAACA;IAADA,CAACA,AAA5B,EAAuB,KAAC,EAAI;IAAf,SAAC,IAAc,CAAA"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,SAAC,IAAI,CAAA;;;;ICAlB;QAAuB,qBAAC;QAAxB;YAAuB,8BAAC;QAAG,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,EAAuB,KAAC,EAAI;IAAf,SAAC,IAAc,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index eec3a6014aa3e..0b5988e4d3ad9 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -14,18 +14,19 @@ sourceFile:tests/cases/compiler/ref/a.ts >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; >>>define("tests/cases/compiler/ref/a", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> var A = (function () { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(7, 5) Source(2, 1) + SourceIndex(0) +1 >Emitted(8, 5) Source(2, 1) + SourceIndex(0) --- >>> function A() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(8, 9) Source(2, 1) + SourceIndex(0) name (A) +1->Emitted(9, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -33,16 +34,16 @@ sourceFile:tests/cases/compiler/ref/a.ts 3 > ^^^^^^^^^-> 1->export class A { 2 > } -1->Emitted(9, 9) Source(2, 18) + SourceIndex(0) name (A.constructor) -2 >Emitted(9, 10) Source(2, 19) + SourceIndex(0) name (A.constructor) +1->Emitted(10, 9) Source(2, 18) + SourceIndex(0) +2 >Emitted(10, 10) Source(2, 19) + SourceIndex(0) --- >>> return A; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(10, 9) Source(2, 18) + SourceIndex(0) name (A) -2 >Emitted(10, 17) Source(2, 19) + SourceIndex(0) name (A) +1->Emitted(11, 9) Source(2, 18) + SourceIndex(0) +2 >Emitted(11, 17) Source(2, 19) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -54,10 +55,10 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > } 3 > 4 > export class A { } -1 >Emitted(11, 5) Source(2, 18) + SourceIndex(0) name (A) -2 >Emitted(11, 6) Source(2, 19) + SourceIndex(0) name (A) -3 >Emitted(11, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(11, 10) Source(2, 19) + SourceIndex(0) +1 >Emitted(12, 5) Source(2, 18) + SourceIndex(0) +2 >Emitted(12, 6) Source(2, 19) + SourceIndex(0) +3 >Emitted(12, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(12, 10) Source(2, 19) + SourceIndex(0) --- >>> exports.A = A; 1->^^^^ @@ -68,10 +69,10 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > A 3 > { } 4 > -1->Emitted(12, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(12, 14) Source(2, 15) + SourceIndex(0) -3 >Emitted(12, 18) Source(2, 19) + SourceIndex(0) -4 >Emitted(12, 19) Source(2, 19) + SourceIndex(0) +1->Emitted(13, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(13, 14) Source(2, 15) + SourceIndex(0) +3 >Emitted(13, 18) Source(2, 19) + SourceIndex(0) +4 >Emitted(13, 19) Source(2, 19) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -79,34 +80,35 @@ sourceFile:tests/cases/compiler/b.ts ------------------------------------------------------------------- >>>}); >>>define("tests/cases/compiler/b", ["require", "exports", "tests/cases/compiler/ref/a"], function (require, exports, a_1) { +>>> "use strict"; >>> var B = (function (_super) { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(15, 5) Source(2, 1) + SourceIndex(1) +1 >Emitted(17, 5) Source(2, 1) + SourceIndex(1) --- >>> __extends(B, _super); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(16, 9) Source(2, 24) + SourceIndex(1) name (B) -2 >Emitted(16, 30) Source(2, 25) + SourceIndex(1) name (B) +1->Emitted(18, 9) Source(2, 24) + SourceIndex(1) +2 >Emitted(18, 30) Source(2, 25) + SourceIndex(1) --- >>> function B() { 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(17, 9) Source(2, 1) + SourceIndex(1) name (B) +1 >Emitted(19, 9) Source(2, 1) + SourceIndex(1) --- >>> _super.apply(this, arguments); 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(18, 13) Source(2, 24) + SourceIndex(1) name (B.constructor) -2 >Emitted(18, 43) Source(2, 25) + SourceIndex(1) name (B.constructor) +1->Emitted(20, 13) Source(2, 24) + SourceIndex(1) +2 >Emitted(20, 43) Source(2, 25) + SourceIndex(1) --- >>> } 1 >^^^^^^^^ @@ -114,16 +116,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1 > { 2 > } -1 >Emitted(19, 9) Source(2, 28) + SourceIndex(1) name (B.constructor) -2 >Emitted(19, 10) Source(2, 29) + SourceIndex(1) name (B.constructor) +1 >Emitted(21, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(21, 10) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(2, 28) + SourceIndex(1) name (B) -2 >Emitted(20, 17) Source(2, 29) + SourceIndex(1) name (B) +1->Emitted(22, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(22, 17) Source(2, 29) + SourceIndex(1) --- >>> })(a_1.A); 1 >^^^^ @@ -139,12 +141,12 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(21, 5) Source(2, 28) + SourceIndex(1) name (B) -2 >Emitted(21, 6) Source(2, 29) + SourceIndex(1) name (B) -3 >Emitted(21, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(21, 8) Source(2, 24) + SourceIndex(1) -5 >Emitted(21, 13) Source(2, 25) + SourceIndex(1) -6 >Emitted(21, 15) Source(2, 29) + SourceIndex(1) +1 >Emitted(23, 5) Source(2, 28) + SourceIndex(1) +2 >Emitted(23, 6) Source(2, 29) + SourceIndex(1) +3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(23, 8) Source(2, 24) + SourceIndex(1) +5 >Emitted(23, 13) Source(2, 25) + SourceIndex(1) +6 >Emitted(23, 15) Source(2, 29) + SourceIndex(1) --- >>> exports.B = B; 1->^^^^ @@ -155,10 +157,10 @@ sourceFile:tests/cases/compiler/b.ts 2 > B 3 > extends A { } 4 > -1->Emitted(22, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(22, 14) Source(2, 15) + SourceIndex(1) -3 >Emitted(22, 18) Source(2, 29) + SourceIndex(1) -4 >Emitted(22, 19) Source(2, 29) + SourceIndex(1) +1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(24, 14) Source(2, 15) + SourceIndex(1) +3 >Emitted(24, 18) Source(2, 29) + SourceIndex(1) +4 >Emitted(24, 19) Source(2, 29) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index 1f8bdbd80703b..688221ca5b2fe 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -15,6 +15,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; System.register("tests/cases/compiler/ref/a", [], function(exports_1) { + "use strict"; var A; return { setters:[], @@ -29,6 +30,7 @@ System.register("tests/cases/compiler/ref/a", [], function(exports_1) { } }); System.register("tests/cases/compiler/b", ["tests/cases/compiler/ref/a"], function(exports_2) { + "use strict"; var a_1; var B; return { diff --git a/tests/baselines/reference/outModuleConcatSystem.js.map b/tests/baselines/reference/outModuleConcatSystem.js.map index 77ff05f84fbf2..c2289af1df454 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js.map +++ b/tests/baselines/reference/outModuleConcatSystem.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":["A","A.constructor","B","B.constructor"],"mappings":";;;;;;;;;;YACA;gBAAAA;gBAAiBC,CAACA;gBAADD,QAACA;YAADA,CAACA,AAAlB,IAAkB;YAAlB,iBAAkB,CAAA;;;;;;;;;;;;;YCAlB;gBAAuBE,qBAACA;gBAAxBA;oBAAuBC,8BAACA;gBAAGA,CAACA;gBAADD,QAACA;YAADA,CAACA,AAA5B,EAAuB,KAAC,EAAI;YAA5B,iBAA4B,CAAA"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;YAAlB,iBAAkB,CAAA;;;;;;;;;;;;;;YCAlB;gBAAuB,qBAAC;gBAAxB;oBAAuB,8BAAC;gBAAG,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,EAAuB,KAAC,EAAI;YAA5B,iBAA4B,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index 489487772dbf0..639fe3dcc895e 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -14,6 +14,7 @@ sourceFile:tests/cases/compiler/ref/a.ts >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; >>>System.register("tests/cases/compiler/ref/a", [], function(exports_1) { +>>> "use strict"; >>> var A; >>> return { >>> setters:[], @@ -23,13 +24,13 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 13) Source(2, 1) + SourceIndex(0) +1 >Emitted(12, 13) Source(2, 1) + SourceIndex(0) --- >>> function A() { 1->^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(12, 17) Source(2, 1) + SourceIndex(0) name (A) +1->Emitted(13, 17) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^ @@ -37,16 +38,16 @@ sourceFile:tests/cases/compiler/ref/a.ts 3 > ^^^^^^^^^-> 1->export class A { 2 > } -1->Emitted(13, 17) Source(2, 18) + SourceIndex(0) name (A.constructor) -2 >Emitted(13, 18) Source(2, 19) + SourceIndex(0) name (A.constructor) +1->Emitted(14, 17) Source(2, 18) + SourceIndex(0) +2 >Emitted(14, 18) Source(2, 19) + SourceIndex(0) --- >>> return A; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(14, 17) Source(2, 18) + SourceIndex(0) name (A) -2 >Emitted(14, 25) Source(2, 19) + SourceIndex(0) name (A) +1->Emitted(15, 17) Source(2, 18) + SourceIndex(0) +2 >Emitted(15, 25) Source(2, 19) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -58,10 +59,10 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > } 3 > 4 > export class A { } -1 >Emitted(15, 13) Source(2, 18) + SourceIndex(0) name (A) -2 >Emitted(15, 14) Source(2, 19) + SourceIndex(0) name (A) -3 >Emitted(15, 14) Source(2, 1) + SourceIndex(0) -4 >Emitted(15, 18) Source(2, 19) + SourceIndex(0) +1 >Emitted(16, 13) Source(2, 18) + SourceIndex(0) +2 >Emitted(16, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(16, 14) Source(2, 1) + SourceIndex(0) +4 >Emitted(16, 18) Source(2, 19) + SourceIndex(0) --- >>> exports_1("A", A); 1->^^^^^^^^^^^^ @@ -70,9 +71,9 @@ sourceFile:tests/cases/compiler/ref/a.ts 1-> 2 > export class A { } 3 > -1->Emitted(16, 13) Source(2, 1) + SourceIndex(0) -2 >Emitted(16, 30) Source(2, 19) + SourceIndex(0) -3 >Emitted(16, 31) Source(2, 19) + SourceIndex(0) +1->Emitted(17, 13) Source(2, 1) + SourceIndex(0) +2 >Emitted(17, 30) Source(2, 19) + SourceIndex(0) +3 >Emitted(17, 31) Source(2, 19) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -82,6 +83,7 @@ sourceFile:tests/cases/compiler/b.ts >>> } >>>}); >>>System.register("tests/cases/compiler/b", ["tests/cases/compiler/ref/a"], function(exports_2) { +>>> "use strict"; >>> var a_1; >>> var B; >>> return { @@ -95,29 +97,29 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(29, 13) Source(2, 1) + SourceIndex(1) +1 >Emitted(31, 13) Source(2, 1) + SourceIndex(1) --- >>> __extends(B, _super); 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(30, 17) Source(2, 24) + SourceIndex(1) name (B) -2 >Emitted(30, 38) Source(2, 25) + SourceIndex(1) name (B) +1->Emitted(32, 17) Source(2, 24) + SourceIndex(1) +2 >Emitted(32, 38) Source(2, 25) + SourceIndex(1) --- >>> function B() { 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(31, 17) Source(2, 1) + SourceIndex(1) name (B) +1 >Emitted(33, 17) Source(2, 1) + SourceIndex(1) --- >>> _super.apply(this, arguments); 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(32, 21) Source(2, 24) + SourceIndex(1) name (B.constructor) -2 >Emitted(32, 51) Source(2, 25) + SourceIndex(1) name (B.constructor) +1->Emitted(34, 21) Source(2, 24) + SourceIndex(1) +2 >Emitted(34, 51) Source(2, 25) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -125,16 +127,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1 > { 2 > } -1 >Emitted(33, 17) Source(2, 28) + SourceIndex(1) name (B.constructor) -2 >Emitted(33, 18) Source(2, 29) + SourceIndex(1) name (B.constructor) +1 >Emitted(35, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(35, 18) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(34, 17) Source(2, 28) + SourceIndex(1) name (B) -2 >Emitted(34, 25) Source(2, 29) + SourceIndex(1) name (B) +1->Emitted(36, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(36, 25) Source(2, 29) + SourceIndex(1) --- >>> })(a_1.A); 1 >^^^^^^^^^^^^ @@ -150,12 +152,12 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(35, 13) Source(2, 28) + SourceIndex(1) name (B) -2 >Emitted(35, 14) Source(2, 29) + SourceIndex(1) name (B) -3 >Emitted(35, 14) Source(2, 1) + SourceIndex(1) -4 >Emitted(35, 16) Source(2, 24) + SourceIndex(1) -5 >Emitted(35, 21) Source(2, 25) + SourceIndex(1) -6 >Emitted(35, 23) Source(2, 29) + SourceIndex(1) +1 >Emitted(37, 13) Source(2, 28) + SourceIndex(1) +2 >Emitted(37, 14) Source(2, 29) + SourceIndex(1) +3 >Emitted(37, 14) Source(2, 1) + SourceIndex(1) +4 >Emitted(37, 16) Source(2, 24) + SourceIndex(1) +5 >Emitted(37, 21) Source(2, 25) + SourceIndex(1) +6 >Emitted(37, 23) Source(2, 29) + SourceIndex(1) --- >>> exports_2("B", B); 1->^^^^^^^^^^^^ @@ -164,9 +166,9 @@ sourceFile:tests/cases/compiler/b.ts 1-> 2 > export class B extends A { } 3 > -1->Emitted(36, 13) Source(2, 1) + SourceIndex(1) -2 >Emitted(36, 30) Source(2, 29) + SourceIndex(1) -3 >Emitted(36, 31) Source(2, 29) + SourceIndex(1) +1->Emitted(38, 13) Source(2, 1) + SourceIndex(1) +2 >Emitted(38, 30) Source(2, 29) + SourceIndex(1) +3 >Emitted(38, 31) Source(2, 29) + SourceIndex(1) --- >>> } >>> } diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index ae4ac43b5c982..88cb9c9ed3800 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -43,6 +43,7 @@ var Foo = (function () { return Foo; })(); define("tests/cases/compiler/ref/a", ["require", "exports"], function (require, exports) { + "use strict"; /// var A = (function () { function A() { @@ -52,6 +53,7 @@ define("tests/cases/compiler/ref/a", ["require", "exports"], function (require, exports.A = A; }); define("tests/cases/compiler/b", ["require", "exports", "tests/cases/compiler/ref/a"], function (require, exports, a_1) { + "use strict"; var B = (function (_super) { __extends(B, _super); function B() { diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js.map b/tests/baselines/reference/outModuleTripleSlashRefs.js.map index 711163a76e862..324f0e9374f95 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js.map +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":["Foo","Foo.constructor","A","A.constructor","B","B.constructor"],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAAA;IAEAC,CAACA;IAADD,UAACA;AAADA,CAACA,AAFD,IAEC;;ICFD,+BAA+B;IAC/B;QAAAE;QAEAC,CAACA;QAADD,QAACA;IAADA,CAACA,AAFD,IAEC;IAFY,SAAC,IAEb,CAAA;;;ICHD;QAAuBE,qBAACA;QAAxBA;YAAuBC,8BAACA;QAAGA,CAACA;QAADD,QAACA;IAADA,CAACA,AAA5B,EAAuB,KAAC,EAAI;IAAf,SAAC,IAAc,CAAA"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,SAAC,IAEb,CAAA;;;;ICHD;QAAuB,qBAAC;QAAxB;YAAuB,8BAAC;QAAG,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,EAAuB,KAAC,EAAI;IAAf,SAAC,IAAc,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index c95eb22cb10ed..1d0724543cae7 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -32,7 +32,7 @@ sourceFile:tests/cases/compiler/ref/b.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(8, 5) Source(2, 1) + SourceIndex(0) name (Foo) +1->Emitted(8, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -42,16 +42,16 @@ sourceFile:tests/cases/compiler/ref/b.ts > member: Bar; > 2 > } -1->Emitted(9, 5) Source(4, 1) + SourceIndex(0) name (Foo.constructor) -2 >Emitted(9, 6) Source(4, 2) + SourceIndex(0) name (Foo.constructor) +1->Emitted(9, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(9, 6) Source(4, 2) + SourceIndex(0) --- >>> return Foo; 1->^^^^ 2 > ^^^^^^^^^^ 1-> 2 > } -1->Emitted(10, 5) Source(4, 1) + SourceIndex(0) name (Foo) -2 >Emitted(10, 15) Source(4, 2) + SourceIndex(0) name (Foo) +1->Emitted(10, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(10, 15) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -65,8 +65,8 @@ sourceFile:tests/cases/compiler/ref/b.ts 4 > class Foo { > member: Bar; > } -1 >Emitted(11, 1) Source(4, 1) + SourceIndex(0) name (Foo) -2 >Emitted(11, 2) Source(4, 2) + SourceIndex(0) name (Foo) +1 >Emitted(11, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(11, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(11, 6) Source(4, 2) + SourceIndex(0) --- @@ -75,27 +75,28 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>define("tests/cases/compiler/ref/a", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> /// 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> > 2 > /// -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) -2 >Emitted(13, 36) Source(2, 32) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) +2 >Emitted(14, 36) Source(2, 32) + SourceIndex(1) --- >>> var A = (function () { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(14, 5) Source(3, 1) + SourceIndex(1) +1 >Emitted(15, 5) Source(3, 1) + SourceIndex(1) --- >>> function A() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(15, 9) Source(3, 1) + SourceIndex(1) name (A) +1->Emitted(16, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -105,16 +106,16 @@ sourceFile:tests/cases/compiler/ref/a.ts > member: typeof GlobalFoo; > 2 > } -1->Emitted(16, 9) Source(5, 1) + SourceIndex(1) name (A.constructor) -2 >Emitted(16, 10) Source(5, 2) + SourceIndex(1) name (A.constructor) +1->Emitted(17, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 10) Source(5, 2) + SourceIndex(1) --- >>> return A; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(17, 9) Source(5, 1) + SourceIndex(1) name (A) -2 >Emitted(17, 17) Source(5, 2) + SourceIndex(1) name (A) +1->Emitted(18, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(18, 17) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -128,10 +129,10 @@ sourceFile:tests/cases/compiler/ref/a.ts 4 > export class A { > member: typeof GlobalFoo; > } -1 >Emitted(18, 5) Source(5, 1) + SourceIndex(1) name (A) -2 >Emitted(18, 6) Source(5, 2) + SourceIndex(1) name (A) -3 >Emitted(18, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(18, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(19, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(19, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(19, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.A = A; 1->^^^^ @@ -144,10 +145,10 @@ sourceFile:tests/cases/compiler/ref/a.ts > member: typeof GlobalFoo; > } 4 > -1->Emitted(19, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(19, 14) Source(3, 15) + SourceIndex(1) -3 >Emitted(19, 18) Source(5, 2) + SourceIndex(1) -4 >Emitted(19, 19) Source(5, 2) + SourceIndex(1) +1->Emitted(20, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(20, 14) Source(3, 15) + SourceIndex(1) +3 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) +4 >Emitted(20, 19) Source(5, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:all.js @@ -155,34 +156,35 @@ sourceFile:tests/cases/compiler/b.ts ------------------------------------------------------------------- >>>}); >>>define("tests/cases/compiler/b", ["require", "exports", "tests/cases/compiler/ref/a"], function (require, exports, a_1) { +>>> "use strict"; >>> var B = (function (_super) { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(22, 5) Source(2, 1) + SourceIndex(2) +1 >Emitted(24, 5) Source(2, 1) + SourceIndex(2) --- >>> __extends(B, _super); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(23, 9) Source(2, 24) + SourceIndex(2) name (B) -2 >Emitted(23, 30) Source(2, 25) + SourceIndex(2) name (B) +1->Emitted(25, 9) Source(2, 24) + SourceIndex(2) +2 >Emitted(25, 30) Source(2, 25) + SourceIndex(2) --- >>> function B() { 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(24, 9) Source(2, 1) + SourceIndex(2) name (B) +1 >Emitted(26, 9) Source(2, 1) + SourceIndex(2) --- >>> _super.apply(this, arguments); 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(25, 13) Source(2, 24) + SourceIndex(2) name (B.constructor) -2 >Emitted(25, 43) Source(2, 25) + SourceIndex(2) name (B.constructor) +1->Emitted(27, 13) Source(2, 24) + SourceIndex(2) +2 >Emitted(27, 43) Source(2, 25) + SourceIndex(2) --- >>> } 1 >^^^^^^^^ @@ -190,16 +192,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1 > { 2 > } -1 >Emitted(26, 9) Source(2, 28) + SourceIndex(2) name (B.constructor) -2 >Emitted(26, 10) Source(2, 29) + SourceIndex(2) name (B.constructor) +1 >Emitted(28, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(28, 10) Source(2, 29) + SourceIndex(2) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(27, 9) Source(2, 28) + SourceIndex(2) name (B) -2 >Emitted(27, 17) Source(2, 29) + SourceIndex(2) name (B) +1->Emitted(29, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(29, 17) Source(2, 29) + SourceIndex(2) --- >>> })(a_1.A); 1 >^^^^ @@ -215,12 +217,12 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(28, 5) Source(2, 28) + SourceIndex(2) name (B) -2 >Emitted(28, 6) Source(2, 29) + SourceIndex(2) name (B) -3 >Emitted(28, 6) Source(2, 1) + SourceIndex(2) -4 >Emitted(28, 8) Source(2, 24) + SourceIndex(2) -5 >Emitted(28, 13) Source(2, 25) + SourceIndex(2) -6 >Emitted(28, 15) Source(2, 29) + SourceIndex(2) +1 >Emitted(30, 5) Source(2, 28) + SourceIndex(2) +2 >Emitted(30, 6) Source(2, 29) + SourceIndex(2) +3 >Emitted(30, 6) Source(2, 1) + SourceIndex(2) +4 >Emitted(30, 8) Source(2, 24) + SourceIndex(2) +5 >Emitted(30, 13) Source(2, 25) + SourceIndex(2) +6 >Emitted(30, 15) Source(2, 29) + SourceIndex(2) --- >>> exports.B = B; 1->^^^^ @@ -231,10 +233,10 @@ sourceFile:tests/cases/compiler/b.ts 2 > B 3 > extends A { } 4 > -1->Emitted(29, 5) Source(2, 14) + SourceIndex(2) -2 >Emitted(29, 14) Source(2, 15) + SourceIndex(2) -3 >Emitted(29, 18) Source(2, 29) + SourceIndex(2) -4 >Emitted(29, 19) Source(2, 29) + SourceIndex(2) +1->Emitted(31, 5) Source(2, 14) + SourceIndex(2) +2 >Emitted(31, 14) Source(2, 15) + SourceIndex(2) +3 >Emitted(31, 18) Source(2, 29) + SourceIndex(2) +4 >Emitted(31, 19) Source(2, 29) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/overloadConsecutiveness.errors.txt b/tests/baselines/reference/overloadConsecutiveness.errors.txt new file mode 100644 index 0000000000000..59634681c4371 --- /dev/null +++ b/tests/baselines/reference/overloadConsecutiveness.errors.txt @@ -0,0 +1,63 @@ +tests/cases/compiler/overloadConsecutiveness.ts(3,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/overloadConsecutiveness.ts(3,14): error TS1144: '{' or ';' expected. +tests/cases/compiler/overloadConsecutiveness.ts(3,25): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/overloadConsecutiveness.ts(4,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/overloadConsecutiveness.ts(4,14): error TS1144: '{' or ';' expected. +tests/cases/compiler/overloadConsecutiveness.ts(5,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/overloadConsecutiveness.ts(5,17): error TS1128: Declaration or statement expected. +tests/cases/compiler/overloadConsecutiveness.ts(5,28): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/overloadConsecutiveness.ts(8,2): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/overloadConsecutiveness.ts(8,6): error TS1144: '{' or ';' expected. +tests/cases/compiler/overloadConsecutiveness.ts(8,8): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/overloadConsecutiveness.ts(9,2): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/overloadConsecutiveness.ts(9,6): error TS1144: '{' or ';' expected. +tests/cases/compiler/overloadConsecutiveness.ts(10,2): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/overloadConsecutiveness.ts(10,9): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/compiler/overloadConsecutiveness.ts(10,11): error TS2391: Function implementation is missing or not immediately following the declaration. + + +==== tests/cases/compiler/overloadConsecutiveness.ts (16 errors) ==== + // Making sure compiler won't break with declarations that are consecutive in the AST but not consecutive in the source. Syntax errors intentional. + + function f1(), function f1(); + ~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + ~ +!!! error TS1144: '{' or ';' expected. + ~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + function f2(), function f2() {} + ~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + ~ +!!! error TS1144: '{' or ';' expected. + function f3() {}, function f3(); + ~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + ~ +!!! error TS1128: Declaration or statement expected. + ~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + + class C { + m1(), m1(); + ~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + ~ +!!! error TS1144: '{' or ';' expected. + ~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + m2(), m2() {} + ~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + ~ +!!! error TS1144: '{' or ';' expected. + m3() {}, m3(); + ~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + ~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + ~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + } + \ No newline at end of file diff --git a/tests/baselines/reference/overloadConsecutiveness.js b/tests/baselines/reference/overloadConsecutiveness.js new file mode 100644 index 0000000000000..8c0d3d26b7286 --- /dev/null +++ b/tests/baselines/reference/overloadConsecutiveness.js @@ -0,0 +1,27 @@ +//// [overloadConsecutiveness.ts] +// Making sure compiler won't break with declarations that are consecutive in the AST but not consecutive in the source. Syntax errors intentional. + +function f1(), function f1(); +function f2(), function f2() {} +function f3() {}, function f3(); + +class C { + m1(), m1(); + m2(), m2() {} + m3() {}, m3(); +} + + +//// [overloadConsecutiveness.js] +// Making sure compiler won't break with declarations that are consecutive in the AST but not consecutive in the source. Syntax errors intentional. +function f2() { } +function f3() { } +var C = (function () { + function C() { + } + C.prototype.m1 = ; + C.prototype.m2 = ; + C.prototype.m2 = function () { }; + C.prototype.m3 = function () { }; + return C; +})(); diff --git a/tests/baselines/reference/overloadModifiersMustAgree.js b/tests/baselines/reference/overloadModifiersMustAgree.js index 3f9f7eb1415a8..afcc0f829c891 100644 --- a/tests/baselines/reference/overloadModifiersMustAgree.js +++ b/tests/baselines/reference/overloadModifiersMustAgree.js @@ -16,6 +16,7 @@ interface I { //// [overloadModifiersMustAgree.js] +"use strict"; var baz = (function () { function baz() { } diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.types b/tests/baselines/reference/overloadOnConstConstraintChecks1.types index cc561eb6e21c6..012774b3cc9eb 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.types @@ -22,23 +22,23 @@ interface MyDoc { // Document >MyDoc : MyDoc createElement(tagName: string): Base; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } >tagName : string >Base : Base createElement(tagName: 'canvas'): Derived1; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } ->tagName : 'canvas' +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>tagName : "canvas" >Derived1 : Derived1 createElement(tagName: 'div'): Derived2; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } ->tagName : 'div' +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>tagName : "div" >Derived2 : Derived2 createElement(tagName: 'span'): Derived3; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } ->tagName : 'span' +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>tagName : "span" >Derived3 : Derived3 // + 100 more @@ -49,27 +49,27 @@ class D implements MyDoc { >MyDoc : MyDoc createElement(tagName:string): Base; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } >tagName : string >Base : Base createElement(tagName: 'canvas'): Derived1; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } ->tagName : 'canvas' +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>tagName : "canvas" >Derived1 : Derived1 createElement(tagName: 'div'): Derived2; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } ->tagName : 'div' +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>tagName : "div" >Derived2 : Derived2 createElement(tagName: 'span'): Derived3; ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } ->tagName : 'span' +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } +>tagName : "span" >Derived3 : Derived3 createElement(tagName:any): Base { ->createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; } +>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; } >tagName : any >Base : Base diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.types b/tests/baselines/reference/overloadOnConstConstraintChecks2.types index 36fa89dec4a5a..6102c282a60a3 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.types @@ -14,22 +14,22 @@ class C extends A { >foo : () => void } function foo(name: 'hi'): B; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } ->name : 'hi' +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>name : "hi" >B : B function foo(name: 'bye'): C; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } ->name : 'bye' +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>name : "bye" >C : C function foo(name: string): A; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } >name : string >A : A function foo(name: any): A { ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } >name : any >A : A diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.types b/tests/baselines/reference/overloadOnConstConstraintChecks3.types index 94a03bb768070..0348d3d4b79b8 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.types @@ -16,22 +16,22 @@ class C extends A { >foo : () => void } function foo(name: 'hi'): B; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } ->name : 'hi' +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>name : "hi" >B : B function foo(name: 'bye'): C; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } ->name : 'bye' +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } +>name : "bye" >C : C function foo(name: string): A; ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } >name : string >A : A function foo(name: any): A { ->foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } +>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; } >name : any >A : A diff --git a/tests/baselines/reference/overloadOnConstInheritance1.types b/tests/baselines/reference/overloadOnConstInheritance1.types index 96f8df3dffdf9..4721c18e55c8a 100644 --- a/tests/baselines/reference/overloadOnConstInheritance1.types +++ b/tests/baselines/reference/overloadOnConstInheritance1.types @@ -3,23 +3,23 @@ interface Base { >Base : Base addEventListener(x: string): any; ->addEventListener : { (x: string): any; (x: 'foo'): string; } +>addEventListener : { (x: string): any; (x: "foo"): string; } >x : string addEventListener(x: 'foo'): string; ->addEventListener : { (x: string): any; (x: 'foo'): string; } ->x : 'foo' +>addEventListener : { (x: string): any; (x: "foo"): string; } +>x : "foo" } interface Deriver extends Base { >Deriver : Deriver >Base : Base addEventListener(x: string): any; ->addEventListener : { (x: string): any; (x: 'bar'): string; } +>addEventListener : { (x: string): any; (x: "bar"): string; } >x : string addEventListener(x: 'bar'): string; ->addEventListener : { (x: string): any; (x: 'bar'): string; } ->x : 'bar' +>addEventListener : { (x: string): any; (x: "bar"): string; } +>x : "bar" } diff --git a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt index 159af64a13ae2..4870106f4745b 100644 --- a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/overloadOnConstInheritance2.ts(5,11): error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. Types of property 'addEventListener' are incompatible. - Type '(x: 'bar') => string' is not assignable to type '{ (x: string): any; (x: 'foo'): string; }'. + Type '(x: "bar") => string' is not assignable to type '{ (x: string): any; (x: "foo"): string; }'. tests/cases/compiler/overloadOnConstInheritance2.ts(6,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. @@ -13,7 +13,7 @@ tests/cases/compiler/overloadOnConstInheritance2.ts(6,5): error TS2382: Speciali ~~~~~~~ !!! error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. !!! error TS2430: Types of property 'addEventListener' are incompatible. -!!! error TS2430: Type '(x: 'bar') => string' is not assignable to type '{ (x: string): any; (x: 'foo'): string; }'. +!!! error TS2430: Type '(x: "bar") => string' is not assignable to type '{ (x: string): any; (x: "foo"): string; }'. addEventListener(x: 'bar'): string; // shouldn't need to redeclare the string overload ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. diff --git a/tests/baselines/reference/overloadOnConstInheritance3.errors.txt b/tests/baselines/reference/overloadOnConstInheritance3.errors.txt index e0fff7b1ec73c..b338f9795d79c 100644 --- a/tests/baselines/reference/overloadOnConstInheritance3.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance3.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/overloadOnConstInheritance3.ts(4,11): error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. Types of property 'addEventListener' are incompatible. - Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'. + Type '{ (x: "bar"): string; (x: "foo"): string; }' is not assignable to type '(x: string) => any'. tests/cases/compiler/overloadOnConstInheritance3.ts(6,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/compiler/overloadOnConstInheritance3.ts(7,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. @@ -13,7 +13,7 @@ tests/cases/compiler/overloadOnConstInheritance3.ts(7,5): error TS2382: Speciali ~~~~~~~ !!! error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. !!! error TS2430: Types of property 'addEventListener' are incompatible. -!!! error TS2430: Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'. +!!! error TS2430: Type '{ (x: "bar"): string; (x: "foo"): string; }' is not assignable to type '(x: string) => any'. // shouldn't need to redeclare the string overload addEventListener(x: 'bar'): string; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt index 1676a2fb426a0..4fea7cc122795 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(6,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(7,10): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(11,5): error TS2345: Argument of type 'string' is not assignable to parameter of type '"SPAN"'. +tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(11,5): error TS2345: Argument of type '"HI"' is not assignable to parameter of type '"SPAN"'. ==== tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts (3 errors) ==== @@ -20,4 +20,4 @@ tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(11,5): error TS2345: foo("HI"); ~~~~ -!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"SPAN"'. \ No newline at end of file +!!! error TS2345: Argument of type '"HI"' is not assignable to parameter of type '"SPAN"'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadingOnConstants2.errors.txt b/tests/baselines/reference/overloadingOnConstants2.errors.txt index c6d6352357681..b448deaadc75b 100644 --- a/tests/baselines/reference/overloadingOnConstants2.errors.txt +++ b/tests/baselines/reference/overloadingOnConstants2.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/overloadingOnConstants2.ts(8,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/compiler/overloadingOnConstants2.ts(9,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadingOnConstants2.ts(15,13): error TS2345: Argument of type 'string' is not assignable to parameter of type '"bye"'. +tests/cases/compiler/overloadingOnConstants2.ts(15,13): error TS2345: Argument of type '"um"' is not assignable to parameter of type '"bye"'. tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. @@ -25,7 +25,7 @@ tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2382: Specialize var b: E = foo("bye", []); // E var c = foo("um", []); // error ~~~~ -!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"bye"'. +!!! error TS2345: Argument of type '"um"' is not assignable to parameter of type '"bye"'. //function bar(x: "hi", items: string[]): D; diff --git a/tests/baselines/reference/parameterNamesInTypeParameterList.errors.txt b/tests/baselines/reference/parameterNamesInTypeParameterList.errors.txt new file mode 100644 index 0000000000000..54ddb963f94d0 --- /dev/null +++ b/tests/baselines/reference/parameterNamesInTypeParameterList.errors.txt @@ -0,0 +1,44 @@ +tests/cases/compiler/parameterNamesInTypeParameterList.ts(1,30): error TS2304: Cannot find name 'a'. +tests/cases/compiler/parameterNamesInTypeParameterList.ts(5,30): error TS2304: Cannot find name 'a'. +tests/cases/compiler/parameterNamesInTypeParameterList.ts(9,30): error TS2304: Cannot find name 'a'. +tests/cases/compiler/parameterNamesInTypeParameterList.ts(14,22): error TS2304: Cannot find name 'a'. +tests/cases/compiler/parameterNamesInTypeParameterList.ts(17,22): error TS2304: Cannot find name 'a'. +tests/cases/compiler/parameterNamesInTypeParameterList.ts(20,22): error TS2304: Cannot find name 'a'. + + +==== tests/cases/compiler/parameterNamesInTypeParameterList.ts (6 errors) ==== + function f0(a: T) { + ~ +!!! error TS2304: Cannot find name 'a'. + a.b; + } + + function f1({a}: {a:T}) { + ~ +!!! error TS2304: Cannot find name 'a'. + a.b; + } + + function f2([a]: T[]) { + ~ +!!! error TS2304: Cannot find name 'a'. + a.b; + } + + class A { + m0(a: T) { + ~ +!!! error TS2304: Cannot find name 'a'. + a.b + } + m1({a}: {a:T}) { + ~ +!!! error TS2304: Cannot find name 'a'. + a.b + } + m2([a]: T[]) { + ~ +!!! error TS2304: Cannot find name 'a'. + a.b + } + } \ No newline at end of file diff --git a/tests/baselines/reference/parameterNamesInTypeParameterList.js b/tests/baselines/reference/parameterNamesInTypeParameterList.js new file mode 100644 index 0000000000000..2fbd7fad3cb05 --- /dev/null +++ b/tests/baselines/reference/parameterNamesInTypeParameterList.js @@ -0,0 +1,53 @@ +//// [parameterNamesInTypeParameterList.ts] +function f0(a: T) { + a.b; +} + +function f1({a}: {a:T}) { + a.b; +} + +function f2([a]: T[]) { + a.b; +} + +class A { + m0(a: T) { + a.b + } + m1({a}: {a:T}) { + a.b + } + m2([a]: T[]) { + a.b + } +} + +//// [parameterNamesInTypeParameterList.js] +function f0(a) { + a.b; +} +function f1(_a) { + var a = _a.a; + a.b; +} +function f2(_a) { + var a = _a[0]; + a.b; +} +var A = (function () { + function A() { + } + A.prototype.m0 = function (a) { + a.b; + }; + A.prototype.m1 = function (_a) { + var a = _a.a; + a.b; + }; + A.prototype.m2 = function (_a) { + var a = _a[0]; + a.b; + }; + return A; +})(); diff --git a/tests/baselines/reference/parser0_004152.js b/tests/baselines/reference/parser0_004152.js index cd6a20742a85c..87248eb8d8395 100644 --- a/tests/baselines/reference/parser0_004152.js +++ b/tests/baselines/reference/parser0_004152.js @@ -5,6 +5,7 @@ export class Game { } //// [parser0_004152.js] +"use strict"; var Game = (function () { function Game() { this.position = new DisplayPosition([]); diff --git a/tests/baselines/reference/parser509546.js b/tests/baselines/reference/parser509546.js index 5524a4d606f6c..9a38cdc8b6153 100644 --- a/tests/baselines/reference/parser509546.js +++ b/tests/baselines/reference/parser509546.js @@ -5,6 +5,7 @@ export class Logger { //// [parser509546.js] +"use strict"; var Logger = (function () { function Logger() { } diff --git a/tests/baselines/reference/parser509546_1.js b/tests/baselines/reference/parser509546_1.js index d0e32feb1cad8..847ded1fdbab2 100644 --- a/tests/baselines/reference/parser509546_1.js +++ b/tests/baselines/reference/parser509546_1.js @@ -5,6 +5,7 @@ export class Logger { //// [parser509546_1.js] +"use strict"; var Logger = (function () { function Logger() { } diff --git a/tests/baselines/reference/parser618973.js b/tests/baselines/reference/parser618973.js index e52c9667e764a..dbcad3e3d6ef4 100644 --- a/tests/baselines/reference/parser618973.js +++ b/tests/baselines/reference/parser618973.js @@ -5,6 +5,7 @@ export export class Foo { } //// [parser618973.js] +"use strict"; var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/parserArgumentList1.js b/tests/baselines/reference/parserArgumentList1.js index d33e8931d18dd..222b2c5ac89ec 100644 --- a/tests/baselines/reference/parserArgumentList1.js +++ b/tests/baselines/reference/parserArgumentList1.js @@ -6,6 +6,7 @@ export function removeClass (node:HTMLElement, className:string) { } //// [parserArgumentList1.js] +"use strict"; function removeClass(node, className) { node.className = node.className.replace(_classNameRegexp(className), function (everything, leftDelimiter, name, rightDelimiter) { return leftDelimiter.length + rightDelimiter.length === 2 ? ' ' : ''; diff --git a/tests/baselines/reference/parserClass1.js b/tests/baselines/reference/parserClass1.js index eb1d17566aa06..3f772a2f692c5 100644 --- a/tests/baselines/reference/parserClass1.js +++ b/tests/baselines/reference/parserClass1.js @@ -10,6 +10,7 @@ } //// [parserClass1.js] +"use strict"; var NullLogger = (function () { function NullLogger() { } diff --git a/tests/baselines/reference/parserClass2.js b/tests/baselines/reference/parserClass2.js index b3816ea6ebb68..1fe84f37a074d 100644 --- a/tests/baselines/reference/parserClass2.js +++ b/tests/baselines/reference/parserClass2.js @@ -8,6 +8,7 @@ } //// [parserClass2.js] +"use strict"; var LoggerAdapter = (function () { function LoggerAdapter(logger) { this.logger = logger; diff --git a/tests/baselines/reference/parserEnum1.js b/tests/baselines/reference/parserEnum1.js index 3b71eee5e49d8..e54fff50c7392 100644 --- a/tests/baselines/reference/parserEnum1.js +++ b/tests/baselines/reference/parserEnum1.js @@ -9,6 +9,7 @@ } //// [parserEnum1.js] +"use strict"; (function (SignatureFlags) { SignatureFlags[SignatureFlags["None"] = 0] = "None"; SignatureFlags[SignatureFlags["IsIndexer"] = 1] = "IsIndexer"; diff --git a/tests/baselines/reference/parserEnum2.js b/tests/baselines/reference/parserEnum2.js index 9a49b145954f0..8e7da5c73cd8d 100644 --- a/tests/baselines/reference/parserEnum2.js +++ b/tests/baselines/reference/parserEnum2.js @@ -9,6 +9,7 @@ } //// [parserEnum2.js] +"use strict"; (function (SignatureFlags) { SignatureFlags[SignatureFlags["None"] = 0] = "None"; SignatureFlags[SignatureFlags["IsIndexer"] = 1] = "IsIndexer"; diff --git a/tests/baselines/reference/parserEnum3.js b/tests/baselines/reference/parserEnum3.js index bbfb203931433..1d0c445d3a0d0 100644 --- a/tests/baselines/reference/parserEnum3.js +++ b/tests/baselines/reference/parserEnum3.js @@ -5,6 +5,7 @@ } //// [parserEnum3.js] +"use strict"; (function (SignatureFlags) { })(exports.SignatureFlags || (exports.SignatureFlags = {})); var SignatureFlags = exports.SignatureFlags; diff --git a/tests/baselines/reference/parserEnum4.js b/tests/baselines/reference/parserEnum4.js index 1bad704748623..1a207960714a3 100644 --- a/tests/baselines/reference/parserEnum4.js +++ b/tests/baselines/reference/parserEnum4.js @@ -6,6 +6,7 @@ } //// [parserEnum4.js] +"use strict"; (function (SignatureFlags) { })(exports.SignatureFlags || (exports.SignatureFlags = {})); var SignatureFlags = exports.SignatureFlags; diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.errors.txt b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.errors.txt deleted file mode 100644 index 707e68c2c4542..0000000000000 --- a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.errors.txt +++ /dev/null @@ -1,34 +0,0 @@ -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts(12,21): error TS1110: Type expected. - - -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts (1 errors) ==== - // Interface - interface IPoint { - getDist(): number; - } - - // Module - module Shapes { - - // Class - export class Point implements IPoint { - - public con: "hello"; - ~~~~~~~ -!!! error TS1110: Type expected. - // Constructor - constructor (public x: number, public y: number) { } - - // Instance member - getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } - - // Static member - static origin = new Point(0, 0); - } - - } - - // Local variables - var p: IPoint = new Shapes.Point(3, 4); - var dist = p.getDist(); - \ No newline at end of file diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js index ae2509c3f4929..8055cd9d4947b 100644 --- a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js +++ b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js @@ -38,7 +38,6 @@ var Shapes; function Point(x, y) { this.x = x; this.y = y; - this.con = "hello"; } // Instance member Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.symbols b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.symbols new file mode 100644 index 0000000000000..7b8be05f923f8 --- /dev/null +++ b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.symbols @@ -0,0 +1,67 @@ +=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts === +// Interface +interface IPoint { +>IPoint : Symbol(IPoint, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 0, 0)) + + getDist(): number; +>getDist : Symbol(getDist, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 1, 18)) +} + +// Module +module Shapes { +>Shapes : Symbol(Shapes, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 3, 1)) + + // Class + export class Point implements IPoint { +>Point : Symbol(Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15)) +>IPoint : Symbol(IPoint, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 0, 0)) + + public con: "hello"; +>con : Symbol(con, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 9, 42)) + + // Constructor + constructor (public x: number, public y: number) { } +>x : Symbol(x, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 21)) +>y : Symbol(y, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 38)) + + // Instance member + getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } +>getDist : Symbol(getDist, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 60)) +>Math.sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) +>this.x : Symbol(x, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 21)) +>this : Symbol(Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15)) +>x : Symbol(x, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 21)) +>this.x : Symbol(x, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 21)) +>this : Symbol(Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15)) +>x : Symbol(x, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 21)) +>this.y : Symbol(y, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 38)) +>this : Symbol(Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15)) +>y : Symbol(y, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 38)) +>this.y : Symbol(y, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 38)) +>this : Symbol(Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15)) +>y : Symbol(y, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 38)) + + // Static member + static origin = new Point(0, 0); +>origin : Symbol(Point.origin, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 16, 74)) +>Point : Symbol(Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15)) + } + +} + +// Local variables +var p: IPoint = new Shapes.Point(3, 4); +>p : Symbol(p, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 25, 3)) +>IPoint : Symbol(IPoint, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 0, 0)) +>Shapes.Point : Symbol(Shapes.Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15)) +>Shapes : Symbol(Shapes, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 3, 1)) +>Point : Symbol(Shapes.Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15)) + +var dist = p.getDist(); +>dist : Symbol(dist, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 26, 3)) +>p.getDist : Symbol(IPoint.getDist, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 1, 18)) +>p : Symbol(p, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 25, 3)) +>getDist : Symbol(IPoint.getDist, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 1, 18)) + diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.types b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.types new file mode 100644 index 0000000000000..b38bbbfe64d4d --- /dev/null +++ b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.types @@ -0,0 +1,78 @@ +=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts === +// Interface +interface IPoint { +>IPoint : IPoint + + getDist(): number; +>getDist : () => number +} + +// Module +module Shapes { +>Shapes : typeof Shapes + + // Class + export class Point implements IPoint { +>Point : Point +>IPoint : IPoint + + public con: "hello"; +>con : "hello" + + // Constructor + constructor (public x: number, public y: number) { } +>x : number +>y : number + + // Instance member + getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } +>getDist : () => number +>Math.sqrt(this.x * this.x + this.y * this.y) : number +>Math.sqrt : (x: number) => number +>Math : Math +>sqrt : (x: number) => number +>this.x * this.x + this.y * this.y : number +>this.x * this.x : number +>this.x : number +>this : this +>x : number +>this.x : number +>this : this +>x : number +>this.y * this.y : number +>this.y : number +>this : this +>y : number +>this.y : number +>this : this +>y : number + + // Static member + static origin = new Point(0, 0); +>origin : Point +>new Point(0, 0) : Point +>Point : typeof Point +>0 : number +>0 : number + } + +} + +// Local variables +var p: IPoint = new Shapes.Point(3, 4); +>p : IPoint +>IPoint : IPoint +>new Shapes.Point(3, 4) : Shapes.Point +>Shapes.Point : typeof Shapes.Point +>Shapes : typeof Shapes +>Point : typeof Shapes.Point +>3 : number +>4 : number + +var dist = p.getDist(); +>dist : number +>p.getDist() : number +>p.getDist : () => number +>p : IPoint +>getDist : () => number + diff --git a/tests/baselines/reference/parserExportAssignment1.js b/tests/baselines/reference/parserExportAssignment1.js index 5f3c0e1513f9a..cecfe2789f4ee 100644 --- a/tests/baselines/reference/parserExportAssignment1.js +++ b/tests/baselines/reference/parserExportAssignment1.js @@ -2,3 +2,4 @@ export = foo //// [parserExportAssignment1.js] +"use strict"; diff --git a/tests/baselines/reference/parserExportAssignment2.js b/tests/baselines/reference/parserExportAssignment2.js index aaa12cea1795b..cf3f5a1114539 100644 --- a/tests/baselines/reference/parserExportAssignment2.js +++ b/tests/baselines/reference/parserExportAssignment2.js @@ -2,3 +2,4 @@ export = foo; //// [parserExportAssignment2.js] +"use strict"; diff --git a/tests/baselines/reference/parserExportAssignment3.js b/tests/baselines/reference/parserExportAssignment3.js index 13e04c3607af2..55dd6f107bb91 100644 --- a/tests/baselines/reference/parserExportAssignment3.js +++ b/tests/baselines/reference/parserExportAssignment3.js @@ -2,3 +2,4 @@ export = //// [parserExportAssignment3.js] +"use strict"; diff --git a/tests/baselines/reference/parserExportAssignment4.js b/tests/baselines/reference/parserExportAssignment4.js index 7cfd8206dbe0f..8c2c3a8746b8e 100644 --- a/tests/baselines/reference/parserExportAssignment4.js +++ b/tests/baselines/reference/parserExportAssignment4.js @@ -2,3 +2,4 @@ export = ; //// [parserExportAssignment4.js] +"use strict"; diff --git a/tests/baselines/reference/parserExportAssignment7.js b/tests/baselines/reference/parserExportAssignment7.js index 52f9848c243e0..4e3982e429562 100644 --- a/tests/baselines/reference/parserExportAssignment7.js +++ b/tests/baselines/reference/parserExportAssignment7.js @@ -5,6 +5,7 @@ export class C { export = B; //// [parserExportAssignment7.js] +"use strict"; var C = (function () { function C() { } diff --git a/tests/baselines/reference/parserExportAssignment8.js b/tests/baselines/reference/parserExportAssignment8.js index 3c5b851284e0b..580a0bfe80471 100644 --- a/tests/baselines/reference/parserExportAssignment8.js +++ b/tests/baselines/reference/parserExportAssignment8.js @@ -5,6 +5,7 @@ export class C { } //// [parserExportAssignment8.js] +"use strict"; var C = (function () { function C() { } diff --git a/tests/baselines/reference/parserInterfaceDeclaration6.js b/tests/baselines/reference/parserInterfaceDeclaration6.js index 3cecca19198c9..1ec3325de3443 100644 --- a/tests/baselines/reference/parserInterfaceDeclaration6.js +++ b/tests/baselines/reference/parserInterfaceDeclaration6.js @@ -3,3 +3,4 @@ export export interface I { } //// [parserInterfaceDeclaration6.js] +"use strict"; diff --git a/tests/baselines/reference/parserInterfaceDeclaration7.js b/tests/baselines/reference/parserInterfaceDeclaration7.js index 40998c119cf38..eed874db1431d 100644 --- a/tests/baselines/reference/parserInterfaceDeclaration7.js +++ b/tests/baselines/reference/parserInterfaceDeclaration7.js @@ -3,3 +3,4 @@ export interface I { } //// [parserInterfaceDeclaration7.js] +"use strict"; diff --git a/tests/baselines/reference/parserModifierOnStatementInBlock1.js b/tests/baselines/reference/parserModifierOnStatementInBlock1.js index 1796c9eddf5d5..e7234a4d2742c 100644 --- a/tests/baselines/reference/parserModifierOnStatementInBlock1.js +++ b/tests/baselines/reference/parserModifierOnStatementInBlock1.js @@ -5,6 +5,7 @@ export function foo() { //// [parserModifierOnStatementInBlock1.js] +"use strict"; function foo() { exports.x = this; } diff --git a/tests/baselines/reference/parserModifierOnStatementInBlock3.js b/tests/baselines/reference/parserModifierOnStatementInBlock3.js index 9c625f0dc7ff7..0520d0e1d0740 100644 --- a/tests/baselines/reference/parserModifierOnStatementInBlock3.js +++ b/tests/baselines/reference/parserModifierOnStatementInBlock3.js @@ -6,6 +6,7 @@ export function foo() { //// [parserModifierOnStatementInBlock3.js] +"use strict"; function foo() { function bar() { } diff --git a/tests/baselines/reference/parserModule1.js b/tests/baselines/reference/parserModule1.js index 1eba49114ab83..749715a39d1a1 100644 --- a/tests/baselines/reference/parserModule1.js +++ b/tests/baselines/reference/parserModule1.js @@ -32,6 +32,7 @@ } //// [parserModule1.js] +"use strict"; var CompilerDiagnostics; (function (CompilerDiagnostics) { CompilerDiagnostics.debug = false; diff --git a/tests/baselines/reference/prespecializedGenericMembers1.js b/tests/baselines/reference/prespecializedGenericMembers1.js index 26edee4e3f7da..c53a6f2ee691d 100644 --- a/tests/baselines/reference/prespecializedGenericMembers1.js +++ b/tests/baselines/reference/prespecializedGenericMembers1.js @@ -21,6 +21,7 @@ var catThing = { var catBag = new CatBag(catThing); //// [prespecializedGenericMembers1.js] +"use strict"; var Cat = (function () { function Cat() { } diff --git a/tests/baselines/reference/primtiveTypesAreIdentical.types b/tests/baselines/reference/primtiveTypesAreIdentical.types index bbff4623f0b88..0b8e7dadf7dc3 100644 --- a/tests/baselines/reference/primtiveTypesAreIdentical.types +++ b/tests/baselines/reference/primtiveTypesAreIdentical.types @@ -50,19 +50,19 @@ function foo4(x: any) { } >x : any function foo5(x: 'a'); ->foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } ->x : 'a' +>foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } +>x : "a" function foo5(x: 'a'); ->foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } ->x : 'a' +>foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } +>x : "a" function foo5(x: string); ->foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } +>foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } >x : string function foo5(x: any) { } ->foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } +>foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; } >x : any enum E { A } diff --git a/tests/baselines/reference/privacyAccessorDeclFile.js b/tests/baselines/reference/privacyAccessorDeclFile.js index b9825807eb748..efd96c4442b12 100644 --- a/tests/baselines/reference/privacyAccessorDeclFile.js +++ b/tests/baselines/reference/privacyAccessorDeclFile.js @@ -1060,6 +1060,7 @@ module publicModuleInGlobal { } //// [privacyAccessorDeclFile_externalModule.js] +"use strict"; var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js index 8c4108ea9e857..cb6bbc38a7e07 100644 --- a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js +++ b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js @@ -138,6 +138,7 @@ class privateClassWithPrivateModuleGetAccessorTypes { //// [privacyCannotNameAccessorDeclFile_GlobalWidgets.js] //// [privacyCannotNameAccessorDeclFile_Widgets.js] +"use strict"; var Widget1 = (function () { function Widget1() { this.name = 'one'; @@ -164,6 +165,7 @@ var SpecializedWidget; SpecializedWidget.createWidget2 = createWidget2; })(SpecializedWidget = exports.SpecializedWidget || (exports.SpecializedWidget = {})); //// [privacyCannotNameAccessorDeclFile_exporter.js] +"use strict"; /// var Widgets = require("./privacyCannotNameAccessorDeclFile_Widgets"); var Widgets1 = require("GlobalWidgets"); @@ -184,6 +186,7 @@ function createExportedWidget4() { } exports.createExportedWidget4 = createExportedWidget4; //// [privacyCannotNameAccessorDeclFile_consumer.js] +"use strict"; var exporter = require("./privacyCannotNameAccessorDeclFile_exporter"); var publicClassWithWithPrivateGetAccessorTypes = (function () { function publicClassWithWithPrivateGetAccessorTypes() { diff --git a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js index b40d1dc4980b0..b64e813f4ee0f 100644 --- a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js +++ b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js @@ -102,6 +102,7 @@ var privateVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4() //// [privacyCannotNameVarTypeDeclFile_GlobalWidgets.js] //// [privacyCannotNameVarTypeDeclFile_Widgets.js] +"use strict"; var Widget1 = (function () { function Widget1() { this.name = 'one'; @@ -128,6 +129,7 @@ var SpecializedWidget; SpecializedWidget.createWidget2 = createWidget2; })(SpecializedWidget = exports.SpecializedWidget || (exports.SpecializedWidget = {})); //// [privacyCannotNameVarTypeDeclFile_exporter.js] +"use strict"; /// var Widgets = require("./privacyCannotNameVarTypeDeclFile_Widgets"); var Widgets1 = require("GlobalWidgets"); @@ -148,6 +150,7 @@ function createExportedWidget4() { } exports.createExportedWidget4 = createExportedWidget4; //// [privacyCannotNameVarTypeDeclFile_consumer.js] +"use strict"; var exporter = require("./privacyCannotNameVarTypeDeclFile_exporter"); var publicClassWithWithPrivatePropertyTypes = (function () { function publicClassWithWithPrivatePropertyTypes() { diff --git a/tests/baselines/reference/privacyCheckAnonymousFunctionParameter.js b/tests/baselines/reference/privacyCheckAnonymousFunctionParameter.js index 70bc067bb8d1e..92be6f737ccf1 100644 --- a/tests/baselines/reference/privacyCheckAnonymousFunctionParameter.js +++ b/tests/baselines/reference/privacyCheckAnonymousFunctionParameter.js @@ -17,6 +17,7 @@ module Query { //// [privacyCheckAnonymousFunctionParameter.js] +"use strict"; exports.x = 1; // Makes this an external module var Query; (function (Query) { diff --git a/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.js b/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.js index 77bb7e9349bb5..9965f472d7510 100644 --- a/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.js +++ b/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.js @@ -16,6 +16,7 @@ module Q { //// [privacyCheckAnonymousFunctionParameter2.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.x = 1; // Makes this an external module var Q; (function (Q) { diff --git a/tests/baselines/reference/privacyCheckCallbackOfInterfaceMethodWithTypeParameter.js b/tests/baselines/reference/privacyCheckCallbackOfInterfaceMethodWithTypeParameter.js index faaef563ebb7c..54ad8acd2f170 100644 --- a/tests/baselines/reference/privacyCheckCallbackOfInterfaceMethodWithTypeParameter.js +++ b/tests/baselines/reference/privacyCheckCallbackOfInterfaceMethodWithTypeParameter.js @@ -9,6 +9,7 @@ export interface B extends A { //// [privacyCheckCallbackOfInterfaceMethodWithTypeParameter.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface1.js b/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface1.js index 7b5e63ce00992..af368f52078ee 100644 --- a/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface1.js +++ b/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface1.js @@ -9,6 +9,7 @@ var Foo: new () => Foo.A>; export = Foo; //// [privacyCheckExportAssignmentOnExportedGenericInterface1.js] +"use strict"; var Foo; module.exports = Foo; diff --git a/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface2.js b/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface2.js index 11a5131823098..cb61a82399014 100644 --- a/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface2.js +++ b/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface2.js @@ -15,6 +15,7 @@ module Foo { //// [privacyCheckExportAssignmentOnExportedGenericInterface2.js] define(["require", "exports"], function (require, exports) { + "use strict"; function Foo(array) { return undefined; } diff --git a/tests/baselines/reference/privacyCheckExternalModuleExportAssignmentOfGenericClass.js b/tests/baselines/reference/privacyCheckExternalModuleExportAssignmentOfGenericClass.js index 8ed0b3cfa1b95..94933d322e690 100644 --- a/tests/baselines/reference/privacyCheckExternalModuleExportAssignmentOfGenericClass.js +++ b/tests/baselines/reference/privacyCheckExternalModuleExportAssignmentOfGenericClass.js @@ -14,6 +14,7 @@ interface Bar { } //// [privacyCheckExternalModuleExportAssignmentOfGenericClass_0.js] +"use strict"; var Foo = (function () { function Foo(a) { this.a = a; @@ -22,6 +23,7 @@ var Foo = (function () { })(); module.exports = Foo; //// [privacyCheckExternalModuleExportAssignmentOfGenericClass_1.js] +"use strict"; //// [privacyCheckExternalModuleExportAssignmentOfGenericClass_0.d.ts] diff --git a/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.js b/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.js index 6e2ef7449467d..1788435755af3 100644 --- a/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.js +++ b/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.js @@ -12,6 +12,7 @@ export class B { //// [privacyCheckOnTypeParameterReferenceInConstructorParameter.js] define(["require", "exports"], function (require, exports) { + "use strict"; var A = (function () { function A(callback) { var child = new B(this); diff --git a/tests/baselines/reference/privacyCheckTypeOfFunction.js b/tests/baselines/reference/privacyCheckTypeOfFunction.js index b29a21b98b513..b810dafcca70e 100644 --- a/tests/baselines/reference/privacyCheckTypeOfFunction.js +++ b/tests/baselines/reference/privacyCheckTypeOfFunction.js @@ -6,6 +6,7 @@ export var b = foo; //// [privacyCheckTypeOfFunction.js] +"use strict"; function foo() { } exports.b = foo; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index f632ea8b26ff6..74a4234b47433 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -128,6 +128,7 @@ export class glo_C12_public extends glo_c_private implements glo_i_private, glo } //// [privacyClass.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index a3ddd387883be..4efc6e12b1655 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -98,6 +98,7 @@ class publicClassExtendingPublicClassInGlobal extends publicClassInGlobal { //// [privacyClassExtendsClauseDeclFile_externalModule.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/privacyClassImplementsClauseDeclFile.js b/tests/baselines/reference/privacyClassImplementsClauseDeclFile.js index 8327a75b8ab8f..74f1ec1bec69b 100644 --- a/tests/baselines/reference/privacyClassImplementsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassImplementsClauseDeclFile.js @@ -95,6 +95,7 @@ class publicClassImplementingPublicInterfaceInGlobal implements publicInterfaceI //// [privacyClassImplementsClauseDeclFile_externalModule.js] +"use strict"; var publicModule; (function (publicModule) { var privateClassImplementingPublicInterfaceInModule = (function () { diff --git a/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js b/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js index bf2d820e2eade..6f567ec3bd0ef 100644 --- a/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js +++ b/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js @@ -158,6 +158,7 @@ function privateFunctionWithPrivateModuleParameterTypes1(param= exporter.createE //// [privacyFunctionCannotNameParameterTypeDeclFile_GlobalWidgets.js] //// [privacyFunctionCannotNameParameterTypeDeclFile_Widgets.js] +"use strict"; var Widget1 = (function () { function Widget1() { this.name = 'one'; @@ -184,6 +185,7 @@ var SpecializedWidget; SpecializedWidget.createWidget2 = createWidget2; })(SpecializedWidget = exports.SpecializedWidget || (exports.SpecializedWidget = {})); //// [privacyFunctionCannotNameParameterTypeDeclFile_exporter.js] +"use strict"; /// var Widgets = require("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets"); var Widgets1 = require("GlobalWidgets"); @@ -204,6 +206,7 @@ function createExportedWidget4() { } exports.createExportedWidget4 = createExportedWidget4; //// [privacyFunctionCannotNameParameterTypeDeclFile_consumer.js] +"use strict"; var exporter = require("./privacyFunctionCannotNameParameterTypeDeclFile_exporter"); var publicClassWithWithPrivateParmeterTypes = (function () { function publicClassWithWithPrivateParmeterTypes(param, param1, param2) { diff --git a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js index 8de50f4ea8ac5..1de0f2b664276 100644 --- a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js +++ b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js @@ -165,6 +165,7 @@ function privateFunctionWithPrivateModuleReturnTypes1() { //// [privacyFunctionReturnTypeDeclFile_GlobalWidgets.js] //// [privacyFunctionReturnTypeDeclFile_Widgets.js] +"use strict"; var Widget1 = (function () { function Widget1() { this.name = 'one'; @@ -191,6 +192,7 @@ var SpecializedWidget; SpecializedWidget.createWidget2 = createWidget2; })(SpecializedWidget = exports.SpecializedWidget || (exports.SpecializedWidget = {})); //// [privacyFunctionReturnTypeDeclFile_exporter.js] +"use strict"; /// var Widgets = require("./privacyFunctionReturnTypeDeclFile_Widgets"); var Widgets1 = require("GlobalWidgets"); @@ -211,6 +213,7 @@ function createExportedWidget4() { } exports.createExportedWidget4 = createExportedWidget4; //// [privacyFunctionReturnTypeDeclFile_consumer.js] +"use strict"; var exporter = require("./privacyFunctionReturnTypeDeclFile_exporter"); var publicClassWithWithPrivateParmeterTypes = (function () { function publicClassWithWithPrivateParmeterTypes() { diff --git a/tests/baselines/reference/privacyFunctionParameterDeclFile.js b/tests/baselines/reference/privacyFunctionParameterDeclFile.js index 91de4d4ffff2b..e02c221d33395 100644 --- a/tests/baselines/reference/privacyFunctionParameterDeclFile.js +++ b/tests/baselines/reference/privacyFunctionParameterDeclFile.js @@ -687,6 +687,7 @@ module publicModuleInGlobal { } //// [privacyFunctionParameterDeclFile_externalModule.js] +"use strict"; var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyFunctionReturnTypeDeclFile.js b/tests/baselines/reference/privacyFunctionReturnTypeDeclFile.js index 05e418ccaa80f..b312578b7a390 100644 --- a/tests/baselines/reference/privacyFunctionReturnTypeDeclFile.js +++ b/tests/baselines/reference/privacyFunctionReturnTypeDeclFile.js @@ -1194,6 +1194,7 @@ module publicModuleInGlobal { } //// [privacyFunctionReturnTypeDeclFile_externalModule.js] +"use strict"; var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyGetter.js b/tests/baselines/reference/privacyGetter.js index ff10e6238cb84..95e3dda5643e7 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) { + "use strict"; var m1; (function (m1) { var C1_public = (function () { diff --git a/tests/baselines/reference/privacyGloFunc.js b/tests/baselines/reference/privacyGloFunc.js index 3ae522b146cda..ff801078df569 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) { + "use strict"; var m1; (function (m1) { var C1_public = (function () { diff --git a/tests/baselines/reference/privacyImport.js b/tests/baselines/reference/privacyImport.js index 02ee47341c4ba..13a6bc396eadf 100644 --- a/tests/baselines/reference/privacyImport.js +++ b/tests/baselines/reference/privacyImport.js @@ -357,6 +357,7 @@ export module m3 { } //// [privacyImport.js] +"use strict"; var m1; (function (m1) { var m1_M1_public; diff --git a/tests/baselines/reference/privacyImportParseErrors.js b/tests/baselines/reference/privacyImportParseErrors.js index 71f20286f901e..7a7e7141684fa 100644 --- a/tests/baselines/reference/privacyImportParseErrors.js +++ b/tests/baselines/reference/privacyImportParseErrors.js @@ -357,6 +357,7 @@ export module m3 { } //// [privacyImportParseErrors.js] +"use strict"; var m1; (function (m1) { var m1_M1_public; diff --git a/tests/baselines/reference/privacyInterface.js b/tests/baselines/reference/privacyInterface.js index 43fd3682f5053..78e87bc22d24f 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] +"use strict"; var m1; (function (m1) { var C1_public = (function () { diff --git a/tests/baselines/reference/privacyInterfaceExtendsClauseDeclFile.js b/tests/baselines/reference/privacyInterfaceExtendsClauseDeclFile.js index 65f0a2af420b7..8b2c4de8bf387 100644 --- a/tests/baselines/reference/privacyInterfaceExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyInterfaceExtendsClauseDeclFile.js @@ -95,4 +95,5 @@ interface publicInterfaceImplementingPublicInterfaceInGlobal extends publicInter //// [privacyInterfaceExtendsClauseDeclFile_externalModule.js] +"use strict"; //// [privacyInterfaceExtendsClauseDeclFile_GlobalFile.js] diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js index 2088123015643..e5c127272b7a4 100644 --- a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js +++ b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js @@ -153,6 +153,7 @@ module import_private { } //// [privacyLocalInternalReferenceImportWithExport.js] +"use strict"; // private elements var m_private; (function (m_private) { diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js index 65565d3a5de09..9cc4f6a9160c4 100644 --- a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js +++ b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js @@ -154,6 +154,7 @@ module import_private { //// [privacyLocalInternalReferenceImportWithoutExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; // private elements var m_private; (function (m_private) { diff --git a/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithExport.js b/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithExport.js index 4d184dfe7148d..5cb455f47bc08 100644 --- a/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithExport.js +++ b/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithExport.js @@ -51,6 +51,7 @@ export var publicUse_im_public_mi_public = new im_public_mi_public.c_private(); //// [privacyTopLevelAmbientExternalModuleImportWithExport_require2.js] //// [privacyTopLevelAmbientExternalModuleImportWithExport_require3.js] //// [privacyTopLevelAmbientExternalModuleImportWithExport_require.js] +"use strict"; // Public elements var c_public = (function () { function c_public() { @@ -59,6 +60,7 @@ var c_public = (function () { })(); exports.c_public = c_public; //// [privacyTopLevelAmbientExternalModuleImportWithExport_require1.js] +"use strict"; var c_public = (function () { function c_public() { } @@ -66,6 +68,7 @@ var c_public = (function () { })(); exports.c_public = c_public; //// [privacyTopLevelAmbientExternalModuleImportWithExport_core.js] +"use strict"; /// /// // Privacy errors - importing private elements diff --git a/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithoutExport.js b/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithoutExport.js index c03c532da3bbf..a03c7dcef6225 100644 --- a/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithoutExport.js +++ b/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithoutExport.js @@ -52,6 +52,7 @@ export var publicUse_im_private_mi_public = new im_private_mi_public.c_public(); //// [privacyTopLevelAmbientExternalModuleImportWithoutExport_require3.js] //// [privacyTopLevelAmbientExternalModuleImportWithoutExport_require.js] define(["require", "exports"], function (require, exports) { + "use strict"; // Public elements var c_public = (function () { function c_public() { @@ -62,6 +63,7 @@ define(["require", "exports"], function (require, exports) { }); //// [privacyTopLevelAmbientExternalModuleImportWithoutExport_require1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var c_public = (function () { function c_public() { } @@ -71,6 +73,7 @@ define(["require", "exports"], function (require, exports) { }); //// [privacyTopLevelAmbientExternalModuleImportWithoutExport_core.js] define(["require", "exports", "m", "m2", "privacyTopLevelAmbientExternalModuleImportWithoutExport_require"], function (require, exports, im_private_mi_private, im_private_mu_private, im_private_mi_public) { + "use strict"; // Usage of privacy error imports var privateUse_im_private_mi_private = new im_private_mi_private.c_private(); exports.publicUse_im_private_mi_private = new im_private_mi_private.c_private(); diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js index ec2d039df012d..5daa00d576465 100644 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js @@ -101,6 +101,7 @@ export var publicUse_im_public_mu_public: im_public_mu_public.i; //// [privacyTopLevelInternalReferenceImportWithExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; // private elements var m_private; (function (m_private) { diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js index a0eb39985b418..2abc4b11d9364 100644 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js @@ -102,6 +102,7 @@ export var publicUse_im_private_mu_public: im_private_mu_public.i; //// [privacyTopLevelInternalReferenceImportWithoutExport.js] define(["require", "exports"], function (require, exports) { + "use strict"; // private elements var m_private; (function (m_private) { diff --git a/tests/baselines/reference/privacyTypeParameterOfFunction.js b/tests/baselines/reference/privacyTypeParameterOfFunction.js index 5505e1a5b3b09..ec447d9ccbbcd 100644 --- a/tests/baselines/reference/privacyTypeParameterOfFunction.js +++ b/tests/baselines/reference/privacyTypeParameterOfFunction.js @@ -133,6 +133,7 @@ function privateFunctionWithPublicTypeParametersWithoutExtends() { } //// [privacyTypeParameterOfFunction.js] +"use strict"; var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyTypeParameterOfFunctionDeclFile.js b/tests/baselines/reference/privacyTypeParameterOfFunctionDeclFile.js index 16b1e360f3367..41dbb84a3ff7f 100644 --- a/tests/baselines/reference/privacyTypeParameterOfFunctionDeclFile.js +++ b/tests/baselines/reference/privacyTypeParameterOfFunctionDeclFile.js @@ -439,6 +439,7 @@ module privateModule { } //// [privacyTypeParameterOfFunctionDeclFile.js] +"use strict"; var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyTypeParametersOfClass.js b/tests/baselines/reference/privacyTypeParametersOfClass.js index c76eaa67851c7..8118d94ab7d08 100644 --- a/tests/baselines/reference/privacyTypeParametersOfClass.js +++ b/tests/baselines/reference/privacyTypeParametersOfClass.js @@ -44,6 +44,7 @@ class privateClassWithPublicTypeParametersWithoutExtends { //// [privacyTypeParametersOfClass.js] +"use strict"; var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyTypeParametersOfClassDeclFile.js b/tests/baselines/reference/privacyTypeParametersOfClassDeclFile.js index d2db553e9db31..e9e1ad218bdc4 100644 --- a/tests/baselines/reference/privacyTypeParametersOfClassDeclFile.js +++ b/tests/baselines/reference/privacyTypeParametersOfClassDeclFile.js @@ -155,6 +155,7 @@ module privateModule { //// [privacyTypeParametersOfClassDeclFile.js] +"use strict"; var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyTypeParametersOfInterface.js b/tests/baselines/reference/privacyTypeParametersOfInterface.js index 02e63ce70985c..c77da126cb615 100644 --- a/tests/baselines/reference/privacyTypeParametersOfInterface.js +++ b/tests/baselines/reference/privacyTypeParametersOfInterface.js @@ -59,6 +59,7 @@ interface privateInterfaceWithPublicTypeParametersWithoutExtends { } //// [privacyTypeParametersOfInterface.js] +"use strict"; var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyTypeParametersOfInterfaceDeclFile.js b/tests/baselines/reference/privacyTypeParametersOfInterfaceDeclFile.js index 69ed8d36fc3a6..ae8ee2d43f325 100644 --- a/tests/baselines/reference/privacyTypeParametersOfInterfaceDeclFile.js +++ b/tests/baselines/reference/privacyTypeParametersOfInterfaceDeclFile.js @@ -191,6 +191,7 @@ module privateModule { } //// [privacyTypeParametersOfInterfaceDeclFile.js] +"use strict"; var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyVar.js b/tests/baselines/reference/privacyVar.js index 17c7b1a74d152..b5a68268074f6 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] +"use strict"; var m1; (function (m1) { var C1_public = (function () { diff --git a/tests/baselines/reference/privacyVarDeclFile.js b/tests/baselines/reference/privacyVarDeclFile.js index 4632ef8c60a96..5dd2e611ffb03 100644 --- a/tests/baselines/reference/privacyVarDeclFile.js +++ b/tests/baselines/reference/privacyVarDeclFile.js @@ -426,6 +426,7 @@ module publicModuleInGlobal { } //// [privacyVarDeclFile_externalModule.js] +"use strict"; var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privatePropertyUsingObjectType.js b/tests/baselines/reference/privatePropertyUsingObjectType.js index 078eed7d1f186..d3a0c1c87642d 100644 --- a/tests/baselines/reference/privatePropertyUsingObjectType.js +++ b/tests/baselines/reference/privatePropertyUsingObjectType.js @@ -11,6 +11,7 @@ export interface IFilterProvider { //// [privatePropertyUsingObjectType.js] define(["require", "exports"], function (require, exports) { + "use strict"; var FilterManager = (function () { function FilterManager() { } diff --git a/tests/baselines/reference/project/baseline/amd/decl.js b/tests/baselines/reference/project/baseline/amd/decl.js index ed53ca816db39..2586bbb23bddc 100644 --- a/tests/baselines/reference/project/baseline/amd/decl.js +++ b/tests/baselines/reference/project/baseline/amd/decl.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; ; function point(x, y) { return { x: x, y: y }; diff --git a/tests/baselines/reference/project/baseline/amd/emit.js b/tests/baselines/reference/project/baseline/amd/emit.js index 12560b1cabeed..b66e5b6e6bad7 100644 --- a/tests/baselines/reference/project/baseline/amd/emit.js +++ b/tests/baselines/reference/project/baseline/amd/emit.js @@ -1,3 +1,4 @@ define(["require", "exports", "./decl"], function (require, exports, g) { + "use strict"; var p = g.point(10, 20); }); diff --git a/tests/baselines/reference/project/baseline/node/decl.js b/tests/baselines/reference/project/baseline/node/decl.js index eb0c46dd93e3f..f6c19174e54a7 100644 --- a/tests/baselines/reference/project/baseline/node/decl.js +++ b/tests/baselines/reference/project/baseline/node/decl.js @@ -1,3 +1,4 @@ +"use strict"; ; function point(x, y) { return { x: x, y: y }; diff --git a/tests/baselines/reference/project/baseline/node/emit.js b/tests/baselines/reference/project/baseline/node/emit.js index 2188cfe391050..b33f5d1b198bb 100644 --- a/tests/baselines/reference/project/baseline/node/emit.js +++ b/tests/baselines/reference/project/baseline/node/emit.js @@ -1,2 +1,3 @@ +"use strict"; var g = require("./decl"); var p = g.point(10, 20); diff --git a/tests/baselines/reference/project/baseline2/amd/decl.js b/tests/baselines/reference/project/baseline2/amd/decl.js index ed53ca816db39..2586bbb23bddc 100644 --- a/tests/baselines/reference/project/baseline2/amd/decl.js +++ b/tests/baselines/reference/project/baseline2/amd/decl.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; ; function point(x, y) { return { x: x, y: y }; diff --git a/tests/baselines/reference/project/baseline2/amd/dont_emit.js b/tests/baselines/reference/project/baseline2/amd/dont_emit.js index d3e9e871c2d8e..523d596dca16a 100644 --- a/tests/baselines/reference/project/baseline2/amd/dont_emit.js +++ b/tests/baselines/reference/project/baseline2/amd/dont_emit.js @@ -1,3 +1,4 @@ define(["require", "exports"], function (require, exports) { + "use strict"; var p = { x: 10, y: 20 }; }); diff --git a/tests/baselines/reference/project/baseline2/node/decl.js b/tests/baselines/reference/project/baseline2/node/decl.js index eb0c46dd93e3f..f6c19174e54a7 100644 --- a/tests/baselines/reference/project/baseline2/node/decl.js +++ b/tests/baselines/reference/project/baseline2/node/decl.js @@ -1,3 +1,4 @@ +"use strict"; ; function point(x, y) { return { x: x, y: y }; diff --git a/tests/baselines/reference/project/baseline2/node/dont_emit.js b/tests/baselines/reference/project/baseline2/node/dont_emit.js index b6239b1295dfa..e5a1637efb1ae 100644 --- a/tests/baselines/reference/project/baseline2/node/dont_emit.js +++ b/tests/baselines/reference/project/baseline2/node/dont_emit.js @@ -1 +1,2 @@ +"use strict"; var p = { x: 10, y: 20 }; diff --git a/tests/baselines/reference/project/baseline3/amd/nestedModule.js b/tests/baselines/reference/project/baseline3/amd/nestedModule.js index d1d6f93af988a..36eb17665d60f 100644 --- a/tests/baselines/reference/project/baseline3/amd/nestedModule.js +++ b/tests/baselines/reference/project/baseline3/amd/nestedModule.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; var outer; (function (outer) { var inner; diff --git a/tests/baselines/reference/project/baseline3/node/nestedModule.js b/tests/baselines/reference/project/baseline3/node/nestedModule.js index d69e2022379c5..1d5c5c9d534ec 100644 --- a/tests/baselines/reference/project/baseline3/node/nestedModule.js +++ b/tests/baselines/reference/project/baseline3/node/nestedModule.js @@ -1,3 +1,4 @@ +"use strict"; var outer; (function (outer) { var inner; diff --git a/tests/baselines/reference/project/declarationsCascadingImports/amd/m4.js b/tests/baselines/reference/project/declarationsCascadingImports/amd/m4.js index c89712ecc7f88..1d46a3ca30270 100644 --- a/tests/baselines/reference/project/declarationsCascadingImports/amd/m4.js +++ b/tests/baselines/reference/project/declarationsCascadingImports/amd/m4.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsCascadingImports/node/m4.js b/tests/baselines/reference/project/declarationsCascadingImports/node/m4.js index 2c8c4f0714967..505e7d74da84f 100644 --- a/tests/baselines/reference/project/declarationsCascadingImports/node/m4.js +++ b/tests/baselines/reference/project/declarationsCascadingImports/node/m4.js @@ -1,3 +1,4 @@ +"use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsGlobalImport/amd/glo_m4.js b/tests/baselines/reference/project/declarationsGlobalImport/amd/glo_m4.js index c89712ecc7f88..1d46a3ca30270 100644 --- a/tests/baselines/reference/project/declarationsGlobalImport/amd/glo_m4.js +++ b/tests/baselines/reference/project/declarationsGlobalImport/amd/glo_m4.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsGlobalImport/amd/useModule.js b/tests/baselines/reference/project/declarationsGlobalImport/amd/useModule.js index 8e81cc2d03fbf..b9390ddc2391f 100644 --- a/tests/baselines/reference/project/declarationsGlobalImport/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsGlobalImport/amd/useModule.js @@ -1,4 +1,5 @@ define(["require", "exports", "glo_m4"], function (require, exports, glo_m4) { + "use strict"; exports.useGlo_m4_x4 = glo_m4.x; exports.useGlo_m4_d4 = glo_m4.d; exports.useGlo_m4_f4 = glo_m4.foo(); diff --git a/tests/baselines/reference/project/declarationsGlobalImport/node/glo_m4.js b/tests/baselines/reference/project/declarationsGlobalImport/node/glo_m4.js index 2c8c4f0714967..505e7d74da84f 100644 --- a/tests/baselines/reference/project/declarationsGlobalImport/node/glo_m4.js +++ b/tests/baselines/reference/project/declarationsGlobalImport/node/glo_m4.js @@ -1,3 +1,4 @@ +"use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsGlobalImport/node/useModule.js b/tests/baselines/reference/project/declarationsGlobalImport/node/useModule.js index 11b8659fda69f..d9219f2014872 100644 --- a/tests/baselines/reference/project/declarationsGlobalImport/node/useModule.js +++ b/tests/baselines/reference/project/declarationsGlobalImport/node/useModule.js @@ -1,3 +1,4 @@ +"use strict"; var glo_m4 = require("glo_m4"); exports.useGlo_m4_x4 = glo_m4.x; exports.useGlo_m4_d4 = glo_m4.d; diff --git a/tests/baselines/reference/project/declarationsImportedInPrivate/amd/private_m4.js b/tests/baselines/reference/project/declarationsImportedInPrivate/amd/private_m4.js index c89712ecc7f88..1d46a3ca30270 100644 --- a/tests/baselines/reference/project/declarationsImportedInPrivate/amd/private_m4.js +++ b/tests/baselines/reference/project/declarationsImportedInPrivate/amd/private_m4.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsImportedInPrivate/amd/useModule.js b/tests/baselines/reference/project/declarationsImportedInPrivate/amd/useModule.js index fd6c8ad47f40d..a5da0ab931427 100644 --- a/tests/baselines/reference/project/declarationsImportedInPrivate/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsImportedInPrivate/amd/useModule.js @@ -1,4 +1,5 @@ define(["require", "exports", "private_m4"], function (require, exports, private_m4) { + "use strict"; var usePrivate_m4_m1; (function (usePrivate_m4_m1) { var x3 = private_m4.x; diff --git a/tests/baselines/reference/project/declarationsImportedInPrivate/node/private_m4.js b/tests/baselines/reference/project/declarationsImportedInPrivate/node/private_m4.js index 2c8c4f0714967..505e7d74da84f 100644 --- a/tests/baselines/reference/project/declarationsImportedInPrivate/node/private_m4.js +++ b/tests/baselines/reference/project/declarationsImportedInPrivate/node/private_m4.js @@ -1,3 +1,4 @@ +"use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsImportedInPrivate/node/useModule.js b/tests/baselines/reference/project/declarationsImportedInPrivate/node/useModule.js index 8fe4cca6e92f8..3cc7f82feb705 100644 --- a/tests/baselines/reference/project/declarationsImportedInPrivate/node/useModule.js +++ b/tests/baselines/reference/project/declarationsImportedInPrivate/node/useModule.js @@ -1,3 +1,4 @@ +"use strict"; // only used privately no need to emit var private_m4 = require("private_m4"); var usePrivate_m4_m1; diff --git a/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/fncOnly_m4.js b/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/fncOnly_m4.js index c89712ecc7f88..1d46a3ca30270 100644 --- a/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/fncOnly_m4.js +++ b/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/fncOnly_m4.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/useModule.js b/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/useModule.js index b8bed40b45895..7485d0fb22933 100644 --- a/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/useModule.js @@ -1,3 +1,4 @@ define(["require", "exports", "fncOnly_m4"], function (require, exports, fncOnly_m4) { + "use strict"; exports.useFncOnly_m4_f4 = fncOnly_m4.foo(); }); diff --git a/tests/baselines/reference/project/declarationsImportedUseInFunction/node/fncOnly_m4.js b/tests/baselines/reference/project/declarationsImportedUseInFunction/node/fncOnly_m4.js index 2c8c4f0714967..505e7d74da84f 100644 --- a/tests/baselines/reference/project/declarationsImportedUseInFunction/node/fncOnly_m4.js +++ b/tests/baselines/reference/project/declarationsImportedUseInFunction/node/fncOnly_m4.js @@ -1,3 +1,4 @@ +"use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsImportedUseInFunction/node/useModule.js b/tests/baselines/reference/project/declarationsImportedUseInFunction/node/useModule.js index 77269ecdb7831..095acfb7fc983 100644 --- a/tests/baselines/reference/project/declarationsImportedUseInFunction/node/useModule.js +++ b/tests/baselines/reference/project/declarationsImportedUseInFunction/node/useModule.js @@ -1,2 +1,3 @@ +"use strict"; var fncOnly_m4 = require("fncOnly_m4"); exports.useFncOnly_m4_f4 = fncOnly_m4.foo(); diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m4.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m4.js index c89712ecc7f88..1d46a3ca30270 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m4.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m4.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m5.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m5.js index ef62a311ef337..9e8ba0f7ade3e 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m5.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m5.js @@ -1,4 +1,5 @@ define(["require", "exports", "m4"], function (require, exports, m4) { + "use strict"; function foo2() { return new m4.d(); } diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/useModule.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/useModule.js index dd66dca110af6..db9e68fbed929 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/useModule.js @@ -1,4 +1,5 @@ define(["require", "exports", "m5"], function (require, exports, m5) { + "use strict"; exports.d = m5.foo2(); exports.x = m5.foo2; function n() { diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m4.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m4.js index 2c8c4f0714967..505e7d74da84f 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m4.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m4.js @@ -1,3 +1,4 @@ +"use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m5.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m5.js index 4cac240b5185d..a7e34c60fe39b 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m5.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m5.js @@ -1,3 +1,4 @@ +"use strict"; var m4 = require("m4"); // Emit used function foo2() { return new m4.d(); diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/useModule.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/useModule.js index f458d0b1f1735..2bde79432f7c8 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/useModule.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/useModule.js @@ -1,3 +1,4 @@ +"use strict"; // Do not emit unused import var m5 = require("m5"); exports.d = m5.foo2(); diff --git a/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/m4.js b/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/m4.js index c89712ecc7f88..1d46a3ca30270 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/m4.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/m4.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/useModule.js b/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/useModule.js index 870c93af0850c..0ec3a0d833133 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/useModule.js @@ -1,4 +1,5 @@ define(["require", "exports", "m4", "m4"], function (require, exports, m4, multiImport_m4) { + "use strict"; exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); diff --git a/tests/baselines/reference/project/declarationsMultipleTimesImport/node/m4.js b/tests/baselines/reference/project/declarationsMultipleTimesImport/node/m4.js index 2c8c4f0714967..505e7d74da84f 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesImport/node/m4.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesImport/node/m4.js @@ -1,3 +1,4 @@ +"use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesImport/node/useModule.js b/tests/baselines/reference/project/declarationsMultipleTimesImport/node/useModule.js index f55c2425fa130..64b9438d96e43 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesImport/node/useModule.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesImport/node/useModule.js @@ -1,3 +1,4 @@ +"use strict"; var m4 = require("m4"); // Emit used exports.x4 = m4.x; exports.d4 = m4.d; diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m4.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m4.js index c89712ecc7f88..1d46a3ca30270 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m4.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m4.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m5.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m5.js index ef62a311ef337..9e8ba0f7ade3e 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m5.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m5.js @@ -1,4 +1,5 @@ define(["require", "exports", "m4"], function (require, exports, m4) { + "use strict"; function foo2() { return new m4.d(); } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/useModule.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/useModule.js index f3874188538a8..cc2eecd22087b 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/useModule.js @@ -1,4 +1,5 @@ define(["require", "exports", "m4", "m5"], function (require, exports, m4, m5) { + "use strict"; exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m4.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m4.js index 2c8c4f0714967..505e7d74da84f 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m4.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m4.js @@ -1,3 +1,4 @@ +"use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m5.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m5.js index 4cac240b5185d..a7e34c60fe39b 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m5.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m5.js @@ -1,3 +1,4 @@ +"use strict"; var m4 = require("m4"); // Emit used function foo2() { return new m4.d(); diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/useModule.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/useModule.js index 0e0b8a00f8148..b4132f79b1ff0 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/useModule.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/useModule.js @@ -1,3 +1,4 @@ +"use strict"; var m4 = require("m4"); // Emit used exports.x4 = m4.x; exports.d4 = m4.d; diff --git a/tests/baselines/reference/project/declarationsSimpleImport/amd/m4.js b/tests/baselines/reference/project/declarationsSimpleImport/amd/m4.js index c89712ecc7f88..1d46a3ca30270 100644 --- a/tests/baselines/reference/project/declarationsSimpleImport/amd/m4.js +++ b/tests/baselines/reference/project/declarationsSimpleImport/amd/m4.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsSimpleImport/amd/useModule.js b/tests/baselines/reference/project/declarationsSimpleImport/amd/useModule.js index 065672a1e0a2a..634a988c1b800 100644 --- a/tests/baselines/reference/project/declarationsSimpleImport/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsSimpleImport/amd/useModule.js @@ -1,4 +1,5 @@ define(["require", "exports", "m4"], function (require, exports, m4) { + "use strict"; exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); diff --git a/tests/baselines/reference/project/declarationsSimpleImport/node/m4.js b/tests/baselines/reference/project/declarationsSimpleImport/node/m4.js index 2c8c4f0714967..505e7d74da84f 100644 --- a/tests/baselines/reference/project/declarationsSimpleImport/node/m4.js +++ b/tests/baselines/reference/project/declarationsSimpleImport/node/m4.js @@ -1,3 +1,4 @@ +"use strict"; var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsSimpleImport/node/useModule.js b/tests/baselines/reference/project/declarationsSimpleImport/node/useModule.js index 66e5ab171428e..40df471507c8e 100644 --- a/tests/baselines/reference/project/declarationsSimpleImport/node/useModule.js +++ b/tests/baselines/reference/project/declarationsSimpleImport/node/useModule.js @@ -1,3 +1,4 @@ +"use strict"; var m4 = require("m4"); // Emit used exports.x4 = m4.x; exports.d4 = m4.d; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json new file mode 100644 index 0000000000000..0729dbedfae94 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesNotSpecified/a.ts" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.errors.txt new file mode 100644 index 0000000000000..e1a24fa384204 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.errors.txt @@ -0,0 +1,6 @@ +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. + + +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== DifferentNamesNotSpecified/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json new file mode 100644 index 0000000000000..0729dbedfae94 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesNotSpecified/a.ts" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt new file mode 100644 index 0000000000000..67b0592c05f1b --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,8 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== DifferentNamesNotSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; +==== DifferentNamesNotSpecifiedWithAllowJs/b.js (0 errors) ==== + var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..4487623500b5c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecifiedWithAllowJs", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesNotSpecifiedWithAllowJs/a.ts", + "DifferentNamesNotSpecifiedWithAllowJs/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.js new file mode 100644 index 0000000000000..f2115703462fc --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/amd/test.js @@ -0,0 +1,2 @@ +var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt new file mode 100644 index 0000000000000..dbebea69cceea --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,10 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== DifferentNamesNotSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; +==== DifferentNamesNotSpecifiedWithAllowJs/b.js (0 errors) ==== + var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..4487623500b5c --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecifiedWithAllowJs", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesNotSpecifiedWithAllowJs/a.ts", + "DifferentNamesNotSpecifiedWithAllowJs/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.js new file mode 100644 index 0000000000000..f2115703462fc --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs/node/test.js @@ -0,0 +1,2 @@ +var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.errors.txt new file mode 100644 index 0000000000000..5fa60d18af99d --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.errors.txt @@ -0,0 +1,6 @@ +error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. + + +!!! error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. +==== DifferentNamesSpecified/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json new file mode 100644 index 0000000000000..36eed6a651812 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/jsFileCompilationDifferentNamesSpecified.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when different .ts and .js file exist and their names are specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesSpecified/a.ts" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/amd/test.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.errors.txt new file mode 100644 index 0000000000000..c05a142a93cc0 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.errors.txt @@ -0,0 +1,8 @@ +error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. + + +!!! error TS6054: File 'DifferentNamesSpecified/b.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== DifferentNamesSpecified/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json new file mode 100644 index 0000000000000..36eed6a651812 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/jsFileCompilationDifferentNamesSpecified.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when different .ts and .js file exist and their names are specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesSpecified/a.ts" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecified/node/test.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt new file mode 100644 index 0000000000000..35c913a5835ba --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,8 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== DifferentNamesSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; +==== DifferentNamesSpecifiedWithAllowJs/b.js (0 errors) ==== + var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..e77cc5ad6bd28 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when different .ts and .js file exist and their names are specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesSpecifiedWithAllowJs", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesSpecifiedWithAllowJs/a.ts", + "DifferentNamesSpecifiedWithAllowJs/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.js new file mode 100644 index 0000000000000..f2115703462fc --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/amd/test.js @@ -0,0 +1,2 @@ +var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt new file mode 100644 index 0000000000000..c8c2ca976c61d --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,10 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== DifferentNamesSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; +==== DifferentNamesSpecifiedWithAllowJs/b.js (0 errors) ==== + var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..e77cc5ad6bd28 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when different .ts and .js file exist and their names are specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesSpecifiedWithAllowJs", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesSpecifiedWithAllowJs/a.ts", + "DifferentNamesSpecifiedWithAllowJs/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.js new file mode 100644 index 0000000000000..f2115703462fc --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs/node/test.js @@ -0,0 +1,2 @@ +var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/amd/jsFileCompilationSameNameDTsSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/amd/jsFileCompilationSameNameDTsSpecified.json new file mode 100644 index 0000000000000..d0ffac121e457 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/amd/jsFileCompilationSameNameDTsSpecified.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but .d.ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsSpecified/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/node/jsFileCompilationSameNameDTsSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/node/jsFileCompilationSameNameDTsSpecified.json new file mode 100644 index 0000000000000..d0ffac121e457 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecified/node/jsFileCompilationSameNameDTsSpecified.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but .d.ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsSpecified/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt new file mode 100644 index 0000000000000..cdec4ffb398f3 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameDTsSpecifiedWithAllowJs/a.d.ts (0 errors) ==== + declare var test: number; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..27ec20feb8d3b --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but .d.ts file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsSpecifiedWithAllowJs", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsSpecifiedWithAllowJs/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt new file mode 100644 index 0000000000000..cdec4ffb398f3 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameDTsSpecifiedWithAllowJs/a.d.ts (0 errors) ==== + declare var test: number; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..27ec20feb8d3b --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs/node/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but .d.ts file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsSpecifiedWithAllowJs", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsSpecifiedWithAllowJs/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/amd/jsFileCompilationSameNameDtsNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/amd/jsFileCompilationSameNameDtsNotSpecified.json new file mode 100644 index 0000000000000..a619f0e1e22b7 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/amd/jsFileCompilationSameNameDtsNotSpecified.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsNotSpecified/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/node/jsFileCompilationSameNameDtsNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/node/jsFileCompilationSameNameDtsNotSpecified.json new file mode 100644 index 0000000000000..a619f0e1e22b7 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecified/node/jsFileCompilationSameNameDtsNotSpecified.json @@ -0,0 +1,12 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsNotSpecified/a.d.ts" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt new file mode 100644 index 0000000000000..ac25edc1bd565 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,10 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +error TS5055: Cannot write file 'SameNameDTsNotSpecifiedWithAllowJs/a.js' because it would overwrite input file. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +!!! error TS5055: Cannot write file 'SameNameDTsNotSpecifiedWithAllowJs/a.js' because it would overwrite input file. +==== SameNameDTsNotSpecifiedWithAllowJs/a.d.ts (0 errors) ==== + declare var a: number; +==== SameNameDTsNotSpecifiedWithAllowJs/a.js (0 errors) ==== + var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..b4c3fb8f51bb6 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json @@ -0,0 +1,13 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecifiedWithAllowJs", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsNotSpecifiedWithAllowJs/a.d.ts", + "SameNameDTsNotSpecifiedWithAllowJs/a.js" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt new file mode 100644 index 0000000000000..ac25edc1bd565 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,10 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +error TS5055: Cannot write file 'SameNameDTsNotSpecifiedWithAllowJs/a.js' because it would overwrite input file. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +!!! error TS5055: Cannot write file 'SameNameDTsNotSpecifiedWithAllowJs/a.js' because it would overwrite input file. +==== SameNameDTsNotSpecifiedWithAllowJs/a.d.ts (0 errors) ==== + declare var a: number; +==== SameNameDTsNotSpecifiedWithAllowJs/a.js (0 errors) ==== + var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..b4c3fb8f51bb6 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json @@ -0,0 +1,13 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecifiedWithAllowJs", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameDTsNotSpecifiedWithAllowJs/a.d.ts", + "SameNameDTsNotSpecifiedWithAllowJs/a.js" + ], + "emittedFiles": [] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/SameNameFilesNotSpecified/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/jsFileCompilationSameNameFilesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/jsFileCompilationSameNameFilesNotSpecified.json new file mode 100644 index 0000000000000..2b4d6b2b35aa8 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/amd/jsFileCompilationSameNameFilesNotSpecified.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameFilesNotSpecified/a.ts" + ], + "emittedFiles": [ + "SameNameFilesNotSpecified/a.js", + "SameNameFilesNotSpecified/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/SameNameFilesNotSpecified/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/jsFileCompilationSameNameFilesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/jsFileCompilationSameNameFilesNotSpecified.json new file mode 100644 index 0000000000000..2b4d6b2b35aa8 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecified/node/jsFileCompilationSameNameFilesNotSpecified.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameFilesNotSpecified/a.ts" + ], + "emittedFiles": [ + "SameNameFilesNotSpecified/a.js", + "SameNameFilesNotSpecified/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/SameNameFilesNotSpecifiedWithAllowJs/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/SameNameFilesNotSpecifiedWithAllowJs/a.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/SameNameFilesNotSpecifiedWithAllowJs/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/SameNameFilesNotSpecifiedWithAllowJs/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/SameNameFilesNotSpecifiedWithAllowJs/a.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/SameNameFilesNotSpecifiedWithAllowJs/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt new file mode 100644 index 0000000000000..9eb81a5f9f13d --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameFilesNotSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..34d6768372f6e --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecifiedWithAllowJs", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameFilesNotSpecifiedWithAllowJs/a.ts" + ], + "emittedFiles": [ + "SameNameFilesNotSpecifiedWithAllowJs/a.js", + "SameNameFilesNotSpecifiedWithAllowJs/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/SameNameFilesNotSpecifiedWithAllowJs/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/SameNameFilesNotSpecifiedWithAllowJs/a.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/SameNameFilesNotSpecifiedWithAllowJs/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/SameNameFilesNotSpecifiedWithAllowJs/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/SameNameFilesNotSpecifiedWithAllowJs/a.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/SameNameFilesNotSpecifiedWithAllowJs/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt new file mode 100644 index 0000000000000..9eb81a5f9f13d --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameFilesNotSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..34d6768372f6e --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecifiedWithAllowJs", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameFilesNotSpecifiedWithAllowJs/a.ts" + ], + "emittedFiles": [ + "SameNameFilesNotSpecifiedWithAllowJs/a.js", + "SameNameFilesNotSpecifiedWithAllowJs/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/SameNameTsSpecified/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/jsFileCompilationSameNameFilesSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/jsFileCompilationSameNameFilesSpecified.json new file mode 100644 index 0000000000000..ddf148ea982ac --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/amd/jsFileCompilationSameNameFilesSpecified.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameTsSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameTsSpecified/a.ts" + ], + "emittedFiles": [ + "SameNameTsSpecified/a.js", + "SameNameTsSpecified/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/SameNameTsSpecified/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/jsFileCompilationSameNameFilesSpecified.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/jsFileCompilationSameNameFilesSpecified.json new file mode 100644 index 0000000000000..ddf148ea982ac --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecified/node/jsFileCompilationSameNameFilesSpecified.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameTsSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameTsSpecified/a.ts" + ], + "emittedFiles": [ + "SameNameTsSpecified/a.js", + "SameNameTsSpecified/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/SameNameTsSpecifiedWithAllowJs/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/SameNameTsSpecifiedWithAllowJs/a.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/SameNameTsSpecifiedWithAllowJs/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/SameNameTsSpecifiedWithAllowJs/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/SameNameTsSpecifiedWithAllowJs/a.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/SameNameTsSpecifiedWithAllowJs/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt new file mode 100644 index 0000000000000..ddfb63686b402 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameTsSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..ae68fac44bd60 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/amd/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameTsSpecifiedWithAllowJs", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameTsSpecifiedWithAllowJs/a.ts" + ], + "emittedFiles": [ + "SameNameTsSpecifiedWithAllowJs/a.js", + "SameNameTsSpecifiedWithAllowJs/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/SameNameTsSpecifiedWithAllowJs/a.d.ts b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/SameNameTsSpecifiedWithAllowJs/a.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/SameNameTsSpecifiedWithAllowJs/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/SameNameTsSpecifiedWithAllowJs/a.js b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/SameNameTsSpecifiedWithAllowJs/a.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/SameNameTsSpecifiedWithAllowJs/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt new file mode 100644 index 0000000000000..ddfb63686b402 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. +==== SameNameTsSpecifiedWithAllowJs/a.ts (0 errors) ==== + var test = 10; \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..ae68fac44bd60 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs/node/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameTsSpecifiedWithAllowJs", + "resolvedInputFiles": [ + "lib.d.ts", + "SameNameTsSpecifiedWithAllowJs/a.ts" + ], + "emittedFiles": [ + "SameNameTsSpecifiedWithAllowJs/a.js", + "SameNameTsSpecifiedWithAllowJs/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.json index fa9e0b566a937..8a96d681f2427 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt index 8e555fb23f217..a72b4af337b06 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:ref/m2.js sourceFile:../../ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:../../ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:../../ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:../../ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:../../ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:../../ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:../../ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:../../ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:../../ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m1.js.map index 43db599a09206..2ec23553c3b01 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js index 9dad0db002a05..fa0eb43e98e72 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map index 0e907c1a2cad0..1928d5965fb38 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/test.js.map index 1602fe4d4e088..2d046c948afe3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.json index fa9e0b566a937..8a96d681f2427 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt index 240277bfc7004..062e42a5e5f64 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ../../ref/m2.ts emittedFile:ref/m2.js sourceFile:../../ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:../../ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:../../ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:../../ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:../../ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:../../ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:../../ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:../../ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:../../ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m1.js.map index 43db599a09206..2ec23553c3b01 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js index 3eaebd5c1367e..991554b2cb336 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map index cbb2dc3649237..b295037df93a0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/test.js.map index 1602fe4d4e088..2d046c948afe3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json index ebaec46d1e3e9..997c2ed46c0d4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 1a530c850e242..0dd9d248ed8ff 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:outdir/simple/ref/m2.js sourceFile:../../ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:../../ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:../../ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:../../ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:../../ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:../../ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:../../ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:../../ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:../../ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 43db599a09206..2ec23553c3b01 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 9dad0db002a05..fa0eb43e98e72 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index 0e907c1a2cad0..1928d5965fb38 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 1602fe4d4e088..2d046c948afe3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json index ebaec46d1e3e9..997c2ed46c0d4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 511832f1de058..4d2bfe895593b 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ../../ref/m2.ts emittedFile:outdir/simple/ref/m2.js sourceFile:../../ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:../../ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:../../ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:../../ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:../../ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:../../ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:../../ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:../../ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:../../ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 43db599a09206..2ec23553c3b01 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index 3eaebd5c1367e..991554b2cb336 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index cbb2dc3649237..b295037df93a0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 1602fe4d4e088..2d046c948afe3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js index af837fd203136..75f7b767aeabe 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 94371fe696d3e..04c42ed11d00f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json index 2f0cd8e123077..39641313eb9cc 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index 94348f987ce1b..90faa19dd08c4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:../ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:../ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:../ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:../ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:../ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:../ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:../ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:../ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:../ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -317,8 +318,8 @@ sourceFile:../test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:../test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:../test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:../test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map index a580c050d07e2..b3feff79cab84 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json index 2f0cd8e123077..39641313eb9cc 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index 3f16355ad76da..783a11edfd4c3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -196,7 +196,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index de704afeedb14..67d1060440510 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 22aaecafe2d3d..babc80c4d26c0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 24fb56c1fd298..a088b23354e37 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,10 +7,10 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index c0dbdb42cdf16..e772acc4db4df 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js sourceFile:../ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:../ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:../ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:../ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:../ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:../ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:../ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:../ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:../ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -317,8 +318,8 @@ sourceFile:../test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:../test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:../test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:../test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map index 2eab0f873245a..7813d8d45f113 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 24fb56c1fd298..a088b23354e37 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,10 +7,10 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_mixed_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 963b3f3bb223e..67d311777c13a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -196,7 +196,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index b02c7fdd8c2bf..383cd93a9db82 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js index 8fe95a1506f8a..b2d0711042a80 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.json index 8f512dcc98c55..7474a34ec8ce7 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt index 4b883a84e706d..c62d96fdcce78 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:../../../ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../../../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../../../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../../../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../../../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:diskFile1.js sourceFile:../../../outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:test.js sourceFile:../../test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:../../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:../../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:../../test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:../../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:../../test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:../../test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:../../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:../../test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js index 52b5e682660ed..2285204e0bdb9 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map index 652d934d6022c..df92966a9109a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js index a2a29b4dcfc07..d046b77d327ea 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map index be0b3a580f51c..6c8ee2b7bf2d4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map index f9d0dd89e9ce8..74fc6200ba98e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js index 589c5838a2c10..bb70e1342a1cd 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.json index 8f512dcc98c55..7474a34ec8ce7 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt index 5ab3146b09944..d38a02260acf5 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../../../ref/m1.ts emittedFile:ref/m1.js sourceFile:../../../ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../../../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../../../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../../../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../../../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: ../../../outputdir_module_multifolder_ref/m2.ts emittedFile:diskFile1.js sourceFile:../../../outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: ../../test.ts emittedFile:test.js sourceFile:../../test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:../../test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:../../test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:../../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:../../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:../../test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:../../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:../../test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:../../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:../../test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js index b0e6a265bc985..31565374f87a1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map index 15bddd32fe5c9..a1ba2747bea79 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js index 16422a234c58c..99285ad2e58ba 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map index eae921435ac84..7fe59ee242c25 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json index 4f65daf7560a9..b0c916710122d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 1236cb2c82711..31e8687a0ea43 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:../../../ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../../../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../../../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../../../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../../../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:../../../outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:../../test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:../../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:../../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:../../test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:../../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:../../test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:../../test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:../../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:../../test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index 52b5e682660ed..2285204e0bdb9 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 652d934d6022c..df92966a9109a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index a2a29b4dcfc07..d046b77d327ea 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index be0b3a580f51c..6c8ee2b7bf2d4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index 8fe95a1506f8a..b2d0711042a80 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index b02c7fdd8c2bf..383cd93a9db82 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json index 4f65daf7560a9..b0c916710122d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 7fd3bf30722e4..a3f617af03e25 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../../../ref/m1.ts emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:../../../ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../../../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../../../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../../../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../../../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: ../../../outputdir_module_multifolder_ref/m2.ts emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:../../../outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: ../../test.ts emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:../../test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:../../test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:../../test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:../../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:../../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:../../test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:../../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:../../test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:../../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:../../test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index b0e6a265bc985..31565374f87a1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 15bddd32fe5c9..a1ba2747bea79 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index 16422a234c58c..99285ad2e58ba 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index eae921435ac84..7fe59ee242c25 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index 589c5838a2c10..bb70e1342a1cd 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index f9d0dd89e9ce8..74fc6200ba98e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js index 25cd156c4ab29..6c9bb7e502986 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ -define("ref/m1", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -12,7 +13,8 @@ define("ref/m1", ["require", "exports"], function (require, exports) { } exports.m1_f1 = m1_f1; }); -define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -26,7 +28,8 @@ define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], functio } exports.m2_f1 = m2_f1; }); -define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index c532c3846d9a3..bbd9ace39b60b 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json index 4869993ca9299..14643d2565d49 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index 4462b142d9804..00c1d36ee61d2 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -8,7 +8,8 @@ sources: ../ref/m1.ts,../../outputdir_module_multifolder_ref/m2.ts,../test.ts emittedFile:bin/test.js sourceFile:../ref/m1.ts ------------------------------------------------------------------- ->>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,17 +165,18 @@ sourceFile:../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:../../outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>}); ->>>define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -187,24 +189,24 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(16, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(16, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(16, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(16, 24) Source(1, 23) + SourceIndex(1) +1 >Emitted(18, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(18, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(18, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(18, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(18, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(20, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -214,16 +216,16 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(19, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(19, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(21, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(20, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(22, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(22, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -237,10 +239,10 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(21, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(21, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(21, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -254,10 +256,10 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(22, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(22, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(22, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(22, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(24, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(24, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -276,20 +278,20 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(23, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(23, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(23, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(23, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(23, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(23, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(23, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(25, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(25, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(25, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(25, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(25, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(25, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(25, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -303,11 +305,11 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(25, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(25, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(25, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(25, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(25, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(27, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(27, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(27, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -316,8 +318,8 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(26, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(28, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -330,17 +332,18 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(27, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(27, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(27, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(27, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(29, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(29, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(29, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:../test.ts ------------------------------------------------------------------- >>>}); ->>>define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>>define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -355,24 +358,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(30, 5) Source(3, 12) + SourceIndex(2) -2 >Emitted(30, 15) Source(3, 14) + SourceIndex(2) -3 >Emitted(30, 18) Source(3, 17) + SourceIndex(2) -4 >Emitted(30, 20) Source(3, 19) + SourceIndex(2) -5 >Emitted(30, 21) Source(3, 20) + SourceIndex(2) +1 >Emitted(33, 5) Source(3, 12) + SourceIndex(2) +2 >Emitted(33, 15) Source(3, 14) + SourceIndex(2) +3 >Emitted(33, 18) Source(3, 17) + SourceIndex(2) +4 >Emitted(33, 20) Source(3, 19) + SourceIndex(2) +5 >Emitted(33, 21) Source(3, 20) + SourceIndex(2) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(31, 5) Source(4, 1) + SourceIndex(2) +1->Emitted(34, 5) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(32, 9) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(35, 9) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^^^^^ @@ -382,16 +385,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(33, 9) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(33, 10) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(36, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(36, 10) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(34, 9) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(34, 18) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(37, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(37, 18) Source(6, 2) + SourceIndex(2) --- >>> })(); 1 >^^^^ @@ -405,10 +408,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(35, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(35, 6) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(35, 6) Source(4, 1) + SourceIndex(2) -4 >Emitted(35, 10) Source(6, 2) + SourceIndex(2) +1 >Emitted(38, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(38, 6) Source(6, 2) + SourceIndex(2) +3 >Emitted(38, 6) Source(4, 1) + SourceIndex(2) +4 >Emitted(38, 10) Source(6, 2) + SourceIndex(2) --- >>> exports.c1 = c1; 1->^^^^ @@ -422,10 +425,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(36, 5) Source(4, 14) + SourceIndex(2) -2 >Emitted(36, 15) Source(4, 16) + SourceIndex(2) -3 >Emitted(36, 20) Source(6, 2) + SourceIndex(2) -4 >Emitted(36, 21) Source(6, 2) + SourceIndex(2) +1->Emitted(39, 5) Source(4, 14) + SourceIndex(2) +2 >Emitted(39, 15) Source(4, 16) + SourceIndex(2) +3 >Emitted(39, 20) Source(6, 2) + SourceIndex(2) +4 >Emitted(39, 21) Source(6, 2) + SourceIndex(2) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -444,20 +447,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(37, 5) Source(8, 12) + SourceIndex(2) -2 >Emitted(37, 22) Source(8, 21) + SourceIndex(2) -3 >Emitted(37, 25) Source(8, 24) + SourceIndex(2) -4 >Emitted(37, 29) Source(8, 28) + SourceIndex(2) -5 >Emitted(37, 31) Source(8, 30) + SourceIndex(2) -6 >Emitted(37, 33) Source(8, 32) + SourceIndex(2) -7 >Emitted(37, 34) Source(8, 33) + SourceIndex(2) +1->Emitted(40, 5) Source(8, 12) + SourceIndex(2) +2 >Emitted(40, 22) Source(8, 21) + SourceIndex(2) +3 >Emitted(40, 25) Source(8, 24) + SourceIndex(2) +4 >Emitted(40, 29) Source(8, 28) + SourceIndex(2) +5 >Emitted(40, 31) Source(8, 30) + SourceIndex(2) +6 >Emitted(40, 33) Source(8, 32) + SourceIndex(2) +7 >Emitted(40, 34) Source(8, 33) + SourceIndex(2) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(38, 5) Source(9, 1) + SourceIndex(2) +1 >Emitted(41, 5) Source(9, 1) + SourceIndex(2) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -471,11 +474,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(39, 9) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(39, 15) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(39, 16) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(39, 33) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(39, 34) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(42, 9) Source(10, 5) + SourceIndex(2) +2 >Emitted(42, 15) Source(10, 11) + SourceIndex(2) +3 >Emitted(42, 16) Source(10, 12) + SourceIndex(2) +4 >Emitted(42, 33) Source(10, 21) + SourceIndex(2) +5 >Emitted(42, 34) Source(10, 22) + SourceIndex(2) --- >>> } 1 >^^^^ @@ -484,8 +487,8 @@ sourceFile:../test.ts 1 > > 2 > } -1 >Emitted(40, 5) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(40, 6) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(43, 5) Source(11, 1) + SourceIndex(2) +2 >Emitted(43, 6) Source(11, 2) + SourceIndex(2) --- >>> exports.f1 = f1; 1->^^^^ @@ -499,10 +502,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(41, 5) Source(9, 17) + SourceIndex(2) -2 >Emitted(41, 15) Source(9, 19) + SourceIndex(2) -3 >Emitted(41, 20) Source(11, 2) + SourceIndex(2) -4 >Emitted(41, 21) Source(11, 2) + SourceIndex(2) +1->Emitted(44, 5) Source(9, 17) + SourceIndex(2) +2 >Emitted(44, 15) Source(9, 19) + SourceIndex(2) +3 >Emitted(44, 20) Source(11, 2) + SourceIndex(2) +4 >Emitted(44, 21) Source(11, 2) + SourceIndex(2) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -522,13 +525,13 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(42, 5) Source(13, 12) + SourceIndex(2) -2 >Emitted(42, 15) Source(13, 14) + SourceIndex(2) -3 >Emitted(42, 18) Source(13, 17) + SourceIndex(2) -4 >Emitted(42, 20) Source(13, 19) + SourceIndex(2) -5 >Emitted(42, 21) Source(13, 20) + SourceIndex(2) -6 >Emitted(42, 26) Source(13, 25) + SourceIndex(2) -7 >Emitted(42, 27) Source(13, 26) + SourceIndex(2) +1->Emitted(45, 5) Source(13, 12) + SourceIndex(2) +2 >Emitted(45, 15) Source(13, 14) + SourceIndex(2) +3 >Emitted(45, 18) Source(13, 17) + SourceIndex(2) +4 >Emitted(45, 20) Source(13, 19) + SourceIndex(2) +5 >Emitted(45, 21) Source(13, 20) + SourceIndex(2) +6 >Emitted(45, 26) Source(13, 25) + SourceIndex(2) +7 >Emitted(45, 27) Source(13, 26) + SourceIndex(2) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -546,13 +549,13 @@ sourceFile:../test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(43, 5) Source(14, 12) + SourceIndex(2) -2 >Emitted(43, 15) Source(14, 14) + SourceIndex(2) -3 >Emitted(43, 18) Source(14, 17) + SourceIndex(2) -4 >Emitted(43, 20) Source(14, 19) + SourceIndex(2) -5 >Emitted(43, 21) Source(14, 20) + SourceIndex(2) -6 >Emitted(43, 26) Source(14, 25) + SourceIndex(2) -7 >Emitted(43, 27) Source(14, 26) + SourceIndex(2) +1->Emitted(46, 5) Source(14, 12) + SourceIndex(2) +2 >Emitted(46, 15) Source(14, 14) + SourceIndex(2) +3 >Emitted(46, 18) Source(14, 17) + SourceIndex(2) +4 >Emitted(46, 20) Source(14, 19) + SourceIndex(2) +5 >Emitted(46, 21) Source(14, 20) + SourceIndex(2) +6 >Emitted(46, 26) Source(14, 25) + SourceIndex(2) +7 >Emitted(46, 27) Source(14, 26) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.errors.txt index 247f9e4f2f2a1..b0d02cf812052 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json index 4869993ca9299..14643d2565d49 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js index 86c0ba4123800..684b6e489f78b 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map index 7f5576a8a9c7f..7a239e36dfd54 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.json index 31a0fb89c5026..ff1b014410ef8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt index 834a5c3a112c1..e546405911bc2 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:m1.js sourceFile:../m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:../test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:../test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js index 6e24571a3f270..44e408fb39b18 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map index 80d6bbf450bb9..70ee8ff61e009 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js index c8a4f5c91a47b..284d58acdad3e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map index ce271e4a3cd16..ced269a7dca63 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.json index 31a0fb89c5026..ff1b014410ef8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt index 668c24e25c517..dcb2c860ca096 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../m1.ts emittedFile:m1.js sourceFile:../m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: ../test.ts emittedFile:test.js sourceFile:../test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:../test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js index 080dcf6e8181e..3a438f0255bc5 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map index de9ec1f985913..1977336ea8e28 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json index 355458526bc92..a155932652879 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index ebb800ef3dd85..87a12bd64cf47 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/m1.js sourceFile:../m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:../test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:../test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index 86c0ba4123800..684b6e489f78b 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 7f5576a8a9c7f..7a239e36dfd54 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index 6e24571a3f270..44e408fb39b18 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 80d6bbf450bb9..70ee8ff61e009 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json index 355458526bc92..a155932652879 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index ed2f07140c453..ff6b403823d89 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../m1.ts emittedFile:outdir/simple/m1.js sourceFile:../m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: ../test.ts emittedFile:outdir/simple/test.js sourceFile:../test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:../test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index c8a4f5c91a47b..284d58acdad3e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index ce271e4a3cd16..ced269a7dca63 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index 080dcf6e8181e..3a438f0255bc5 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index de9ec1f985913..1977336ea8e28 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js index d3d9bd9dc8583..3dc74b12b3d77 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 6377a26395e5e..f8787f0f0188f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json index 742acdc7a2559..40d72149fd944 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt index d8ab3db126671..8797275bcdad8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:../m1.ts ------------------------------------------------------------------- >>>define("m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:../test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:../test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.errors.txt index 12592331fb591..0dc033a09d2dc 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json index 742acdc7a2559..40d72149fd944 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.json index a6bc71dd664d0..27d5d010b40f1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt index a8488d8a1345c..737f15bf08c95 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:../../ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../../ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:../test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:../test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js index e819d557c4032..24ff184b236b5 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map index 88e67e19b3669..3875e8cb03af4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js index 3b2cd1a24c424..f1d1c605eb430 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map index 80d6bbf450bb9..70ee8ff61e009 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.json index a6bc71dd664d0..27d5d010b40f1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt index f227d9809ada5..b5706736604f7 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../../ref/m1.ts emittedFile:ref/m1.js sourceFile:../../ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../../ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: ../test.ts emittedFile:test.js sourceFile:../test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:../test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js index a420241c901c3..277943cc80d60 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map index 420650feeac89..eda395c61375c 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js index f6319258d8f9d..884fc07b3414f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map index 15d4e3e1c9b08..9b4031ad9adc1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json index e873c8fc472e5..8e16e5d165d1d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index f5cd30a8a50d0..ce3e6a112d2cc 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/ref/m1.js sourceFile:../../ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../../ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:../test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:../test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index e819d557c4032..24ff184b236b5 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 88e67e19b3669..3875e8cb03af4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index 3b2cd1a24c424..f1d1c605eb430 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 80d6bbf450bb9..70ee8ff61e009 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json index e873c8fc472e5..8e16e5d165d1d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 2e0ba5061ceca..0ce6c34b1a33a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../../ref/m1.ts emittedFile:outdir/simple/ref/m1.js sourceFile:../../ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../../ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: ../test.ts emittedFile:outdir/simple/test.js sourceFile:../test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:../test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index a420241c901c3..277943cc80d60 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 420650feeac89..eda395c61375c 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index f6319258d8f9d..884fc07b3414f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 15d4e3e1c9b08..9b4031ad9adc1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 176c3f78407c2..44b0801e558e9 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index f77c1351b1584..f2d94cd0ab2e6 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json index 21d6e50f28a69..8787d932d29a6 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index d63cf86d23670..0eade6b6f8fb9 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:../ref/m1.ts ------------------------------------------------------------------- >>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:../test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:../test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.errors.txt index 42154149020d1..7eb84ece29d1e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json index 21d6e50f28a69..8787d932d29a6 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_module_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/diskFile0.js.map index bc33e2f8d720a..2b699d2706981 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.json index 49018ee59734b..f511365c917ed 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt index f630a92b4a99d..1c3193cbd2010 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/ref/m1.js.map index b8be5eb8e01a4..1733ce017197a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/test.js.map index 05ee1332d71ef..cd0afe5bb0faa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/diskFile0.js.map index bc33e2f8d720a..2b699d2706981 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.json index 49018ee59734b..f511365c917ed 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt index f630a92b4a99d..1c3193cbd2010 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/ref/m1.js.map index b8be5eb8e01a4..1733ce017197a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/test.js.map index 05ee1332d71ef..cd0afe5bb0faa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json index 097c9bbf2097c..b3c5617dffa61 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt index 74b8b777ec312..7e1b50667b884 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map index b8be5eb8e01a4..1733ce017197a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map index 05ee1332d71ef..cd0afe5bb0faa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map index bc33e2f8d720a..2b699d2706981 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json index 097c9bbf2097c..b3c5617dffa61 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt index 74b8b777ec312..7e1b50667b884 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map index b8be5eb8e01a4..1733ce017197a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map index 05ee1332d71ef..cd0afe5bb0faa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map index bc33e2f8d720a..2b699d2706981 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/bin/test.js.map index 37b77beb154fa..16fc574b9c10f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_multifolder_ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.json index bcf3a4400aa95..81f0ad78eb302 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt index 69830c04b5641..1d83cb2c7344e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/bin/test.js.map index 37b77beb154fa..16fc574b9c10f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_multifolder_ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.errors.txt index 53a35eb2c84a0..f420dc4be3342 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ../outputdir_multifolder_ref/m2.ts (0 errors) ==== var m2_a1 = 10; class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.json index bcf3a4400aa95..81f0ad78eb302 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_multifolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt index 69830c04b5641..1d83cb2c7344e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_multifolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/m1.js.map index 9ad95c3cfd4ca..6bbdb177623e0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.json index d5914d929503b..8a32acd12e1aa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt index 86dae9982ec27..3098d176ceee3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_simple/mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/test.js.map index 230b0e3381744..4556d50eb3075 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/m1.js.map index 9ad95c3cfd4ca..6bbdb177623e0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.json index d5914d929503b..8a32acd12e1aa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt index 86dae9982ec27..3098d176ceee3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_simple/mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/test.js.map index 230b0e3381744..4556d50eb3075 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json index 2c5e1dae38a29..23cc45f96453c 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt index 84f8b2e886a2e..39e884c2e811b 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_simple/mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 9ad95c3cfd4ca..6bbdb177623e0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 230b0e3381744..4556d50eb3075 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json index 2c5e1dae38a29..23cc45f96453c 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt index 84f8b2e886a2e..39e884c2e811b 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_simple/mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 9ad95c3cfd4ca..6bbdb177623e0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 230b0e3381744..4556d50eb3075 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/bin/test.js.map index b7b29ed1cf834..0f1b26bbb4c10 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.json index 8431a99c800ca..72a0dce300769 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt index e020abba5a5b9..809260bb3bf10 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/bin/test.js.map index b7b29ed1cf834..0f1b26bbb4c10 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.errors.txt index 53fc18f86c749..fa5c648451acb 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.json index 8431a99c800ca..72a0dce300769 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_simple/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt index e020abba5a5b9..809260bb3bf10 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_simple/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.json index 4a180368e2023..d26b77e467512 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt index 4433eb94534be..78f3538ee65e7 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_singleFile/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/test.js.map index c15b0f9ed70ea..1ea77ceaed18f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.json index 4a180368e2023..d26b77e467512 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt index 4433eb94534be..78f3538ee65e7 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_singleFile/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/test.js.map index c15b0f9ed70ea..1ea77ceaed18f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json index a44a569a0a608..e712eab1a751e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt index 9b92dfb44558c..4528840f69b7e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_singleFile/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map index c15b0f9ed70ea..1ea77ceaed18f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json index a44a569a0a608..e712eab1a751e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt index 9b92dfb44558c..4528840f69b7e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_singleFile/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map index c15b0f9ed70ea..1ea77ceaed18f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/bin/test.js.map index c15b0f9ed70ea..1ea77ceaed18f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.json index 7c0069605da79..c66cea7fd447e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt index 85f4115a0ee3d..ed57bdb6f1ede 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_singleFile/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/bin/test.js.map index c15b0f9ed70ea..1ea77ceaed18f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.errors.txt index eb358c3b79d38..6fdef1c0d9d45 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== test.ts (0 errors) ==== var a1 = 10; class c1 { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.json index 7c0069605da79..c66cea7fd447e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_singleFile/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt index 85f4115a0ee3d..ed57bdb6f1ede 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_singleFile/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.json index 1b09decc58d02..a3c1bede2a1ef 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt index 702f520b4a6a1..4834c4ee4c436 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/ref/m1.js.map index 43db599a09206..2ec23553c3b01 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/test.js.map index cba32efbabea0..bd2470b8ccf60 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.json index 1b09decc58d02..a3c1bede2a1ef 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt index 702f520b4a6a1..4834c4ee4c436 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/ref/m1.js.map index 43db599a09206..2ec23553c3b01 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/test.js.map index cba32efbabea0..bd2470b8ccf60 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json index a02eb484aa248..ddd2bdee5a87a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt index 68ca3d32ac991..186e55039a051 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 43db599a09206..2ec23553c3b01 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index cba32efbabea0..bd2470b8ccf60 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json index a02eb484aa248..ddd2bdee5a87a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt index 68ca3d32ac991..186e55039a051 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 43db599a09206..2ec23553c3b01 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index cba32efbabea0..bd2470b8ccf60 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/bin/test.js.map index 91ea14b3da422..0b06c40446086 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.json index ec516baecfe0f..d452a55784f64 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt index a82ab38507bc8..7958222249dd3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/bin/test.js.map index 91ea14b3da422..0b06c40446086 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.errors.txt index 376cfa761b8a0..2a58fd1ab36f3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.json index ec516baecfe0f..d452a55784f64 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", - "resolveMapRoot": true, "declaration": true, "baselineCheck": true, + "mapRoot": "tests/cases/projects/outputdir_subfolder/mapFiles", + "resolveMapRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt index a82ab38507bc8..7958222249dd3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_subfolder/mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.json index 5352fd8a988f2..af9fb8ba53bc7 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt index e6c67f2d66a12..9d47375d9931a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/ref/m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:ref/m2.js sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../mapFiles/ref/m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:../outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m1.js.map index 49da9789ec8a1..67e8b70639de8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js index 4f0b35f21c7e5..22446a6202151 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map index 81bb9202e5a9c..8046b4e56e9a1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/test.js.map index 3fcfc31e4d1be..b142ff216f215 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.json index 5352fd8a988f2..af9fb8ba53bc7 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt index ad208f9375c4f..647c7f30e3680 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/ref/m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ../../outputdir_mixed_subfolder/ref/m2.ts emittedFile:ref/m2.js sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/ref/m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:../outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m1.js.map index 49da9789ec8a1..67e8b70639de8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js index f13773b3384b3..83c26797422c6 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map index 98da596cfa43d..3d767492427e4 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/test.js.map index 3fcfc31e4d1be..b142ff216f215 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json index 0a0d68e300a05..9faeb47e4c8ec 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 181b1b84b5f27..93b67a6e3b208 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../mapFiles/ref/m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:outdir/simple/ref/m2.js sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../../mapFiles/ref/m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:../outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 49da9789ec8a1..67e8b70639de8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index e4c8f7b361033..8135743efbb29 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index 81bb9202e5a9c..8046b4e56e9a1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 3fcfc31e4d1be..b142ff216f215 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json index 0a0d68e300a05..9faeb47e4c8ec 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 4230c8e6366f1..690652e709249 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../mapFiles/ref/m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ../../outputdir_mixed_subfolder/ref/m2.ts emittedFile:outdir/simple/ref/m2.js sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../mapFiles/ref/m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:../outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 49da9789ec8a1..67e8b70639de8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index d78261fe225e2..dd1d86b133613 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 98da596cfa43d..3d767492427e4 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 3fcfc31e4d1be..b142ff216f215 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js index bd14cd07502d1..75131b5063047 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index ca8dd0934b5b4..ad91316934a98 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json index f3b0bdd119e37..1ec6dbe907e8c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index cfd0952c941db..15b9d4ff17d03 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:../outputdir_mixed_subfolder/ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -317,8 +318,8 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:../outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map index 02be1ec09fbfc..b54fffed73f4e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json index f3b0bdd119e37..1ec6dbe907e8c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index 931a09b3ae6d6..12ac5dd705030 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -196,7 +196,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:../outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 59405bccb9c15..52e051d7ba0ac 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 794d2a5817671..946ba761aef65 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 0d6c009961b06..fc1dc40836b2d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index cb14a553f053a..cc17592a88f77 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js sourceFile:../outputdir_mixed_subfolder/ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:../outputdir_mixed_subfolder/ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -317,8 +318,8 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:../outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=../../mapFiles/outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map index 43710b5f06122..c5cc839430f52 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 0d6c009961b06..fc1dc40836b2d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index eddbc79711cfd..1d5041d6d00f9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -196,7 +196,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:../outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=../../mapFiles/outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 9745ad1a4ab6c..319f5bbb7d5cb 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js index ad9b3f686118e..efc54df85c4c7 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.json index 8ec143b2dce59..42354ecded5e9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt index 12d96900c84c4..1a02d0ed75c31 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:diskFile1.js sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:test.js sourceFile:../../projects/outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../mapFiles/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js index 09fbf68994d4d..0a11d7abb9c1b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map index e7200adafdbc0..07fcee5d5c684 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js index 90dee0800c7b8..e368bc35b2415 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map index f2b1ea701105c..ed3a0f816aa42 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map index c2ac2bc27101a..261053c5b8a81 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js index 573ce2ac6c550..d6279c6e1b899 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.json index 8ec143b2dce59..42354ecded5e9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt index 567b51cfff5f8..2140f27c0823d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../../../projects/outputdir_module_multifolder/ref/m1.ts emittedFile:ref/m1.js sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: ../../projects/outputdir_module_multifolder_ref/m2.ts emittedFile:diskFile1.js sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: ../../projects/outputdir_module_multifolder/test.ts emittedFile:test.js sourceFile:../../projects/outputdir_module_multifolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js index 87f1f3a51b7a5..6b59fb6f79c13 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map index 074ab743af3ed..c6fe688528bbd 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js index 6e2fb8d785198..fbdb77f2d2598 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map index 85da8e394210b..9bc78eedda3a6 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json index 96777b6f502f6..969b730a251b2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 58dd5dfef8213..0c068b2496d15 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../../../../mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../../../mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:../../projects/outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../../../mapFiles/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index 3b74c0f890ef4..57f346647510a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index e7200adafdbc0..07fcee5d5c684 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index 5224ad7d4fde7..3431f8ce475a0 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index f2b1ea701105c..ed3a0f816aa42 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index 2f060a4768661..f6f3df3a777f9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 9745ad1a4ab6c..319f5bbb7d5cb 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json index 96777b6f502f6..969b730a251b2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index b4900315771c4..72f9ba10fc124 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../../../projects/outputdir_module_multifolder/ref/m1.ts emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../../../mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: ../../projects/outputdir_module_multifolder_ref/m2.ts emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../../mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: ../../projects/outputdir_module_multifolder/test.ts emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:../../projects/outputdir_module_multifolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../../mapFiles/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index ab4a16c55108d..69476c5b6ca0e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 074ab743af3ed..c6fe688528bbd 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index c439bd5a5ef55..27d8b15a593d2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 85da8e394210b..9bc78eedda3a6 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index f8a4cd2f22225..971843479a5ff 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index c2ac2bc27101a..261053c5b8a81 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js index 8b1094335619f..e39147c6ae10b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ -define("ref/m1", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -12,7 +13,8 @@ define("ref/m1", ["require", "exports"], function (require, exports) { } exports.m1_f1 = m1_f1; }); -define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -26,7 +28,8 @@ define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], functio } exports.m2_f1 = m2_f1; }); -define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index a7235c6c2b368..692f9bdb8e9e1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../projects/outputdir_module_multifolder/ref/m1.ts","../projects/outputdir_module_multifolder_ref/m2.ts","../projects/outputdir_module_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../projects/outputdir_module_multifolder/ref/m1.ts","../projects/outputdir_module_multifolder_ref/m2.ts","../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json index 283c0703f90fe..2f6c92af1994a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index 47e1835365a19..064a3ae060478 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -8,7 +8,8 @@ sources: ../projects/outputdir_module_multifolder/ref/m1.ts,../projects/outputdi emittedFile:bin/test.js sourceFile:../projects/outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- ->>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../projects/outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../projects/outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../projects/outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../projects/outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../projects/outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,17 +165,18 @@ sourceFile:../projects/outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:../projects/outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>}); ->>>define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -187,24 +189,24 @@ sourceFile:../projects/outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(16, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(16, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(16, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(16, 24) Source(1, 23) + SourceIndex(1) +1 >Emitted(18, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(18, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(18, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(18, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(18, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(20, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -214,16 +216,16 @@ sourceFile:../projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(19, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(19, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(21, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(20, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(22, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(22, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -237,10 +239,10 @@ sourceFile:../projects/outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(21, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(21, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(21, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -254,10 +256,10 @@ sourceFile:../projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(22, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(22, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(22, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(22, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(24, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(24, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -276,20 +278,20 @@ sourceFile:../projects/outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(23, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(23, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(23, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(23, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(23, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(23, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(23, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(25, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(25, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(25, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(25, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(25, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(25, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(25, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -303,11 +305,11 @@ sourceFile:../projects/outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(25, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(25, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(25, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(25, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(25, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(27, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(27, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(27, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -316,8 +318,8 @@ sourceFile:../projects/outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(26, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(28, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -330,17 +332,18 @@ sourceFile:../projects/outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(27, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(27, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(27, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(27, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(29, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(29, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(29, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:../projects/outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>}); ->>>define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>>define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -355,24 +358,24 @@ sourceFile:../projects/outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(30, 5) Source(3, 12) + SourceIndex(2) -2 >Emitted(30, 15) Source(3, 14) + SourceIndex(2) -3 >Emitted(30, 18) Source(3, 17) + SourceIndex(2) -4 >Emitted(30, 20) Source(3, 19) + SourceIndex(2) -5 >Emitted(30, 21) Source(3, 20) + SourceIndex(2) +1 >Emitted(33, 5) Source(3, 12) + SourceIndex(2) +2 >Emitted(33, 15) Source(3, 14) + SourceIndex(2) +3 >Emitted(33, 18) Source(3, 17) + SourceIndex(2) +4 >Emitted(33, 20) Source(3, 19) + SourceIndex(2) +5 >Emitted(33, 21) Source(3, 20) + SourceIndex(2) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(31, 5) Source(4, 1) + SourceIndex(2) +1->Emitted(34, 5) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(32, 9) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(35, 9) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^^^^^ @@ -382,16 +385,16 @@ sourceFile:../projects/outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(33, 9) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(33, 10) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(36, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(36, 10) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(34, 9) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(34, 18) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(37, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(37, 18) Source(6, 2) + SourceIndex(2) --- >>> })(); 1 >^^^^ @@ -405,10 +408,10 @@ sourceFile:../projects/outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(35, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(35, 6) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(35, 6) Source(4, 1) + SourceIndex(2) -4 >Emitted(35, 10) Source(6, 2) + SourceIndex(2) +1 >Emitted(38, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(38, 6) Source(6, 2) + SourceIndex(2) +3 >Emitted(38, 6) Source(4, 1) + SourceIndex(2) +4 >Emitted(38, 10) Source(6, 2) + SourceIndex(2) --- >>> exports.c1 = c1; 1->^^^^ @@ -422,10 +425,10 @@ sourceFile:../projects/outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(36, 5) Source(4, 14) + SourceIndex(2) -2 >Emitted(36, 15) Source(4, 16) + SourceIndex(2) -3 >Emitted(36, 20) Source(6, 2) + SourceIndex(2) -4 >Emitted(36, 21) Source(6, 2) + SourceIndex(2) +1->Emitted(39, 5) Source(4, 14) + SourceIndex(2) +2 >Emitted(39, 15) Source(4, 16) + SourceIndex(2) +3 >Emitted(39, 20) Source(6, 2) + SourceIndex(2) +4 >Emitted(39, 21) Source(6, 2) + SourceIndex(2) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -444,20 +447,20 @@ sourceFile:../projects/outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(37, 5) Source(8, 12) + SourceIndex(2) -2 >Emitted(37, 22) Source(8, 21) + SourceIndex(2) -3 >Emitted(37, 25) Source(8, 24) + SourceIndex(2) -4 >Emitted(37, 29) Source(8, 28) + SourceIndex(2) -5 >Emitted(37, 31) Source(8, 30) + SourceIndex(2) -6 >Emitted(37, 33) Source(8, 32) + SourceIndex(2) -7 >Emitted(37, 34) Source(8, 33) + SourceIndex(2) +1->Emitted(40, 5) Source(8, 12) + SourceIndex(2) +2 >Emitted(40, 22) Source(8, 21) + SourceIndex(2) +3 >Emitted(40, 25) Source(8, 24) + SourceIndex(2) +4 >Emitted(40, 29) Source(8, 28) + SourceIndex(2) +5 >Emitted(40, 31) Source(8, 30) + SourceIndex(2) +6 >Emitted(40, 33) Source(8, 32) + SourceIndex(2) +7 >Emitted(40, 34) Source(8, 33) + SourceIndex(2) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(38, 5) Source(9, 1) + SourceIndex(2) +1 >Emitted(41, 5) Source(9, 1) + SourceIndex(2) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -471,11 +474,11 @@ sourceFile:../projects/outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(39, 9) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(39, 15) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(39, 16) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(39, 33) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(39, 34) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(42, 9) Source(10, 5) + SourceIndex(2) +2 >Emitted(42, 15) Source(10, 11) + SourceIndex(2) +3 >Emitted(42, 16) Source(10, 12) + SourceIndex(2) +4 >Emitted(42, 33) Source(10, 21) + SourceIndex(2) +5 >Emitted(42, 34) Source(10, 22) + SourceIndex(2) --- >>> } 1 >^^^^ @@ -484,8 +487,8 @@ sourceFile:../projects/outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(40, 5) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(40, 6) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(43, 5) Source(11, 1) + SourceIndex(2) +2 >Emitted(43, 6) Source(11, 2) + SourceIndex(2) --- >>> exports.f1 = f1; 1->^^^^ @@ -499,10 +502,10 @@ sourceFile:../projects/outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(41, 5) Source(9, 17) + SourceIndex(2) -2 >Emitted(41, 15) Source(9, 19) + SourceIndex(2) -3 >Emitted(41, 20) Source(11, 2) + SourceIndex(2) -4 >Emitted(41, 21) Source(11, 2) + SourceIndex(2) +1->Emitted(44, 5) Source(9, 17) + SourceIndex(2) +2 >Emitted(44, 15) Source(9, 19) + SourceIndex(2) +3 >Emitted(44, 20) Source(11, 2) + SourceIndex(2) +4 >Emitted(44, 21) Source(11, 2) + SourceIndex(2) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -522,13 +525,13 @@ sourceFile:../projects/outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(42, 5) Source(13, 12) + SourceIndex(2) -2 >Emitted(42, 15) Source(13, 14) + SourceIndex(2) -3 >Emitted(42, 18) Source(13, 17) + SourceIndex(2) -4 >Emitted(42, 20) Source(13, 19) + SourceIndex(2) -5 >Emitted(42, 21) Source(13, 20) + SourceIndex(2) -6 >Emitted(42, 26) Source(13, 25) + SourceIndex(2) -7 >Emitted(42, 27) Source(13, 26) + SourceIndex(2) +1->Emitted(45, 5) Source(13, 12) + SourceIndex(2) +2 >Emitted(45, 15) Source(13, 14) + SourceIndex(2) +3 >Emitted(45, 18) Source(13, 17) + SourceIndex(2) +4 >Emitted(45, 20) Source(13, 19) + SourceIndex(2) +5 >Emitted(45, 21) Source(13, 20) + SourceIndex(2) +6 >Emitted(45, 26) Source(13, 25) + SourceIndex(2) +7 >Emitted(45, 27) Source(13, 26) + SourceIndex(2) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -546,13 +549,13 @@ sourceFile:../projects/outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(43, 5) Source(14, 12) + SourceIndex(2) -2 >Emitted(43, 15) Source(14, 14) + SourceIndex(2) -3 >Emitted(43, 18) Source(14, 17) + SourceIndex(2) -4 >Emitted(43, 20) Source(14, 19) + SourceIndex(2) -5 >Emitted(43, 21) Source(14, 20) + SourceIndex(2) -6 >Emitted(43, 26) Source(14, 25) + SourceIndex(2) -7 >Emitted(43, 27) Source(14, 26) + SourceIndex(2) +1->Emitted(46, 5) Source(14, 12) + SourceIndex(2) +2 >Emitted(46, 15) Source(14, 14) + SourceIndex(2) +3 >Emitted(46, 18) Source(14, 17) + SourceIndex(2) +4 >Emitted(46, 20) Source(14, 19) + SourceIndex(2) +5 >Emitted(46, 21) Source(14, 20) + SourceIndex(2) +6 >Emitted(46, 26) Source(14, 25) + SourceIndex(2) +7 >Emitted(46, 27) Source(14, 26) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.errors.txt index 247f9e4f2f2a1..b0d02cf812052 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json index 283c0703f90fe..2f6c92af1994a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js index 1fe3446e4bc00..d34c484207f52 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map index e2625035edb1b..054150c265487 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.json index a4e8c09b004df..162bcbaa749a7 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt index 76375ce0d0c9b..2a501a3a088d1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:m1.js sourceFile:../outputdir_module_simple/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../outputdir_module_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../outputdir_module_simple/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../outputdir_module_simple/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../outputdir_module_simple/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../outputdir_module_simple/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../outputdir_module_simple/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../mapFiles/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:../outputdir_module_simple/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:../outputdir_module_simple/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:../outputdir_module_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:../outputdir_module_simple/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:../outputdir_module_simple/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:../outputdir_module_simple/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:../outputdir_module_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:../outputdir_module_simple/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:../outputdir_module_simple/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:../outputdir_module_simple/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js index 14471b6e983ce..8205a698b7255 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map index 5ce1629342421..c82c9aa7814f4 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js index 73a399fe2533e..bf342f3a0376b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map index 0950101384da7..d2943328caffc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.json index a4e8c09b004df..162bcbaa749a7 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt index aff5583a5e9ac..d9a867d684930 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../outputdir_module_simple/m1.ts emittedFile:m1.js sourceFile:../outputdir_module_simple/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../outputdir_module_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../outputdir_module_simple/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../outputdir_module_simple/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../outputdir_module_simple/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../outputdir_module_simple/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../outputdir_module_simple/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: ../outputdir_module_simple/test.ts emittedFile:test.js sourceFile:../outputdir_module_simple/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:../outputdir_module_simple/test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:../outputdir_module_simple/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:../outputdir_module_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:../outputdir_module_simple/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:../outputdir_module_simple/test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:../outputdir_module_simple/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:../outputdir_module_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:../outputdir_module_simple/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:../outputdir_module_simple/test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:../outputdir_module_simple/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js index 1a2a4fc5e6abd..a5faaf288bb28 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map index c0654a8e141c4..5dec3e818a6fc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json index f4a8884b58eea..440dbb0972e3a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 458c6b0616238..e4875c4f14625 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/m1.js sourceFile:../outputdir_module_simple/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../outputdir_module_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../outputdir_module_simple/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../outputdir_module_simple/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../outputdir_module_simple/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../outputdir_module_simple/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../outputdir_module_simple/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../mapFiles/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:../outputdir_module_simple/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:../outputdir_module_simple/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:../outputdir_module_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:../outputdir_module_simple/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:../outputdir_module_simple/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:../outputdir_module_simple/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:../outputdir_module_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:../outputdir_module_simple/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:../outputdir_module_simple/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:../outputdir_module_simple/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index 1c7488c76ca50..119c0d64430b8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index e2625035edb1b..054150c265487 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index 5de61a43765a3..0189f9ede6338 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 5ce1629342421..c82c9aa7814f4 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json index f4a8884b58eea..440dbb0972e3a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index bcfdd607553c2..b2bf27e081ed1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../outputdir_module_simple/m1.ts emittedFile:outdir/simple/m1.js sourceFile:../outputdir_module_simple/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../outputdir_module_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../outputdir_module_simple/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../outputdir_module_simple/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../outputdir_module_simple/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../outputdir_module_simple/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../outputdir_module_simple/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: ../outputdir_module_simple/test.ts emittedFile:outdir/simple/test.js sourceFile:../outputdir_module_simple/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:../outputdir_module_simple/test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:../outputdir_module_simple/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:../outputdir_module_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:../outputdir_module_simple/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:../outputdir_module_simple/test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:../outputdir_module_simple/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:../outputdir_module_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:../outputdir_module_simple/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:../outputdir_module_simple/test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:../outputdir_module_simple/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index a39c6a4f1040d..dcf1e846993f8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 0950101384da7..d2943328caffc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index acba051a083a7..9264af81d3163 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index c0654a8e141c4..5dec3e818a6fc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js index 8ff2bbdb75b7d..a682a1f510dd9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index b94a5ff18e5b1..3f784bfa553ca 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts","../outputdir_module_simple/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts","../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.json index b4efe9ebb3975..2346dd2391029 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 8099c2f176aef..ceb18caf153d4 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:../outputdir_module_simple/m1.ts ------------------------------------------------------------------- >>>define("m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../outputdir_module_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../outputdir_module_simple/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../outputdir_module_simple/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../outputdir_module_simple/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../outputdir_module_simple/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../outputdir_module_simple/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:../outputdir_module_simple/test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:../outputdir_module_simple/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:../outputdir_module_simple/test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:../outputdir_module_simple/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:../outputdir_module_simple/test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:../outputdir_module_simple/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:../outputdir_module_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:../outputdir_module_simple/test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:../outputdir_module_simple/test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:../outputdir_module_simple/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.errors.txt index 12592331fb591..0dc033a09d2dc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.json index b4efe9ebb3975..2346dd2391029 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.json index a2779060068a2..5abb8eec3dafc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt index 46af484749055..66a7c7430367f 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:../../outputdir_module_subfolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../mapFiles/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:../outputdir_module_subfolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:../outputdir_module_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:../outputdir_module_subfolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:../outputdir_module_subfolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:../outputdir_module_subfolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:../outputdir_module_subfolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:../outputdir_module_subfolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:../outputdir_module_subfolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js index 3e8406858e243..8d3bff9f961e3 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map index 66acf4aace791..5c31d767ece29 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js index 84b62ed0fc7af..cc3fde39a754f 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map index 6139e8293b0ef..2653e1320a028 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.json index a2779060068a2..5abb8eec3dafc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt index 48f639a7ee2ee..62ee9347ba2d8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../../outputdir_module_subfolder/ref/m1.ts emittedFile:ref/m1.js sourceFile:../../outputdir_module_subfolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: ../outputdir_module_subfolder/test.ts emittedFile:test.js sourceFile:../outputdir_module_subfolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:../outputdir_module_subfolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:../outputdir_module_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:../outputdir_module_subfolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:../outputdir_module_subfolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:../outputdir_module_subfolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:../outputdir_module_subfolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:../outputdir_module_subfolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:../outputdir_module_subfolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js index 2dbac1edb8e92..c9c1fc5a6d1a2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map index 7e9c3643b9982..c0316079a93b3 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js index c6dd0639fb74e..d2c56e1b16904 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map index 64b21aa3115db..f057481c9b152 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json index 120bb5afbb6ea..d587558fbaf01 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 59c165fe0e3e7..857d197acb542 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/ref/m1.js sourceFile:../../outputdir_module_subfolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../../mapFiles/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:../outputdir_module_subfolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:../outputdir_module_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:../outputdir_module_subfolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:../outputdir_module_subfolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:../outputdir_module_subfolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:../outputdir_module_subfolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:../outputdir_module_subfolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:../outputdir_module_subfolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index 60a3a0f5552b6..769504a9af899 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 66acf4aace791..5c31d767ece29 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index 14791061d04ad..529760ec8956b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 6139e8293b0ef..2653e1320a028 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json index 120bb5afbb6ea..d587558fbaf01 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index abf4b9d6a848d..925c9368edd16 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../../outputdir_module_subfolder/ref/m1.ts emittedFile:outdir/simple/ref/m1.js sourceFile:../../outputdir_module_subfolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: ../outputdir_module_subfolder/test.ts emittedFile:outdir/simple/test.js sourceFile:../outputdir_module_subfolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:../outputdir_module_subfolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:../outputdir_module_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:../outputdir_module_subfolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:../outputdir_module_subfolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:../outputdir_module_subfolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:../outputdir_module_subfolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:../outputdir_module_subfolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:../outputdir_module_subfolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 5f32feb74bdd9..34294f368ff54 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 7e9c3643b9982..c0316079a93b3 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 5c2cb37295456..535ac2c9706df 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 64b21aa3115db..f057481c9b152 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js index ccc0a7b503b98..88f1db4f33e63 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index ae6d9b422211d..b8840d8440c6b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/ref/m1.ts","../outputdir_module_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/ref/m1.ts","../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json index 51ad7ddf1b2ca..c688513f28f86 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index e666ef224a3cb..2bff7cdbda9d3 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:../outputdir_module_subfolder/ref/m1.ts ------------------------------------------------------------------- >>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../outputdir_module_subfolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../outputdir_module_subfolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../outputdir_module_subfolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../outputdir_module_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../outputdir_module_subfolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../outputdir_module_subfolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:../outputdir_module_subfolder/test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:../outputdir_module_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:../outputdir_module_subfolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:../outputdir_module_subfolder/test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:../outputdir_module_subfolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:../outputdir_module_subfolder/test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:../outputdir_module_subfolder/test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:../outputdir_module_subfolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.errors.txt index 42154149020d1..7eb84ece29d1e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json index 51ad7ddf1b2ca..c688513f28f86 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/diskFile0.js.map index b94901a1d6ea4..4065af78119e9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.json index 718cfdabf0f08..89fc00cb3ec51 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt index f820fb19c6506..e5bf488f3d0f0 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:../../projects/outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/ref/m1.js.map index be7882c99f68c..2d94371174991 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/test.js.map index ee5a589cb6289..2c4b424daf28d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/diskFile0.js.map index b94901a1d6ea4..4065af78119e9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.json index 718cfdabf0f08..89fc00cb3ec51 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt index f820fb19c6506..e5bf488f3d0f0 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:../../projects/outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/ref/m1.js.map index be7882c99f68c..2d94371174991 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/test.js.map index ee5a589cb6289..2c4b424daf28d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.json index f51e53f02f6e7..d0034c920bc50 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt index f9b0d9fd57ef6..ea4571b517c60 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../../../mapFiles/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../../mapFiles/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:../../projects/outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../../mapFiles/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map index be7882c99f68c..2d94371174991 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map index ee5a589cb6289..2c4b424daf28d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map index b94901a1d6ea4..4065af78119e9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.json index f51e53f02f6e7..d0034c920bc50 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt index f9b0d9fd57ef6..ea4571b517c60 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../../../mapFiles/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../../mapFiles/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:../../projects/outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../../mapFiles/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map index be7882c99f68c..2d94371174991 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map index ee5a589cb6289..2c4b424daf28d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map index b94901a1d6ea4..4065af78119e9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/bin/test.js.map index fc3b27ea65c66..5fe8191c828b1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../projects/outputdir_multifolder/ref/m1.ts","../projects/outputdir_multifolder_ref/m2.ts","../projects/outputdir_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../projects/outputdir_multifolder/ref/m1.ts","../projects/outputdir_multifolder_ref/m2.ts","../projects/outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.json index 0d3f3ad02d5fd..17fc8719be6b2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt index 534e9184f7b0f..ec7a51000b428 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../projects/outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../projects/outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../projects/outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../projects/outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../projects/outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:../projects/outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:../projects/outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:../projects/outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:../projects/outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:../projects/outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:../projects/outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:../projects/outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:../projects/outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:../projects/outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:../projects/outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/bin/test.js.map index fc3b27ea65c66..5fe8191c828b1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../projects/outputdir_multifolder/ref/m1.ts","../projects/outputdir_multifolder_ref/m2.ts","../projects/outputdir_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../projects/outputdir_multifolder/ref/m1.ts","../projects/outputdir_multifolder_ref/m2.ts","../projects/outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.errors.txt index 53a35eb2c84a0..f420dc4be3342 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ../outputdir_multifolder_ref/m2.ts (0 errors) ==== var m2_a1 = 10; class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.json index 0d3f3ad02d5fd..17fc8719be6b2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt index 534e9184f7b0f..ec7a51000b428 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../projects/outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../projects/outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../projects/outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../projects/outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../projects/outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:../projects/outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:../projects/outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:../projects/outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:../projects/outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:../projects/outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:../projects/outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:../projects/outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:../projects/outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:../projects/outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:../projects/outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/m1.js.map index 82ae367f41dc1..06c3d793d0036 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_simple/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.json index d4d500a397e17..ee2758b4e8777 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.sourcemap.txt index 880f12ff46171..7c6f2c2513d71 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_simple/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_simple/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../outputdir_simple/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../outputdir_simple/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../outputdir_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../outputdir_simple/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../outputdir_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../outputdir_simple/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/test.js.map index bb43574904809..a0304c41f55a6 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/m1.js.map index 82ae367f41dc1..06c3d793d0036 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_simple/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.json index d4d500a397e17..ee2758b4e8777 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.sourcemap.txt index 880f12ff46171..7c6f2c2513d71 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_simple/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_simple/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../outputdir_simple/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../outputdir_simple/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../outputdir_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../outputdir_simple/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../outputdir_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../outputdir_simple/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/test.js.map index bb43574904809..a0304c41f55a6 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.json index 12801537d2bdf..de85b187e28df 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt index 3ac5b5906405d..9b5cee44e8803 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_simple/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_simple/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../outputdir_simple/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../outputdir_simple/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../outputdir_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../outputdir_simple/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../outputdir_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../outputdir_simple/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 82ae367f41dc1..06c3d793d0036 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_simple/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index bb43574904809..a0304c41f55a6 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.json index 12801537d2bdf..de85b187e28df 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt index 3ac5b5906405d..9b5cee44e8803 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_simple/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_simple/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../outputdir_simple/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../outputdir_simple/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../outputdir_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../outputdir_simple/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../outputdir_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../outputdir_simple/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 82ae367f41dc1..06c3d793d0036 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_simple/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index bb43574904809..a0304c41f55a6 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/bin/test.js.map index 11bf13c6ac81c..c6dac016fa352 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/m1.ts","../outputdir_simple/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/m1.ts","../outputdir_simple/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.json index d6bbe96a7e07c..0e7a2f759bc60 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt index 452ad2eb84115..cdfe8381ab41e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_simple/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_simple/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../outputdir_simple/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:../outputdir_simple/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:../outputdir_simple/test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:../outputdir_simple/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:../outputdir_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:../outputdir_simple/test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/bin/test.js.map index 11bf13c6ac81c..c6dac016fa352 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/m1.ts","../outputdir_simple/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/m1.ts","../outputdir_simple/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.errors.txt index 53fc18f86c749..fa5c648451acb 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.json index d6bbe96a7e07c..0e7a2f759bc60 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt index 452ad2eb84115..cdfe8381ab41e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_simple/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_simple/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../outputdir_simple/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:../outputdir_simple/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:../outputdir_simple/test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:../outputdir_simple/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:../outputdir_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:../outputdir_simple/test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.json index bb7ccbf453ba8..f8b9e1b96c2b2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt index b0d16a34e9aa0..3c5a58c134c08 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_singleFile/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_singleFile/test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_singleFile/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_singleFile/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../outputdir_singleFile/test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/test.js.map index e3d8cd8c37f2d..4fd259015f513 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_singleFile/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_singleFile/test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.json index bb7ccbf453ba8..f8b9e1b96c2b2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt index b0d16a34e9aa0..3c5a58c134c08 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_singleFile/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_singleFile/test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_singleFile/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_singleFile/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../outputdir_singleFile/test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/test.js.map index e3d8cd8c37f2d..4fd259015f513 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_singleFile/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_singleFile/test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.json index f654dbc3fac65..4960088c2691e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt index ade0746d1bfd8..1234777c9c133 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_singleFile/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_singleFile/test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_singleFile/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_singleFile/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../outputdir_singleFile/test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map index e3d8cd8c37f2d..4fd259015f513 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_singleFile/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_singleFile/test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.json index f654dbc3fac65..4960088c2691e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt index ade0746d1bfd8..1234777c9c133 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_singleFile/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_singleFile/test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_singleFile/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_singleFile/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../outputdir_singleFile/test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map index e3d8cd8c37f2d..4fd259015f513 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_singleFile/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_singleFile/test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/bin/test.js.map index e3d8cd8c37f2d..4fd259015f513 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_singleFile/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_singleFile/test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.json index fc285030e8fa7..e14165a2094ee 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt index b4f76aad2a38e..13278d30331ed 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_singleFile/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_singleFile/test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_singleFile/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_singleFile/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../outputdir_singleFile/test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/bin/test.js.map index e3d8cd8c37f2d..4fd259015f513 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_singleFile/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_singleFile/test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.errors.txt index eb358c3b79d38..6fdef1c0d9d45 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== test.ts (0 errors) ==== var a1 = 10; class c1 { diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.json index fc285030e8fa7..e14165a2094ee 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt index b4f76aad2a38e..13278d30331ed 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_singleFile/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_singleFile/test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_singleFile/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_singleFile/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../outputdir_singleFile/test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.json index b5b1dfba62eea..f47e52efaae15 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt index 87f1e589a1251..ce2229723a356 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../outputdir_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../outputdir_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../outputdir_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../outputdir_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../outputdir_subfolder/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/ref/m1.js.map index 67151dfbad59f..d27f0a2f6c387 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/test.js.map index fe7aaf2252b05..2e3d358f1926c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.json b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.json index b5b1dfba62eea..f47e52efaae15 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt index 87f1e589a1251..ce2229723a356 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../outputdir_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../outputdir_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../outputdir_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../outputdir_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../outputdir_subfolder/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/ref/m1.js.map index 67151dfbad59f..d27f0a2f6c387 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/test.js.map index fe7aaf2252b05..2e3d358f1926c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.json index a06e2f34d5ac5..d54421a13acff 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt index f68430b295d2a..0e558e67ec2c0 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../outputdir_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../outputdir_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../outputdir_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../outputdir_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../outputdir_subfolder/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 67151dfbad59f..d27f0a2f6c387 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index fe7aaf2252b05..2e3d358f1926c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.json index a06e2f34d5ac5..d54421a13acff 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt index f68430b295d2a..0e558e67ec2c0 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../outputdir_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../outputdir_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../outputdir_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../outputdir_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../outputdir_subfolder/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 67151dfbad59f..d27f0a2f6c387 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index fe7aaf2252b05..2e3d358f1926c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/bin/test.js.map index 9e7077cbe2511..c23b45ac58e6c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/ref/m1.ts","../outputdir_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/ref/m1.ts","../outputdir_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.json index 772431187026e..da673bae82c96 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt index 8c4bedb4b3005..673c6572b5677 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../outputdir_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:../outputdir_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:../outputdir_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:../outputdir_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:../outputdir_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:../outputdir_subfolder/test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/bin/test.js.map index 9e7077cbe2511..c23b45ac58e6c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/ref/m1.ts","../outputdir_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/ref/m1.ts","../outputdir_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.errors.txt index 376cfa761b8a0..2a58fd1ab36f3 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.json index 772431187026e..da673bae82c96 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "../mapFiles", "declaration": true, "baselineCheck": true, + "mapRoot": "../mapFiles", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt index 8c4bedb4b3005..673c6572b5677 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../outputdir_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../outputdir_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../outputdir_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../outputdir_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../outputdir_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:../outputdir_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:../outputdir_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:../outputdir_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:../outputdir_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:../outputdir_subfolder/test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=../../mapFiles/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.json index c661284121066..24e51c87f59b7 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt index 7c797a023a2ff..a01426e8cd6b2 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:ref/m2.js sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m1.js.map index 18051b2af91c9..df653772beb82 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js index aa404804b4587..2f22bba7566da 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map index c2157bc3b1b87..4a3d25348300d 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/test.js.map index 767d260e0b828..bd199ac9a0e0d 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.json index c661284121066..24e51c87f59b7 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt index 6aecdcd084ae7..096356e3054dd 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts emittedFile:ref/m2.js sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m1.js.map index 18051b2af91c9..df653772beb82 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js index a39f0f50e5f91..e542958a41055 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map index 0230aad40a59d..66453b1e9b44d 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/test.js.map index 767d260e0b828..bd199ac9a0e0d 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.json index b225c4e408f6b..9ad38e70ea2d5 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 06b8e768334c6..d4e3fde027e2d 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:outdir/simple/ref/m2.js sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 18051b2af91c9..df653772beb82 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index aa404804b4587..2f22bba7566da 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index c2157bc3b1b87..4a3d25348300d 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 767d260e0b828..bd199ac9a0e0d 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.json index b225c4e408f6b..9ad38e70ea2d5 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 468e5d2338b7f..058484f80f447 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts emittedFile:outdir/simple/ref/m2.js sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 18051b2af91c9..df653772beb82 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index a39f0f50e5f91..e542958a41055 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 0230aad40a59d..66453b1e9b44d 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 767d260e0b828..bd199ac9a0e0d 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js index 6fbac81a12dba..03d1c2fc75073 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index c6996bb53b9d7..5c82f181545d2 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.json index b65b2477c8e51..c8af9ff2c3c01 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt index 0fa723ff01b48..d347c1a16a58e 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -317,8 +318,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/bin/test.js.map index 0b202d40b8c6a..b322a9dd0bb77 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.json index b65b2477c8e51..c8af9ff2c3c01 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt index bfe9f5dff6ad4..d4e651c5bc01f 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -196,7 +196,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 8c16871c4a728..04fd25336f1a7 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index d78e3b4607a62..41be977954623 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 9b7785a024b49..55020dd2a6892 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 6746d0609b6f9..0452361c2de3c 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -317,8 +318,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map index 363ef3c21bf50..7cf551e7dc047 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 9b7785a024b49..55020dd2a6892 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 14ca884e9f7d0..b659a6c11c5ee 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -196,7 +196,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map index 66c8fa96a0b8e..abf7a2ecd19b0 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile1.js index e926e95f3c38b..3a0f016c568cf 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.json index 6ecdc26ccd446..e63320ddb6a21 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt index f07b7d9212d5f..2a3f8d78e9474 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:diskFile1.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:test.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js index e8004c87aadb5..0014eb3163c56 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map index 37bc803927189..fa40ecf48165b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js index 01ad8f96e78ea..40f17b7a6cc64 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map index 4e7e9721b83c0..3fe49d9c7afe4 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map index ec29dfcad186b..165dd78d6c91c 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile1.js index 721fdf3827f91..94c4edd028979 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.json index 6ecdc26ccd446..e63320ddb6a21 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt index e3d905204b2d3..69e712ee56d4a 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts emittedFile:ref/m1.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts emittedFile:diskFile1.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: file:///tests/cases/projects/outputdir_module_multifolder/test.ts emittedFile:test.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js index 7b14808a06713..e50be801bbf7b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map index c88465aaec47d..40ad29ac6e6d6 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js index b9191db7d5ffb..866997ceee077 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map index 6a18d277c1070..386c14e8731fd 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.json index 9884550745c4b..8bedb00204127 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 34cc5d53b87b6..84dce11dc01af 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index e8004c87aadb5..0014eb3163c56 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 37bc803927189..fa40ecf48165b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index 01ad8f96e78ea..40f17b7a6cc64 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index 4e7e9721b83c0..3fe49d9c7afe4 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index e926e95f3c38b..3a0f016c568cf 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 66c8fa96a0b8e..abf7a2ecd19b0 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.json index 9884550745c4b..8bedb00204127 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 097d3769047b1..dcf1fb70a43c3 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: file:///tests/cases/projects/outputdir_module_multifolder/test.ts emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 7b14808a06713..e50be801bbf7b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index c88465aaec47d..40ad29ac6e6d6 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index b9191db7d5ffb..866997ceee077 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 6a18d277c1070..386c14e8731fd 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index 721fdf3827f91..94c4edd028979 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index ec29dfcad186b..165dd78d6c91c 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js index 0734d350e1117..621d7634ee1c9 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ -define("ref/m1", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -12,7 +13,8 @@ define("ref/m1", ["require", "exports"], function (require, exports) { } exports.m1_f1 = m1_f1; }); -define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -26,7 +28,8 @@ define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], functio } exports.m2_f1 = m2_f1; }); -define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 211bf71cbedf0..e5b77da53ebd5 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts","file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts","file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts","file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts","file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.json index 2ff88c9696f0b..d6640cdb40441 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index 5805c876be804..568d06c38d13b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -8,7 +8,8 @@ sources: file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts,fil emittedFile:bin/test.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- ->>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,17 +165,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>}); ->>>define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -187,24 +189,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(16, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(16, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(16, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(16, 24) Source(1, 23) + SourceIndex(1) +1 >Emitted(18, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(18, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(18, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(18, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(18, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(20, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -214,16 +216,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(19, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(19, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(21, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(20, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(22, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(22, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -237,10 +239,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(21, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(21, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(21, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -254,10 +256,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(22, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(22, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(22, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(22, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(24, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(24, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -276,20 +278,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(23, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(23, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(23, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(23, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(23, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(23, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(23, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(25, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(25, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(25, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(25, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(25, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(25, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(25, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -303,11 +305,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(25, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(25, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(25, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(25, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(25, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(27, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(27, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(27, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -316,8 +318,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(26, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(28, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -330,17 +332,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(27, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(27, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(27, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(27, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(29, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(29, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(29, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>}); ->>>define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>>define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -355,24 +358,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(30, 5) Source(3, 12) + SourceIndex(2) -2 >Emitted(30, 15) Source(3, 14) + SourceIndex(2) -3 >Emitted(30, 18) Source(3, 17) + SourceIndex(2) -4 >Emitted(30, 20) Source(3, 19) + SourceIndex(2) -5 >Emitted(30, 21) Source(3, 20) + SourceIndex(2) +1 >Emitted(33, 5) Source(3, 12) + SourceIndex(2) +2 >Emitted(33, 15) Source(3, 14) + SourceIndex(2) +3 >Emitted(33, 18) Source(3, 17) + SourceIndex(2) +4 >Emitted(33, 20) Source(3, 19) + SourceIndex(2) +5 >Emitted(33, 21) Source(3, 20) + SourceIndex(2) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(31, 5) Source(4, 1) + SourceIndex(2) +1->Emitted(34, 5) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(32, 9) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(35, 9) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^^^^^ @@ -382,16 +385,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(33, 9) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(33, 10) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(36, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(36, 10) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(34, 9) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(34, 18) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(37, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(37, 18) Source(6, 2) + SourceIndex(2) --- >>> })(); 1 >^^^^ @@ -405,10 +408,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(35, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(35, 6) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(35, 6) Source(4, 1) + SourceIndex(2) -4 >Emitted(35, 10) Source(6, 2) + SourceIndex(2) +1 >Emitted(38, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(38, 6) Source(6, 2) + SourceIndex(2) +3 >Emitted(38, 6) Source(4, 1) + SourceIndex(2) +4 >Emitted(38, 10) Source(6, 2) + SourceIndex(2) --- >>> exports.c1 = c1; 1->^^^^ @@ -422,10 +425,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(36, 5) Source(4, 14) + SourceIndex(2) -2 >Emitted(36, 15) Source(4, 16) + SourceIndex(2) -3 >Emitted(36, 20) Source(6, 2) + SourceIndex(2) -4 >Emitted(36, 21) Source(6, 2) + SourceIndex(2) +1->Emitted(39, 5) Source(4, 14) + SourceIndex(2) +2 >Emitted(39, 15) Source(4, 16) + SourceIndex(2) +3 >Emitted(39, 20) Source(6, 2) + SourceIndex(2) +4 >Emitted(39, 21) Source(6, 2) + SourceIndex(2) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -444,20 +447,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(37, 5) Source(8, 12) + SourceIndex(2) -2 >Emitted(37, 22) Source(8, 21) + SourceIndex(2) -3 >Emitted(37, 25) Source(8, 24) + SourceIndex(2) -4 >Emitted(37, 29) Source(8, 28) + SourceIndex(2) -5 >Emitted(37, 31) Source(8, 30) + SourceIndex(2) -6 >Emitted(37, 33) Source(8, 32) + SourceIndex(2) -7 >Emitted(37, 34) Source(8, 33) + SourceIndex(2) +1->Emitted(40, 5) Source(8, 12) + SourceIndex(2) +2 >Emitted(40, 22) Source(8, 21) + SourceIndex(2) +3 >Emitted(40, 25) Source(8, 24) + SourceIndex(2) +4 >Emitted(40, 29) Source(8, 28) + SourceIndex(2) +5 >Emitted(40, 31) Source(8, 30) + SourceIndex(2) +6 >Emitted(40, 33) Source(8, 32) + SourceIndex(2) +7 >Emitted(40, 34) Source(8, 33) + SourceIndex(2) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(38, 5) Source(9, 1) + SourceIndex(2) +1 >Emitted(41, 5) Source(9, 1) + SourceIndex(2) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -471,11 +474,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(39, 9) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(39, 15) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(39, 16) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(39, 33) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(39, 34) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(42, 9) Source(10, 5) + SourceIndex(2) +2 >Emitted(42, 15) Source(10, 11) + SourceIndex(2) +3 >Emitted(42, 16) Source(10, 12) + SourceIndex(2) +4 >Emitted(42, 33) Source(10, 21) + SourceIndex(2) +5 >Emitted(42, 34) Source(10, 22) + SourceIndex(2) --- >>> } 1 >^^^^ @@ -484,8 +487,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(40, 5) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(40, 6) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(43, 5) Source(11, 1) + SourceIndex(2) +2 >Emitted(43, 6) Source(11, 2) + SourceIndex(2) --- >>> exports.f1 = f1; 1->^^^^ @@ -499,10 +502,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(41, 5) Source(9, 17) + SourceIndex(2) -2 >Emitted(41, 15) Source(9, 19) + SourceIndex(2) -3 >Emitted(41, 20) Source(11, 2) + SourceIndex(2) -4 >Emitted(41, 21) Source(11, 2) + SourceIndex(2) +1->Emitted(44, 5) Source(9, 17) + SourceIndex(2) +2 >Emitted(44, 15) Source(9, 19) + SourceIndex(2) +3 >Emitted(44, 20) Source(11, 2) + SourceIndex(2) +4 >Emitted(44, 21) Source(11, 2) + SourceIndex(2) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -522,13 +525,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(42, 5) Source(13, 12) + SourceIndex(2) -2 >Emitted(42, 15) Source(13, 14) + SourceIndex(2) -3 >Emitted(42, 18) Source(13, 17) + SourceIndex(2) -4 >Emitted(42, 20) Source(13, 19) + SourceIndex(2) -5 >Emitted(42, 21) Source(13, 20) + SourceIndex(2) -6 >Emitted(42, 26) Source(13, 25) + SourceIndex(2) -7 >Emitted(42, 27) Source(13, 26) + SourceIndex(2) +1->Emitted(45, 5) Source(13, 12) + SourceIndex(2) +2 >Emitted(45, 15) Source(13, 14) + SourceIndex(2) +3 >Emitted(45, 18) Source(13, 17) + SourceIndex(2) +4 >Emitted(45, 20) Source(13, 19) + SourceIndex(2) +5 >Emitted(45, 21) Source(13, 20) + SourceIndex(2) +6 >Emitted(45, 26) Source(13, 25) + SourceIndex(2) +7 >Emitted(45, 27) Source(13, 26) + SourceIndex(2) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -546,13 +549,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(43, 5) Source(14, 12) + SourceIndex(2) -2 >Emitted(43, 15) Source(14, 14) + SourceIndex(2) -3 >Emitted(43, 18) Source(14, 17) + SourceIndex(2) -4 >Emitted(43, 20) Source(14, 19) + SourceIndex(2) -5 >Emitted(43, 21) Source(14, 20) + SourceIndex(2) -6 >Emitted(43, 26) Source(14, 25) + SourceIndex(2) -7 >Emitted(43, 27) Source(14, 26) + SourceIndex(2) +1->Emitted(46, 5) Source(14, 12) + SourceIndex(2) +2 >Emitted(46, 15) Source(14, 14) + SourceIndex(2) +3 >Emitted(46, 18) Source(14, 17) + SourceIndex(2) +4 >Emitted(46, 20) Source(14, 19) + SourceIndex(2) +5 >Emitted(46, 21) Source(14, 20) + SourceIndex(2) +6 >Emitted(46, 26) Source(14, 25) + SourceIndex(2) +7 >Emitted(46, 27) Source(14, 26) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.errors.txt index 247f9e4f2f2a1..b0d02cf812052 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.json index 2ff88c9696f0b..d6640cdb40441 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js index 1a4d200cdcb5c..b2136c5cb5ed8 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map index d2270dfd2ce62..f794e0c5d091b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.json index f9f02dcf7894e..f8a6fa3cd5947 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.sourcemap.txt index 7df7c4142e888..7d729a5661f73 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:m1.js sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js index d752d7f8395e1..e5120428e519c 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map index de9d99184d24d..9cf904bdb3643 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js index 02ca4ab81c74b..c8cf74001a865 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map index bc2e2667bcd70..546a52762dca2 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.json index f9f02dcf7894e..f8a6fa3cd5947 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.sourcemap.txt index ff16dbdb8d68e..f9261589ad04c 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: file:///tests/cases/projects/outputdir_module_simple/m1.ts emittedFile:m1.js sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: file:///tests/cases/projects/outputdir_module_simple/test.ts emittedFile:test.js sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js index 1d5a32f0ad5e2..2e158a0284fcf 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map index b9c164bb73283..2a6e8fef12877 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.json index db2995acf6956..c307775e5490c 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 4a730d962af85..a02c48506ef3b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/m1.js sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index 1a4d200cdcb5c..b2136c5cb5ed8 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index d2270dfd2ce62..f794e0c5d091b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index d752d7f8395e1..e5120428e519c 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index de9d99184d24d..9cf904bdb3643 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.json index db2995acf6956..c307775e5490c 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 67a86d9d9ae97..5109b2e31b013 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: file:///tests/cases/projects/outputdir_module_simple/m1.ts emittedFile:outdir/simple/m1.js sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: file:///tests/cases/projects/outputdir_module_simple/test.ts emittedFile:outdir/simple/test.js sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 02ca4ab81c74b..c8cf74001a865 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index bc2e2667bcd70..546a52762dca2 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index 1d5a32f0ad5e2..2e158a0284fcf 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index b9c164bb73283..2a6e8fef12877 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js index 77db9e80a53e0..b04aa2d4d46f5 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 445268f27c17b..6aaa713e8f408 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts","file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts","file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.json index 1dbc9780b9543..e96204c5faa2d 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index 36bfe394d3907..e45cacab12aea 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts ------------------------------------------------------------------- >>>define("m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.errors.txt index 12592331fb591..0dc033a09d2dc 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.json index 1dbc9780b9543..e96204c5faa2d 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.json index 2c7699ff0faed..91546861e0159 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt index d2d74c7219d48..1808b29753f6c 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js index 73309eabe3027..1819603381c8d 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map index ec8a7690d4715..b21a6141b7c69 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js index 270604ea7cbd0..9ff0c2c90ff00 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map index 35691a873b83e..527dcc9a33d0b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.json index 2c7699ff0faed..91546861e0159 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt index acf02348d67ec..340b73f57bb12 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts emittedFile:ref/m1.js sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: file:///tests/cases/projects/outputdir_module_subfolder/test.ts emittedFile:test.js sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js index 8f31dc2aaa230..b594cf79eb2d6 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map index 95de442e92d38..00d7fafd83c1c 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js index 9bb4ed0180a31..1a8413b660194 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map index fee2f4cb12936..b8f2b00795199 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.json index a61a50a760d15..80247e1b00972 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index b41fcbbc7b615..f26dc1e03bfd3 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/ref/m1.js sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index 73309eabe3027..1819603381c8d 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index ec8a7690d4715..b21a6141b7c69 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index 270604ea7cbd0..9ff0c2c90ff00 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 35691a873b83e..527dcc9a33d0b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.json index a61a50a760d15..80247e1b00972 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index a70074a2fbd23..4e4cb8a0cbbe4 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts emittedFile:outdir/simple/ref/m1.js sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: file:///tests/cases/projects/outputdir_module_subfolder/test.ts emittedFile:outdir/simple/test.js sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 8f31dc2aaa230..b594cf79eb2d6 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 95de442e92d38..00d7fafd83c1c 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 9bb4ed0180a31..1a8413b660194 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index fee2f4cb12936..b8f2b00795199 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 10c38a7441189..37aaeb4ecdacb 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 439677f8aba06..130a41cfbba9c 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.json index b33bd42f04558..10de4bede9ea0 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index 617b90f7c814e..5df60cdb06a97 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts ------------------------------------------------------------------- >>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.errors.txt index 42154149020d1..7eb84ece29d1e 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.json index b33bd42f04558..10de4bede9ea0 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/diskFile0.js.map index dd02f14d4a163..21fcb42a117c4 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.json index 5ea7aa806651d..078c565dee6c9 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.sourcemap.txt index ceda6b4c058ad..570fdc7051940 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/ref/m1.js.map index 57ced088c4146..51aa3088c8ece 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/test.js.map index 04ab805bfcb24..c5bffb7504155 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/diskFile0.js.map index dd02f14d4a163..21fcb42a117c4 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.json index 5ea7aa806651d..078c565dee6c9 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.sourcemap.txt index ceda6b4c058ad..570fdc7051940 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/ref/m1.js.map index 57ced088c4146..51aa3088c8ece 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/test.js.map index 04ab805bfcb24..c5bffb7504155 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.json index 0d16b53af662f..dfd35e2a11e4c 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt index 2bf3e6591183b..5d6bc0ed0429b 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map index 57ced088c4146..51aa3088c8ece 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map index 04ab805bfcb24..c5bffb7504155 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map index dd02f14d4a163..21fcb42a117c4 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.json index 0d16b53af662f..dfd35e2a11e4c 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt index 2bf3e6591183b..5d6bc0ed0429b 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map index 57ced088c4146..51aa3088c8ece 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map index 04ab805bfcb24..c5bffb7504155 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map index dd02f14d4a163..21fcb42a117c4 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/bin/test.js.map index aecd97d513692..fa2ace4860349 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts","file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts","file:///tests/cases/projects/outputdir_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts","file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts","file:///tests/cases/projects/outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.json index 8fb63eb43b0b4..e515573b4d86f 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt index 344b620620d79..36b0d16d1aa8b 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/bin/test.js.map index aecd97d513692..fa2ace4860349 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts","file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts","file:///tests/cases/projects/outputdir_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts","file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts","file:///tests/cases/projects/outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.errors.txt index 53a35eb2c84a0..f420dc4be3342 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ../outputdir_multifolder_ref/m2.ts (0 errors) ==== var m2_a1 = 10; class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.json index 8fb63eb43b0b4..e515573b4d86f 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt index 344b620620d79..36b0d16d1aa8b 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/m1.js.map index 0fc2c621e0a61..811549fe24b3b 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.json index 6f141f8151104..6ea29c1e036a1 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.sourcemap.txt index f13225988bd0b..9da8ea4abed3b 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/test.js.map index ede8f059f004e..d11bc79cf0334 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/m1.js.map index 0fc2c621e0a61..811549fe24b3b 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.json index 6f141f8151104..6ea29c1e036a1 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.sourcemap.txt index f13225988bd0b..9da8ea4abed3b 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/test.js.map index ede8f059f004e..d11bc79cf0334 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.json index 1f73a2a33d6cc..999d4c5c3cbe7 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt index c5c7205d89447..17c7f707a841b 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 0fc2c621e0a61..811549fe24b3b 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index ede8f059f004e..d11bc79cf0334 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.json index 1f73a2a33d6cc..999d4c5c3cbe7 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt index c5c7205d89447..17c7f707a841b 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 0fc2c621e0a61..811549fe24b3b 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index ede8f059f004e..d11bc79cf0334 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/bin/test.js.map index 29ba590802a13..141dd1ad65428 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/m1.ts","file:///tests/cases/projects/outputdir_simple/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/m1.ts","file:///tests/cases/projects/outputdir_simple/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.json index dcd18f3e946b5..85527f93f24e8 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt index 27d691b2b1090..100a3db76a50b 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/bin/test.js.map index 29ba590802a13..141dd1ad65428 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/m1.ts","file:///tests/cases/projects/outputdir_simple/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_simple/m1.ts","file:///tests/cases/projects/outputdir_simple/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.errors.txt index 53fc18f86c749..fa5c648451acb 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.json index dcd18f3e946b5..85527f93f24e8 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt index 27d691b2b1090..100a3db76a50b 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.json b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.json index 689739aedcef4..9cdafc48766e3 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.sourcemap.txt index a0eb693f75319..169448dbcc252 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/test.js.map index 420452cddcfb6..ee286c89ca6d4 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_singleFile/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_singleFile/test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.json b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.json index 689739aedcef4..9cdafc48766e3 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.sourcemap.txt index a0eb693f75319..169448dbcc252 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/test.js.map index 420452cddcfb6..ee286c89ca6d4 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_singleFile/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_singleFile/test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.json index bbd1c10f32016..7ee5dedd0de58 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt index 22edc6e923d13..92a8de1c6069b 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 420452cddcfb6..ee286c89ca6d4 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_singleFile/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_singleFile/test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.json index bbd1c10f32016..7ee5dedd0de58 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt index 22edc6e923d13..92a8de1c6069b 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map index 420452cddcfb6..ee286c89ca6d4 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_singleFile/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_singleFile/test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/bin/test.js.map index 420452cddcfb6..ee286c89ca6d4 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_singleFile/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_singleFile/test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.json index 634d80d7ff00d..d48c811492766 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt index b7c18ea6cd109..b894437e6230a 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/bin/test.js.map index 420452cddcfb6..ee286c89ca6d4 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_singleFile/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_singleFile/test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.errors.txt index eb358c3b79d38..6fdef1c0d9d45 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== test.ts (0 errors) ==== var a1 = 10; class c1 { diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.json index 634d80d7ff00d..d48c811492766 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt index b7c18ea6cd109..b894437e6230a 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.json index edd08fbfe107f..eb0a847c3cb3f 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.sourcemap.txt index 7f311cb64eeb9..aa943fface2e5 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/ref/m1.js.map index 74b0608f23623..3f248eb9a9f50 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/test.js.map index 5883b6aac3f50..4b826d6120d90 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.json index edd08fbfe107f..eb0a847c3cb3f 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.sourcemap.txt index 7f311cb64eeb9..aa943fface2e5 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/ref/m1.js.map index 74b0608f23623..3f248eb9a9f50 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/test.js.map index 5883b6aac3f50..4b826d6120d90 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.json index 0b2ea47302960..ec6fe614b436c 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt index 5f992db632392..f3b69f5c9d2ee 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 74b0608f23623..3f248eb9a9f50 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 5883b6aac3f50..4b826d6120d90 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.json index 0b2ea47302960..ec6fe614b436c 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt index 5f992db632392..f3b69f5c9d2ee 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 74b0608f23623..3f248eb9a9f50 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 5883b6aac3f50..4b826d6120d90 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/bin/test.js.map index 25ed0e8fc92f5..b9dedfdcff0e3 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.json index d4965ed4e7484..f8d936825fdcd 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt index b8a52baa41e5f..15d09ffdb8918 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/bin/test.js.map index 25ed0e8fc92f5..b9dedfdcff0e3 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_subfolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.errors.txt index 376cfa761b8a0..2a58fd1ab36f3 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.json index d4965ed4e7484..f8d936825fdcd 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt index b8a52baa41e5f..15d09ffdb8918 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json index 2f2a4280abf1c..25ba499857816 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt index d7a3195e99556..b3f1a48628d52 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js index aa404804b4587..2f22bba7566da 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map index 04f168a6289cc..830a328e14422 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/test.js.map index e425f41290b8a..ba0f9afb8202a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json index 2f2a4280abf1c..25ba499857816 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt index fe1ebdb1cc96a..682c0afa6f04e 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ref/m2.ts emittedFile:ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js index a39f0f50e5f91..e542958a41055 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map index 0ce68e169af7d..790459b963d8a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/test.js.map index e425f41290b8a..ba0f9afb8202a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json index 006720b1cc3d5..4978c9691b4aa 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 6f2bf783957ab..3a8848af7cd96 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:outdir/simple/ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index aa404804b4587..2f22bba7566da 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index 04f168a6289cc..830a328e14422 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index e425f41290b8a..ba0f9afb8202a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json index 006720b1cc3d5..4978c9691b4aa 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index eff1de8b03918..9e9c45bb2a214 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ref/m2.ts emittedFile:outdir/simple/ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index a39f0f50e5f91..e542958a41055 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 0ce68e169af7d..790459b963d8a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index e425f41290b8a..ba0f9afb8202a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js index 6fbac81a12dba..03d1c2fc75073 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 37bb9be8a9590..38ee6987e2c08 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json index 2de7a33388a7c..fce465172dd01 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt index 1a75ab0b60194..d3c8d277b998d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -317,8 +318,8 @@ sourceFile:test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/bin/test.js.map index a6626039aa21a..facd1d09335a2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json index 2de7a33388a7c..fce465172dd01 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt index d1ab16ddf2b57..726cc1f8f73ee 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -196,7 +196,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 8c16871c4a728..04fd25336f1a7 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index f3058d9f8787f..d2eeb5074b558 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 8d29a56932027..430853b944d9a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,10 +7,10 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 2a4bc95cbc247..689a2a79281c1 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -317,8 +318,8 @@ sourceFile:test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map index ba9f4ee590ccc..f3f77743f872e 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 8d29a56932027..430853b944d9a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,10 +7,10 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index da3d501acb7e7..5d18153232237 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -196,7 +196,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map index 3b00d82ab66c4..aedc29a2978e6 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js index e926e95f3c38b..3a0f016c568cf 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json index ec6313ac50c0c..ce844561c4150 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt index e8aa1436d988a..492b858eaf445 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:diskFile1.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js index e8004c87aadb5..0014eb3163c56 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map index 8c257bd111148..312d2f052cc78 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js index 01ad8f96e78ea..40f17b7a6cc64 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map index 8612cd0d1085a..2330fbc104bc3 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map index 058e405b6061e..0b0599e7f6232 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js index 721fdf3827f91..94c4edd028979 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json index ec6313ac50c0c..ce844561c4150 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt index a8f4f3bf2385b..ad8ab94e30de0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: outputdir_module_multifolder/ref/m1.ts emittedFile:ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: outputdir_module_multifolder_ref/m2.ts emittedFile:diskFile1.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: outputdir_module_multifolder/test.ts emittedFile:test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js index 7b14808a06713..e50be801bbf7b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map index e7f54a4a2e144..f53f427de904e 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js index b9191db7d5ffb..866997ceee077 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map index 4ac74c2fcdb7c..fc3dfdd8306a4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json index 9a0d0258ca4bd..a73eb85b5c4f2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 009fa65f89ca6..83f02e725b4f2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index e8004c87aadb5..0014eb3163c56 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 8c257bd111148..312d2f052cc78 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index 01ad8f96e78ea..40f17b7a6cc64 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index 8612cd0d1085a..2330fbc104bc3 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index e926e95f3c38b..3a0f016c568cf 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 3b00d82ab66c4..aedc29a2978e6 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json index 9a0d0258ca4bd..a73eb85b5c4f2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 8fbb0bd391688..db5a07b077d29 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: outputdir_module_multifolder/ref/m1.ts emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: outputdir_module_multifolder_ref/m2.ts emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: outputdir_module_multifolder/test.ts emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 7b14808a06713..e50be801bbf7b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index e7f54a4a2e144..f53f427de904e 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index b9191db7d5ffb..866997ceee077 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 4ac74c2fcdb7c..fc3dfdd8306a4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index 721fdf3827f91..94c4edd028979 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 058e405b6061e..0b0599e7f6232 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js index 0734d350e1117..621d7634ee1c9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ -define("ref/m1", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -12,7 +13,8 @@ define("ref/m1", ["require", "exports"], function (require, exports) { } exports.m1_f1 = m1_f1; }); -define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -26,7 +28,8 @@ define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], functio } exports.m2_f1 = m2_f1; }); -define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 85e465474d309..f142c1edf9bd2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json index ae51d051ff063..98804be1c15a4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index 20a9789039979..ea4aeaeecd959 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -8,7 +8,8 @@ sources: outputdir_module_multifolder/ref/m1.ts,outputdir_module_multifolder_ref emittedFile:bin/test.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- ->>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,17 +165,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>}); ->>>define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -187,24 +189,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(16, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(16, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(16, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(16, 24) Source(1, 23) + SourceIndex(1) +1 >Emitted(18, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(18, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(18, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(18, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(18, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(20, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -214,16 +216,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(19, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(19, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(21, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(20, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(22, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(22, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -237,10 +239,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(21, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(21, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(21, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -254,10 +256,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(22, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(22, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(22, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(22, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(24, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(24, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -276,20 +278,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(23, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(23, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(23, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(23, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(23, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(23, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(23, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(25, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(25, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(25, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(25, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(25, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(25, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(25, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -303,11 +305,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(25, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(25, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(25, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(25, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(25, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(27, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(27, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(27, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -316,8 +318,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(26, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(28, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -330,17 +332,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(27, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(27, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(27, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(27, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(29, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(29, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(29, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>}); ->>>define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>>define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -355,24 +358,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(30, 5) Source(3, 12) + SourceIndex(2) -2 >Emitted(30, 15) Source(3, 14) + SourceIndex(2) -3 >Emitted(30, 18) Source(3, 17) + SourceIndex(2) -4 >Emitted(30, 20) Source(3, 19) + SourceIndex(2) -5 >Emitted(30, 21) Source(3, 20) + SourceIndex(2) +1 >Emitted(33, 5) Source(3, 12) + SourceIndex(2) +2 >Emitted(33, 15) Source(3, 14) + SourceIndex(2) +3 >Emitted(33, 18) Source(3, 17) + SourceIndex(2) +4 >Emitted(33, 20) Source(3, 19) + SourceIndex(2) +5 >Emitted(33, 21) Source(3, 20) + SourceIndex(2) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(31, 5) Source(4, 1) + SourceIndex(2) +1->Emitted(34, 5) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(32, 9) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(35, 9) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^^^^^ @@ -382,16 +385,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(33, 9) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(33, 10) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(36, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(36, 10) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(34, 9) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(34, 18) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(37, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(37, 18) Source(6, 2) + SourceIndex(2) --- >>> })(); 1 >^^^^ @@ -405,10 +408,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(35, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(35, 6) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(35, 6) Source(4, 1) + SourceIndex(2) -4 >Emitted(35, 10) Source(6, 2) + SourceIndex(2) +1 >Emitted(38, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(38, 6) Source(6, 2) + SourceIndex(2) +3 >Emitted(38, 6) Source(4, 1) + SourceIndex(2) +4 >Emitted(38, 10) Source(6, 2) + SourceIndex(2) --- >>> exports.c1 = c1; 1->^^^^ @@ -422,10 +425,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(36, 5) Source(4, 14) + SourceIndex(2) -2 >Emitted(36, 15) Source(4, 16) + SourceIndex(2) -3 >Emitted(36, 20) Source(6, 2) + SourceIndex(2) -4 >Emitted(36, 21) Source(6, 2) + SourceIndex(2) +1->Emitted(39, 5) Source(4, 14) + SourceIndex(2) +2 >Emitted(39, 15) Source(4, 16) + SourceIndex(2) +3 >Emitted(39, 20) Source(6, 2) + SourceIndex(2) +4 >Emitted(39, 21) Source(6, 2) + SourceIndex(2) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -444,20 +447,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(37, 5) Source(8, 12) + SourceIndex(2) -2 >Emitted(37, 22) Source(8, 21) + SourceIndex(2) -3 >Emitted(37, 25) Source(8, 24) + SourceIndex(2) -4 >Emitted(37, 29) Source(8, 28) + SourceIndex(2) -5 >Emitted(37, 31) Source(8, 30) + SourceIndex(2) -6 >Emitted(37, 33) Source(8, 32) + SourceIndex(2) -7 >Emitted(37, 34) Source(8, 33) + SourceIndex(2) +1->Emitted(40, 5) Source(8, 12) + SourceIndex(2) +2 >Emitted(40, 22) Source(8, 21) + SourceIndex(2) +3 >Emitted(40, 25) Source(8, 24) + SourceIndex(2) +4 >Emitted(40, 29) Source(8, 28) + SourceIndex(2) +5 >Emitted(40, 31) Source(8, 30) + SourceIndex(2) +6 >Emitted(40, 33) Source(8, 32) + SourceIndex(2) +7 >Emitted(40, 34) Source(8, 33) + SourceIndex(2) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(38, 5) Source(9, 1) + SourceIndex(2) +1 >Emitted(41, 5) Source(9, 1) + SourceIndex(2) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -471,11 +474,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(39, 9) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(39, 15) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(39, 16) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(39, 33) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(39, 34) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(42, 9) Source(10, 5) + SourceIndex(2) +2 >Emitted(42, 15) Source(10, 11) + SourceIndex(2) +3 >Emitted(42, 16) Source(10, 12) + SourceIndex(2) +4 >Emitted(42, 33) Source(10, 21) + SourceIndex(2) +5 >Emitted(42, 34) Source(10, 22) + SourceIndex(2) --- >>> } 1 >^^^^ @@ -484,8 +487,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(40, 5) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(40, 6) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(43, 5) Source(11, 1) + SourceIndex(2) +2 >Emitted(43, 6) Source(11, 2) + SourceIndex(2) --- >>> exports.f1 = f1; 1->^^^^ @@ -499,10 +502,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(41, 5) Source(9, 17) + SourceIndex(2) -2 >Emitted(41, 15) Source(9, 19) + SourceIndex(2) -3 >Emitted(41, 20) Source(11, 2) + SourceIndex(2) -4 >Emitted(41, 21) Source(11, 2) + SourceIndex(2) +1->Emitted(44, 5) Source(9, 17) + SourceIndex(2) +2 >Emitted(44, 15) Source(9, 19) + SourceIndex(2) +3 >Emitted(44, 20) Source(11, 2) + SourceIndex(2) +4 >Emitted(44, 21) Source(11, 2) + SourceIndex(2) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -522,13 +525,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(42, 5) Source(13, 12) + SourceIndex(2) -2 >Emitted(42, 15) Source(13, 14) + SourceIndex(2) -3 >Emitted(42, 18) Source(13, 17) + SourceIndex(2) -4 >Emitted(42, 20) Source(13, 19) + SourceIndex(2) -5 >Emitted(42, 21) Source(13, 20) + SourceIndex(2) -6 >Emitted(42, 26) Source(13, 25) + SourceIndex(2) -7 >Emitted(42, 27) Source(13, 26) + SourceIndex(2) +1->Emitted(45, 5) Source(13, 12) + SourceIndex(2) +2 >Emitted(45, 15) Source(13, 14) + SourceIndex(2) +3 >Emitted(45, 18) Source(13, 17) + SourceIndex(2) +4 >Emitted(45, 20) Source(13, 19) + SourceIndex(2) +5 >Emitted(45, 21) Source(13, 20) + SourceIndex(2) +6 >Emitted(45, 26) Source(13, 25) + SourceIndex(2) +7 >Emitted(45, 27) Source(13, 26) + SourceIndex(2) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -546,13 +549,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(43, 5) Source(14, 12) + SourceIndex(2) -2 >Emitted(43, 15) Source(14, 14) + SourceIndex(2) -3 >Emitted(43, 18) Source(14, 17) + SourceIndex(2) -4 >Emitted(43, 20) Source(14, 19) + SourceIndex(2) -5 >Emitted(43, 21) Source(14, 20) + SourceIndex(2) -6 >Emitted(43, 26) Source(14, 25) + SourceIndex(2) -7 >Emitted(43, 27) Source(14, 26) + SourceIndex(2) +1->Emitted(46, 5) Source(14, 12) + SourceIndex(2) +2 >Emitted(46, 15) Source(14, 14) + SourceIndex(2) +3 >Emitted(46, 18) Source(14, 17) + SourceIndex(2) +4 >Emitted(46, 20) Source(14, 19) + SourceIndex(2) +5 >Emitted(46, 21) Source(14, 20) + SourceIndex(2) +6 >Emitted(46, 26) Source(14, 25) + SourceIndex(2) +7 >Emitted(46, 27) Source(14, 26) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.errors.txt index 247f9e4f2f2a1..b0d02cf812052 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json index ae51d051ff063..98804be1c15a4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js index 1a4d200cdcb5c..b2136c5cb5ed8 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map index 6751f2f82cd22..7e2923164324a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json index d901eb0a79073..7b1ffa340c57f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt index 06f3e02521d12..a7a2092c9cd30 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:m1.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js index d752d7f8395e1..e5120428e519c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map index a57b57d2b17db..67f4a8faf60ca 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js index 02ca4ab81c74b..c8cf74001a865 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map index ca45773f423fb..3bb503f2c26d5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json index d901eb0a79073..7b1ffa340c57f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt index 2843c88faf5ac..15a6a8bd07c34 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: m1.ts emittedFile:m1.js sourceFile:m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js index 1d5a32f0ad5e2..2e158a0284fcf 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map index 41d3e11e99563..132980673448b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json index 278bc2c86e5de..bf1e9882756a0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 0f31c24c53996..4c6f3cd3d1338 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/m1.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index 1a4d200cdcb5c..b2136c5cb5ed8 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 6751f2f82cd22..7e2923164324a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index d752d7f8395e1..e5120428e519c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index a57b57d2b17db..67f4a8faf60ca 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json index 278bc2c86e5de..bf1e9882756a0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 8b33b445d72bb..b593c1d166bdc 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: m1.ts emittedFile:outdir/simple/m1.js sourceFile:m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 02ca4ab81c74b..c8cf74001a865 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index ca45773f423fb..3bb503f2c26d5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index 1d5a32f0ad5e2..2e158a0284fcf 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 41d3e11e99563..132980673448b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js index 77db9e80a53e0..b04aa2d4d46f5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 2ace469f90296..c324029a742fb 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json index d8ff0027520de..7b5ccb6c071d2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index bd33dbb5ec7e0..61463651296a3 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define("m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.errors.txt index 12592331fb591..0dc033a09d2dc 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json index d8ff0027520de..7b5ccb6c071d2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json index fc4e8b7c9db59..e57d54bde3b55 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt index 89ea048e26883..fd93b49350ee0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js index 73309eabe3027..1819603381c8d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map index 6c5413f630e73..422fe41a79d21 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js index 270604ea7cbd0..9ff0c2c90ff00 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map index a57b57d2b17db..67f4a8faf60ca 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json index fc4e8b7c9db59..e57d54bde3b55 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt index bf0333f3d1263..abc32308f8801 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: ref/m1.ts emittedFile:ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js index 8f31dc2aaa230..b594cf79eb2d6 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map index 35e7e9a48dd7c..bee1ea97f8332 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js index 9bb4ed0180a31..1a8413b660194 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map index d0638b6c34ce5..f851a615aef4a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json index a20ecf2d6c97d..76e138ca5119f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index c16c32be6b264..2772b70cfbebc 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index 73309eabe3027..1819603381c8d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 6c5413f630e73..422fe41a79d21 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index 270604ea7cbd0..9ff0c2c90ff00 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index a57b57d2b17db..67f4a8faf60ca 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json index a20ecf2d6c97d..76e138ca5119f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 363cd0e29f154..beaf54a04de69 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ref/m1.ts emittedFile:outdir/simple/ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 8f31dc2aaa230..b594cf79eb2d6 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 35e7e9a48dd7c..bee1ea97f8332 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 9bb4ed0180a31..1a8413b660194 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index d0638b6c34ce5..f851a615aef4a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 10c38a7441189..37aaeb4ecdacb 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 29e01bc0bc6d2..ade8b34024d95 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json index cd7c4867bc39f..66a2c90e80f09 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index 557f15f4e2a0b..2117db2d0b06b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:ref/m1.ts ------------------------------------------------------------------- >>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.errors.txt index 42154149020d1..7eb84ece29d1e 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json index cd7c4867bc39f..66a2c90e80f09 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/diskFile0.js.map index e652c011c172f..02fe5ddcde59d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.json index ddfa8259401e4..ae04c034c8cc9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt index 8bcabc44e3ab9..ffce1098df610 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/ref/m1.js.map index 64aafef0915ff..97e0d452dba03 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/test.js.map index 859053b551029..d668056049e25 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/diskFile0.js.map index e652c011c172f..02fe5ddcde59d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.json index ddfa8259401e4..ae04c034c8cc9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt index 8bcabc44e3ab9..ffce1098df610 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/ref/m1.js.map index 64aafef0915ff..97e0d452dba03 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/test.js.map index 859053b551029..d668056049e25 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json index 6e6c3e73c0390..5bac47f1b0b8c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt index e2d9eaa8dda3c..3e7b4d1b21bb9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map index 64aafef0915ff..97e0d452dba03 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map index 859053b551029..d668056049e25 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map index e652c011c172f..02fe5ddcde59d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json index 6e6c3e73c0390..5bac47f1b0b8c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt index e2d9eaa8dda3c..3e7b4d1b21bb9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_multifolder/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map index 64aafef0915ff..97e0d452dba03 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map index 859053b551029..d668056049e25 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map index e652c011c172f..02fe5ddcde59d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/bin/test.js.map index 2e0ee57fe0504..429ef42162bf4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json index f6aa3055f76d9..b0159f72fc0e6 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt index f64fa277957ca..278bdb65bfc34 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/bin/test.js.map index 2e0ee57fe0504..429ef42162bf4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.errors.txt index 53a35eb2c84a0..f420dc4be3342 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ../outputdir_multifolder_ref/m2.ts (0 errors) ==== var m2_a1 = 10; class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json index f6aa3055f76d9..b0159f72fc0e6 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt index f64fa277957ca..278bdb65bfc34 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/m1.js.map index d920bbe078d63..43b7b9cb12626 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.json index c85db0226a2c0..601a381b6bc25 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt index a3179d120d8b6..7f41d24298398 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/test.js.map index ad9ad3d5ce04a..83557b43a867f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/m1.js.map index d920bbe078d63..43b7b9cb12626 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.json index c85db0226a2c0..601a381b6bc25 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt index a3179d120d8b6..7f41d24298398 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/test.js.map index ad9ad3d5ce04a..83557b43a867f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json index ceda4546fcebf..72d412d2e5c2d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt index 232cdca7916b9..ef44bbeae905f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index d920bbe078d63..43b7b9cb12626 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index ad9ad3d5ce04a..83557b43a867f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json index ceda4546fcebf..72d412d2e5c2d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt index 232cdca7916b9..ef44bbeae905f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index d920bbe078d63..43b7b9cb12626 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index ad9ad3d5ce04a..83557b43a867f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/bin/test.js.map index f1c6e3bd1b7a7..d876a9633b4ec 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json index 2bdff3a64beee..ad03221057b16 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt index 8d22ea01f1692..72fc256960937 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/bin/test.js.map index f1c6e3bd1b7a7..d876a9633b4ec 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.errors.txt index 53fc18f86c749..fa5c648451acb 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json index 2bdff3a64beee..ad03221057b16 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt index 8d22ea01f1692..72fc256960937 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.json index 2c66c2dc3a351..8ad3500d92659 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt index 13e178f926cdb..5abd520cdaea9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/test.js.map index a1be429da805c..9dc5e9c0cae83 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.json index 2c66c2dc3a351..8ad3500d92659 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt index 13e178f926cdb..5abd520cdaea9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/test.js.map index a1be429da805c..9dc5e9c0cae83 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json index 4d7e0f659ef1b..82d34274776f0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt index 3fe9cb43cbdd5..df39c21af9eb7 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map index a1be429da805c..9dc5e9c0cae83 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json index 4d7e0f659ef1b..82d34274776f0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt index 3fe9cb43cbdd5..df39c21af9eb7 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map index a1be429da805c..9dc5e9c0cae83 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/bin/test.js.map index a1be429da805c..9dc5e9c0cae83 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json index f68a658cc8b51..323adcd17b92e 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt index 8fff42e6b47be..a3604df7a9d99 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/bin/test.js.map index a1be429da805c..9dc5e9c0cae83 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.errors.txt index eb358c3b79d38..6fdef1c0d9d45 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== test.ts (0 errors) ==== var a1 = 10; class c1 { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json index f68a658cc8b51..323adcd17b92e 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt index 8fff42e6b47be..a3604df7a9d99 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.json index 5f6d0ccd74b8d..f3fb4f89412ef 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt index e697e24c64d4c..e909fa2b9d9ab 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/test.js.map index 014979baf0321..f43236fa96a01 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.json index 5f6d0ccd74b8d..f3fb4f89412ef 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt index e697e24c64d4c..e909fa2b9d9ab 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/test.js.map index 014979baf0321..f43236fa96a01 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json index 9dca1ba6d4b78..8d6923824ebc2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt index 50bebc38cbeb5..8d48c91668d75 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 014979baf0321..f43236fa96a01 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json index 9dca1ba6d4b78..8d6923824ebc2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt index 50bebc38cbeb5..8d48c91668d75 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 014979baf0321..f43236fa96a01 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/bin/test.js.map index e80a550275c2a..386fdffa417f3 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json index d3d7588f1caa6..0bdb289d92d02 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt index b885327d18679..a3eb3d49a399f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/bin/test.js.map index e80a550275c2a..386fdffa417f3 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.errors.txt index 376cfa761b8a0..2a58fd1ab36f3 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json index d3d7588f1caa6..0bdb289d92d02 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "mapRoot": "http://www.typescriptlang.org/", - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "mapRoot": "http://www.typescriptlang.org/", + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt index b885327d18679..a3eb3d49a399f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.d.ts b/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.js b/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/noProjectOptionAndInputFiles.json b/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/noProjectOptionAndInputFiles.json new file mode 100644 index 0000000000000..32b8c5a28f727 --- /dev/null +++ b/tests/baselines/reference/project/noProjectOptionAndInputFiles/amd/noProjectOptionAndInputFiles.json @@ -0,0 +1,14 @@ +{ + "scenario": "Verify project option", + "projectRoot": "tests/cases/projects/projectOption/Test", + "baselineCheck": true, + "declaration": true, + "resolvedInputFiles": [ + "lib.d.ts", + "a.ts" + ], + "emittedFiles": [ + "a.js", + "a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.d.ts b/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.js b/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/noProjectOptionAndInputFiles.json b/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/noProjectOptionAndInputFiles.json new file mode 100644 index 0000000000000..32b8c5a28f727 --- /dev/null +++ b/tests/baselines/reference/project/noProjectOptionAndInputFiles/node/noProjectOptionAndInputFiles.json @@ -0,0 +1,14 @@ +{ + "scenario": "Verify project option", + "projectRoot": "tests/cases/projects/projectOption/Test", + "baselineCheck": true, + "declaration": true, + "resolvedInputFiles": [ + "lib.d.ts", + "a.ts" + ], + "emittedFiles": [ + "a.js", + "a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/nonRelative/amd/consume.js b/tests/baselines/reference/project/nonRelative/amd/consume.js index c10bad1802df2..08e0b38c7dfe9 100644 --- a/tests/baselines/reference/project/nonRelative/amd/consume.js +++ b/tests/baselines/reference/project/nonRelative/amd/consume.js @@ -1,4 +1,5 @@ define(["require", "exports", "decl", "lib/foo/a", "lib/bar/a"], function (require, exports, mod, x, y) { + "use strict"; x.hello(); y.hello(); var str = mod.call(); diff --git a/tests/baselines/reference/project/nonRelative/amd/decl.js b/tests/baselines/reference/project/nonRelative/amd/decl.js index 03d7ba46e190f..f2dbc101a5221 100644 --- a/tests/baselines/reference/project/nonRelative/amd/decl.js +++ b/tests/baselines/reference/project/nonRelative/amd/decl.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; function call() { return "success"; } diff --git a/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js b/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js index 6ffe8c5344558..a8619f8826017 100644 --- a/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js +++ b/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; function hello() { } exports.hello = hello; }); diff --git a/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js b/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js index 6ffe8c5344558..a8619f8826017 100644 --- a/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js +++ b/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; function hello() { } exports.hello = hello; }); diff --git a/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js b/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js index 6ffe8c5344558..a8619f8826017 100644 --- a/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js +++ b/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; function hello() { } exports.hello = hello; }); diff --git a/tests/baselines/reference/project/nonRelative/node/consume.js b/tests/baselines/reference/project/nonRelative/node/consume.js index 7d1bc0ecace5d..35d658abb62d2 100644 --- a/tests/baselines/reference/project/nonRelative/node/consume.js +++ b/tests/baselines/reference/project/nonRelative/node/consume.js @@ -1,3 +1,4 @@ +"use strict"; var mod = require("decl"); var x = require("lib/foo/a"); var y = require("lib/bar/a"); diff --git a/tests/baselines/reference/project/nonRelative/node/decl.js b/tests/baselines/reference/project/nonRelative/node/decl.js index a8dc375b1c703..e2d4b03d1c1e1 100644 --- a/tests/baselines/reference/project/nonRelative/node/decl.js +++ b/tests/baselines/reference/project/nonRelative/node/decl.js @@ -1,3 +1,4 @@ +"use strict"; function call() { return "success"; } diff --git a/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js b/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js index 58114de3a4d49..182e381bcdec8 100644 --- a/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js +++ b/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js @@ -1,2 +1,3 @@ +"use strict"; function hello() { } exports.hello = hello; diff --git a/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js b/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js index 58114de3a4d49..182e381bcdec8 100644 --- a/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js +++ b/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js @@ -1,2 +1,3 @@ +"use strict"; function hello() { } exports.hello = hello; diff --git a/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js b/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js index 58114de3a4d49..182e381bcdec8 100644 --- a/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js +++ b/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js @@ -1,2 +1,3 @@ +"use strict"; function hello() { } exports.hello = hello; diff --git a/tests/baselines/reference/project/outMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/outMixedSubfolderNoOutdir/amd/ref/m2.js index 2c61fd1d935db..67db806ee95c9 100644 --- a/tests/baselines/reference/project/outMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/outMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/outMixedSubfolderNoOutdir/node/ref/m2.js index b7c7f5d81398a..818f4c9dd06a5 100644 --- a/tests/baselines/reference/project/outMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/outMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 2c61fd1d935db..67db806ee95c9 100644 --- a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index b7c7f5d81398a..818f4c9dd06a5 100644 --- a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFile/amd/bin/test.js index 40bdaa24fc9b9..c7642c55d72ef 100644 --- a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFile/node/outMixedSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFile/node/outMixedSubfolderSpecifyOutputFile.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFile/node/outMixedSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFile/node/outMixedSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 40bdaa24fc9b9..c7642c55d72ef 100644 --- a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt +++ b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/diskFile0.js b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/diskFile0.js index 2c61fd1d935db..67db806ee95c9 100644 --- a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/diskFile0.js +++ b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/diskFile0.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/ref/m1.js index c2a6326846e86..469ba2c199fb0 100644 --- a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/test.js index f83ccabfd350e..02ee3e86a3a70 100644 --- a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/diskFile0.js b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/diskFile0.js index b7c7f5d81398a..818f4c9dd06a5 100644 --- a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/diskFile0.js +++ b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/diskFile0.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/ref/m1.js index 37f4ec486b23c..01ed51fe662f1 100644 --- a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/test.js index d1c1b22a85b26..f06fba8195527 100644 --- a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index c2a6326846e86..469ba2c199fb0 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index f83ccabfd350e..02ee3e86a3a70 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index 2c61fd1d935db..67db806ee95c9 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 37f4ec486b23c..01ed51fe662f1 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index d1c1b22a85b26..f06fba8195527 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index b7c7f5d81398a..818f4c9dd06a5 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.js index 0814424ca390d..132e408c64893 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ -define("ref/m1", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -12,7 +13,8 @@ define("ref/m1", ["require", "exports"], function (require, exports) { } exports.m1_f1 = m1_f1; }); -define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -26,7 +28,8 @@ define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], functio } exports.m2_f1 = m2_f1; }); -define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/outModuleMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/outModuleMultifolderSpecifyOutputFile.errors.txt index 247f9e4f2f2a1..b0d02cf812052 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/outModuleMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/node/outModuleMultifolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/m1.js index c2a6326846e86..469ba2c199fb0 100644 --- a/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/test.js index b6c62f75f3c22..bc5eaec25e0ab 100644 --- a/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/m1.js index 37f4ec486b23c..01ed51fe662f1 100644 --- a/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/test.js index d016c5ff00a9f..147125b61c102 100644 --- a/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index c2a6326846e86..469ba2c199fb0 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index b6c62f75f3c22..bc5eaec25e0ab 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 37f4ec486b23c..01ed51fe662f1 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index d016c5ff00a9f..147125b61c102 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.js index d07eebbd7260c..30a7145ab87e6 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/outModuleSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/outModuleSimpleSpecifyOutputFile.errors.txt index 12592331fb591..0dc033a09d2dc 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/outModuleSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/node/outModuleSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/ref/m1.js index c2a6326846e86..469ba2c199fb0 100644 --- a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/test.js index ef183a5773cfc..fca6f6bc91346 100644 --- a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/ref/m1.js index 37f4ec486b23c..01ed51fe662f1 100644 --- a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/test.js index 548a35e714c17..e4389a9467b9e 100644 --- a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index c2a6326846e86..469ba2c199fb0 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index ef183a5773cfc..fca6f6bc91346 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 37f4ec486b23c..01ed51fe662f1 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 548a35e714c17..e4389a9467b9e 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.js index a1bb15d7b355e..78afb5215e363 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/outModuleSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/outModuleSubfolderSpecifyOutputFile.errors.txt index 42154149020d1..7eb84ece29d1e 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/outModuleSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/node/outModuleSubfolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/outMultifolderSpecifyOutputFile/node/outMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/outMultifolderSpecifyOutputFile/node/outMultifolderSpecifyOutputFile.errors.txt index 53a35eb2c84a0..f420dc4be3342 100644 --- a/tests/baselines/reference/project/outMultifolderSpecifyOutputFile/node/outMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/outMultifolderSpecifyOutputFile/node/outMultifolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ../outputdir_multifolder_ref/m2.ts (0 errors) ==== var m2_a1 = 10; class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/outSimpleSpecifyOutputFile/node/outSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/outSimpleSpecifyOutputFile/node/outSimpleSpecifyOutputFile.errors.txt index 53fc18f86c749..fa5c648451acb 100644 --- a/tests/baselines/reference/project/outSimpleSpecifyOutputFile/node/outSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/outSimpleSpecifyOutputFile/node/outSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { diff --git a/tests/baselines/reference/project/outSingleFileSpecifyOutputFile/node/outSingleFileSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/outSingleFileSpecifyOutputFile/node/outSingleFileSpecifyOutputFile.errors.txt index eb358c3b79d38..6fdef1c0d9d45 100644 --- a/tests/baselines/reference/project/outSingleFileSpecifyOutputFile/node/outSingleFileSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/outSingleFileSpecifyOutputFile/node/outSingleFileSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== test.ts (0 errors) ==== var a1 = 10; class c1 { diff --git a/tests/baselines/reference/project/outSubfolderSpecifyOutputFile/node/outSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/outSubfolderSpecifyOutputFile/node/outSubfolderSpecifyOutputFile.errors.txt index 376cfa761b8a0..2a58fd1ab36f3 100644 --- a/tests/baselines/reference/project/outSubfolderSpecifyOutputFile/node/outSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/outSubfolderSpecifyOutputFile/node/outSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; diff --git a/tests/baselines/reference/project/projectOptionTest/amd/Test/a.d.ts b/tests/baselines/reference/project/projectOptionTest/amd/Test/a.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/projectOptionTest/amd/Test/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/projectOptionTest/amd/Test/a.js b/tests/baselines/reference/project/projectOptionTest/amd/Test/a.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/projectOptionTest/amd/Test/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/projectOptionTest/amd/projectOptionTest.json b/tests/baselines/reference/project/projectOptionTest/amd/projectOptionTest.json new file mode 100644 index 0000000000000..e2be92cb38a3a --- /dev/null +++ b/tests/baselines/reference/project/projectOptionTest/amd/projectOptionTest.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify project option", + "projectRoot": "tests/cases/projects/projectOption", + "baselineCheck": true, + "declaration": true, + "project": "Test", + "resolvedInputFiles": [ + "lib.d.ts", + "Test/a.ts" + ], + "emittedFiles": [ + "Test/a.js", + "Test/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/projectOptionTest/node/Test/a.d.ts b/tests/baselines/reference/project/projectOptionTest/node/Test/a.d.ts new file mode 100644 index 0000000000000..4c0b8989316ef --- /dev/null +++ b/tests/baselines/reference/project/projectOptionTest/node/Test/a.d.ts @@ -0,0 +1 @@ +declare var test: number; diff --git a/tests/baselines/reference/project/projectOptionTest/node/Test/a.js b/tests/baselines/reference/project/projectOptionTest/node/Test/a.js new file mode 100644 index 0000000000000..e757934f20cc5 --- /dev/null +++ b/tests/baselines/reference/project/projectOptionTest/node/Test/a.js @@ -0,0 +1 @@ +var test = 10; diff --git a/tests/baselines/reference/project/projectOptionTest/node/projectOptionTest.json b/tests/baselines/reference/project/projectOptionTest/node/projectOptionTest.json new file mode 100644 index 0000000000000..e2be92cb38a3a --- /dev/null +++ b/tests/baselines/reference/project/projectOptionTest/node/projectOptionTest.json @@ -0,0 +1,15 @@ +{ + "scenario": "Verify project option", + "projectRoot": "tests/cases/projects/projectOption", + "baselineCheck": true, + "declaration": true, + "project": "Test", + "resolvedInputFiles": [ + "lib.d.ts", + "Test/a.ts" + ], + "emittedFiles": [ + "Test/a.js", + "Test/a.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/prologueEmit/node/prologueEmit.errors.txt b/tests/baselines/reference/project/prologueEmit/node/prologueEmit.errors.txt index ef77af7372ee7..8ce21315a955f 100644 --- a/tests/baselines/reference/project/prologueEmit/node/prologueEmit.errors.txt +++ b/tests/baselines/reference/project/prologueEmit/node/prologueEmit.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== globalThisCapture.ts (0 errors) ==== // Add a lambda to ensure global 'this' capture is triggered (()=>this.window); diff --git a/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/amd/referenceResolutionRelativePathsNoResolve.json b/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/amd/referenceResolutionRelativePathsNoResolve.json index 16831b328e9c7..bb8d7b368595b 100644 --- a/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/amd/referenceResolutionRelativePathsNoResolve.json +++ b/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/amd/referenceResolutionRelativePathsNoResolve.json @@ -5,6 +5,7 @@ "foo.ts", "../../../bar/bar.ts" ], + "noResolve": true, "declaration": true, "baselineCheck": true, "resolvedInputFiles": [ diff --git a/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/node/referenceResolutionRelativePathsNoResolve.json b/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/node/referenceResolutionRelativePathsNoResolve.json index 16831b328e9c7..bb8d7b368595b 100644 --- a/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/node/referenceResolutionRelativePathsNoResolve.json +++ b/tests/baselines/reference/project/referenceResolutionRelativePathsNoResolve/node/referenceResolutionRelativePathsNoResolve.json @@ -5,6 +5,7 @@ "foo.ts", "../../../bar/bar.ts" ], + "noResolve": true, "declaration": true, "baselineCheck": true, "resolvedInputFiles": [ diff --git a/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/referenceResolutionSameFileTwiceNoResolve.json b/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/referenceResolutionSameFileTwiceNoResolve.json index b22aefac3ef5c..482cfcd40b4e5 100644 --- a/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/referenceResolutionSameFileTwiceNoResolve.json +++ b/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/referenceResolutionSameFileTwiceNoResolve.json @@ -5,6 +5,7 @@ "test.ts", "../ReferenceResolution/test.ts" ], + "noResolve": true, "declaration": true, "baselineCheck": true, "resolvedInputFiles": [ diff --git a/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/referenceResolutionSameFileTwiceNoResolve.json b/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/referenceResolutionSameFileTwiceNoResolve.json index b22aefac3ef5c..482cfcd40b4e5 100644 --- a/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/referenceResolutionSameFileTwiceNoResolve.json +++ b/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/referenceResolutionSameFileTwiceNoResolve.json @@ -5,6 +5,7 @@ "test.ts", "../ReferenceResolution/test.ts" ], + "noResolve": true, "declaration": true, "baselineCheck": true, "resolvedInputFiles": [ diff --git a/tests/baselines/reference/project/rootDirectory/amd/outdir/simple/FolderB/FolderC/fileC.js.map b/tests/baselines/reference/project/rootDirectory/amd/outdir/simple/FolderB/FolderC/fileC.js.map index de54805ee5425..d67fd5861cff8 100644 --- a/tests/baselines/reference/project/rootDirectory/amd/outdir/simple/FolderB/FolderC/fileC.js.map +++ b/tests/baselines/reference/project/rootDirectory/amd/outdir/simple/FolderB/FolderC/fileC.js.map @@ -1 +1 @@ -{"version":3,"file":"fileC.js","sourceRoot":"","sources":["../../../../FolderA/FolderB/FolderC/fileC.ts"],"names":["C","C.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"} \ No newline at end of file +{"version":3,"file":"fileC.js","sourceRoot":"","sources":["../../../../FolderA/FolderB/FolderC/fileC.ts"],"names":[],"mappings":"AAAA;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/rootDirectory/amd/outdir/simple/FolderB/fileB.js.map b/tests/baselines/reference/project/rootDirectory/amd/outdir/simple/FolderB/fileB.js.map index 79496de73d952..161ad8891f6b9 100644 --- a/tests/baselines/reference/project/rootDirectory/amd/outdir/simple/FolderB/fileB.js.map +++ b/tests/baselines/reference/project/rootDirectory/amd/outdir/simple/FolderB/fileB.js.map @@ -1 +1 @@ -{"version":3,"file":"fileB.js","sourceRoot":"","sources":["../../../FolderA/FolderB/fileB.ts"],"names":["B","B.constructor"],"mappings":"AAAA,wCAAwC;AACxC;IAAAA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC"} \ No newline at end of file +{"version":3,"file":"fileB.js","sourceRoot":"","sources":["../../../FolderA/FolderB/fileB.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC;IAAA;IAEA,CAAC;IAAD,QAAC;AAAD,CAAC,AAFD,IAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/rootDirectory/amd/rootDirectory.json b/tests/baselines/reference/project/rootDirectory/amd/rootDirectory.json index 2ec18b3ac5acf..bb79b1a7911e5 100644 --- a/tests/baselines/reference/project/rootDirectory/amd/rootDirectory.json +++ b/tests/baselines/reference/project/rootDirectory/amd/rootDirectory.json @@ -5,10 +5,10 @@ "FolderA/FolderB/fileB.ts" ], "outDir": "outdir/simple", + "rootDir": "FolderA", "sourceMap": true, "declaration": true, "baselineCheck": true, - "rootDir": "FolderA", "resolvedInputFiles": [ "lib.d.ts", "FolderA/FolderB/FolderC/fileC.ts", diff --git a/tests/baselines/reference/project/rootDirectory/amd/rootDirectory.sourcemap.txt b/tests/baselines/reference/project/rootDirectory/amd/rootDirectory.sourcemap.txt index 0833854ab17d3..4ef619780a6a9 100644 --- a/tests/baselines/reference/project/rootDirectory/amd/rootDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/rootDirectory/amd/rootDirectory.sourcemap.txt @@ -18,7 +18,7 @@ sourceFile:../../../../FolderA/FolderB/FolderC/fileC.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C) +1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -27,16 +27,16 @@ sourceFile:../../../../FolderA/FolderB/FolderC/fileC.ts 1->class C { > 2 > } -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (C.constructor) -2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (C.constructor) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) --- >>> return C; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (C) -2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (C) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -49,8 +49,8 @@ sourceFile:../../../../FolderA/FolderB/FolderC/fileC.ts 3 > 4 > class C { > } -1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (C) -2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (C) +1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) 3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0) 4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0) --- @@ -83,7 +83,7 @@ sourceFile:../../../FolderA/FolderB/fileB.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (B) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -93,16 +93,16 @@ sourceFile:../../../FolderA/FolderB/fileB.ts > public c: C; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (B.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (B.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return B; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (B) -2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) name (B) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -116,8 +116,8 @@ sourceFile:../../../FolderA/FolderB/fileB.ts 4 > class B { > public c: C; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (B) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (B) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/project/rootDirectory/node/outdir/simple/FolderB/FolderC/fileC.js.map b/tests/baselines/reference/project/rootDirectory/node/outdir/simple/FolderB/FolderC/fileC.js.map index de54805ee5425..d67fd5861cff8 100644 --- a/tests/baselines/reference/project/rootDirectory/node/outdir/simple/FolderB/FolderC/fileC.js.map +++ b/tests/baselines/reference/project/rootDirectory/node/outdir/simple/FolderB/FolderC/fileC.js.map @@ -1 +1 @@ -{"version":3,"file":"fileC.js","sourceRoot":"","sources":["../../../../FolderA/FolderB/FolderC/fileC.ts"],"names":["C","C.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"} \ No newline at end of file +{"version":3,"file":"fileC.js","sourceRoot":"","sources":["../../../../FolderA/FolderB/FolderC/fileC.ts"],"names":[],"mappings":"AAAA;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/rootDirectory/node/outdir/simple/FolderB/fileB.js.map b/tests/baselines/reference/project/rootDirectory/node/outdir/simple/FolderB/fileB.js.map index 79496de73d952..161ad8891f6b9 100644 --- a/tests/baselines/reference/project/rootDirectory/node/outdir/simple/FolderB/fileB.js.map +++ b/tests/baselines/reference/project/rootDirectory/node/outdir/simple/FolderB/fileB.js.map @@ -1 +1 @@ -{"version":3,"file":"fileB.js","sourceRoot":"","sources":["../../../FolderA/FolderB/fileB.ts"],"names":["B","B.constructor"],"mappings":"AAAA,wCAAwC;AACxC;IAAAA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC"} \ No newline at end of file +{"version":3,"file":"fileB.js","sourceRoot":"","sources":["../../../FolderA/FolderB/fileB.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC;IAAA;IAEA,CAAC;IAAD,QAAC;AAAD,CAAC,AAFD,IAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/rootDirectory/node/rootDirectory.json b/tests/baselines/reference/project/rootDirectory/node/rootDirectory.json index 2ec18b3ac5acf..bb79b1a7911e5 100644 --- a/tests/baselines/reference/project/rootDirectory/node/rootDirectory.json +++ b/tests/baselines/reference/project/rootDirectory/node/rootDirectory.json @@ -5,10 +5,10 @@ "FolderA/FolderB/fileB.ts" ], "outDir": "outdir/simple", + "rootDir": "FolderA", "sourceMap": true, "declaration": true, "baselineCheck": true, - "rootDir": "FolderA", "resolvedInputFiles": [ "lib.d.ts", "FolderA/FolderB/FolderC/fileC.ts", diff --git a/tests/baselines/reference/project/rootDirectory/node/rootDirectory.sourcemap.txt b/tests/baselines/reference/project/rootDirectory/node/rootDirectory.sourcemap.txt index 0833854ab17d3..4ef619780a6a9 100644 --- a/tests/baselines/reference/project/rootDirectory/node/rootDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/rootDirectory/node/rootDirectory.sourcemap.txt @@ -18,7 +18,7 @@ sourceFile:../../../../FolderA/FolderB/FolderC/fileC.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C) +1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -27,16 +27,16 @@ sourceFile:../../../../FolderA/FolderB/FolderC/fileC.ts 1->class C { > 2 > } -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (C.constructor) -2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (C.constructor) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) --- >>> return C; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (C) -2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (C) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -49,8 +49,8 @@ sourceFile:../../../../FolderA/FolderB/FolderC/fileC.ts 3 > 4 > class C { > } -1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (C) -2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (C) +1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) 3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0) 4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0) --- @@ -83,7 +83,7 @@ sourceFile:../../../FolderA/FolderB/fileB.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (B) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -93,16 +93,16 @@ sourceFile:../../../FolderA/FolderB/fileB.ts > public c: C; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (B.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (B.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return B; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (B) -2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) name (B) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -116,8 +116,8 @@ sourceFile:../../../FolderA/FolderB/fileB.ts 4 > class B { > public c: C; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (B) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (B) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.errors.txt b/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.errors.txt index cde83785831bc..dfbdd67968588 100644 --- a/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.errors.txt +++ b/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.errors.txt @@ -2,11 +2,11 @@ error TS6059: File 'FolderA/FolderB/fileB.ts' is not under 'rootDir' 'FolderA/Fo !!! error TS6059: File 'fileB.ts' is not under 'rootDir' 'FolderA/FolderB/FolderC'. 'rootDir' is expected to contain all source files. -==== fileC.ts (0 errors) ==== +==== FolderA/FolderB/FolderC/fileC.ts (0 errors) ==== class C { } -==== fileB.ts (0 errors) ==== +==== FolderA/FolderB/fileB.ts (0 errors) ==== /// class B { public c: C; diff --git a/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json b/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json index fdde42592ca8d..42f348a4b56d6 100644 --- a/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json +++ b/tests/baselines/reference/project/rootDirectoryErrors/amd/rootDirectoryErrors.json @@ -5,9 +5,9 @@ "FolderA/FolderB/fileB.ts" ], "outDir": "outdir/simple", + "rootDir": "FolderA/FolderB/FolderC", "declaration": true, "baselineCheck": true, - "rootDir": "FolderA/FolderB/FolderC", "resolvedInputFiles": [ "lib.d.ts", "FolderA/FolderB/FolderC/fileC.ts", diff --git a/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.errors.txt b/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.errors.txt index cde83785831bc..dfbdd67968588 100644 --- a/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.errors.txt +++ b/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.errors.txt @@ -2,11 +2,11 @@ error TS6059: File 'FolderA/FolderB/fileB.ts' is not under 'rootDir' 'FolderA/Fo !!! error TS6059: File 'fileB.ts' is not under 'rootDir' 'FolderA/FolderB/FolderC'. 'rootDir' is expected to contain all source files. -==== fileC.ts (0 errors) ==== +==== FolderA/FolderB/FolderC/fileC.ts (0 errors) ==== class C { } -==== fileB.ts (0 errors) ==== +==== FolderA/FolderB/fileB.ts (0 errors) ==== /// class B { public c: C; diff --git a/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json b/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json index fdde42592ca8d..42f348a4b56d6 100644 --- a/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json +++ b/tests/baselines/reference/project/rootDirectoryErrors/node/rootDirectoryErrors.json @@ -5,9 +5,9 @@ "FolderA/FolderB/fileB.ts" ], "outDir": "outdir/simple", + "rootDir": "FolderA/FolderB/FolderC", "declaration": true, "baselineCheck": true, - "rootDir": "FolderA/FolderB/FolderC", "resolvedInputFiles": [ "lib.d.ts", "FolderA/FolderB/FolderC/fileC.ts", diff --git a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/outdir/simple/FolderB/FolderC/fileC.js.map b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/outdir/simple/FolderB/FolderC/fileC.js.map index 9a35f3fbc3ecc..45953aa1384d9 100644 --- a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/outdir/simple/FolderB/FolderC/fileC.js.map +++ b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/outdir/simple/FolderB/FolderC/fileC.js.map @@ -1 +1 @@ -{"version":3,"file":"fileC.js","sourceRoot":"SourceRootPath/","sources":["FolderB/FolderC/fileC.ts"],"names":["C","C.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"} \ No newline at end of file +{"version":3,"file":"fileC.js","sourceRoot":"SourceRootPath/","sources":["FolderB/FolderC/fileC.ts"],"names":[],"mappings":"AAAA;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/outdir/simple/FolderB/fileB.js.map b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/outdir/simple/FolderB/fileB.js.map index 41ef956764844..bf8cdf049728e 100644 --- a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/outdir/simple/FolderB/fileB.js.map +++ b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/outdir/simple/FolderB/fileB.js.map @@ -1 +1 @@ -{"version":3,"file":"fileB.js","sourceRoot":"SourceRootPath/","sources":["FolderB/fileB.ts"],"names":["B","B.constructor"],"mappings":"AAAA,wCAAwC;AACxC;IAAAA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC"} \ No newline at end of file +{"version":3,"file":"fileB.js","sourceRoot":"SourceRootPath/","sources":["FolderB/fileB.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC;IAAA;IAEA,CAAC;IAAD,QAAC;AAAD,CAAC,AAFD,IAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/rootDirectoryWithSourceRoot.json b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/rootDirectoryWithSourceRoot.json index deb12150736aa..57e51ed359a2d 100644 --- a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/rootDirectoryWithSourceRoot.json +++ b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/rootDirectoryWithSourceRoot.json @@ -5,10 +5,10 @@ "FolderA/FolderB/fileB.ts" ], "outDir": "outdir/simple", + "rootDir": "FolderA", "sourceMap": true, "sourceRoot": "SourceRootPath", "baselineCheck": true, - "rootDir": "FolderA", "resolvedInputFiles": [ "lib.d.ts", "FolderA/FolderB/FolderC/fileC.ts", diff --git a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/rootDirectoryWithSourceRoot.sourcemap.txt b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/rootDirectoryWithSourceRoot.sourcemap.txt index c0f24c52650a4..f7312546b9c1a 100644 --- a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/rootDirectoryWithSourceRoot.sourcemap.txt +++ b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/amd/rootDirectoryWithSourceRoot.sourcemap.txt @@ -18,7 +18,7 @@ sourceFile:FolderB/FolderC/fileC.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C) +1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -27,16 +27,16 @@ sourceFile:FolderB/FolderC/fileC.ts 1->class C { > 2 > } -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (C.constructor) -2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (C.constructor) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) --- >>> return C; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (C) -2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (C) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -49,8 +49,8 @@ sourceFile:FolderB/FolderC/fileC.ts 3 > 4 > class C { > } -1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (C) -2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (C) +1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) 3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0) 4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0) --- @@ -83,7 +83,7 @@ sourceFile:FolderB/fileB.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (B) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -93,16 +93,16 @@ sourceFile:FolderB/fileB.ts > public c: C; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (B.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (B.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return B; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (B) -2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) name (B) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -116,8 +116,8 @@ sourceFile:FolderB/fileB.ts 4 > class B { > public c: C; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (B) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (B) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/outdir/simple/FolderB/FolderC/fileC.js.map b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/outdir/simple/FolderB/FolderC/fileC.js.map index 9a35f3fbc3ecc..45953aa1384d9 100644 --- a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/outdir/simple/FolderB/FolderC/fileC.js.map +++ b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/outdir/simple/FolderB/FolderC/fileC.js.map @@ -1 +1 @@ -{"version":3,"file":"fileC.js","sourceRoot":"SourceRootPath/","sources":["FolderB/FolderC/fileC.ts"],"names":["C","C.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"} \ No newline at end of file +{"version":3,"file":"fileC.js","sourceRoot":"SourceRootPath/","sources":["FolderB/FolderC/fileC.ts"],"names":[],"mappings":"AAAA;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/outdir/simple/FolderB/fileB.js.map b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/outdir/simple/FolderB/fileB.js.map index 41ef956764844..bf8cdf049728e 100644 --- a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/outdir/simple/FolderB/fileB.js.map +++ b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/outdir/simple/FolderB/fileB.js.map @@ -1 +1 @@ -{"version":3,"file":"fileB.js","sourceRoot":"SourceRootPath/","sources":["FolderB/fileB.ts"],"names":["B","B.constructor"],"mappings":"AAAA,wCAAwC;AACxC;IAAAA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC"} \ No newline at end of file +{"version":3,"file":"fileB.js","sourceRoot":"SourceRootPath/","sources":["FolderB/fileB.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC;IAAA;IAEA,CAAC;IAAD,QAAC;AAAD,CAAC,AAFD,IAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/rootDirectoryWithSourceRoot.json b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/rootDirectoryWithSourceRoot.json index deb12150736aa..57e51ed359a2d 100644 --- a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/rootDirectoryWithSourceRoot.json +++ b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/rootDirectoryWithSourceRoot.json @@ -5,10 +5,10 @@ "FolderA/FolderB/fileB.ts" ], "outDir": "outdir/simple", + "rootDir": "FolderA", "sourceMap": true, "sourceRoot": "SourceRootPath", "baselineCheck": true, - "rootDir": "FolderA", "resolvedInputFiles": [ "lib.d.ts", "FolderA/FolderB/FolderC/fileC.ts", diff --git a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/rootDirectoryWithSourceRoot.sourcemap.txt b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/rootDirectoryWithSourceRoot.sourcemap.txt index c0f24c52650a4..f7312546b9c1a 100644 --- a/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/rootDirectoryWithSourceRoot.sourcemap.txt +++ b/tests/baselines/reference/project/rootDirectoryWithSourceRoot/node/rootDirectoryWithSourceRoot.sourcemap.txt @@ -18,7 +18,7 @@ sourceFile:FolderB/FolderC/fileC.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C) +1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -27,16 +27,16 @@ sourceFile:FolderB/FolderC/fileC.ts 1->class C { > 2 > } -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (C.constructor) -2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (C.constructor) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) --- >>> return C; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (C) -2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (C) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -49,8 +49,8 @@ sourceFile:FolderB/FolderC/fileC.ts 3 > 4 > class C { > } -1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (C) -2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (C) +1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) 3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0) 4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0) --- @@ -83,7 +83,7 @@ sourceFile:FolderB/fileB.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (B) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -93,16 +93,16 @@ sourceFile:FolderB/fileB.ts > public c: C; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (B.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (B.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return B; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (B) -2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) name (B) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -116,8 +116,8 @@ sourceFile:FolderB/fileB.ts 4 > class B { > public c: C; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (B) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (B) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m1.js.map index ec4f3128e18f9..f0aa7384842b8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map index 381b239c573ab..a62495f753a3d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.json index 43059eaa5c6bc..734abfe9f95a3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt index 7e234d178b806..2e9af21f9334a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/test.js.map index b5e6eec3623b3..d795c3d1f0dca 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m1.js.map index ec4f3128e18f9..f0aa7384842b8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map index 2963737a5a064..1dea57986d9a7 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.json index 43059eaa5c6bc..734abfe9f95a3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt index f0b41e615ae1f..a0197125a2136 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ref/m2.ts emittedFile:ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/test.js.map index b5e6eec3623b3..d795c3d1f0dca 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index ec4f3128e18f9..f0aa7384842b8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index 381b239c573ab..a62495f753a3d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index b5e6eec3623b3..d795c3d1f0dca 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json index 6d9cf2998a884..560eef6c4905a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 999019984d6cf..3e718952d1335 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:outdir/simple/ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index ec4f3128e18f9..f0aa7384842b8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 2963737a5a064..1dea57986d9a7 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index b5e6eec3623b3..d795c3d1f0dca 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json index 6d9cf2998a884..560eef6c4905a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 9ed3d1262fa7b..c904a43bde796 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ref/m2.ts emittedFile:outdir/simple/ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js index 13e9de8f87f84..a480aa83e80bf 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 3aa34b0f8331c..5ff4ba61874df 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json index 1772111176c41..b128c28b5b198 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index 7ede7f02c360f..fdc46e9a0546d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -317,8 +318,8 @@ sourceFile:test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map index cf4a14ae9e93c..11f204cc24202 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json index 1772111176c41..b128c28b5b198 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index 7330eac1399a9..841774dd5d8e8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -196,7 +196,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 81bb710c58080..1ebe03468c72e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 454bdf3acb0de..98d50582c819c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 8d7c349b4815f..32ec789f729f8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,10 +7,10 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index b686585c9775a..f906a7ec6b488 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -317,8 +318,8 @@ sourceFile:test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map index f7d00d1aff9e8..a4bacca9ebe3c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 8d7c349b4815f..32ec789f729f8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,10 +7,10 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_mixed_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 71a33c0180608..4cd16335c50f5 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -196,7 +196,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index c4c57a82e126f..8bf3ef495616b 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map index 71e1da5d3ccf8..0fc51f5e3410f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.json index 9e98d46666fa0..2475d02eb4796 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt index 11b024ba13440..dbd142633aa89 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:diskFile1.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js index 5cca04a0f2567..bf3f6e482670a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map index aeb0a1c3c5d12..f0be560aaaf6d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map index 7e08245de722a..ab5f17a63ea6e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map index de341c87ec136..cec71625f40e6 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.json index 9e98d46666fa0..2475d02eb4796 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt index 9072b5c7129d6..f7e814da92948 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: outputdir_module_multifolder/ref/m1.ts emittedFile:ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: outputdir_module_multifolder_ref/m2.ts emittedFile:diskFile1.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: outputdir_module_multifolder/test.ts emittedFile:test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js index 14c09e444a52a..67406a9e410d5 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map index 0b67e7ee4815f..4bdb1bfdb51cd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 71e1da5d3ccf8..0fc51f5e3410f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index 5cca04a0f2567..bf3f6e482670a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index aeb0a1c3c5d12..f0be560aaaf6d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index c4c57a82e126f..8bf3ef495616b 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json index d96a3e5f83237..8a746a518a3ad 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 0a60d710297e2..f028d952086b7 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index de341c87ec136..cec71625f40e6 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index 14c09e444a52a..67406a9e410d5 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 0b67e7ee4815f..4bdb1bfdb51cd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 7e08245de722a..ab5f17a63ea6e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json index d96a3e5f83237..8a746a518a3ad 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index fbbb2304152d6..fef086063a4ad 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: outputdir_module_multifolder/ref/m1.ts emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: outputdir_module_multifolder_ref/m2.ts emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: outputdir_module_multifolder/test.ts emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js index 994e21ca0326d..aa75fa3316945 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ -define("ref/m1", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -12,7 +13,8 @@ define("ref/m1", ["require", "exports"], function (require, exports) { } exports.m1_f1 = m1_f1; }); -define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -26,7 +28,8 @@ define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], functio } exports.m2_f1 = m2_f1; }); -define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 0fd0b2def0c7e..4e1b085eb4ce2 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json index 722a6fbd4da9b..279857bce8b34 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index 8c710d9c4da3e..b4b30c5d8c27c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -8,7 +8,8 @@ sources: outputdir_module_multifolder/ref/m1.ts,outputdir_module_multifolder_ref emittedFile:bin/test.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- ->>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,17 +165,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>}); ->>>define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -187,24 +189,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(16, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(16, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(16, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(16, 24) Source(1, 23) + SourceIndex(1) +1 >Emitted(18, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(18, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(18, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(18, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(18, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(20, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -214,16 +216,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(19, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(19, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(21, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(20, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(22, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(22, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -237,10 +239,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(21, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(21, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(21, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -254,10 +256,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(22, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(22, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(22, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(22, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(24, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(24, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -276,20 +278,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(23, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(23, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(23, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(23, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(23, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(23, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(23, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(25, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(25, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(25, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(25, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(25, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(25, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(25, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -303,11 +305,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(25, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(25, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(25, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(25, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(25, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(27, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(27, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(27, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -316,8 +318,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(26, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(28, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -330,17 +332,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(27, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(27, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(27, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(27, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(29, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(29, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(29, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>}); ->>>define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>>define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -355,24 +358,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(30, 5) Source(3, 12) + SourceIndex(2) -2 >Emitted(30, 15) Source(3, 14) + SourceIndex(2) -3 >Emitted(30, 18) Source(3, 17) + SourceIndex(2) -4 >Emitted(30, 20) Source(3, 19) + SourceIndex(2) -5 >Emitted(30, 21) Source(3, 20) + SourceIndex(2) +1 >Emitted(33, 5) Source(3, 12) + SourceIndex(2) +2 >Emitted(33, 15) Source(3, 14) + SourceIndex(2) +3 >Emitted(33, 18) Source(3, 17) + SourceIndex(2) +4 >Emitted(33, 20) Source(3, 19) + SourceIndex(2) +5 >Emitted(33, 21) Source(3, 20) + SourceIndex(2) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(31, 5) Source(4, 1) + SourceIndex(2) +1->Emitted(34, 5) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(32, 9) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(35, 9) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^^^^^ @@ -382,16 +385,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(33, 9) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(33, 10) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(36, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(36, 10) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(34, 9) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(34, 18) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(37, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(37, 18) Source(6, 2) + SourceIndex(2) --- >>> })(); 1 >^^^^ @@ -405,10 +408,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(35, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(35, 6) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(35, 6) Source(4, 1) + SourceIndex(2) -4 >Emitted(35, 10) Source(6, 2) + SourceIndex(2) +1 >Emitted(38, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(38, 6) Source(6, 2) + SourceIndex(2) +3 >Emitted(38, 6) Source(4, 1) + SourceIndex(2) +4 >Emitted(38, 10) Source(6, 2) + SourceIndex(2) --- >>> exports.c1 = c1; 1->^^^^ @@ -422,10 +425,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(36, 5) Source(4, 14) + SourceIndex(2) -2 >Emitted(36, 15) Source(4, 16) + SourceIndex(2) -3 >Emitted(36, 20) Source(6, 2) + SourceIndex(2) -4 >Emitted(36, 21) Source(6, 2) + SourceIndex(2) +1->Emitted(39, 5) Source(4, 14) + SourceIndex(2) +2 >Emitted(39, 15) Source(4, 16) + SourceIndex(2) +3 >Emitted(39, 20) Source(6, 2) + SourceIndex(2) +4 >Emitted(39, 21) Source(6, 2) + SourceIndex(2) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -444,20 +447,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(37, 5) Source(8, 12) + SourceIndex(2) -2 >Emitted(37, 22) Source(8, 21) + SourceIndex(2) -3 >Emitted(37, 25) Source(8, 24) + SourceIndex(2) -4 >Emitted(37, 29) Source(8, 28) + SourceIndex(2) -5 >Emitted(37, 31) Source(8, 30) + SourceIndex(2) -6 >Emitted(37, 33) Source(8, 32) + SourceIndex(2) -7 >Emitted(37, 34) Source(8, 33) + SourceIndex(2) +1->Emitted(40, 5) Source(8, 12) + SourceIndex(2) +2 >Emitted(40, 22) Source(8, 21) + SourceIndex(2) +3 >Emitted(40, 25) Source(8, 24) + SourceIndex(2) +4 >Emitted(40, 29) Source(8, 28) + SourceIndex(2) +5 >Emitted(40, 31) Source(8, 30) + SourceIndex(2) +6 >Emitted(40, 33) Source(8, 32) + SourceIndex(2) +7 >Emitted(40, 34) Source(8, 33) + SourceIndex(2) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(38, 5) Source(9, 1) + SourceIndex(2) +1 >Emitted(41, 5) Source(9, 1) + SourceIndex(2) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -471,11 +474,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(39, 9) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(39, 15) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(39, 16) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(39, 33) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(39, 34) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(42, 9) Source(10, 5) + SourceIndex(2) +2 >Emitted(42, 15) Source(10, 11) + SourceIndex(2) +3 >Emitted(42, 16) Source(10, 12) + SourceIndex(2) +4 >Emitted(42, 33) Source(10, 21) + SourceIndex(2) +5 >Emitted(42, 34) Source(10, 22) + SourceIndex(2) --- >>> } 1 >^^^^ @@ -484,8 +487,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(40, 5) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(40, 6) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(43, 5) Source(11, 1) + SourceIndex(2) +2 >Emitted(43, 6) Source(11, 2) + SourceIndex(2) --- >>> exports.f1 = f1; 1->^^^^ @@ -499,10 +502,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(41, 5) Source(9, 17) + SourceIndex(2) -2 >Emitted(41, 15) Source(9, 19) + SourceIndex(2) -3 >Emitted(41, 20) Source(11, 2) + SourceIndex(2) -4 >Emitted(41, 21) Source(11, 2) + SourceIndex(2) +1->Emitted(44, 5) Source(9, 17) + SourceIndex(2) +2 >Emitted(44, 15) Source(9, 19) + SourceIndex(2) +3 >Emitted(44, 20) Source(11, 2) + SourceIndex(2) +4 >Emitted(44, 21) Source(11, 2) + SourceIndex(2) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -522,13 +525,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(42, 5) Source(13, 12) + SourceIndex(2) -2 >Emitted(42, 15) Source(13, 14) + SourceIndex(2) -3 >Emitted(42, 18) Source(13, 17) + SourceIndex(2) -4 >Emitted(42, 20) Source(13, 19) + SourceIndex(2) -5 >Emitted(42, 21) Source(13, 20) + SourceIndex(2) -6 >Emitted(42, 26) Source(13, 25) + SourceIndex(2) -7 >Emitted(42, 27) Source(13, 26) + SourceIndex(2) +1->Emitted(45, 5) Source(13, 12) + SourceIndex(2) +2 >Emitted(45, 15) Source(13, 14) + SourceIndex(2) +3 >Emitted(45, 18) Source(13, 17) + SourceIndex(2) +4 >Emitted(45, 20) Source(13, 19) + SourceIndex(2) +5 >Emitted(45, 21) Source(13, 20) + SourceIndex(2) +6 >Emitted(45, 26) Source(13, 25) + SourceIndex(2) +7 >Emitted(45, 27) Source(13, 26) + SourceIndex(2) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -546,13 +549,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(43, 5) Source(14, 12) + SourceIndex(2) -2 >Emitted(43, 15) Source(14, 14) + SourceIndex(2) -3 >Emitted(43, 18) Source(14, 17) + SourceIndex(2) -4 >Emitted(43, 20) Source(14, 19) + SourceIndex(2) -5 >Emitted(43, 21) Source(14, 20) + SourceIndex(2) -6 >Emitted(43, 26) Source(14, 25) + SourceIndex(2) -7 >Emitted(43, 27) Source(14, 26) + SourceIndex(2) +1->Emitted(46, 5) Source(14, 12) + SourceIndex(2) +2 >Emitted(46, 15) Source(14, 14) + SourceIndex(2) +3 >Emitted(46, 18) Source(14, 17) + SourceIndex(2) +4 >Emitted(46, 20) Source(14, 19) + SourceIndex(2) +5 >Emitted(46, 21) Source(14, 20) + SourceIndex(2) +6 >Emitted(46, 26) Source(14, 25) + SourceIndex(2) +7 >Emitted(46, 27) Source(14, 26) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.errors.txt index 247f9e4f2f2a1..b0d02cf812052 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json index 722a6fbd4da9b..279857bce8b34 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map index 89373fc1cfaf0..3d65f47e63aed 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.json index 6e1f133ef6486..09cb6b546b32b 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt index 0ff03b640b1a1..ed667e35c034d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:m1.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js index 372f1052b89d5..4e5ad232cc3ab 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map index 945ed0583adfd..fb10b5b1de900 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map index 9bf6e024b3f55..1ba37ab45d037 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.json index 6e1f133ef6486..09cb6b546b32b 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt index 55790d252721b..d48dcb61c683d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: m1.ts emittedFile:m1.js sourceFile:m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js index c2e7dfa443bfd..bbc39c2543192 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map index a7792ef52426b..7611cfa9649ab 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 89373fc1cfaf0..3d65f47e63aed 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index 372f1052b89d5..4e5ad232cc3ab 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 945ed0583adfd..fb10b5b1de900 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json index c15e91877ae5c..d3ba076ef6fed 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 52eadf10bdbc8..937ad4f4647cf 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/m1.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 9bf6e024b3f55..1ba37ab45d037 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index c2e7dfa443bfd..bbc39c2543192 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index a7792ef52426b..7611cfa9649ab 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json index c15e91877ae5c..d3ba076ef6fed 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index e4c6d218e888b..ef8b955f22f8e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: m1.ts emittedFile:outdir/simple/m1.js sourceFile:m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js index f385e49ecd198..cc73ea698fe63 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index a910369c3e4bf..c94ffed292f1a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json index f9e2736f65a30..eed9ed1ea347f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 827aa235ef262..f4237f8bb9fc4 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define("m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.errors.txt index 12592331fb591..0dc033a09d2dc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json index f9e2736f65a30..eed9ed1ea347f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map index 6f750f89857a4..9a60e0b6f5d06 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.json index b65bed6197951..cdd0d1b3328d9 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt index 990b84fd4fd97..f4f5f57241959 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js index 6c8aeb3190bf9..081c888ee0234 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map index f65cfa554d17b..5a25b5d46561c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map index 19b046a427c58..a40c4244c4724 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.json index b65bed6197951..cdd0d1b3328d9 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt index 757d17973aff9..c71f3ce344a6b 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: ref/m1.ts emittedFile:ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js index 46c9f29e55a8a..bdc33590853f7 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map index c63a094397635..fd5f31062e0e3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 6f750f89857a4..9a60e0b6f5d06 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index 6c8aeb3190bf9..081c888ee0234 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index f65cfa554d17b..5a25b5d46561c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json index a8662e09bf6ea..2e482f41e6640 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 4491a6dbea557..61718dfae16d7 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 19b046a427c58..a40c4244c4724 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 46c9f29e55a8a..bdc33590853f7 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index c63a094397635..fd5f31062e0e3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json index a8662e09bf6ea..2e482f41e6640 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 4849be6e95a34..d267fc18a6bb1 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ref/m1.ts emittedFile:outdir/simple/ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 18d212c7e69ab..93a25f7ef19cc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 30bac946d14ac..3910a6170d338 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json index 50dc5aaf60fce..048d4296ae52b 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index af6c2b21fdc89..3691823f0761a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:ref/m1.ts ------------------------------------------------------------------- >>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.errors.txt index 42154149020d1..7eb84ece29d1e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json index 50dc5aaf60fce..048d4296ae52b 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_module_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/diskFile0.js.map index c41bb34558123..6d8889bab5042 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/ref/m1.js.map index e43074326e06b..1ed71a40f7805 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.json index b84ccc2bc2308..c955083f7f13e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt index b7293d81f542d..43858f6ab7a2c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/test.js.map index da7206b4e32be..02d8fb800bf07 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/diskFile0.js.map index c41bb34558123..6d8889bab5042 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/ref/m1.js.map index e43074326e06b..1ed71a40f7805 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.json index b84ccc2bc2308..c955083f7f13e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt index b7293d81f542d..43858f6ab7a2c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/test.js.map index da7206b4e32be..02d8fb800bf07 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map index e43074326e06b..1ed71a40f7805 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map index da7206b4e32be..02d8fb800bf07 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map index c41bb34558123..6d8889bab5042 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json index 43d3db291ff91..3fa14686a7c03 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt index a76377a99e468..6de3c355d6f18 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map index e43074326e06b..1ed71a40f7805 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map index da7206b4e32be..02d8fb800bf07 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map index c41bb34558123..6d8889bab5042 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json index 43d3db291ff91..3fa14686a7c03 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt index a76377a99e468..6de3c355d6f18 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/bin/test.js.map index 9ce443017eb07..35b866d6488c0 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json index 6bd6db427c4f5..ed994f82308dc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt index 23f41f64947a5..bc639f73abf91 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/bin/test.js.map index 9ce443017eb07..35b866d6488c0 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_multifolder/src/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.errors.txt index 53a35eb2c84a0..f420dc4be3342 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ../outputdir_multifolder_ref/m2.ts (0 errors) ==== var m2_a1 = 10; class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json index 6bd6db427c4f5..ed994f82308dc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_multifolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt index 23f41f64947a5..bc639f73abf91 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/m1.js.map index 166a894f9bc4a..9443bade40329 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.json index f57c8110827d0..5ee7318ed14e8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt index 0087d5d671695..0062e88d20e43 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/test.js.map index 68302f9245b3f..e0b6ac94e0dab 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/m1.js.map index 166a894f9bc4a..9443bade40329 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.json index f57c8110827d0..5ee7318ed14e8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt index 0087d5d671695..0062e88d20e43 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/test.js.map index 68302f9245b3f..e0b6ac94e0dab 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 166a894f9bc4a..9443bade40329 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 68302f9245b3f..e0b6ac94e0dab 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json index 02981610092e3..a7a05e1024831 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt index a0c7d8cd9768a..98cd3b2fce21a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 166a894f9bc4a..9443bade40329 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 68302f9245b3f..e0b6ac94e0dab 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json index 02981610092e3..a7a05e1024831 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt index a0c7d8cd9768a..98cd3b2fce21a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/bin/test.js.map index 28168d6c0ced4..7156ba8dc5440 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.json index 74add9e8d7bb9..3a215e043c6ea 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt index f4897f2cd52e4..ff2cacede465f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/bin/test.js.map index 28168d6c0ced4..7156ba8dc5440 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_simple/src/","sources":["m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.errors.txt index 53fc18f86c749..fa5c648451acb 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.json index 74add9e8d7bb9..3a215e043c6ea 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_simple/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_simple/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt index f4897f2cd52e4..ff2cacede465f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.json index 772190b485172..369da8c6254cd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt index 8a378aeb6339a..125a4421ad971 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/test.js.map index d4b7f1b88c671..9b57a17d7b863 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_singleFile/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_singleFile/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.json index 772190b485172..369da8c6254cd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt index 8a378aeb6339a..125a4421ad971 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/test.js.map index d4b7f1b88c671..9b57a17d7b863 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_singleFile/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_singleFile/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map index d4b7f1b88c671..9b57a17d7b863 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_singleFile/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_singleFile/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json index 8a6eb54b7892f..6534ef2784766 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt index d7ecfe75c3598..9a26f02b8a576 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map index d4b7f1b88c671..9b57a17d7b863 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_singleFile/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_singleFile/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json index 8a6eb54b7892f..6534ef2784766 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt index d7ecfe75c3598..9a26f02b8a576 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/bin/test.js.map index d4b7f1b88c671..9b57a17d7b863 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_singleFile/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_singleFile/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json index ec9d13d68de6f..71b375b8650d6 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt index ab2d0e10bd34c..e5ab088d09287 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/bin/test.js.map index d4b7f1b88c671..9b57a17d7b863 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_singleFile/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_singleFile/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.errors.txt index eb358c3b79d38..6fdef1c0d9d45 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== test.ts (0 errors) ==== var a1 = 10; class c1 { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json index ec9d13d68de6f..71b375b8650d6 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_singleFile/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt index ab2d0e10bd34c..e5ab088d09287 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/ref/m1.js.map index 0cd3d17ea8ff5..3f9a2d1663c38 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.json index 03f06090742ea..3ec5d65f7a0d9 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt index 9d5c143cfd46c..2ef04f2b3f77d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/test.js.map index 9979f6eb7d561..624510e0e30a1 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/ref/m1.js.map index 0cd3d17ea8ff5..3f9a2d1663c38 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.json index 03f06090742ea..3ec5d65f7a0d9 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.json @@ -5,10 +5,10 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt index 9d5c143cfd46c..2ef04f2b3f77d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/test.js.map index 9979f6eb7d561..624510e0e30a1 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 0cd3d17ea8ff5..3f9a2d1663c38 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 9979f6eb7d561..624510e0e30a1 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json index 08bdabb1c6e3c..faa7592db458f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt index 63af6359f7ef6..d197965afca05 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 0cd3d17ea8ff5..3f9a2d1663c38 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 9979f6eb7d561..624510e0e30a1 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json index 08bdabb1c6e3c..faa7592db458f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json @@ -6,10 +6,10 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt index 63af6359f7ef6..d197965afca05 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/bin/test.js.map index d11b23b98c4c7..38a56a19d6ece 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["ref/m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json index a6c034775ce78..73333fd4868bb 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt index 6a0176bdacd0a..6b213c2a75c32 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/bin/test.js.map index d11b23b98c4c7..38a56a19d6ece 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["ref/m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_subfolder/src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.errors.txt index 376cfa761b8a0..2a58fd1ab36f3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json index a6c034775ce78..73333fd4868bb 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json @@ -6,10 +6,10 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", - "resolveSourceRoot": true, "declaration": true, "baselineCheck": true, + "sourceRoot": "tests/cases/projects/outputdir_subfolder/src", + "resolveSourceRoot": true, "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt index 6a0176bdacd0a..6b213c2a75c32 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m1.js.map index 17c695312b304..003271f673071 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map index 0927206ec1bd1..06b2a8b3dfc12 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.json index 0e73f218462dd..326bb4aaff6fe 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt index a144760b69f8f..54e361169bfd8 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/test.js.map index 6014ca9159858..d1d1c89c2d09c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m1.js.map index 17c695312b304..003271f673071 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map index 84f18c56247b3..43700cb45373b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.json index 0e73f218462dd..326bb4aaff6fe 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt index 64ebd330860a1..122955308fc37 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ref/m2.ts emittedFile:ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/test.js.map index 6014ca9159858..d1d1c89c2d09c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 17c695312b304..003271f673071 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index 0927206ec1bd1..06b2a8b3dfc12 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 6014ca9159858..d1d1c89c2d09c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json index 99815d5266195..e47173aac84b1 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index a8377701181ab..babb39e3518cc 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:outdir/simple/ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 17c695312b304..003271f673071 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 84f18c56247b3..43700cb45373b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 6014ca9159858..d1d1c89c2d09c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json index 99815d5266195..e47173aac84b1 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index d8857daae5c01..f8dac699dd3cf 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ref/m2.ts emittedFile:outdir/simple/ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js index 13e9de8f87f84..a480aa83e80bf 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 62f932a571e19..5005743418eb8 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json index 2dcfc8a5a2ce8..f42b01758d391 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index d722bc8936af3..670b7ba5f2bde 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -317,8 +318,8 @@ sourceFile:test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map index 03976e6a8d68e..f406d61a6f1b3 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json index 2dcfc8a5a2ce8..f42b01758d391 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index b71c21b5b99d6..a4e47c43e8e5b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -196,7 +196,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 81bb710c58080..1ebe03468c72e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index a9529891ffd37..0cefe1f1642b5 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 4247e9dadc292..7f0be1c2b21ea 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index d1799c07a98c0..8ec79895fef1e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -317,8 +318,8 @@ sourceFile:test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map index 239577614701f..6bd9a36c15d02 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index 4247e9dadc292..7f0be1c2b21ea 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 2a0cc630cc05c..b424fde902b88 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -196,7 +196,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 414fa845b2ec7..d14f89c2c6e23 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map index 0cdc44d330d6d..0a78c398416bf 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.json index 2acbea1cc8dcc..79c4217ab5184 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt index 77e69f9879021..496f1849d69d4 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:diskFile1.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js index 5cca04a0f2567..bf3f6e482670a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map index 20138821cfe42..bb03821c38504 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map index 92fd6e19cfb36..e173a64c64d2d 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map index 292dcb61933f2..daef8ad6d4e19 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.json index 2acbea1cc8dcc..79c4217ab5184 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt index 095d4b65fdfbe..6d4fcd7bf89a7 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: outputdir_module_multifolder/ref/m1.ts emittedFile:ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: outputdir_module_multifolder_ref/m2.ts emittedFile:diskFile1.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: outputdir_module_multifolder/test.ts emittedFile:test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js index 14c09e444a52a..67406a9e410d5 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map index a603394fc15a9..530c3cb016ce5 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 0cdc44d330d6d..0a78c398416bf 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index 5cca04a0f2567..bf3f6e482670a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index 20138821cfe42..bb03821c38504 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 414fa845b2ec7..d14f89c2c6e23 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json index 6603e36c2811a..bb4c36687354a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 82da7e4770b15..dc6fc0fda03e1 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 292dcb61933f2..daef8ad6d4e19 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index 14c09e444a52a..67406a9e410d5 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index a603394fc15a9..530c3cb016ce5 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 92fd6e19cfb36..e173a64c64d2d 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json index 6603e36c2811a..bb4c36687354a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 28aa64ae076f7..992c66e53ae0d 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: outputdir_module_multifolder/ref/m1.ts emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: outputdir_module_multifolder_ref/m2.ts emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: outputdir_module_multifolder/test.ts emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js index 994e21ca0326d..aa75fa3316945 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ -define("ref/m1", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -12,7 +13,8 @@ define("ref/m1", ["require", "exports"], function (require, exports) { } exports.m1_f1 = m1_f1; }); -define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -26,7 +28,8 @@ define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], functio } exports.m2_f1 = m2_f1; }); -define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 39dcc66e06b8d..38fef635f82d8 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json index 77179246af5b7..328a26d10866f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index 43c4340ba370b..ef5fa1f7b5abd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -8,7 +8,8 @@ sources: outputdir_module_multifolder/ref/m1.ts,outputdir_module_multifolder_ref emittedFile:bin/test.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- ->>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,17 +165,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>}); ->>>define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -187,24 +189,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(16, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(16, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(16, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(16, 24) Source(1, 23) + SourceIndex(1) +1 >Emitted(18, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(18, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(18, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(18, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(18, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(20, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -214,16 +216,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(19, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(19, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(21, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(20, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(22, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(22, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -237,10 +239,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(21, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(21, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(21, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -254,10 +256,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(22, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(22, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(22, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(22, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(24, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(24, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -276,20 +278,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(23, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(23, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(23, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(23, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(23, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(23, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(23, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(25, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(25, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(25, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(25, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(25, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(25, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(25, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -303,11 +305,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(25, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(25, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(25, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(25, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(25, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(27, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(27, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(27, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -316,8 +318,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(26, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(28, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -330,17 +332,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(27, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(27, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(27, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(27, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(29, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(29, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(29, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>}); ->>>define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>>define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -355,24 +358,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(30, 5) Source(3, 12) + SourceIndex(2) -2 >Emitted(30, 15) Source(3, 14) + SourceIndex(2) -3 >Emitted(30, 18) Source(3, 17) + SourceIndex(2) -4 >Emitted(30, 20) Source(3, 19) + SourceIndex(2) -5 >Emitted(30, 21) Source(3, 20) + SourceIndex(2) +1 >Emitted(33, 5) Source(3, 12) + SourceIndex(2) +2 >Emitted(33, 15) Source(3, 14) + SourceIndex(2) +3 >Emitted(33, 18) Source(3, 17) + SourceIndex(2) +4 >Emitted(33, 20) Source(3, 19) + SourceIndex(2) +5 >Emitted(33, 21) Source(3, 20) + SourceIndex(2) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(31, 5) Source(4, 1) + SourceIndex(2) +1->Emitted(34, 5) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(32, 9) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(35, 9) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^^^^^ @@ -382,16 +385,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(33, 9) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(33, 10) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(36, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(36, 10) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(34, 9) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(34, 18) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(37, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(37, 18) Source(6, 2) + SourceIndex(2) --- >>> })(); 1 >^^^^ @@ -405,10 +408,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(35, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(35, 6) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(35, 6) Source(4, 1) + SourceIndex(2) -4 >Emitted(35, 10) Source(6, 2) + SourceIndex(2) +1 >Emitted(38, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(38, 6) Source(6, 2) + SourceIndex(2) +3 >Emitted(38, 6) Source(4, 1) + SourceIndex(2) +4 >Emitted(38, 10) Source(6, 2) + SourceIndex(2) --- >>> exports.c1 = c1; 1->^^^^ @@ -422,10 +425,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(36, 5) Source(4, 14) + SourceIndex(2) -2 >Emitted(36, 15) Source(4, 16) + SourceIndex(2) -3 >Emitted(36, 20) Source(6, 2) + SourceIndex(2) -4 >Emitted(36, 21) Source(6, 2) + SourceIndex(2) +1->Emitted(39, 5) Source(4, 14) + SourceIndex(2) +2 >Emitted(39, 15) Source(4, 16) + SourceIndex(2) +3 >Emitted(39, 20) Source(6, 2) + SourceIndex(2) +4 >Emitted(39, 21) Source(6, 2) + SourceIndex(2) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -444,20 +447,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(37, 5) Source(8, 12) + SourceIndex(2) -2 >Emitted(37, 22) Source(8, 21) + SourceIndex(2) -3 >Emitted(37, 25) Source(8, 24) + SourceIndex(2) -4 >Emitted(37, 29) Source(8, 28) + SourceIndex(2) -5 >Emitted(37, 31) Source(8, 30) + SourceIndex(2) -6 >Emitted(37, 33) Source(8, 32) + SourceIndex(2) -7 >Emitted(37, 34) Source(8, 33) + SourceIndex(2) +1->Emitted(40, 5) Source(8, 12) + SourceIndex(2) +2 >Emitted(40, 22) Source(8, 21) + SourceIndex(2) +3 >Emitted(40, 25) Source(8, 24) + SourceIndex(2) +4 >Emitted(40, 29) Source(8, 28) + SourceIndex(2) +5 >Emitted(40, 31) Source(8, 30) + SourceIndex(2) +6 >Emitted(40, 33) Source(8, 32) + SourceIndex(2) +7 >Emitted(40, 34) Source(8, 33) + SourceIndex(2) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(38, 5) Source(9, 1) + SourceIndex(2) +1 >Emitted(41, 5) Source(9, 1) + SourceIndex(2) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -471,11 +474,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(39, 9) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(39, 15) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(39, 16) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(39, 33) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(39, 34) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(42, 9) Source(10, 5) + SourceIndex(2) +2 >Emitted(42, 15) Source(10, 11) + SourceIndex(2) +3 >Emitted(42, 16) Source(10, 12) + SourceIndex(2) +4 >Emitted(42, 33) Source(10, 21) + SourceIndex(2) +5 >Emitted(42, 34) Source(10, 22) + SourceIndex(2) --- >>> } 1 >^^^^ @@ -484,8 +487,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(40, 5) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(40, 6) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(43, 5) Source(11, 1) + SourceIndex(2) +2 >Emitted(43, 6) Source(11, 2) + SourceIndex(2) --- >>> exports.f1 = f1; 1->^^^^ @@ -499,10 +502,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(41, 5) Source(9, 17) + SourceIndex(2) -2 >Emitted(41, 15) Source(9, 19) + SourceIndex(2) -3 >Emitted(41, 20) Source(11, 2) + SourceIndex(2) -4 >Emitted(41, 21) Source(11, 2) + SourceIndex(2) +1->Emitted(44, 5) Source(9, 17) + SourceIndex(2) +2 >Emitted(44, 15) Source(9, 19) + SourceIndex(2) +3 >Emitted(44, 20) Source(11, 2) + SourceIndex(2) +4 >Emitted(44, 21) Source(11, 2) + SourceIndex(2) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -522,13 +525,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(42, 5) Source(13, 12) + SourceIndex(2) -2 >Emitted(42, 15) Source(13, 14) + SourceIndex(2) -3 >Emitted(42, 18) Source(13, 17) + SourceIndex(2) -4 >Emitted(42, 20) Source(13, 19) + SourceIndex(2) -5 >Emitted(42, 21) Source(13, 20) + SourceIndex(2) -6 >Emitted(42, 26) Source(13, 25) + SourceIndex(2) -7 >Emitted(42, 27) Source(13, 26) + SourceIndex(2) +1->Emitted(45, 5) Source(13, 12) + SourceIndex(2) +2 >Emitted(45, 15) Source(13, 14) + SourceIndex(2) +3 >Emitted(45, 18) Source(13, 17) + SourceIndex(2) +4 >Emitted(45, 20) Source(13, 19) + SourceIndex(2) +5 >Emitted(45, 21) Source(13, 20) + SourceIndex(2) +6 >Emitted(45, 26) Source(13, 25) + SourceIndex(2) +7 >Emitted(45, 27) Source(13, 26) + SourceIndex(2) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -546,13 +549,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(43, 5) Source(14, 12) + SourceIndex(2) -2 >Emitted(43, 15) Source(14, 14) + SourceIndex(2) -3 >Emitted(43, 18) Source(14, 17) + SourceIndex(2) -4 >Emitted(43, 20) Source(14, 19) + SourceIndex(2) -5 >Emitted(43, 21) Source(14, 20) + SourceIndex(2) -6 >Emitted(43, 26) Source(14, 25) + SourceIndex(2) -7 >Emitted(43, 27) Source(14, 26) + SourceIndex(2) +1->Emitted(46, 5) Source(14, 12) + SourceIndex(2) +2 >Emitted(46, 15) Source(14, 14) + SourceIndex(2) +3 >Emitted(46, 18) Source(14, 17) + SourceIndex(2) +4 >Emitted(46, 20) Source(14, 19) + SourceIndex(2) +5 >Emitted(46, 21) Source(14, 20) + SourceIndex(2) +6 >Emitted(46, 26) Source(14, 25) + SourceIndex(2) +7 >Emitted(46, 27) Source(14, 26) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.errors.txt index 247f9e4f2f2a1..b0d02cf812052 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json index 77179246af5b7..328a26d10866f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map index e0af3af9b222c..c8f4d72f22f3b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.json index f28c784480f22..910f5cd7e8ff0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt index b4f6ed8c48879..0f93a19bb7483 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:m1.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js index 372f1052b89d5..4e5ad232cc3ab 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map index 22f07c1754496..a87178e07e206 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map index 05c53f0182efb..87446d164638b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.json index f28c784480f22..910f5cd7e8ff0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt index 82c62b23d3c1c..e208286902234 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: m1.ts emittedFile:m1.js sourceFile:m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js index c2e7dfa443bfd..bbc39c2543192 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map index 1e72e2a220395..f8ad3c6a4458a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index e0af3af9b222c..c8f4d72f22f3b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index 372f1052b89d5..4e5ad232cc3ab 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 22f07c1754496..a87178e07e206 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json index 77fa77f5fb05d..29a92a51eec08 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index cf74f45b0dc24..aa1b771c0bbf4 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/m1.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 05c53f0182efb..87446d164638b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index c2e7dfa443bfd..bbc39c2543192 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 1e72e2a220395..f8ad3c6a4458a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json index 77fa77f5fb05d..29a92a51eec08 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index d94164cc05673..84a1e0175f53b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: m1.ts emittedFile:outdir/simple/m1.js sourceFile:m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js index f385e49ecd198..cc73ea698fe63 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 262e5cdc1f397..a8a3b1c51dafc 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json index 8213a1478ae93..d16c4a53d9ca2 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt index fc0f367f34368..66f462e7c9f3c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define("m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.errors.txt index 12592331fb591..0dc033a09d2dc 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json index 8213a1478ae93..d16c4a53d9ca2 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map index aaae11bb5b5be..934216cc93187 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.json index 8a3035f363273..6ffc10b044810 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt index a483e0ff9fc60..2030173b30db0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js index 6c8aeb3190bf9..081c888ee0234 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map index 22f07c1754496..a87178e07e206 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map index 702b574b61472..d7788bd6bb915 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.json index 8a3035f363273..6ffc10b044810 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt index 4e25047bafc0f..5e251d7c7e870 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: ref/m1.ts emittedFile:ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js index 46c9f29e55a8a..bdc33590853f7 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map index b3972a3cfc174..f5191f2dd0237 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index aaae11bb5b5be..934216cc93187 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index 6c8aeb3190bf9..081c888ee0234 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 22f07c1754496..a87178e07e206 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json index 9f10fc5e7e05a..28b99749a6e7e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index fe64e38c46853..3a62229b645a7 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 702b574b61472..d7788bd6bb915 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 46c9f29e55a8a..bdc33590853f7 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index b3972a3cfc174..f5191f2dd0237 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json index 9f10fc5e7e05a..28b99749a6e7e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index ebcaec60aaac2..552fa69288c24 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ref/m1.ts emittedFile:outdir/simple/ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 18d212c7e69ab..93a25f7ef19cc 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index dc294ebd160d1..209b545b60977 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json index a5966ef08b8a9..f1ef0403d6e85 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index 83f9ef1f262eb..88ab2d261548b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:ref/m1.ts ------------------------------------------------------------------- >>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.errors.txt index 42154149020d1..7eb84ece29d1e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json index a5966ef08b8a9..f1ef0403d6e85 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/diskFile0.js.map index dfe53a2f98c5d..b0102393a6d27 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/ref/m1.js.map index ebf5d6bc88620..8b0aa0b151b13 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.json index e7dfb0beff37c..b785e8311f369 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt index 20c4a628b797f..1e7409b877877 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/test.js.map index 1c3b0105b5f0b..52a842ad8ea68 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/diskFile0.js.map index dfe53a2f98c5d..b0102393a6d27 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/ref/m1.js.map index ebf5d6bc88620..8b0aa0b151b13 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.json index e7dfb0beff37c..b785e8311f369 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt index 20c4a628b797f..1e7409b877877 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/test.js.map index 1c3b0105b5f0b..52a842ad8ea68 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map index ebf5d6bc88620..8b0aa0b151b13 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map index 1c3b0105b5f0b..52a842ad8ea68 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map index dfe53a2f98c5d..b0102393a6d27 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json index bfb740034016f..83a4cf9e563ea 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt index 325718e37e1e1..f22687619bc07 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map index ebf5d6bc88620..8b0aa0b151b13 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map index 1c3b0105b5f0b..52a842ad8ea68 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map index dfe53a2f98c5d..b0102393a6d27 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json index bfb740034016f..83a4cf9e563ea 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt index 325718e37e1e1..f22687619bc07 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/bin/test.js.map index d7eeef9ca4955..57f6637b4f498 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.json index 1f2e577b0b3a1..f9f31a969c46e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt index 46af9b6678ba0..53d479879d67c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/bin/test.js.map index d7eeef9ca4955..57f6637b4f498 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.errors.txt index 53a35eb2c84a0..f420dc4be3342 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ../outputdir_multifolder_ref/m2.ts (0 errors) ==== var m2_a1 = 10; class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.json index 1f2e577b0b3a1..f9f31a969c46e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt index 46af9b6678ba0..53d479879d67c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/m1.js.map index 66ee252767864..7cd5a10b95d24 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.json index 4d33e85e2ba8d..a4fc65ac644a4 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt index 181dcd2d8c672..02199705e318d 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/test.js.map index eb9e3b663f1ac..5e5a862e511f0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/m1.js.map index 66ee252767864..7cd5a10b95d24 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.json index 4d33e85e2ba8d..a4fc65ac644a4 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt index 181dcd2d8c672..02199705e318d 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/test.js.map index eb9e3b663f1ac..5e5a862e511f0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 66ee252767864..7cd5a10b95d24 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index eb9e3b663f1ac..5e5a862e511f0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.json index bf86309b59a89..23096eb32674f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt index 3a97d4540e29c..43993182320e0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 66ee252767864..7cd5a10b95d24 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index eb9e3b663f1ac..5e5a862e511f0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.json index bf86309b59a89..23096eb32674f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt index 3a97d4540e29c..43993182320e0 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/bin/test.js.map index cc3b39712085f..b1adff8db7eb9 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.json index 4b371bf592416..e60785d9b5753 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt index c85101c002636..c797be4d43260 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/bin/test.js.map index cc3b39712085f..b1adff8db7eb9 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.errors.txt index 53fc18f86c749..fa5c648451acb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.json index 4b371bf592416..e60785d9b5753 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt index c85101c002636..c797be4d43260 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.json index 06a55d4a7cce7..c7799ba328c60 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt index 17acf414c6dbc..e125816f9a18e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/test.js.map index d6fa9b1eda688..ce0e34920488b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.json index 06a55d4a7cce7..c7799ba328c60 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt index 17acf414c6dbc..e125816f9a18e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/test.js.map index d6fa9b1eda688..ce0e34920488b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map index d6fa9b1eda688..ce0e34920488b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json index d87b6b22829be..c9eabb1402488 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt index 161f1a1befb0c..3c8bc78f8f3cc 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map index d6fa9b1eda688..ce0e34920488b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json index d87b6b22829be..c9eabb1402488 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt index 161f1a1befb0c..3c8bc78f8f3cc 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/bin/test.js.map index d6fa9b1eda688..ce0e34920488b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.json index c80db3f739c73..39e0e9577bbb1 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt index b282a6db091d9..6d92e64eb643f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/bin/test.js.map index d6fa9b1eda688..ce0e34920488b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.errors.txt index eb358c3b79d38..6fdef1c0d9d45 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== test.ts (0 errors) ==== var a1 = 10; class c1 { diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.json index c80db3f739c73..39e0e9577bbb1 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt index b282a6db091d9..6d92e64eb643f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/ref/m1.js.map index 17c695312b304..003271f673071 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.json index ff189067e6755..28fbd41bab9ff 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt index e3643a7e1e4da..64d3f901d6d29 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/test.js.map index 7792f8a3df67f..0fee1b5aff796 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/ref/m1.js.map index 17c695312b304..003271f673071 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.json b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.json index ff189067e6755..28fbd41bab9ff 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt index e3643a7e1e4da..64d3f901d6d29 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/test.js.map index 7792f8a3df67f..0fee1b5aff796 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 17c695312b304..003271f673071 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 7792f8a3df67f..0fee1b5aff796 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json index 8896f911a9998..d6c94f991650b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt index c76e3a2c05c7e..e9073db7f8e6c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 17c695312b304..003271f673071 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 7792f8a3df67f..0fee1b5aff796 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json index 8896f911a9998..d6c94f991650b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt index c76e3a2c05c7e..e9073db7f8e6c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/bin/test.js.map index ef39d6c5cdbce..2b18772f2d69c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.json index ddcfbd2ff9cc1..bc02869d35bee 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt index c0ad748bf2bcb..e66acb3fe680b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/bin/test.js.map index ef39d6c5cdbce..2b18772f2d69c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.errors.txt index 376cfa761b8a0..2a58fd1ab36f3 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.json index ddcfbd2ff9cc1..bc02869d35bee 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "../src", "declaration": true, "baselineCheck": true, + "sourceRoot": "../src", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt index c0ad748bf2bcb..e66acb3fe680b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m1.js.map index da83de7ea2e73..fa208c79390a5 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js.map index cbb7eed495327..37d956756ce64 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/sourcemapMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/sourcemapMixedSubfolderNoOutdir.sourcemap.txt index 40be0ca660cbd..bc878affc7d68 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/sourcemapMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/sourcemapMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:ref/m2.js sourceFile:m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/test.js.map index c9a79b35d3c52..6be8dbd2c2fe0 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m1.js.map index da83de7ea2e73..fa208c79390a5 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js.map index 0826e9e95f33a..107c53778e2c1 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/sourcemapMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/sourcemapMixedSubfolderNoOutdir.sourcemap.txt index d3eeabc27b53f..f383541378f7c 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/sourcemapMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/sourcemapMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: m2.ts emittedFile:ref/m2.js sourceFile:m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/test.js.map index c9a79b35d3c52..6be8dbd2c2fe0 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index b8be5eb8e01a4..1733ce017197a 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index aabf49f904d98..01d0cee65438a 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index bad31ecf8d2a4..6e310b886d412 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 4557384d5b831..534a9499a68e9 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:outdir/simple/ref/m2.js sourceFile:../../../ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:../../../ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:../../../ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:../../../ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:../../../ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:../../../ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:../../../ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:../../../ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:../../../ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index b8be5eb8e01a4..1733ce017197a 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index e31d90a8f0c70..ac0b3d2dc48f4 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index bad31ecf8d2a4..6e310b886d412 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 7a377d04299ef..56f5ff25cc336 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ../../../ref/m2.ts emittedFile:outdir/simple/ref/m2.js sourceFile:../../../ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:../../../ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:../../../ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:../../../ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:../../../ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:../../../ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:../../../ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:../../../ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:../../../ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js index 13e9de8f87f84..a480aa83e80bf 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 94371fe696d3e..04c42ed11d00f 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt index 821236c5c8505..fbb97b14e902e 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:../ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:../ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:../ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:../ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:../ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:../ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:../ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:../ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:../ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -317,8 +318,8 @@ sourceFile:../test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:../test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:../test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:../test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/bin/test.js.map index a580c050d07e2..b3feff79cab84 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/sourcemapMixedSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/sourcemapMixedSubfolderSpecifyOutputFile.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/sourcemapMixedSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/sourcemapMixedSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt index e37948398a3c8..08c87a22d2371 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -196,7 +196,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 81bb710c58080..1ebe03468c72e 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 22aaecafe2d3d..babc80c4d26c0 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 4394eb0748eaf..6e2448fdb3e47 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js sourceFile:../ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:../ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:../ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:../ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:../ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:../ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:../ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:../ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:../ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -317,8 +318,8 @@ sourceFile:../test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:../test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:../test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:../test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map index 2eab0f873245a..7813d8d45f113 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 9486ad5e3a79d..67bff3854348a 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -196,7 +196,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map index cbb7eed495327..37d956756ce64 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile1.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js.map index 51755e4c9a347..7613820ab9901 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/sourcemapModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/sourcemapModuleMultifolderNoOutdir.sourcemap.txt index 383a66a6e2fb5..1939a9428a66b 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/sourcemapModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/sourcemapModuleMultifolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:diskFile1.js sourceFile:m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js index 5cca04a0f2567..bf3f6e482670a 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map index 462fa38ab4239..02d734d6a23fd 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map index 0826e9e95f33a..107c53778e2c1 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile1.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js.map index 095951a67d097..d3e8930bf4e1e 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/sourcemapModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/sourcemapModuleMultifolderNoOutdir.sourcemap.txt index 0036386e6c44a..fe3c83ed28396 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/sourcemapModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/sourcemapModuleMultifolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: m1.ts emittedFile:ref/m1.js sourceFile:m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: m2.ts emittedFile:diskFile1.js sourceFile:m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: test.ts emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js index 14c09e444a52a..67406a9e410d5 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map index 3b3ef6b145c44..63de9801efe32 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 820b088730f71..2655f2c655ec3 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index 5cca04a0f2567..bf3f6e482670a 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index 181025cda92fd..05f63e35111f6 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index ac636fcee1646..8bc0b5d0e4ce8 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 7158e15c4935b..fac0536ad7dcf 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:../../../../ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../../../../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../../../../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../../../../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../../../../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../../../../ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../../../../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:../../../test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:../../../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:../../../test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:../../../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:../../../test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:../../../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:../../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:../../../test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:../../../test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:../../../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:../../../test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 6df33fbb9e655..4a4c8a4ab2edb 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index 14c09e444a52a..67406a9e410d5 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index cda16e9fb3e0c..efe375c82cc4a 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 5a37db58aa093..213e3024d614f 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 0548113dc8198..dcb25b433948d 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../../../../ref/m1.ts emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:../../../../ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../../../../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../../../../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../../../../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../../../../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../../../../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: ../../../../outputdir_module_multifolder_ref/m2.ts emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: ../../../test.ts emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:../../../test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:../../../test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:../../../test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:../../../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:../../../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:../../../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:../../../test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:../../../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:../../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:../../../test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:../../../test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:../../../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:../../../test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js index 994e21ca0326d..aa75fa3316945 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ -define("ref/m1", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -12,7 +13,8 @@ define("ref/m1", ["require", "exports"], function (require, exports) { } exports.m1_f1 = m1_f1; }); -define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -26,7 +28,8 @@ define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], functio } exports.m2_f1 = m2_f1; }); -define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index c532c3846d9a3..bbd9ace39b60b 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt index 6c8bdf4da742c..797b9c0bf3cb7 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -8,7 +8,8 @@ sources: ../ref/m1.ts,../../outputdir_module_multifolder_ref/m2.ts,../test.ts emittedFile:bin/test.js sourceFile:../ref/m1.ts ------------------------------------------------------------------- ->>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,17 +165,18 @@ sourceFile:../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:../../outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>}); ->>>define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -187,24 +189,24 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(16, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(16, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(16, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(16, 24) Source(1, 23) + SourceIndex(1) +1 >Emitted(18, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(18, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(18, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(18, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(18, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(20, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -214,16 +216,16 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(19, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(19, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(21, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(20, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(22, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(22, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -237,10 +239,10 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(21, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(21, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(21, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -254,10 +256,10 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(22, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(22, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(22, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(22, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(24, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(24, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -276,20 +278,20 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(23, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(23, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(23, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(23, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(23, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(23, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(23, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(25, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(25, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(25, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(25, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(25, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(25, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(25, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -303,11 +305,11 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(25, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(25, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(25, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(25, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(25, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(27, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(27, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(27, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -316,8 +318,8 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(26, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(28, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -330,17 +332,18 @@ sourceFile:../../outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(27, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(27, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(27, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(27, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(29, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(29, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(29, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:../test.ts ------------------------------------------------------------------- >>>}); ->>>define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>>define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -355,24 +358,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(30, 5) Source(3, 12) + SourceIndex(2) -2 >Emitted(30, 15) Source(3, 14) + SourceIndex(2) -3 >Emitted(30, 18) Source(3, 17) + SourceIndex(2) -4 >Emitted(30, 20) Source(3, 19) + SourceIndex(2) -5 >Emitted(30, 21) Source(3, 20) + SourceIndex(2) +1 >Emitted(33, 5) Source(3, 12) + SourceIndex(2) +2 >Emitted(33, 15) Source(3, 14) + SourceIndex(2) +3 >Emitted(33, 18) Source(3, 17) + SourceIndex(2) +4 >Emitted(33, 20) Source(3, 19) + SourceIndex(2) +5 >Emitted(33, 21) Source(3, 20) + SourceIndex(2) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(31, 5) Source(4, 1) + SourceIndex(2) +1->Emitted(34, 5) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(32, 9) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(35, 9) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^^^^^ @@ -382,16 +385,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(33, 9) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(33, 10) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(36, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(36, 10) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(34, 9) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(34, 18) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(37, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(37, 18) Source(6, 2) + SourceIndex(2) --- >>> })(); 1 >^^^^ @@ -405,10 +408,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(35, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(35, 6) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(35, 6) Source(4, 1) + SourceIndex(2) -4 >Emitted(35, 10) Source(6, 2) + SourceIndex(2) +1 >Emitted(38, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(38, 6) Source(6, 2) + SourceIndex(2) +3 >Emitted(38, 6) Source(4, 1) + SourceIndex(2) +4 >Emitted(38, 10) Source(6, 2) + SourceIndex(2) --- >>> exports.c1 = c1; 1->^^^^ @@ -422,10 +425,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(36, 5) Source(4, 14) + SourceIndex(2) -2 >Emitted(36, 15) Source(4, 16) + SourceIndex(2) -3 >Emitted(36, 20) Source(6, 2) + SourceIndex(2) -4 >Emitted(36, 21) Source(6, 2) + SourceIndex(2) +1->Emitted(39, 5) Source(4, 14) + SourceIndex(2) +2 >Emitted(39, 15) Source(4, 16) + SourceIndex(2) +3 >Emitted(39, 20) Source(6, 2) + SourceIndex(2) +4 >Emitted(39, 21) Source(6, 2) + SourceIndex(2) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -444,20 +447,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(37, 5) Source(8, 12) + SourceIndex(2) -2 >Emitted(37, 22) Source(8, 21) + SourceIndex(2) -3 >Emitted(37, 25) Source(8, 24) + SourceIndex(2) -4 >Emitted(37, 29) Source(8, 28) + SourceIndex(2) -5 >Emitted(37, 31) Source(8, 30) + SourceIndex(2) -6 >Emitted(37, 33) Source(8, 32) + SourceIndex(2) -7 >Emitted(37, 34) Source(8, 33) + SourceIndex(2) +1->Emitted(40, 5) Source(8, 12) + SourceIndex(2) +2 >Emitted(40, 22) Source(8, 21) + SourceIndex(2) +3 >Emitted(40, 25) Source(8, 24) + SourceIndex(2) +4 >Emitted(40, 29) Source(8, 28) + SourceIndex(2) +5 >Emitted(40, 31) Source(8, 30) + SourceIndex(2) +6 >Emitted(40, 33) Source(8, 32) + SourceIndex(2) +7 >Emitted(40, 34) Source(8, 33) + SourceIndex(2) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(38, 5) Source(9, 1) + SourceIndex(2) +1 >Emitted(41, 5) Source(9, 1) + SourceIndex(2) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -471,11 +474,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(39, 9) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(39, 15) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(39, 16) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(39, 33) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(39, 34) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(42, 9) Source(10, 5) + SourceIndex(2) +2 >Emitted(42, 15) Source(10, 11) + SourceIndex(2) +3 >Emitted(42, 16) Source(10, 12) + SourceIndex(2) +4 >Emitted(42, 33) Source(10, 21) + SourceIndex(2) +5 >Emitted(42, 34) Source(10, 22) + SourceIndex(2) --- >>> } 1 >^^^^ @@ -484,8 +487,8 @@ sourceFile:../test.ts 1 > > 2 > } -1 >Emitted(40, 5) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(40, 6) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(43, 5) Source(11, 1) + SourceIndex(2) +2 >Emitted(43, 6) Source(11, 2) + SourceIndex(2) --- >>> exports.f1 = f1; 1->^^^^ @@ -499,10 +502,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(41, 5) Source(9, 17) + SourceIndex(2) -2 >Emitted(41, 15) Source(9, 19) + SourceIndex(2) -3 >Emitted(41, 20) Source(11, 2) + SourceIndex(2) -4 >Emitted(41, 21) Source(11, 2) + SourceIndex(2) +1->Emitted(44, 5) Source(9, 17) + SourceIndex(2) +2 >Emitted(44, 15) Source(9, 19) + SourceIndex(2) +3 >Emitted(44, 20) Source(11, 2) + SourceIndex(2) +4 >Emitted(44, 21) Source(11, 2) + SourceIndex(2) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -522,13 +525,13 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(42, 5) Source(13, 12) + SourceIndex(2) -2 >Emitted(42, 15) Source(13, 14) + SourceIndex(2) -3 >Emitted(42, 18) Source(13, 17) + SourceIndex(2) -4 >Emitted(42, 20) Source(13, 19) + SourceIndex(2) -5 >Emitted(42, 21) Source(13, 20) + SourceIndex(2) -6 >Emitted(42, 26) Source(13, 25) + SourceIndex(2) -7 >Emitted(42, 27) Source(13, 26) + SourceIndex(2) +1->Emitted(45, 5) Source(13, 12) + SourceIndex(2) +2 >Emitted(45, 15) Source(13, 14) + SourceIndex(2) +3 >Emitted(45, 18) Source(13, 17) + SourceIndex(2) +4 >Emitted(45, 20) Source(13, 19) + SourceIndex(2) +5 >Emitted(45, 21) Source(13, 20) + SourceIndex(2) +6 >Emitted(45, 26) Source(13, 25) + SourceIndex(2) +7 >Emitted(45, 27) Source(13, 26) + SourceIndex(2) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -546,13 +549,13 @@ sourceFile:../test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(43, 5) Source(14, 12) + SourceIndex(2) -2 >Emitted(43, 15) Source(14, 14) + SourceIndex(2) -3 >Emitted(43, 18) Source(14, 17) + SourceIndex(2) -4 >Emitted(43, 20) Source(14, 19) + SourceIndex(2) -5 >Emitted(43, 21) Source(14, 20) + SourceIndex(2) -6 >Emitted(43, 26) Source(14, 25) + SourceIndex(2) -7 >Emitted(43, 27) Source(14, 26) + SourceIndex(2) +1->Emitted(46, 5) Source(14, 12) + SourceIndex(2) +2 >Emitted(46, 15) Source(14, 14) + SourceIndex(2) +3 >Emitted(46, 18) Source(14, 17) + SourceIndex(2) +4 >Emitted(46, 20) Source(14, 19) + SourceIndex(2) +5 >Emitted(46, 21) Source(14, 20) + SourceIndex(2) +6 >Emitted(46, 26) Source(14, 25) + SourceIndex(2) +7 >Emitted(46, 27) Source(14, 26) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.errors.txt index 247f9e4f2f2a1..b0d02cf812052 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map index 51755e4c9a347..7613820ab9901 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/sourcemapModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/sourcemapModuleSimpleNoOutdir.sourcemap.txt index b461163a8b8e4..bba2edd10017f 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/sourcemapModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/sourcemapModuleSimpleNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:m1.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js index 372f1052b89d5..4e5ad232cc3ab 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map index 9bcc170386cc8..1e9d1cc6ddf05 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map index 095951a67d097..d3e8930bf4e1e 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/sourcemapModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/sourcemapModuleSimpleNoOutdir.sourcemap.txt index d5247e7eeb021..e5eb42814b0a5 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/sourcemapModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/sourcemapModuleSimpleNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: m1.ts emittedFile:m1.js sourceFile:m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js index c2e7dfa443bfd..bbc39c2543192 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map index 7bae4ed7491a2..0af52e5facda0 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 4a09f6eebdda0..c93393fadd7e2 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index 372f1052b89d5..4e5ad232cc3ab 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 67882e5327bfc..3ee95c75c9578 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt index c8c025ac58271..ff95cc13340e6 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/m1.js sourceFile:../../m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../../m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../../m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../../m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../../m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../../m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../../m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:../../test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:../../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:../../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:../../test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:../../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:../../test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:../../test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:../../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index fbcf63377be22..d9691d43fc263 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index c2e7dfa443bfd..bbc39c2543192 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 1c53bf2849cf2..814caa426d9fd 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 8fda552208ba7..a98cd950b0fbd 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../../m1.ts emittedFile:outdir/simple/m1.js sourceFile:../../m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../../m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../../m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../../m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../../m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../../m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../../m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: ../../test.ts emittedFile:outdir/simple/test.js sourceFile:../../test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:../../test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:../../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:../../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:../../test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:../../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:../../test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:../../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js index f385e49ecd198..cc73ea698fe63 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 6377a26395e5e..f8787f0f0188f 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt index 71c0a41b2d11a..a5c116d00e4ca 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:../m1.ts ------------------------------------------------------------------- >>>define("m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:../test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:../test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.errors.txt index 12592331fb591..0dc033a09d2dc 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js.map index 51755e4c9a347..7613820ab9901 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/sourcemapModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/sourcemapModuleSubfolderNoOutdir.sourcemap.txt index b6ddd879bc183..8489469d29a0b 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/sourcemapModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/sourcemapModuleSubfolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js index 6c8aeb3190bf9..081c888ee0234 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map index 9bcc170386cc8..1e9d1cc6ddf05 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js.map index 095951a67d097..d3e8930bf4e1e 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/sourcemapModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/sourcemapModuleSubfolderNoOutdir.sourcemap.txt index 3319b4e31f9dc..dcbc990a0846a 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/sourcemapModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/sourcemapModuleSubfolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: m1.ts emittedFile:ref/m1.js sourceFile:m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js index 46c9f29e55a8a..bdc33590853f7 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map index 56d42d8bdfd58..bbd1ffd7b9880 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 652d934d6022c..df92966a9109a 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index 6c8aeb3190bf9..081c888ee0234 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 67882e5327bfc..3ee95c75c9578 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index de5d168dad2c1..ed6c818fda582 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/ref/m1.js sourceFile:../../../ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../../../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../../../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../../../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../../../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:../../test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:../../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:../../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:../../test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:../../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:../../test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:../../test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:../../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 15bddd32fe5c9..a1ba2747bea79 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 46c9f29e55a8a..bdc33590853f7 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index bcab7aa3bc644..1ea6b49a9b92d 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index a9427c9fc8bbc..88e2ff35ec180 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ../../../ref/m1.ts emittedFile:outdir/simple/ref/m1.js sourceFile:../../../ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:../../../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:../../../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:../../../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:../../../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: ../../test.ts emittedFile:outdir/simple/test.js sourceFile:../../test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:../../test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:../../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:../../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:../../test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:../../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:../../test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:../../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 18d212c7e69ab..93a25f7ef19cc 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index f77c1351b1584..f2d94cd0ab2e6 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt index 9c12e1749caaf..b7c6dfd3fdd94 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:../ref/m1.ts ------------------------------------------------------------------- >>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:../ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:../ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:../ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:../ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:../ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:../test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:../test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:../test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:../test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:../test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:../test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:../test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:../test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.errors.txt index 42154149020d1..7eb84ece29d1e 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/diskFile0.js.map index 5511f8eed7a74..ffa9f9f880132 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/ref/m1.js.map index da83de7ea2e73..fa208c79390a5 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/sourcemapMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/sourcemapMultifolderNoOutdir.sourcemap.txt index 9f8f5856ae82f..fae25202ebf25 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/sourcemapMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/sourcemapMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/test.js.map index 38fe91174ea14..e267093ff28c1 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/diskFile0.js.map index 5511f8eed7a74..ffa9f9f880132 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/ref/m1.js.map index da83de7ea2e73..fa208c79390a5 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/sourcemapMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/sourcemapMultifolderNoOutdir.sourcemap.txt index 9f8f5856ae82f..fae25202ebf25 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/sourcemapMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/sourcemapMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/test.js.map index 38fe91174ea14..e267093ff28c1 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map index b9e02d043489a..3a3e660ebb593 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map index 4c7bad4f920d8..5fecc97d364a2 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map index 8bb6ed1465023..909bc0e42eff5 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt index cb0659450da97..b638e890cfce2 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:../../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:../../../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:../../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:../../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:../../../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map index b9e02d043489a..3a3e660ebb593 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map index 4c7bad4f920d8..5fecc97d364a2 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map index 8bb6ed1465023..909bc0e42eff5 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt index cb0659450da97..b638e890cfce2 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:../../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:../../../test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:../../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:../../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:../../../test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/amd/bin/test.js.map index 37b77beb154fa..16fc574b9c10f 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_multifolder_ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/amd/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/amd/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt index fa9ebc580e629..efde82f881cd9 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/amd/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/amd/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/bin/test.js.map index 37b77beb154fa..16fc574b9c10f 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_multifolder_ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/sourcemapMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/sourcemapMultifolderSpecifyOutputFile.errors.txt index 53a35eb2c84a0..f420dc4be3342 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/sourcemapMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/sourcemapMultifolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ../outputdir_multifolder_ref/m2.ts (0 errors) ==== var m2_a1 = 10; class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt index fa9ebc580e629..efde82f881cd9 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/m1.js.map index da83de7ea2e73..fa208c79390a5 100644 --- a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/sourcemapSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/sourcemapSimpleNoOutdir.sourcemap.txt index 17bbd902b9603..2eb83abfe6a56 100644 --- a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/sourcemapSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/sourcemapSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/test.js.map index 69f4d8bbfc17c..432c227c72b7e 100644 --- a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/m1.js.map index da83de7ea2e73..fa208c79390a5 100644 --- a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/sourcemapSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/sourcemapSimpleNoOutdir.sourcemap.txt index 17bbd902b9603..2eb83abfe6a56 100644 --- a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/sourcemapSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/sourcemapSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/test.js.map index 69f4d8bbfc17c..432c227c72b7e 100644 --- a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index dcba20cf66a51..d3339c99f1950 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 5ec3a45d1bd61..9026931ffe9c4 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt index 0a6c6e15aa1c6..afe348176d3c5 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index dcba20cf66a51..d3339c99f1950 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 5ec3a45d1bd61..9026931ffe9c4 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt index 0a6c6e15aa1c6..afe348176d3c5 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/amd/bin/test.js.map index b7b29ed1cf834..0f1b26bbb4c10 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/amd/sourcemapSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/amd/sourcemapSimpleSpecifyOutputFile.sourcemap.txt index 6343dcc34c6d5..246480ea6fba5 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/amd/sourcemapSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/amd/sourcemapSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/bin/test.js.map index b7b29ed1cf834..0f1b26bbb4c10 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/sourcemapSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/sourcemapSimpleSpecifyOutputFile.errors.txt index 53fc18f86c749..fa5c648451acb 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/sourcemapSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/sourcemapSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/sourcemapSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/sourcemapSimpleSpecifyOutputFile.sourcemap.txt index 6343dcc34c6d5..246480ea6fba5 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/sourcemapSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/sourcemapSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/sourcemapSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/sourcemapSingleFileNoOutdir.sourcemap.txt index 0b09b971bcbec..662bee468cda5 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/sourcemapSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/sourcemapSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/test.js.map index 3cb3f00b46d7f..27d7a9ee7335c 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/sourcemapSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/sourcemapSingleFileNoOutdir.sourcemap.txt index 0b09b971bcbec..662bee468cda5 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/sourcemapSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/sourcemapSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/test.js.map index 3cb3f00b46d7f..27d7a9ee7335c 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map index d2bb04b222685..9b9740e35556c 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/amd/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/amd/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt index dffdc150f7185..2b86d9f68227a 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/amd/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/amd/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map index d2bb04b222685..9b9740e35556c 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/node/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/node/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt index dffdc150f7185..2b86d9f68227a 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/node/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/node/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/amd/bin/test.js.map index c15b0f9ed70ea..1ea77ceaed18f 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/amd/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/amd/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt index 127f06d960ee7..8dcf4e9b92851 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/amd/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/amd/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/bin/test.js.map index c15b0f9ed70ea..1ea77ceaed18f 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/sourcemapSingleFileSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/sourcemapSingleFileSpecifyOutputFile.errors.txt index eb358c3b79d38..6fdef1c0d9d45 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/sourcemapSingleFileSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/sourcemapSingleFileSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== test.ts (0 errors) ==== var a1 = 10; class c1 { diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt index 127f06d960ee7..8dcf4e9b92851 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/ref/m1.js.map index da83de7ea2e73..fa208c79390a5 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/sourcemapSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/sourcemapSubfolderNoOutdir.sourcemap.txt index 6bdf8e8ef313b..e9fd62ee40df4 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/sourcemapSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/sourcemapSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/test.js.map index ef084bb212820..ec2e68648b7d2 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/ref/m1.js.map index da83de7ea2e73..fa208c79390a5 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/sourcemapSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/sourcemapSubfolderNoOutdir.sourcemap.txt index 6bdf8e8ef313b..e9fd62ee40df4 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/sourcemapSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/sourcemapSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/test.js.map index ef084bb212820..ec2e68648b7d2 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index b8be5eb8e01a4..1733ce017197a 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 22a81dc63bc12..21d3e73474e5f 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt index 2de709b09abb8..fd9ac18f50808 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index b8be5eb8e01a4..1733ce017197a 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 22a81dc63bc12..21d3e73474e5f 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt index 2de709b09abb8..fd9ac18f50808 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../../../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../../../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../../../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../../../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../../../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:../../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:../../test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:../../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:../../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:../../test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/amd/bin/test.js.map index 91ea14b3da422..0b06c40446086 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/amd/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/amd/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt index 9ca0493ff415e..09d4554b31828 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/amd/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/amd/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/bin/test.js.map index 91ea14b3da422..0b06c40446086 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/sourcemapSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/sourcemapSubfolderSpecifyOutputFile.errors.txt index 376cfa761b8a0..2a58fd1ab36f3 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/sourcemapSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/sourcemapSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt index 9ca0493ff415e..09d4554b31828 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:../ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:../ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:../ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:../ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:../ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:../test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:../test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:../test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:../test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:../test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map index 04f168a6289cc..830a328e14422 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.json index ef5cb2df6335d..e949da7fdbf1d 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt index 6abc36a083230..c07300abf9132 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/test.js.map index e425f41290b8a..ba0f9afb8202a 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map index 0ce68e169af7d..790459b963d8a 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.json index ef5cb2df6335d..e949da7fdbf1d 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt index 49e704a99e1f8..072b66be99802 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ref/m2.ts emittedFile:ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/test.js.map index e425f41290b8a..ba0f9afb8202a 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index 04f168a6289cc..830a328e14422 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index e425f41290b8a..ba0f9afb8202a 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json index a46fe8457105a..892bc6673b9d7 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 7e0989aabb01e..51667d9da4847 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -152,6 +152,7 @@ emittedFile:outdir/simple/ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -164,24 +165,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -191,16 +192,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -214,10 +215,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -231,10 +232,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -253,20 +254,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -280,11 +281,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -293,8 +294,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -374,7 +375,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -384,16 +385,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -407,8 +408,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -459,11 +460,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -472,7 +473,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 0ce68e169af7d..790459b963d8a 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index e425f41290b8a..ba0f9afb8202a 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json index a46fe8457105a..892bc6673b9d7 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 3d19accc614eb..eceffcab6bc9b 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -151,6 +151,7 @@ sources: ref/m2.ts emittedFile:outdir/simple/ref/m2.js sourceFile:ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -163,24 +164,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -190,16 +191,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -213,10 +214,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -230,10 +231,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -252,20 +253,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -279,11 +280,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -292,8 +293,8 @@ sourceFile:ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -307,10 +308,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -373,7 +374,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -383,16 +384,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -406,8 +407,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -458,11 +459,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -471,7 +472,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js index 13e9de8f87f84..a480aa83e80bf 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 37bb9be8a9590..38ee6987e2c08 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.json index 7316c8b01c986..80d11298c83de 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt index 51a641cb750a4..b0f81c9a15c7a 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -317,8 +318,8 @@ sourceFile:test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/bin/test.js.map index a6626039aa21a..facd1d09335a2 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.json index 7316c8b01c986..80d11298c83de 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt index 38aecc15857f0..c4c07a7d1d0ad 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -196,7 +196,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 81bb710c58080..1ebe03468c72e 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -9,6 +9,7 @@ function m1_f1() { return m1_instance1; } define("ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index f3058d9f8787f..d2eeb5074b558 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index e165908b72c5b..ba23bdd104ca1 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index df760dc79b022..0f23121a493d7 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,14 +138,15 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js sourceFile:ref/m2.ts ------------------------------------------------------------------- >>>define("ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1->^^^^ 2 > ^^^^^^^^^^^^^ @@ -158,24 +159,24 @@ sourceFile:ref/m2.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1) +1->Emitted(13, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(13, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(13, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(13, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(13, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -185,16 +186,16 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(17, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(17, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -208,10 +209,10 @@ sourceFile:ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(18, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(18, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -225,10 +226,10 @@ sourceFile:ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(18, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(19, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(19, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -247,20 +248,20 @@ sourceFile:ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(19, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(20, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(20, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(20, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(20, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(20, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(20, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(20, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -274,11 +275,11 @@ sourceFile:ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(22, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(22, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(22, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(22, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(22, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -287,8 +288,8 @@ sourceFile:ref/m2.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(23, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -301,10 +302,10 @@ sourceFile:ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(23, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(24, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(24, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -317,8 +318,8 @@ sourceFile:test.ts 3 > ^-> 1 > 2 >/// -1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2) +1 >Emitted(26, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(26, 34) Source(1, 34) + SourceIndex(2) --- >>>/// 1-> @@ -326,8 +327,8 @@ sourceFile:test.ts 1-> > 2 >/// -1->Emitted(26, 1) Source(2, 1) + SourceIndex(2) -2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2) +1->Emitted(27, 1) Source(2, 1) + SourceIndex(2) +2 >Emitted(27, 34) Source(2, 34) + SourceIndex(2) --- >>>var a1 = 10; 1 > @@ -344,25 +345,25 @@ sourceFile:test.ts 4 > = 5 > 10 6 > ; -1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2) -3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2) -4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2) -5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2) -6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2) +1 >Emitted(28, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(28, 5) Source(3, 5) + SourceIndex(2) +3 >Emitted(28, 7) Source(3, 7) + SourceIndex(2) +4 >Emitted(28, 10) Source(3, 10) + SourceIndex(2) +5 >Emitted(28, 12) Source(3, 12) + SourceIndex(2) +6 >Emitted(28, 13) Source(3, 13) + SourceIndex(2) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) +1->Emitted(29, 1) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(30, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -372,16 +373,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(31, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(32, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(32, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -395,10 +396,10 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2) -4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2) +1 >Emitted(33, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(33, 2) Source(6, 2) + SourceIndex(2) +3 >Emitted(33, 2) Source(4, 1) + SourceIndex(2) +4 >Emitted(33, 6) Source(6, 2) + SourceIndex(2) --- >>>var instance1 = new c1(); 1-> @@ -419,21 +420,21 @@ sourceFile:test.ts 6 > c1 7 > () 8 > ; -1->Emitted(33, 1) Source(8, 1) + SourceIndex(2) -2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2) -3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2) -4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2) -5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2) -6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2) -7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2) -8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2) +1->Emitted(34, 1) Source(8, 1) + SourceIndex(2) +2 >Emitted(34, 5) Source(8, 5) + SourceIndex(2) +3 >Emitted(34, 14) Source(8, 14) + SourceIndex(2) +4 >Emitted(34, 17) Source(8, 17) + SourceIndex(2) +5 >Emitted(34, 21) Source(8, 21) + SourceIndex(2) +6 >Emitted(34, 23) Source(8, 23) + SourceIndex(2) +7 >Emitted(34, 25) Source(8, 25) + SourceIndex(2) +8 >Emitted(34, 26) Source(8, 26) + SourceIndex(2) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2) +1 >Emitted(35, 1) Source(9, 1) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -447,11 +448,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(36, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(36, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(36, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(36, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(36, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -460,7 +461,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(37, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(37, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map index ba9f4ee590ccc..f3f77743f872e 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt index ea1bbf2ba6bde..2c420704766b0 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ref/m2.ts (0 errors) ==== export var m2_a1 = 10; export class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json index e165908b72c5b..ba23bdd104ca1 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json @@ -7,9 +7,9 @@ "out": "bin/outAndOutDirFile.js", "outDir": "outdir/outAndOutDirFolder", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index c8507ca7df84d..2d42454f204fe 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/outAndOutDirFile.js @@ -196,7 +196,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -206,16 +206,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -229,8 +229,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2) --- @@ -281,11 +281,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -294,7 +294,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=outAndOutDirFile.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map index 3b00d82ab66c4..aedc29a2978e6 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map index 8c257bd111148..312d2f052cc78 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.json index c2594c0093cb8..f33a095e60eea 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt index 0fa4d7bfa36f5..00f645f2eac17 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:diskFile1.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js index 5cca04a0f2567..bf3f6e482670a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map index 8612cd0d1085a..2330fbc104bc3 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map index 058e405b6061e..0b0599e7f6232 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map index e7f54a4a2e144..f53f427de904e 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.json index c2594c0093cb8..f33a095e60eea 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt index 625e81c473819..b2dad692820c3 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: outputdir_module_multifolder/ref/m1.ts emittedFile:ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: outputdir_module_multifolder_ref/m2.ts emittedFile:diskFile1.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: outputdir_module_multifolder/test.ts emittedFile:test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js index 14c09e444a52a..67406a9e410d5 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map index 4ac74c2fcdb7c..fc3dfdd8306a4 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 8c257bd111148..312d2f052cc78 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index 5cca04a0f2567..bf3f6e482670a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index 8612cd0d1085a..2330fbc104bc3 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index 144ad24e2de69..dd1c532b6dfbd 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 3b00d82ab66c4..aedc29a2978e6 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json index d2c6956bf8021..1a429c986d8ef 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 8a9a8cba4301e..19c0e53aa0ca7 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -193,24 +195,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -220,16 +222,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -243,10 +245,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -260,10 +262,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -282,20 +284,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -309,11 +311,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -322,8 +324,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -336,10 +338,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -353,6 +355,7 @@ emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -367,24 +370,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(3, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(3, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(3, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(3, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(3, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(3, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -394,16 +397,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(6, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -417,10 +420,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(4, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(6, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(4, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(6, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -434,10 +437,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(4, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(4, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(4, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(4, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -456,20 +459,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(8, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(8, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(8, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(8, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(8, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(8, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(8, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(8, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(8, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(8, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(8, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(8, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(8, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(8, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -483,11 +486,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(10, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(10, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(10, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(10, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -496,8 +499,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(11, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -511,10 +514,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(9, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -534,13 +537,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(13, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(13, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(13, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(13, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(13, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(13, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(13, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(13, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(13, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(13, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(13, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(13, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(13, 26) + SourceIndex(0) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -558,13 +561,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(15, 5) Source(14, 12) + SourceIndex(0) -2 >Emitted(15, 15) Source(14, 14) + SourceIndex(0) -3 >Emitted(15, 18) Source(14, 17) + SourceIndex(0) -4 >Emitted(15, 20) Source(14, 19) + SourceIndex(0) -5 >Emitted(15, 21) Source(14, 20) + SourceIndex(0) -6 >Emitted(15, 26) Source(14, 25) + SourceIndex(0) -7 >Emitted(15, 27) Source(14, 26) + SourceIndex(0) +1->Emitted(16, 5) Source(14, 12) + SourceIndex(0) +2 >Emitted(16, 15) Source(14, 14) + SourceIndex(0) +3 >Emitted(16, 18) Source(14, 17) + SourceIndex(0) +4 >Emitted(16, 20) Source(14, 19) + SourceIndex(0) +5 >Emitted(16, 21) Source(14, 20) + SourceIndex(0) +6 >Emitted(16, 26) Source(14, 25) + SourceIndex(0) +7 >Emitted(16, 27) Source(14, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index e7f54a4a2e144..f53f427de904e 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index 14c09e444a52a..67406a9e410d5 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 4ac74c2fcdb7c..fc3dfdd8306a4 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,wCAAwC,CAAC,CAAC;AACnD,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index ec0a73b5af84d..1646fd608eaa3 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,3 +1,4 @@ +"use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 058e405b6061e..0b0599e7f6232 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json index d2c6956bf8021..1a429c986d8ef 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index f2cac8f7a2abc..296dcf75dc74f 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: outputdir_module_multifolder/ref/m1.ts emittedFile:outdir/simple/outputdir_module_multifolder/ref/m1.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -179,6 +180,7 @@ sources: outputdir_module_multifolder_ref/m2.ts emittedFile:outdir/simple/outputdir_module_multifolder_ref/m2.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m2_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -191,24 +193,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m2_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -218,16 +220,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -241,10 +243,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_c1 = m2_c1; 1-> @@ -258,10 +260,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -280,20 +282,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m2_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -307,11 +309,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -320,8 +322,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m2_f1 = m2_f1; 1-> @@ -335,10 +337,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -350,6 +352,7 @@ sources: outputdir_module_multifolder/test.ts emittedFile:outdir/simple/outputdir_module_multifolder/test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -366,13 +369,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>var m2 = require("../outputdir_module_multifolder_ref/m2"); 1-> @@ -390,13 +393,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > "../outputdir_module_multifolder_ref/m2" 6 > ) 7 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 21) + SourceIndex(0) -5 >Emitted(2, 58) Source(2, 61) + SourceIndex(0) -6 >Emitted(2, 59) Source(2, 62) + SourceIndex(0) -7 >Emitted(2, 60) Source(2, 63) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(2, 8) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 58) Source(2, 61) + SourceIndex(0) +6 >Emitted(3, 59) Source(2, 62) + SourceIndex(0) +7 >Emitted(3, 60) Source(2, 63) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -411,24 +414,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(3, 1) Source(3, 12) + SourceIndex(0) -2 >Emitted(3, 11) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 16) Source(3, 19) + SourceIndex(0) -5 >Emitted(3, 17) Source(3, 20) + SourceIndex(0) +1 >Emitted(4, 1) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 11) Source(3, 14) + SourceIndex(0) +3 >Emitted(4, 14) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 16) Source(3, 19) + SourceIndex(0) +5 >Emitted(4, 17) Source(3, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -438,16 +441,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(8, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -461,10 +464,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) -3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(9, 6) Source(6, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -478,10 +481,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(9, 1) Source(4, 14) + SourceIndex(0) -2 >Emitted(9, 11) Source(4, 16) + SourceIndex(0) -3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +1->Emitted(10, 1) Source(4, 14) + SourceIndex(0) +2 >Emitted(10, 11) Source(4, 16) + SourceIndex(0) +3 >Emitted(10, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(10, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -500,20 +503,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(10, 1) Source(8, 12) + SourceIndex(0) -2 >Emitted(10, 18) Source(8, 21) + SourceIndex(0) -3 >Emitted(10, 21) Source(8, 24) + SourceIndex(0) -4 >Emitted(10, 25) Source(8, 28) + SourceIndex(0) -5 >Emitted(10, 27) Source(8, 30) + SourceIndex(0) -6 >Emitted(10, 29) Source(8, 32) + SourceIndex(0) -7 >Emitted(10, 30) Source(8, 33) + SourceIndex(0) +1->Emitted(11, 1) Source(8, 12) + SourceIndex(0) +2 >Emitted(11, 18) Source(8, 21) + SourceIndex(0) +3 >Emitted(11, 21) Source(8, 24) + SourceIndex(0) +4 >Emitted(11, 25) Source(8, 28) + SourceIndex(0) +5 >Emitted(11, 27) Source(8, 30) + SourceIndex(0) +6 >Emitted(11, 29) Source(8, 32) + SourceIndex(0) +7 >Emitted(11, 30) Source(8, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -527,11 +530,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(12, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(12, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(12, 29) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(12, 30) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(13, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(13, 29) Source(10, 21) + SourceIndex(0) +5 >Emitted(13, 30) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -540,8 +543,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(14, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(11, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -555,10 +558,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) -2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +1->Emitted(15, 1) Source(9, 17) + SourceIndex(0) +2 >Emitted(15, 11) Source(9, 19) + SourceIndex(0) +3 >Emitted(15, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(15, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -578,13 +581,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(15, 1) Source(13, 12) + SourceIndex(0) -2 >Emitted(15, 11) Source(13, 14) + SourceIndex(0) -3 >Emitted(15, 14) Source(13, 17) + SourceIndex(0) -4 >Emitted(15, 16) Source(13, 19) + SourceIndex(0) -5 >Emitted(15, 17) Source(13, 20) + SourceIndex(0) -6 >Emitted(15, 22) Source(13, 25) + SourceIndex(0) -7 >Emitted(15, 23) Source(13, 26) + SourceIndex(0) +1->Emitted(16, 1) Source(13, 12) + SourceIndex(0) +2 >Emitted(16, 11) Source(13, 14) + SourceIndex(0) +3 >Emitted(16, 14) Source(13, 17) + SourceIndex(0) +4 >Emitted(16, 16) Source(13, 19) + SourceIndex(0) +5 >Emitted(16, 17) Source(13, 20) + SourceIndex(0) +6 >Emitted(16, 22) Source(13, 25) + SourceIndex(0) +7 >Emitted(16, 23) Source(13, 26) + SourceIndex(0) --- >>>exports.a3 = m2.m2_c1; 1-> @@ -603,12 +606,12 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(16, 1) Source(14, 12) + SourceIndex(0) -2 >Emitted(16, 11) Source(14, 14) + SourceIndex(0) -3 >Emitted(16, 14) Source(14, 17) + SourceIndex(0) -4 >Emitted(16, 16) Source(14, 19) + SourceIndex(0) -5 >Emitted(16, 17) Source(14, 20) + SourceIndex(0) -6 >Emitted(16, 22) Source(14, 25) + SourceIndex(0) -7 >Emitted(16, 23) Source(14, 26) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 12) + SourceIndex(0) +2 >Emitted(17, 11) Source(14, 14) + SourceIndex(0) +3 >Emitted(17, 14) Source(14, 17) + SourceIndex(0) +4 >Emitted(17, 16) Source(14, 19) + SourceIndex(0) +5 >Emitted(17, 17) Source(14, 20) + SourceIndex(0) +6 >Emitted(17, 22) Source(14, 25) + SourceIndex(0) +7 >Emitted(17, 23) Source(14, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js index 994e21ca0326d..aa75fa3316945 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ -define("ref/m1", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -12,7 +13,8 @@ define("ref/m1", ["require", "exports"], function (require, exports) { } exports.m1_f1 = m1_f1; }); -define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { + "use strict"; exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -26,7 +28,8 @@ define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], functio } exports.m2_f1 = m2_f1; }); -define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 85e465474d309..f142c1edf9bd2 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.json index 27485e45ad95a..4b7656e044e85 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index d2331ef357941..a2d611841c43d 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -8,7 +8,8 @@ sources: outputdir_module_multifolder/ref/m1.ts,outputdir_module_multifolder_ref emittedFile:bin/test.js sourceFile:outputdir_module_multifolder/ref/m1.ts ------------------------------------------------------------------- ->>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,17 +165,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:outputdir_module_multifolder_ref/m2.ts ------------------------------------------------------------------- >>>}); ->>>define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>>define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m2_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -187,24 +189,24 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(1, 12) + SourceIndex(1) -2 >Emitted(16, 18) Source(1, 17) + SourceIndex(1) -3 >Emitted(16, 21) Source(1, 20) + SourceIndex(1) -4 >Emitted(16, 23) Source(1, 22) + SourceIndex(1) -5 >Emitted(16, 24) Source(1, 23) + SourceIndex(1) +1 >Emitted(18, 5) Source(1, 12) + SourceIndex(1) +2 >Emitted(18, 18) Source(1, 17) + SourceIndex(1) +3 >Emitted(18, 21) Source(1, 20) + SourceIndex(1) +4 >Emitted(18, 23) Source(1, 22) + SourceIndex(1) +5 >Emitted(18, 24) Source(1, 23) + SourceIndex(1) --- >>> var m2_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(2, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 1) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(20, 9) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -214,16 +216,16 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(19, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(19, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(21, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(20, 21) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(22, 9) Source(4, 1) + SourceIndex(1) +2 >Emitted(22, 21) Source(4, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -237,10 +239,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 4 > export class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(21, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(21, 6) Source(4, 2) + SourceIndex(1) name (m2_c1) -3 >Emitted(21, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(4, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(4, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_c1 = m2_c1; 1->^^^^ @@ -254,10 +256,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > public m2_c1_p1: number; > } 4 > -1->Emitted(22, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(22, 18) Source(2, 19) + SourceIndex(1) -3 >Emitted(22, 26) Source(4, 2) + SourceIndex(1) -4 >Emitted(22, 27) Source(4, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(24, 18) Source(2, 19) + SourceIndex(1) +3 >Emitted(24, 26) Source(4, 2) + SourceIndex(1) +4 >Emitted(24, 27) Source(4, 2) + SourceIndex(1) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -276,20 +278,20 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 5 > m2_c1 6 > () 7 > ; -1->Emitted(23, 5) Source(6, 12) + SourceIndex(1) -2 >Emitted(23, 25) Source(6, 24) + SourceIndex(1) -3 >Emitted(23, 28) Source(6, 27) + SourceIndex(1) -4 >Emitted(23, 32) Source(6, 31) + SourceIndex(1) -5 >Emitted(23, 37) Source(6, 36) + SourceIndex(1) -6 >Emitted(23, 39) Source(6, 38) + SourceIndex(1) -7 >Emitted(23, 40) Source(6, 39) + SourceIndex(1) +1->Emitted(25, 5) Source(6, 12) + SourceIndex(1) +2 >Emitted(25, 25) Source(6, 24) + SourceIndex(1) +3 >Emitted(25, 28) Source(6, 27) + SourceIndex(1) +4 >Emitted(25, 32) Source(6, 31) + SourceIndex(1) +5 >Emitted(25, 37) Source(6, 36) + SourceIndex(1) +6 >Emitted(25, 39) Source(6, 38) + SourceIndex(1) +7 >Emitted(25, 40) Source(6, 39) + SourceIndex(1) --- >>> function m2_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(7, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(7, 1) + SourceIndex(1) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -303,11 +305,11 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(25, 9) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(25, 15) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(25, 16) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(25, 36) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(25, 37) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(27, 9) Source(8, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(8, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(8, 12) + SourceIndex(1) +4 >Emitted(27, 36) Source(8, 24) + SourceIndex(1) +5 >Emitted(27, 37) Source(8, 25) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -316,8 +318,8 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(26, 6) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(28, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(9, 2) + SourceIndex(1) --- >>> exports.m2_f1 = m2_f1; 1->^^^^ @@ -330,17 +332,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts > return m2_instance1; > } 4 > -1->Emitted(27, 5) Source(7, 17) + SourceIndex(1) -2 >Emitted(27, 18) Source(7, 22) + SourceIndex(1) -3 >Emitted(27, 26) Source(9, 2) + SourceIndex(1) -4 >Emitted(27, 27) Source(9, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(7, 17) + SourceIndex(1) +2 >Emitted(29, 18) Source(7, 22) + SourceIndex(1) +3 >Emitted(29, 26) Source(9, 2) + SourceIndex(1) +4 >Emitted(29, 27) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js sourceFile:outputdir_module_multifolder/test.ts ------------------------------------------------------------------- >>>}); ->>>define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>>define("test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -355,24 +358,24 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(30, 5) Source(3, 12) + SourceIndex(2) -2 >Emitted(30, 15) Source(3, 14) + SourceIndex(2) -3 >Emitted(30, 18) Source(3, 17) + SourceIndex(2) -4 >Emitted(30, 20) Source(3, 19) + SourceIndex(2) -5 >Emitted(30, 21) Source(3, 20) + SourceIndex(2) +1 >Emitted(33, 5) Source(3, 12) + SourceIndex(2) +2 >Emitted(33, 15) Source(3, 14) + SourceIndex(2) +3 >Emitted(33, 18) Source(3, 17) + SourceIndex(2) +4 >Emitted(33, 20) Source(3, 19) + SourceIndex(2) +5 >Emitted(33, 21) Source(3, 20) + SourceIndex(2) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(31, 5) Source(4, 1) + SourceIndex(2) +1->Emitted(34, 5) Source(4, 1) + SourceIndex(2) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(32, 9) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(35, 9) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^^^^^ @@ -382,16 +385,16 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(33, 9) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(33, 10) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(36, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(36, 10) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(34, 9) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(34, 18) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(37, 9) Source(6, 1) + SourceIndex(2) +2 >Emitted(37, 18) Source(6, 2) + SourceIndex(2) --- >>> })(); 1 >^^^^ @@ -405,10 +408,10 @@ sourceFile:outputdir_module_multifolder/test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(35, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(35, 6) Source(6, 2) + SourceIndex(2) name (c1) -3 >Emitted(35, 6) Source(4, 1) + SourceIndex(2) -4 >Emitted(35, 10) Source(6, 2) + SourceIndex(2) +1 >Emitted(38, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(38, 6) Source(6, 2) + SourceIndex(2) +3 >Emitted(38, 6) Source(4, 1) + SourceIndex(2) +4 >Emitted(38, 10) Source(6, 2) + SourceIndex(2) --- >>> exports.c1 = c1; 1->^^^^ @@ -422,10 +425,10 @@ sourceFile:outputdir_module_multifolder/test.ts > public p1: number; > } 4 > -1->Emitted(36, 5) Source(4, 14) + SourceIndex(2) -2 >Emitted(36, 15) Source(4, 16) + SourceIndex(2) -3 >Emitted(36, 20) Source(6, 2) + SourceIndex(2) -4 >Emitted(36, 21) Source(6, 2) + SourceIndex(2) +1->Emitted(39, 5) Source(4, 14) + SourceIndex(2) +2 >Emitted(39, 15) Source(4, 16) + SourceIndex(2) +3 >Emitted(39, 20) Source(6, 2) + SourceIndex(2) +4 >Emitted(39, 21) Source(6, 2) + SourceIndex(2) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -444,20 +447,20 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > c1 6 > () 7 > ; -1->Emitted(37, 5) Source(8, 12) + SourceIndex(2) -2 >Emitted(37, 22) Source(8, 21) + SourceIndex(2) -3 >Emitted(37, 25) Source(8, 24) + SourceIndex(2) -4 >Emitted(37, 29) Source(8, 28) + SourceIndex(2) -5 >Emitted(37, 31) Source(8, 30) + SourceIndex(2) -6 >Emitted(37, 33) Source(8, 32) + SourceIndex(2) -7 >Emitted(37, 34) Source(8, 33) + SourceIndex(2) +1->Emitted(40, 5) Source(8, 12) + SourceIndex(2) +2 >Emitted(40, 22) Source(8, 21) + SourceIndex(2) +3 >Emitted(40, 25) Source(8, 24) + SourceIndex(2) +4 >Emitted(40, 29) Source(8, 28) + SourceIndex(2) +5 >Emitted(40, 31) Source(8, 30) + SourceIndex(2) +6 >Emitted(40, 33) Source(8, 32) + SourceIndex(2) +7 >Emitted(40, 34) Source(8, 33) + SourceIndex(2) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(38, 5) Source(9, 1) + SourceIndex(2) +1 >Emitted(41, 5) Source(9, 1) + SourceIndex(2) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -471,11 +474,11 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(39, 9) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(39, 15) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(39, 16) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(39, 33) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(39, 34) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(42, 9) Source(10, 5) + SourceIndex(2) +2 >Emitted(42, 15) Source(10, 11) + SourceIndex(2) +3 >Emitted(42, 16) Source(10, 12) + SourceIndex(2) +4 >Emitted(42, 33) Source(10, 21) + SourceIndex(2) +5 >Emitted(42, 34) Source(10, 22) + SourceIndex(2) --- >>> } 1 >^^^^ @@ -484,8 +487,8 @@ sourceFile:outputdir_module_multifolder/test.ts 1 > > 2 > } -1 >Emitted(40, 5) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(40, 6) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(43, 5) Source(11, 1) + SourceIndex(2) +2 >Emitted(43, 6) Source(11, 2) + SourceIndex(2) --- >>> exports.f1 = f1; 1->^^^^ @@ -499,10 +502,10 @@ sourceFile:outputdir_module_multifolder/test.ts > return instance1; > } 4 > -1->Emitted(41, 5) Source(9, 17) + SourceIndex(2) -2 >Emitted(41, 15) Source(9, 19) + SourceIndex(2) -3 >Emitted(41, 20) Source(11, 2) + SourceIndex(2) -4 >Emitted(41, 21) Source(11, 2) + SourceIndex(2) +1->Emitted(44, 5) Source(9, 17) + SourceIndex(2) +2 >Emitted(44, 15) Source(9, 19) + SourceIndex(2) +3 >Emitted(44, 20) Source(11, 2) + SourceIndex(2) +4 >Emitted(44, 21) Source(11, 2) + SourceIndex(2) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -522,13 +525,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(42, 5) Source(13, 12) + SourceIndex(2) -2 >Emitted(42, 15) Source(13, 14) + SourceIndex(2) -3 >Emitted(42, 18) Source(13, 17) + SourceIndex(2) -4 >Emitted(42, 20) Source(13, 19) + SourceIndex(2) -5 >Emitted(42, 21) Source(13, 20) + SourceIndex(2) -6 >Emitted(42, 26) Source(13, 25) + SourceIndex(2) -7 >Emitted(42, 27) Source(13, 26) + SourceIndex(2) +1->Emitted(45, 5) Source(13, 12) + SourceIndex(2) +2 >Emitted(45, 15) Source(13, 14) + SourceIndex(2) +3 >Emitted(45, 18) Source(13, 17) + SourceIndex(2) +4 >Emitted(45, 20) Source(13, 19) + SourceIndex(2) +5 >Emitted(45, 21) Source(13, 20) + SourceIndex(2) +6 >Emitted(45, 26) Source(13, 25) + SourceIndex(2) +7 >Emitted(45, 27) Source(13, 26) + SourceIndex(2) --- >>> exports.a3 = m2.m2_c1; 1->^^^^ @@ -546,13 +549,13 @@ sourceFile:outputdir_module_multifolder/test.ts 5 > . 6 > m2_c1 7 > ; -1->Emitted(43, 5) Source(14, 12) + SourceIndex(2) -2 >Emitted(43, 15) Source(14, 14) + SourceIndex(2) -3 >Emitted(43, 18) Source(14, 17) + SourceIndex(2) -4 >Emitted(43, 20) Source(14, 19) + SourceIndex(2) -5 >Emitted(43, 21) Source(14, 20) + SourceIndex(2) -6 >Emitted(43, 26) Source(14, 25) + SourceIndex(2) -7 >Emitted(43, 27) Source(14, 26) + SourceIndex(2) +1->Emitted(46, 5) Source(14, 12) + SourceIndex(2) +2 >Emitted(46, 15) Source(14, 14) + SourceIndex(2) +3 >Emitted(46, 18) Source(14, 17) + SourceIndex(2) +4 >Emitted(46, 20) Source(14, 19) + SourceIndex(2) +5 >Emitted(46, 21) Source(14, 20) + SourceIndex(2) +6 >Emitted(46, 26) Source(14, 25) + SourceIndex(2) +7 >Emitted(46, 27) Source(14, 26) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts index 9b6af66589aff..d42fc1cd136e8 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/bin/test.d.ts @@ -1,4 +1,4 @@ -declare module "ref/m1" { +declare module "outputdir_module_multifolder/ref/m1" { export var m1_a1: number; export class m1_c1 { m1_c1_p1: number; @@ -6,7 +6,7 @@ declare module "ref/m1" { export var m1_instance1: m1_c1; export function m1_f1(): m1_c1; } -declare module "../outputdir_module_multifolder_ref/m2" { +declare module "outputdir_module_multifolder_ref/m2" { export var m2_a1: number; export class m2_c1 { m2_c1_p1: number; @@ -15,8 +15,8 @@ declare module "../outputdir_module_multifolder_ref/m2" { export function m2_f1(): m2_c1; } declare module "test" { - import m1 = require("ref/m1"); - import m2 = require("../outputdir_module_multifolder_ref/m2"); + import m1 = require("outputdir_module_multifolder/ref/m1"); + import m2 = require("outputdir_module_multifolder_ref/m2"); export var a1: number; export class c1 { p1: number; diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.errors.txt index 247f9e4f2f2a1..b0d02cf812052 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.json index 27485e45ad95a..4b7656e044e85 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map index 6751f2f82cd22..7e2923164324a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.json index 4a7cc668a6a86..0c8a05da3b10e 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt index 15f5ae4bc9321..d5d3573d71ed6 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:m1.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js index 372f1052b89d5..4e5ad232cc3ab 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map index a57b57d2b17db..67f4a8faf60ca 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map index ca45773f423fb..3bb503f2c26d5 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.json index 4a7cc668a6a86..0c8a05da3b10e 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt index 75f6eb8394069..379d118fec08a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: m1.ts emittedFile:m1.js sourceFile:m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js index c2e7dfa443bfd..bbc39c2543192 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map index 41d3e11e99563..132980673448b 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 6751f2f82cd22..7e2923164324a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index 372f1052b89d5..4e5ad232cc3ab 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index a57b57d2b17db..67f4a8faf60ca 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json index 6766f67eab06d..efb3da725dcbc 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 6a53c3e993607..7df1b9ec85be7 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/m1.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index ca45773f423fb..3bb503f2c26d5 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index c2e7dfa443bfd..bbc39c2543192 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 41d3e11e99563..132980673448b 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AACf,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json index 6766f67eab06d..efb3da725dcbc 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt index c4f12e28fe814..cd4d334d3e26f 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: m1.ts emittedFile:outdir/simple/m1.js sourceFile:m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 22) Source(1, 25) + SourceIndex(0) -6 >Emitted(1, 23) Source(1, 26) + SourceIndex(0) -7 >Emitted(1, 24) Source(1, 27) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 22) Source(1, 25) + SourceIndex(0) +6 >Emitted(2, 23) Source(1, 26) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 27) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js index f385e49ecd198..cc73ea698fe63 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 2ace469f90296..c324029a742fb 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.json index 4d92e8a895187..49abba9156cf2 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index e0c060eb88922..1288ae58ca5c3 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:m1.ts ------------------------------------------------------------------- >>>define("m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.errors.txt index 12592331fb591..0dc033a09d2dc 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.json index 4d92e8a895187..49abba9156cf2 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map index 6c5413f630e73..422fe41a79d21 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.json index d7f99610babea..46f3e8aad7da0 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt index 880d55412f825..94f188a5e3db5 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js index 6c8aeb3190bf9..081c888ee0234 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map index a57b57d2b17db..67f4a8faf60ca 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map index 35e7e9a48dd7c..bee1ea97f8332 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.json index d7f99610babea..46f3e8aad7da0 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt index 7fc9e0c1f6090..6388349845474 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt @@ -8,6 +8,7 @@ sources: ref/m1.ts emittedFile:ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js index 46c9f29e55a8a..bdc33590853f7 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map index d0638b6c34ce5..f851a615aef4a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index bbaba444ba29a..25001d63d84ce 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 6c5413f630e73..422fe41a79d21 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index 6c8aeb3190bf9..081c888ee0234 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,4 +1,5 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index a57b57d2b17db..67f4a8faf60ca 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":";IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAA;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json index 1e722cb852eb9..bfd34fb2ec0d7 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index fdfa62ec27bbd..aae97adf33ffc 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:outdir/simple/ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -181,6 +182,7 @@ emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- >>>define(["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -194,24 +196,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 15) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 20) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 21) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 20) + SourceIndex(0) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -221,16 +223,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 18) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(5, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -244,10 +246,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 6) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(5, 2) + SourceIndex(0) --- >>> exports.c1 = c1; 1->^^^^ @@ -261,10 +263,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 5) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 15) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 15) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -283,20 +285,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 5) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 22) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 25) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 29) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 31) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 33) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 34) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 5) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 22) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 25) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 29) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 31) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 33) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 34) Source(7, 33) + SourceIndex(0) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -310,11 +312,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 9) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 15) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 16) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 33) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 34) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 9) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 33) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 34) Source(9, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -323,8 +325,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 6) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 5) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(10, 2) + SourceIndex(0) --- >>> exports.f1 = f1; 1->^^^^ @@ -338,10 +340,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -360,13 +362,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 5) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 15) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 18) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 20) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 21) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 26) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 27) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 5) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 18) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 21) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 26) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 27) Source(12, 26) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 1b4470e2b3750..3bc070839007f 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,3 +1,4 @@ +"use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 35e7e9a48dd7c..bee1ea97f8332 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFe,aAAK,QAEpB,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 46c9f29e55a8a..bdc33590853f7 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,3 +1,4 @@ +"use strict"; var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index d0638b6c34ce5..f851a615aef4a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACIE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,IAAO,EAAE,WAAW,QAAQ,CAAC,CAAC;AACnB,UAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,UAAE,KAEd,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFe,UAAE,KAEjB,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json index 1e722cb852eb9..bfd34fb2ec0d7 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index c97d88b3d59a3..556733c18c6ce 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -8,6 +8,7 @@ sources: ref/m1.ts emittedFile:outdir/simple/ref/m1.js sourceFile:ref/m1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>exports.m1_a1 = 10; 1 > 2 >^^^^^^^^^^^^^ @@ -20,24 +21,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0) -2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0) -3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0) -4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 12) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 17) + SourceIndex(0) +3 >Emitted(2, 17) Source(1, 20) + SourceIndex(0) +4 >Emitted(2, 19) Source(1, 22) + SourceIndex(0) +5 >Emitted(2, 20) Source(1, 23) + SourceIndex(0) --- >>>var m1_c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -47,16 +48,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -70,10 +71,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_c1 = m1_c1; 1-> @@ -87,10 +88,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(7, 1) Source(2, 14) + SourceIndex(0) -2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(2, 14) + SourceIndex(0) +2 >Emitted(8, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(8, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -109,20 +110,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(8, 1) Source(6, 12) + SourceIndex(0) -2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0) -3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0) -4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0) -5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0) -6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0) -7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0) +1->Emitted(9, 1) Source(6, 12) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 24) + SourceIndex(0) +3 >Emitted(9, 24) Source(6, 27) + SourceIndex(0) +4 >Emitted(9, 28) Source(6, 31) + SourceIndex(0) +5 >Emitted(9, 33) Source(6, 36) + SourceIndex(0) +6 >Emitted(9, 35) Source(6, 38) + SourceIndex(0) +7 >Emitted(9, 36) Source(6, 39) + SourceIndex(0) --- >>>function m1_f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -136,11 +137,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(11, 32) Source(8, 24) + SourceIndex(0) +5 >Emitted(11, 33) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -149,8 +150,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(12, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(9, 2) + SourceIndex(0) --- >>>exports.m1_f1 = m1_f1; 1-> @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(12, 1) Source(7, 17) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0) -3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 17) + SourceIndex(0) +2 >Emitted(13, 14) Source(7, 22) + SourceIndex(0) +3 >Emitted(13, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -179,6 +180,7 @@ sources: test.ts emittedFile:outdir/simple/test.js sourceFile:test.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m1 = require("ref/m1"); 1 > 2 >^^^^ @@ -194,13 +196,13 @@ sourceFile:test.ts 5 > "ref/m1" 6 > ) 7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 21) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 31) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 8) + SourceIndex(0) +3 >Emitted(2, 7) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 21) + SourceIndex(0) +5 >Emitted(2, 26) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 27) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 28) Source(1, 31) + SourceIndex(0) --- >>>exports.a1 = 10; 1 > @@ -215,24 +217,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 1) Source(2, 12) + SourceIndex(0) -2 >Emitted(2, 11) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 17) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 19) + SourceIndex(0) -5 >Emitted(2, 17) Source(2, 20) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 11) Source(2, 14) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 17) + SourceIndex(0) +4 >Emitted(3, 16) Source(2, 19) + SourceIndex(0) +5 >Emitted(3, 17) Source(2, 20) + SourceIndex(0) --- >>>var c1 = (function () { 1-> 2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) --- >>> function c1() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -242,16 +244,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -265,10 +267,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) -3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 2) Source(3, 1) + SourceIndex(0) +4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) --- >>>exports.c1 = c1; 1-> @@ -282,10 +284,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(8, 1) Source(3, 14) + SourceIndex(0) -2 >Emitted(8, 11) Source(3, 16) + SourceIndex(0) -3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +1->Emitted(9, 1) Source(3, 14) + SourceIndex(0) +2 >Emitted(9, 11) Source(3, 16) + SourceIndex(0) +3 >Emitted(9, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -304,20 +306,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(9, 1) Source(7, 12) + SourceIndex(0) -2 >Emitted(9, 18) Source(7, 21) + SourceIndex(0) -3 >Emitted(9, 21) Source(7, 24) + SourceIndex(0) -4 >Emitted(9, 25) Source(7, 28) + SourceIndex(0) -5 >Emitted(9, 27) Source(7, 30) + SourceIndex(0) -6 >Emitted(9, 29) Source(7, 32) + SourceIndex(0) -7 >Emitted(9, 30) Source(7, 33) + SourceIndex(0) +1->Emitted(10, 1) Source(7, 12) + SourceIndex(0) +2 >Emitted(10, 18) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 21) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 25) Source(7, 28) + SourceIndex(0) +5 >Emitted(10, 27) Source(7, 30) + SourceIndex(0) +6 >Emitted(10, 29) Source(7, 32) + SourceIndex(0) +7 >Emitted(10, 30) Source(7, 33) + SourceIndex(0) --- >>>function f1() { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(8, 1) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -331,11 +333,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 29) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 30) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(12, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(12, 29) Source(9, 21) + SourceIndex(0) +5 >Emitted(12, 30) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -344,8 +346,8 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(13, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(10, 2) + SourceIndex(0) --- >>>exports.f1 = f1; 1-> @@ -359,10 +361,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) -2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 17) + SourceIndex(0) +2 >Emitted(14, 11) Source(8, 19) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> @@ -382,12 +384,12 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(14, 1) Source(12, 12) + SourceIndex(0) -2 >Emitted(14, 11) Source(12, 14) + SourceIndex(0) -3 >Emitted(14, 14) Source(12, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(12, 19) + SourceIndex(0) -5 >Emitted(14, 17) Source(12, 20) + SourceIndex(0) -6 >Emitted(14, 22) Source(12, 25) + SourceIndex(0) -7 >Emitted(14, 23) Source(12, 26) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 12) + SourceIndex(0) +2 >Emitted(15, 11) Source(12, 14) + SourceIndex(0) +3 >Emitted(15, 14) Source(12, 17) + SourceIndex(0) +4 >Emitted(15, 16) Source(12, 19) + SourceIndex(0) +5 >Emitted(15, 17) Source(12, 20) + SourceIndex(0) +6 >Emitted(15, 22) Source(12, 25) + SourceIndex(0) +7 >Emitted(15, 23) Source(12, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 18d212c7e69ab..93a25f7ef19cc 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,4 +1,5 @@ define("ref/m1", ["require", "exports"], function (require, exports) { + "use strict"; exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -13,6 +14,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { exports.m1_f1 = m1_f1; }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { + "use strict"; exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 29e01bc0bc6d2..ade8b34024d95 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFe,aAAK,QAEpB,CAAA;;;;ICPU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.json index e1f6d3c6e36ba..7db8ebc692671 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index 54624487a5772..72a52b8ab9782 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:bin/test.js sourceFile:ref/m1.ts ------------------------------------------------------------------- >>>define("ref/m1", ["require", "exports"], function (require, exports) { +>>> "use strict"; >>> exports.m1_a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^^^^ @@ -21,24 +22,24 @@ sourceFile:ref/m1.ts 3 > = 4 > 10 5 > ; -1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) -3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0) -5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 18) Source(1, 17) + SourceIndex(0) +3 >Emitted(3, 21) Source(1, 20) + SourceIndex(0) +4 >Emitted(3, 23) Source(1, 22) + SourceIndex(0) +5 >Emitted(3, 24) Source(1, 23) + SourceIndex(0) --- >>> var m1_c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -48,16 +49,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(7, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 21) Source(4, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -71,10 +72,10 @@ sourceFile:ref/m1.ts 4 > export class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m1_c1) -3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_c1 = m1_c1; 1->^^^^ @@ -88,10 +89,10 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > } 4 > -1->Emitted(8, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0) -3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +1->Emitted(9, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(9, 18) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(9, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -110,20 +111,20 @@ sourceFile:ref/m1.ts 5 > m1_c1 6 > () 7 > ; -1->Emitted(9, 5) Source(6, 12) + SourceIndex(0) -2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0) -3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0) -4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0) -5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0) -6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0) -7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0) +1->Emitted(10, 5) Source(6, 12) + SourceIndex(0) +2 >Emitted(10, 25) Source(6, 24) + SourceIndex(0) +3 >Emitted(10, 28) Source(6, 27) + SourceIndex(0) +4 >Emitted(10, 32) Source(6, 31) + SourceIndex(0) +5 >Emitted(10, 37) Source(6, 36) + SourceIndex(0) +6 >Emitted(10, 39) Source(6, 38) + SourceIndex(0) +7 >Emitted(10, 40) Source(6, 39) + SourceIndex(0) --- >>> function m1_f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) +1 >Emitted(11, 5) Source(7, 1) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -137,11 +138,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(12, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(12, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(8, 12) + SourceIndex(0) +4 >Emitted(12, 36) Source(8, 24) + SourceIndex(0) +5 >Emitted(12, 37) Source(8, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -150,8 +151,8 @@ sourceFile:ref/m1.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(13, 5) Source(9, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(9, 2) + SourceIndex(0) --- >>> exports.m1_f1 = m1_f1; 1->^^^^ @@ -164,10 +165,10 @@ sourceFile:ref/m1.ts > return m1_instance1; > } 4 > -1->Emitted(13, 5) Source(7, 17) + SourceIndex(0) -2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0) -3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(7, 17) + SourceIndex(0) +2 >Emitted(14, 18) Source(7, 22) + SourceIndex(0) +3 >Emitted(14, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(14, 27) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -175,6 +176,7 @@ sourceFile:test.ts ------------------------------------------------------------------- >>>}); >>>define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { +>>> "use strict"; >>> exports.a1 = 10; 1 >^^^^ 2 > ^^^^^^^^^^ @@ -188,24 +190,24 @@ sourceFile:test.ts 3 > = 4 > 10 5 > ; -1 >Emitted(16, 5) Source(2, 12) + SourceIndex(1) -2 >Emitted(16, 15) Source(2, 14) + SourceIndex(1) -3 >Emitted(16, 18) Source(2, 17) + SourceIndex(1) -4 >Emitted(16, 20) Source(2, 19) + SourceIndex(1) -5 >Emitted(16, 21) Source(2, 20) + SourceIndex(1) +1 >Emitted(18, 5) Source(2, 12) + SourceIndex(1) +2 >Emitted(18, 15) Source(2, 14) + SourceIndex(1) +3 >Emitted(18, 18) Source(2, 17) + SourceIndex(1) +4 >Emitted(18, 20) Source(2, 19) + SourceIndex(1) +5 >Emitted(18, 21) Source(2, 20) + SourceIndex(1) --- >>> var c1 = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(17, 5) Source(3, 1) + SourceIndex(1) +1->Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 9) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -215,16 +217,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(19, 9) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(20, 9) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(20, 18) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 18) Source(5, 2) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -238,10 +240,10 @@ sourceFile:test.ts 4 > export class c1 { > public p1: number; > } -1 >Emitted(21, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(21, 6) Source(5, 2) + SourceIndex(1) name (c1) -3 >Emitted(21, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.c1 = c1; 1->^^^^ @@ -255,10 +257,10 @@ sourceFile:test.ts > public p1: number; > } 4 > -1->Emitted(22, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(22, 15) Source(3, 16) + SourceIndex(1) -3 >Emitted(22, 20) Source(5, 2) + SourceIndex(1) -4 >Emitted(22, 21) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 15) Source(3, 16) + SourceIndex(1) +3 >Emitted(24, 20) Source(5, 2) + SourceIndex(1) +4 >Emitted(24, 21) Source(5, 2) + SourceIndex(1) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -277,20 +279,20 @@ sourceFile:test.ts 5 > c1 6 > () 7 > ; -1->Emitted(23, 5) Source(7, 12) + SourceIndex(1) -2 >Emitted(23, 22) Source(7, 21) + SourceIndex(1) -3 >Emitted(23, 25) Source(7, 24) + SourceIndex(1) -4 >Emitted(23, 29) Source(7, 28) + SourceIndex(1) -5 >Emitted(23, 31) Source(7, 30) + SourceIndex(1) -6 >Emitted(23, 33) Source(7, 32) + SourceIndex(1) -7 >Emitted(23, 34) Source(7, 33) + SourceIndex(1) +1->Emitted(25, 5) Source(7, 12) + SourceIndex(1) +2 >Emitted(25, 22) Source(7, 21) + SourceIndex(1) +3 >Emitted(25, 25) Source(7, 24) + SourceIndex(1) +4 >Emitted(25, 29) Source(7, 28) + SourceIndex(1) +5 >Emitted(25, 31) Source(7, 30) + SourceIndex(1) +6 >Emitted(25, 33) Source(7, 32) + SourceIndex(1) +7 >Emitted(25, 34) Source(7, 33) + SourceIndex(1) --- >>> function f1() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(24, 5) Source(8, 1) + SourceIndex(1) +1 >Emitted(26, 5) Source(8, 1) + SourceIndex(1) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -304,11 +306,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(25, 9) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(25, 15) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(25, 16) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(25, 33) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(25, 34) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(27, 9) Source(9, 5) + SourceIndex(1) +2 >Emitted(27, 15) Source(9, 11) + SourceIndex(1) +3 >Emitted(27, 16) Source(9, 12) + SourceIndex(1) +4 >Emitted(27, 33) Source(9, 21) + SourceIndex(1) +5 >Emitted(27, 34) Source(9, 22) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -317,8 +319,8 @@ sourceFile:test.ts 1 > > 2 > } -1 >Emitted(26, 5) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(26, 6) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(28, 5) Source(10, 1) + SourceIndex(1) +2 >Emitted(28, 6) Source(10, 2) + SourceIndex(1) --- >>> exports.f1 = f1; 1->^^^^ @@ -332,10 +334,10 @@ sourceFile:test.ts > return instance1; > } 4 > -1->Emitted(27, 5) Source(8, 17) + SourceIndex(1) -2 >Emitted(27, 15) Source(8, 19) + SourceIndex(1) -3 >Emitted(27, 20) Source(10, 2) + SourceIndex(1) -4 >Emitted(27, 21) Source(10, 2) + SourceIndex(1) +1->Emitted(29, 5) Source(8, 17) + SourceIndex(1) +2 >Emitted(29, 15) Source(8, 19) + SourceIndex(1) +3 >Emitted(29, 20) Source(10, 2) + SourceIndex(1) +4 >Emitted(29, 21) Source(10, 2) + SourceIndex(1) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ @@ -354,13 +356,13 @@ sourceFile:test.ts 5 > . 6 > m1_c1 7 > ; -1->Emitted(28, 5) Source(12, 12) + SourceIndex(1) -2 >Emitted(28, 15) Source(12, 14) + SourceIndex(1) -3 >Emitted(28, 18) Source(12, 17) + SourceIndex(1) -4 >Emitted(28, 20) Source(12, 19) + SourceIndex(1) -5 >Emitted(28, 21) Source(12, 20) + SourceIndex(1) -6 >Emitted(28, 26) Source(12, 25) + SourceIndex(1) -7 >Emitted(28, 27) Source(12, 26) + SourceIndex(1) +1->Emitted(30, 5) Source(12, 12) + SourceIndex(1) +2 >Emitted(30, 15) Source(12, 14) + SourceIndex(1) +3 >Emitted(30, 18) Source(12, 17) + SourceIndex(1) +4 >Emitted(30, 20) Source(12, 19) + SourceIndex(1) +5 >Emitted(30, 21) Source(12, 20) + SourceIndex(1) +6 >Emitted(30, 26) Source(12, 25) + SourceIndex(1) +7 >Emitted(30, 27) Source(12, 26) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.errors.txt index 42154149020d1..7eb84ece29d1e 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== export var m1_a1 = 10; export class m1_c1 { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.json index e1f6d3c6e36ba..7db8ebc692671 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/diskFile0.js.map index e652c011c172f..02fe5ddcde59d 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/ref/m1.js.map index 64aafef0915ff..97e0d452dba03 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.json index a68d507bdf3e0..b2e2f7f7b9bd5 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.sourcemap.txt index a70e80c9c1a54..fb198e5f490b9 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/test.js.map index 859053b551029..d668056049e25 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/diskFile0.js.map index e652c011c172f..02fe5ddcde59d 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/ref/m1.js.map index 64aafef0915ff..97e0d452dba03 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.json index a68d507bdf3e0..b2e2f7f7b9bd5 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.sourcemap.txt index a70e80c9c1a54..fb198e5f490b9 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/test.js.map index 859053b551029..d668056049e25 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map index 64aafef0915ff..97e0d452dba03 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map index 859053b551029..d668056049e25 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map index e652c011c172f..02fe5ddcde59d 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.json index 1641625569c29..0730753a4718b 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt index 4f4f068056fa9..ff2fee631b4da 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map index 64aafef0915ff..97e0d452dba03 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map index 859053b551029..d668056049e25 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map index e652c011c172f..02fe5ddcde59d 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder_ref/m2.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.json index 1641625569c29..0730753a4718b 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt index 4f4f068056fa9..ff2fee631b4da 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -183,7 +183,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -193,16 +193,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -216,8 +216,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -268,11 +268,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m2_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m2_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m2_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m2_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m2_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -281,8 +281,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m2_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m2_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -345,7 +345,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -355,16 +355,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) name (c1) +1->Emitted(7, 5) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 14) Source(6, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -378,8 +378,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) name (c1) -2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) name (c1) +1 >Emitted(8, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(6, 2) + SourceIndex(0) --- @@ -430,11 +430,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) name (f1) -2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) name (f1) -3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) name (f1) -4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) name (f1) -5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) name (f1) +1->Emitted(11, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 22) + SourceIndex(0) --- >>>} 1 > @@ -443,7 +443,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) name (f1) -2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) name (f1) +1 >Emitted(12, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(11, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/bin/test.js.map index 2e0ee57fe0504..429ef42162bf4 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.json index 085ef5e8f1971..d1d60d81434f5 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt index 823af8d1bc3ed..16d11d70bbfdd 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/bin/test.js.map index 2e0ee57fe0504..429ef42162bf4 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAC;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_multifolder/ref/m1.ts","outputdir_multifolder_ref/m2.ts","outputdir_multifolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,0DAA0D;AAC1D,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.errors.txt index 53a35eb2c84a0..f420dc4be3342 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; @@ -12,7 +12,7 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. function m1_f1() { return m1_instance1; } -==== m2.ts (0 errors) ==== +==== ../outputdir_multifolder_ref/m2.ts (0 errors) ==== var m2_a1 = 10; class m2_c1 { public m2_c1_p1: number; diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.json index 085ef5e8f1971..d1d60d81434f5 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt index 823af8d1bc3ed..16d11d70bbfdd 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:outputdir_multifolder/ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:outputdir_multifolder/ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -177,7 +177,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -187,16 +187,16 @@ sourceFile:outputdir_multifolder_ref/m2.ts > public m2_c1_p1: number; > 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) -2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(1) --- >>> return m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) name (m2_c1) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) +2 >Emitted(15, 17) Source(4, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -210,8 +210,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 4 > class m2_c1 { > public m2_c1_p1: number; > } -1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) name (m2_c1) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(16, 2) Source(2, 1) + SourceIndex(1) 4 >Emitted(16, 6) Source(4, 2) + SourceIndex(1) --- @@ -262,11 +262,11 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > 4 > m2_instance1 5 > ; -1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) name (m2_f1) -2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) name (m2_f1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) name (m2_f1) -4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) name (m2_f1) -5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) name (m2_f1) +1->Emitted(19, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(19, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) +4 >Emitted(19, 24) Source(8, 24) + SourceIndex(1) +5 >Emitted(19, 25) Source(8, 25) + SourceIndex(1) --- >>>} 1 > @@ -275,8 +275,8 @@ sourceFile:outputdir_multifolder_ref/m2.ts 1 > > 2 >} -1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) name (m2_f1) -2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) name (m2_f1) +1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) +2 >Emitted(20, 2) Source(9, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -333,7 +333,7 @@ sourceFile:outputdir_multifolder/test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) +1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) --- >>> } 1->^^^^ @@ -343,16 +343,16 @@ sourceFile:outputdir_multifolder/test.ts > public p1: number; > 2 > } -1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) -2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) name (c1) +1->Emitted(27, 5) Source(6, 1) + SourceIndex(2) +2 >Emitted(27, 14) Source(6, 2) + SourceIndex(2) --- >>>})(); 1 > @@ -366,8 +366,8 @@ sourceFile:outputdir_multifolder/test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) name (c1) -2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) name (c1) +1 >Emitted(28, 1) Source(6, 1) + SourceIndex(2) +2 >Emitted(28, 2) Source(6, 2) + SourceIndex(2) 3 >Emitted(28, 2) Source(4, 1) + SourceIndex(2) 4 >Emitted(28, 6) Source(6, 2) + SourceIndex(2) --- @@ -418,11 +418,11 @@ sourceFile:outputdir_multifolder/test.ts 3 > 4 > instance1 5 > ; -1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) name (f1) -2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) name (f1) -3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) name (f1) -4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) name (f1) -5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) name (f1) +1->Emitted(31, 5) Source(10, 5) + SourceIndex(2) +2 >Emitted(31, 11) Source(10, 11) + SourceIndex(2) +3 >Emitted(31, 12) Source(10, 12) + SourceIndex(2) +4 >Emitted(31, 21) Source(10, 21) + SourceIndex(2) +5 >Emitted(31, 22) Source(10, 22) + SourceIndex(2) --- >>>} 1 > @@ -431,7 +431,7 @@ sourceFile:outputdir_multifolder/test.ts 1 > > 2 >} -1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) name (f1) -2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) name (f1) +1 >Emitted(32, 1) Source(11, 1) + SourceIndex(2) +2 >Emitted(32, 2) Source(11, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/m1.js.map index d920bbe078d63..43b7b9cb12626 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.json index 9df1fd3922ee8..46d15a907a47f 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.sourcemap.txt index e9ff85f6fe6c2..bd47f942319a8 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/test.js.map index ad9ad3d5ce04a..83557b43a867f 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/m1.js.map index d920bbe078d63..43b7b9cb12626 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.json index 9df1fd3922ee8..46d15a907a47f 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.sourcemap.txt index e9ff85f6fe6c2..bd47f942319a8 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/test.js.map index ad9ad3d5ce04a..83557b43a867f 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index d920bbe078d63..43b7b9cb12626 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index ad9ad3d5ce04a..83557b43a867f 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.json index 1a472ca17eedb..53336eb9a6f30 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt index 411004d82a33d..9ae5029e13b8e 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index d920bbe078d63..43b7b9cb12626 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index ad9ad3d5ce04a..83557b43a867f 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.json index 1a472ca17eedb..53336eb9a6f30 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt index 411004d82a33d..9ae5029e13b8e 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/bin/test.js.map index f1c6e3bd1b7a7..d876a9633b4ec 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.json index 98a2dea24849d..a5cf9d7d10e25 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt index 10e2e3700c151..5c2960857741b 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/bin/test.js.map index f1c6e3bd1b7a7..d876a9633b4ec 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,6BAA6B;AAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.errors.txt index 53fc18f86c749..fa5c648451acb 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.json index 98a2dea24849d..a5cf9d7d10e25 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt index 10e2e3700c151..5c2960857741b 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.json index dbef889efec2c..edb9f68ed0092 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.sourcemap.txt index ac21898e23f7f..640e894b53c06 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/test.js.map index a1be429da805c..9dc5e9c0cae83 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.json index dbef889efec2c..edb9f68ed0092 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.sourcemap.txt index ac21898e23f7f..640e894b53c06 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/test.js.map index a1be429da805c..9dc5e9c0cae83 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map index a1be429da805c..9dc5e9c0cae83 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.json index afc78006729ea..0091f70060375 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt index cdd78604f7541..8a280e118e5c1 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map index a1be429da805c..9dc5e9c0cae83 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.json index afc78006729ea..0091f70060375 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt index cdd78604f7541..8a280e118e5c1 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/bin/test.js.map index a1be429da805c..9dc5e9c0cae83 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.json index 53e86654ad1d8..259d1eb920a76 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt index 54961a153f98a..cb0dcfb8a0ccc 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/bin/test.js.map index a1be429da805c..9dc5e9c0cae83 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.errors.txt index eb358c3b79d38..6fdef1c0d9d45 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.errors.txt @@ -1,7 +1,7 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== test.ts (0 errors) ==== var a1 = 10; class c1 { diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.json index 53e86654ad1d8..259d1eb920a76 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "test.ts" diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt index 54961a153f98a..cb0dcfb8a0ccc 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) name (c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 14) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (f1) -4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) name (f1) -5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) name (f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -138,7 +138,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.json index 77912e79790f3..ac0c223a65fe1 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.sourcemap.txt index c8b19a1227f99..2b19f844ec02a 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/test.js.map index 014979baf0321..f43236fa96a01 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.json b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.json index 77912e79790f3..ac0c223a65fe1 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.json +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.json @@ -5,9 +5,9 @@ "test.ts" ], "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.sourcemap.txt index c8b19a1227f99..2b19f844ec02a 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/test.js.map index 014979baf0321..f43236fa96a01 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 014979baf0321..f43236fa96a01 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.json index 362af3ded0523..40a5e623164ec 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt index 31798101a5734..f607f1f54384a 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index b8fe7026610ca..48ee93efbeb8b 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 014979baf0321..f43236fa96a01 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAA;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.json b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.json index 362af3ded0523..40a5e623164ec 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.json +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.json @@ -6,9 +6,9 @@ ], "outDir": "outdir/simple", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt index 31798101a5734..f607f1f54384a 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -192,7 +192,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -202,16 +202,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) -2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) name (c1) +1->Emitted(6, 5) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 14) Source(5, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -225,8 +225,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) name (c1) -2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) name (c1) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(5, 2) + SourceIndex(0) --- @@ -277,11 +277,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) name (f1) -2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) name (f1) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) name (f1) -4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) name (f1) -5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) name (f1) +1->Emitted(10, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(10, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(10, 21) Source(9, 21) + SourceIndex(0) +5 >Emitted(10, 22) Source(9, 22) + SourceIndex(0) --- >>>} 1 > @@ -290,7 +290,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) name (f1) -2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) name (f1) +1 >Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(10, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/bin/test.js.map index e80a550275c2a..386fdffa417f3 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.json index 7c4bb20e942a6..b779b692d7780 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt index 791b3dbcecbf8..30aa681bfd206 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/bin/test.js.map index e80a550275c2a..386fdffa417f3 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;ACRD,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.errors.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.errors.txt index 376cfa761b8a0..2a58fd1ab36f3 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.errors.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.errors.txt @@ -1,8 +1,8 @@ -error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. +error TS6082: Only 'amd' and 'system' modules are supported alongside --out. -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. -==== m1.ts (0 errors) ==== +!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. +==== ref/m1.ts (0 errors) ==== var m1_a1 = 10; class m1_c1 { public m1_c1_p1: number; diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.json b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.json index 7c4bb20e942a6..b779b692d7780 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.json +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.json @@ -6,9 +6,9 @@ ], "out": "bin/test.js", "sourceMap": true, - "sourceRoot": "http://typescript.codeplex.com/", "declaration": true, "baselineCheck": true, + "sourceRoot": "http://typescript.codeplex.com/", "resolvedInputFiles": [ "lib.d.ts", "ref/m1.ts", diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt index 791b3dbcecbf8..30aa681bfd206 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt @@ -40,7 +40,7 @@ sourceFile:ref/m1.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -50,16 +50,16 @@ sourceFile:ref/m1.ts > public m1_c1_p1: number; > 2 > } -1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) -2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m1_c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) --- >>> return m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m1_c1) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -73,8 +73,8 @@ sourceFile:ref/m1.ts 4 > class m1_c1 { > public m1_c1_p1: number; > } -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m1_c1) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- @@ -125,11 +125,11 @@ sourceFile:ref/m1.ts 3 > 4 > m1_instance1 5 > ; -1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) name (m1_f1) -2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) name (m1_f1) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) name (m1_f1) -4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) name (m1_f1) -5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) name (m1_f1) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(9, 24) Source(8, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(8, 25) + SourceIndex(0) --- >>>} 1 > @@ -138,8 +138,8 @@ sourceFile:ref/m1.ts 1 > > 2 >} -1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) name (m1_f1) -2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) name (m1_f1) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bin/test.js @@ -186,7 +186,7 @@ sourceFile:test.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) +1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -196,16 +196,16 @@ sourceFile:test.ts > public p1: number; > 2 > } -1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) -2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) --- >>> return c1; 1->^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) name (c1) +1->Emitted(16, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 14) Source(5, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -219,8 +219,8 @@ sourceFile:test.ts 4 > class c1 { > public p1: number; > } -1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) name (c1) -2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) name (c1) +1 >Emitted(17, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(5, 2) + SourceIndex(1) 3 >Emitted(17, 2) Source(3, 1) + SourceIndex(1) 4 >Emitted(17, 6) Source(5, 2) + SourceIndex(1) --- @@ -271,11 +271,11 @@ sourceFile:test.ts 3 > 4 > instance1 5 > ; -1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) name (f1) -2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) name (f1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) name (f1) -4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) name (f1) -5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) name (f1) +1->Emitted(20, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(20, 11) Source(9, 11) + SourceIndex(1) +3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) +4 >Emitted(20, 21) Source(9, 21) + SourceIndex(1) +5 >Emitted(20, 22) Source(9, 22) + SourceIndex(1) --- >>>} 1 > @@ -284,7 +284,7 @@ sourceFile:test.ts 1 > > 2 >} -1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) name (f1) -2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) name (f1) +1 >Emitted(21, 1) Source(10, 1) + SourceIndex(1) +2 >Emitted(21, 2) Source(10, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/commands.js b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/commands.js index 8b04a1c9092c3..3053eb35cb488 100644 --- a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/commands.js +++ b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/commands.js @@ -1,2 +1,3 @@ define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/fs.js b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/fs.js index d0451fe5a0836..63344d14b5464 100644 --- a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/fs.js +++ b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/fs.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { + "use strict"; var RM = (function () { function RM() { } diff --git a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/server.js b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/server.js index 8b04a1c9092c3..3053eb35cb488 100644 --- a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/server.js +++ b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/server.js @@ -1,2 +1,3 @@ define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/commands.js b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/commands.js index e69de29bb2d1d..0c14aab22f752 100644 --- a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/commands.js +++ b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/commands.js @@ -0,0 +1 @@ +"use strict"; diff --git a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/fs.js b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/fs.js index 8f38a87b72929..b238334b7be59 100644 --- a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/fs.js +++ b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/fs.js @@ -1,3 +1,4 @@ +"use strict"; var RM = (function () { function RM() { } diff --git a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/server.js b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/server.js index e69de29bb2d1d..0c14aab22f752 100644 --- a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/server.js +++ b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/server.js @@ -0,0 +1 @@ +"use strict"; diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index 72276745c41e2..b17021a02b919 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -81,7 +81,9 @@ tests/cases/compiler/promisePermutations3.ts(159,21): error TS2345: Argument of Type 'number' is not assignable to type 'string'. tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. Type 'IPromise' is not assignable to type 'Promise'. - Property 'done' is optional in type 'IPromise' but required in type 'Promise'. + Types of property 'then' are incompatible. + Type '(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise' is not assignable to type '{ (success?: (value: any) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: any) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: any) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. + Type 'IPromise' is not assignable to type 'Promise'. ==== tests/cases/compiler/promisePermutations3.ts (35 errors) ==== @@ -368,5 +370,7 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. !!! error TS2345: Type 'IPromise' is not assignable to type 'Promise'. -!!! error TS2345: Property 'done' is optional in type 'IPromise' but required in type 'Promise'. +!!! error TS2345: Types of property 'then' are incompatible. +!!! error TS2345: Type '(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise' is not assignable to type '{ (success?: (value: any) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: any) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: any) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. +!!! error TS2345: Type 'IPromise' is not assignable to type 'Promise'. var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok \ No newline at end of file diff --git a/tests/baselines/reference/properties.js.map b/tests/baselines/reference/properties.js.map index 6e68d36e346f9..b9820ddba7c6e 100644 --- a/tests/baselines/reference/properties.js.map +++ b/tests/baselines/reference/properties.js.map @@ -1,2 +1,2 @@ //// [properties.js.map] -{"version":3,"file":"properties.js","sourceRoot":"","sources":["properties.ts"],"names":["MyClass","MyClass.constructor","MyClass.Count"],"mappings":"AACA;IAAAA;IAWAC,CAACA;IATGD,sBAAWA,0BAAKA;aAAhBA;YAEIE,MAAMA,CAACA,EAAEA,CAACA;QACdA,CAACA;aAEDF,UAAiBA,KAAaA;YAE1BE,EAAEA;QACNA,CAACA;;;OALAF;IAMLA,cAACA;AAADA,CAACA,AAXD,IAWC"} \ No newline at end of file +{"version":3,"file":"properties.js","sourceRoot":"","sources":["properties.ts"],"names":[],"mappings":"AACA;IAAA;IAWA,CAAC;IATG,sBAAW,0BAAK;aAAhB;YAEI,MAAM,CAAC,EAAE,CAAC;QACd,CAAC;aAED,UAAiB,KAAa;YAE1B,EAAE;QACN,CAAC;;;OALA;IAML,cAAC;AAAD,CAAC,AAXD,IAWC"} \ No newline at end of file diff --git a/tests/baselines/reference/properties.sourcemap.txt b/tests/baselines/reference/properties.sourcemap.txt index 9ff77cc2c5d80..40245a8976d95 100644 --- a/tests/baselines/reference/properties.sourcemap.txt +++ b/tests/baselines/reference/properties.sourcemap.txt @@ -19,7 +19,7 @@ sourceFile:properties.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(2, 5) Source(2, 1) + SourceIndex(0) name (MyClass) +1->Emitted(2, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -38,8 +38,8 @@ sourceFile:properties.ts > } > 2 > } -1->Emitted(3, 5) Source(13, 1) + SourceIndex(0) name (MyClass.constructor) -2 >Emitted(3, 6) Source(13, 2) + SourceIndex(0) name (MyClass.constructor) +1->Emitted(3, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(13, 2) + SourceIndex(0) --- >>> Object.defineProperty(MyClass.prototype, "Count", { 1->^^^^ @@ -48,15 +48,15 @@ sourceFile:properties.ts 1-> 2 > public get 3 > Count -1->Emitted(4, 5) Source(4, 5) + SourceIndex(0) name (MyClass) -2 >Emitted(4, 27) Source(4, 16) + SourceIndex(0) name (MyClass) -3 >Emitted(4, 53) Source(4, 21) + SourceIndex(0) name (MyClass) +1->Emitted(4, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(4, 27) Source(4, 16) + SourceIndex(0) +3 >Emitted(4, 53) Source(4, 21) + SourceIndex(0) --- >>> get: function () { 1 >^^^^^^^^^^^^^ 2 > ^^^^^^^^^^-> 1 > -1 >Emitted(5, 14) Source(4, 5) + SourceIndex(0) name (MyClass) +1 >Emitted(5, 14) Source(4, 5) + SourceIndex(0) --- >>> return 42; 1->^^^^^^^^^^^^ @@ -71,11 +71,11 @@ sourceFile:properties.ts 3 > 4 > 42 5 > ; -1->Emitted(6, 13) Source(6, 9) + SourceIndex(0) name (MyClass.Count) -2 >Emitted(6, 19) Source(6, 15) + SourceIndex(0) name (MyClass.Count) -3 >Emitted(6, 20) Source(6, 16) + SourceIndex(0) name (MyClass.Count) -4 >Emitted(6, 22) Source(6, 18) + SourceIndex(0) name (MyClass.Count) -5 >Emitted(6, 23) Source(6, 19) + SourceIndex(0) name (MyClass.Count) +1->Emitted(6, 13) Source(6, 9) + SourceIndex(0) +2 >Emitted(6, 19) Source(6, 15) + SourceIndex(0) +3 >Emitted(6, 20) Source(6, 16) + SourceIndex(0) +4 >Emitted(6, 22) Source(6, 18) + SourceIndex(0) +5 >Emitted(6, 23) Source(6, 19) + SourceIndex(0) --- >>> }, 1 >^^^^^^^^ @@ -84,8 +84,8 @@ sourceFile:properties.ts 1 > > 2 > } -1 >Emitted(7, 9) Source(7, 5) + SourceIndex(0) name (MyClass.Count) -2 >Emitted(7, 10) Source(7, 6) + SourceIndex(0) name (MyClass.Count) +1 >Emitted(7, 9) Source(7, 5) + SourceIndex(0) +2 >Emitted(7, 10) Source(7, 6) + SourceIndex(0) --- >>> set: function (value) { 1->^^^^^^^^^^^^^ @@ -96,9 +96,9 @@ sourceFile:properties.ts > 2 > public set Count( 3 > value: number -1->Emitted(8, 14) Source(9, 5) + SourceIndex(0) name (MyClass) -2 >Emitted(8, 24) Source(9, 22) + SourceIndex(0) name (MyClass) -3 >Emitted(8, 29) Source(9, 35) + SourceIndex(0) name (MyClass) +1->Emitted(8, 14) Source(9, 5) + SourceIndex(0) +2 >Emitted(8, 24) Source(9, 22) + SourceIndex(0) +3 >Emitted(8, 29) Source(9, 35) + SourceIndex(0) --- >>> // 1 >^^^^^^^^^^^^ @@ -107,8 +107,8 @@ sourceFile:properties.ts > { > 2 > // -1 >Emitted(9, 13) Source(11, 9) + SourceIndex(0) name (MyClass.Count) -2 >Emitted(9, 15) Source(11, 11) + SourceIndex(0) name (MyClass.Count) +1 >Emitted(9, 13) Source(11, 9) + SourceIndex(0) +2 >Emitted(9, 15) Source(11, 11) + SourceIndex(0) --- >>> }, 1 >^^^^^^^^ @@ -117,8 +117,8 @@ sourceFile:properties.ts 1 > > 2 > } -1 >Emitted(10, 9) Source(12, 5) + SourceIndex(0) name (MyClass.Count) -2 >Emitted(10, 10) Source(12, 6) + SourceIndex(0) name (MyClass.Count) +1 >Emitted(10, 9) Source(12, 5) + SourceIndex(0) +2 >Emitted(10, 10) Source(12, 6) + SourceIndex(0) --- >>> enumerable: true, >>> configurable: true @@ -126,7 +126,7 @@ sourceFile:properties.ts 1->^^^^^^^ 2 > ^^^^^^^^^^^^^-> 1-> -1->Emitted(13, 8) Source(7, 6) + SourceIndex(0) name (MyClass) +1->Emitted(13, 8) Source(7, 6) + SourceIndex(0) --- >>> return MyClass; 1->^^^^ @@ -139,8 +139,8 @@ sourceFile:properties.ts > } > 2 > } -1->Emitted(14, 5) Source(13, 1) + SourceIndex(0) name (MyClass) -2 >Emitted(14, 19) Source(13, 2) + SourceIndex(0) name (MyClass) +1->Emitted(14, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(14, 19) Source(13, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -163,8 +163,8 @@ sourceFile:properties.ts > // > } > } -1 >Emitted(15, 1) Source(13, 1) + SourceIndex(0) name (MyClass) -2 >Emitted(15, 2) Source(13, 2) + SourceIndex(0) name (MyClass) +1 >Emitted(15, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(15, 2) Source(13, 2) + SourceIndex(0) 3 >Emitted(15, 2) Source(2, 1) + SourceIndex(0) 4 >Emitted(15, 6) Source(13, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.js b/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.js index 04720741d2fb3..b87147d11cea0 100644 --- a/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.js +++ b/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.js @@ -30,6 +30,7 @@ var y: Foo2; //// [propertyIdentityWithPrivacyMismatch_0.js] //// [propertyIdentityWithPrivacyMismatch_1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var x; var x; // Should be error (mod1.Foo !== mod2.Foo) var Foo1 = (function () { diff --git a/tests/baselines/reference/protoAsIndexInIndexExpression.js b/tests/baselines/reference/protoAsIndexInIndexExpression.js index a003c70468ee1..715ac2c1007d2 100644 --- a/tests/baselines/reference/protoAsIndexInIndexExpression.js +++ b/tests/baselines/reference/protoAsIndexInIndexExpression.js @@ -20,6 +20,7 @@ class C { } //// [protoAsIndexInIndexExpression_0.js] +"use strict"; //// [protoAsIndexInIndexExpression_1.js] /// var EntityPrototype = undefined; diff --git a/tests/baselines/reference/reExportDefaultExport.js b/tests/baselines/reference/reExportDefaultExport.js new file mode 100644 index 0000000000000..da50a3a711580 --- /dev/null +++ b/tests/baselines/reference/reExportDefaultExport.js @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/es6/modules/reExportDefaultExport.ts] //// + +//// [m1.ts] + +export default function f() { +} +export {f}; + + +//// [m2.ts] +import foo from "./m1"; +import {f} from "./m1"; + +f(); +foo(); + +//// [m1.js] +"use strict"; +function f() { +} +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = f; +exports.f = f; +//// [m2.js] +"use strict"; +var m1_1 = require("./m1"); +var m1_2 = require("./m1"); +m1_2.f(); +m1_1.default(); diff --git a/tests/baselines/reference/reExportDefaultExport.symbols b/tests/baselines/reference/reExportDefaultExport.symbols new file mode 100644 index 0000000000000..cd0d6e493c946 --- /dev/null +++ b/tests/baselines/reference/reExportDefaultExport.symbols @@ -0,0 +1,22 @@ +=== tests/cases/conformance/es6/modules/m1.ts === + +export default function f() { +>f : Symbol(f, Decl(m1.ts, 0, 0)) +} +export {f}; +>f : Symbol(f, Decl(m1.ts, 3, 8)) + + +=== tests/cases/conformance/es6/modules/m2.ts === +import foo from "./m1"; +>foo : Symbol(foo, Decl(m2.ts, 0, 6)) + +import {f} from "./m1"; +>f : Symbol(f, Decl(m2.ts, 1, 8)) + +f(); +>f : Symbol(f, Decl(m2.ts, 1, 8)) + +foo(); +>foo : Symbol(foo, Decl(m2.ts, 0, 6)) + diff --git a/tests/baselines/reference/reExportDefaultExport.types b/tests/baselines/reference/reExportDefaultExport.types new file mode 100644 index 0000000000000..f775571ac2c8d --- /dev/null +++ b/tests/baselines/reference/reExportDefaultExport.types @@ -0,0 +1,24 @@ +=== tests/cases/conformance/es6/modules/m1.ts === + +export default function f() { +>f : () => void +} +export {f}; +>f : () => void + + +=== tests/cases/conformance/es6/modules/m2.ts === +import foo from "./m1"; +>foo : () => void + +import {f} from "./m1"; +>f : () => void + +f(); +>f() : void +>f : () => void + +foo(); +>foo() : void +>foo : () => void + diff --git a/tests/baselines/reference/reachabilityChecks6.errors.txt b/tests/baselines/reference/reachabilityChecks6.errors.txt new file mode 100644 index 0000000000000..38e72def8c680 --- /dev/null +++ b/tests/baselines/reference/reachabilityChecks6.errors.txt @@ -0,0 +1,159 @@ +tests/cases/compiler/reachabilityChecks6.ts(6,10): error TS7030: Not all code paths return a value. +tests/cases/compiler/reachabilityChecks6.ts(31,10): error TS7030: Not all code paths return a value. +tests/cases/compiler/reachabilityChecks6.ts(41,10): error TS7030: Not all code paths return a value. +tests/cases/compiler/reachabilityChecks6.ts(52,10): error TS7030: Not all code paths return a value. +tests/cases/compiler/reachabilityChecks6.ts(80,10): error TS7030: Not all code paths return a value. +tests/cases/compiler/reachabilityChecks6.ts(86,13): error TS7027: Unreachable code detected. +tests/cases/compiler/reachabilityChecks6.ts(94,10): error TS7030: Not all code paths return a value. +tests/cases/compiler/reachabilityChecks6.ts(116,10): error TS7030: Not all code paths return a value. +tests/cases/compiler/reachabilityChecks6.ts(123,13): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/reachabilityChecks6.ts (9 errors) ==== + + function f0(x) { + while (true); + } + + function f1(x) { + ~~ +!!! error TS7030: Not all code paths return a value. + if (x) { + return 1 + } + } + + function f2(x) { + while (x) { + throw new Error(); + } + return 1; + } + + function f3(x) { + while (x) { + throw new Error(); + } + } + + function f3_1 (x) { + while (x) { + } + throw new Error(); + } + + function f4(x) { + ~~ +!!! error TS7030: Not all code paths return a value. + try { + if (x) { + return 1; + } + } + catch (e) { + } + } + + function f5(x) { + ~~ +!!! error TS7030: Not all code paths return a value. + try { + if (x) { + return 1; + } + } + catch (e) { + return 2; + } + } + + function f6(x) { + ~~ +!!! error TS7030: Not all code paths return a value. + try { + if (x) { + return 1; + } + else + { + throw new Error(); + } + } + catch (e) { + } + } + + function f7(x) { + try { + if (x) { + return 1; + } + else { + throw new Error(); + } + } + catch (e) { + return 1; + } + } + + function f8(x) { + ~~ +!!! error TS7030: Not all code paths return a value. + try { + if (true) { + x++; + } + else { + return 1; + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } + } + catch (e) { + return 1; + } + } + + function f9(x) { + ~~ +!!! error TS7030: Not all code paths return a value. + try { + while (false) { + return 1; + } + } + catch (e) { + return 1; + } + } + + function f10(x) { + try { + do { + x++; + } while (true); + } + catch (e) { + return 1; + } + } + + function f11(x) { + ~~~ +!!! error TS7030: Not all code paths return a value. + test: + try { + do { + do { + break test; + } while (true); + x++; + ~ +!!! error TS7027: Unreachable code detected. + } while (true); + } + catch (e) { + return 1; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/reachabilityChecks6.js b/tests/baselines/reference/reachabilityChecks6.js new file mode 100644 index 0000000000000..9be23d32048ec --- /dev/null +++ b/tests/baselines/reference/reachabilityChecks6.js @@ -0,0 +1,247 @@ +//// [reachabilityChecks6.ts] + +function f0(x) { + while (true); +} + +function f1(x) { + if (x) { + return 1 + } +} + +function f2(x) { + while (x) { + throw new Error(); + } + return 1; +} + +function f3(x) { + while (x) { + throw new Error(); + } +} + +function f3_1 (x) { + while (x) { + } + throw new Error(); +} + +function f4(x) { + try { + if (x) { + return 1; + } + } + catch (e) { + } +} + +function f5(x) { + try { + if (x) { + return 1; + } + } + catch (e) { + return 2; + } +} + +function f6(x) { + try { + if (x) { + return 1; + } + else + { + throw new Error(); + } + } + catch (e) { + } +} + +function f7(x) { + try { + if (x) { + return 1; + } + else { + throw new Error(); + } + } + catch (e) { + return 1; + } +} + +function f8(x) { + try { + if (true) { + x++; + } + else { + return 1; + } + } + catch (e) { + return 1; + } +} + +function f9(x) { + try { + while (false) { + return 1; + } + } + catch (e) { + return 1; + } +} + +function f10(x) { + try { + do { + x++; + } while (true); + } + catch (e) { + return 1; + } +} + +function f11(x) { + test: + try { + do { + do { + break test; + } while (true); + x++; + } while (true); + } + catch (e) { + return 1; + } +} + +//// [reachabilityChecks6.js] +function f0(x) { + while (true) + ; +} +function f1(x) { + if (x) { + return 1; + } +} +function f2(x) { + while (x) { + throw new Error(); + } + return 1; +} +function f3(x) { + while (x) { + throw new Error(); + } +} +function f3_1(x) { + while (x) { + } + throw new Error(); +} +function f4(x) { + try { + if (x) { + return 1; + } + } + catch (e) { + } +} +function f5(x) { + try { + if (x) { + return 1; + } + } + catch (e) { + return 2; + } +} +function f6(x) { + try { + if (x) { + return 1; + } + else { + throw new Error(); + } + } + catch (e) { + } +} +function f7(x) { + try { + if (x) { + return 1; + } + else { + throw new Error(); + } + } + catch (e) { + return 1; + } +} +function f8(x) { + try { + if (true) { + x++; + } + else { + return 1; + } + } + catch (e) { + return 1; + } +} +function f9(x) { + try { + while (false) { + return 1; + } + } + catch (e) { + return 1; + } +} +function f10(x) { + try { + do { + x++; + } while (true); + } + catch (e) { + return 1; + } +} +function f11(x) { + test: try { + do { + do { + break test; + } while (true); + x++; + } while (true); + } + catch (e) { + return 1; + } +} diff --git a/tests/baselines/reference/reachabilityChecks7.errors.txt b/tests/baselines/reference/reachabilityChecks7.errors.txt new file mode 100644 index 0000000000000..1596c7d9a3bc3 --- /dev/null +++ b/tests/baselines/reference/reachabilityChecks7.errors.txt @@ -0,0 +1,39 @@ +tests/cases/compiler/reachabilityChecks7.ts(14,16): error TS7030: Not all code paths return a value. +tests/cases/compiler/reachabilityChecks7.ts(18,22): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. + + +==== tests/cases/compiler/reachabilityChecks7.ts (2 errors) ==== + + // async function without return type annotation - error + async function f1() { + } + + let x = async function() { + } + + // async function with which promised type is void - return can be omitted + async function f2(): Promise { + + } + + async function f3(x) { + ~~ +!!! error TS7030: Not all code paths return a value. + if (x) return 10; + } + + async function f4(): Promise { + ~~~~~~~~~~~~~~~ +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. + + } + + function voidFunc(): void { + } + + function calltoVoidFunc(x) { + if (x) return voidFunc(); + } + + declare function use(s: string): void; + let x1 = () => { use("Test"); } \ No newline at end of file diff --git a/tests/baselines/reference/reachabilityChecks7.js b/tests/baselines/reference/reachabilityChecks7.js new file mode 100644 index 0000000000000..c78f99953e9cb --- /dev/null +++ b/tests/baselines/reference/reachabilityChecks7.js @@ -0,0 +1,77 @@ +//// [reachabilityChecks7.ts] + +// async function without return type annotation - error +async function f1() { +} + +let x = async function() { +} + +// async function with which promised type is void - return can be omitted +async function f2(): Promise { + +} + +async function f3(x) { + if (x) return 10; +} + +async function f4(): Promise { + +} + +function voidFunc(): void { +} + +function calltoVoidFunc(x) { + if (x) return voidFunc(); +} + +declare function use(s: string): void; +let x1 = () => { use("Test"); } + +//// [reachabilityChecks7.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { + return new Promise(function (resolve, reject) { + generator = generator.call(thisArg, _arguments); + function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } + function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } + function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } + function step(verb, value) { + var result = generator[verb](value); + result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); + } + step("next", void 0); + }); +}; +// async function without return type annotation - error +function f1() { + return __awaiter(this, void 0, Promise, function* () { + }); +} +let x = function () { + return __awaiter(this, void 0, Promise, function* () { + }); +}; +// async function with which promised type is void - return can be omitted +function f2() { + return __awaiter(this, void 0, Promise, function* () { + }); +} +function f3(x) { + return __awaiter(this, void 0, Promise, function* () { + if (x) + return 10; + }); +} +function f4() { + return __awaiter(this, void 0, Promise, function* () { + }); +} +function voidFunc() { +} +function calltoVoidFunc(x) { + if (x) + return voidFunc(); +} +let x1 = () => { use("Test"); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js.map b/tests/baselines/reference/recursiveClassReferenceTest.js.map index 90ab021de5968..60c5c552d831c 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,IAAAA,OAAOA,CAUpBA;IAVaA,WAAAA,OAAOA;QAACC,IAAAA,KAAKA,CAU1BA;QAVqBA,WAAAA,OAAKA;YAACC,IAAAA,IAAIA,CAU/BA;YAV2BA,WAAAA,IAAIA,EAACA,CAACA;gBACjCC;oBAAAC;oBAQAC,CAACA;oBANOD,+BAAKA,GAAZA,cAAiBE,MAAMA,CAACA,IAAIA,CAACA,CAACA,CAACA;oBAExBF,6BAAGA,GAAVA,UAAWA,KAA6BA;wBAEvCG,MAAMA,CAACA,IAAIA,CAACA;oBACbA,CAACA;oBACFH,sBAACA;gBAADA,CAACA,AARDD,IAQCA;gBARYA,oBAAeA,kBAQ3BA,CAAAA;YACFA,CAACA,EAV2BD,IAAIA,GAAJA,YAAIA,KAAJA,YAAIA,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;gBAKCC,oBAAoBA,SAAkCA;oBAAlCC,cAASA,GAATA,SAASA,CAAyBA;oBAD9CA,YAAOA,GAAOA,IAAIA,CAACA;oBAEvBA,aAAaA;oBACbA,SAASA,CAACA,SAASA,CAACA,WAAWA,EAAEA,IAAIA,CAACA,CAACA;gBAC3CA,CAACA;gBANMD,wBAAGA,GAAVA,UAAWA,MAAyCA,IAAIE,EAAEA,CAACA,CAACA,IAAIA,CAACA,CAACA,CAACA;oBAAAA,MAAMA,CAACA,MAAMA,CAACA,IAAIA,CAACA,CAACA;gBAAAA,CAACA,CAAAA,CAACA;gBAQlFF,+BAAUA,GAAjBA;oBACCG,MAAMA,CAACA,OAAOA,CAACA;gBAChBA,CAACA;gBAEMH,4BAAOA,GAAdA;gBAEAI,CAACA;gBAEFJ,iBAACA;YAADA,CAACA,AAlBDD,IAkBCA;YAlBYA,kBAAUA,aAkBtBA,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;IAAAe;IAAuFC,CAACA;IAA3CD,sCAAeA,GAAtBA,cAAmCE,MAAMA,CAACA,IAAIA,CAACA,CAAAA,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;oBACOC,eAAoBA,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,cAA0BI,MAAMA,CAACA,IAAIA,CAACA,CAACA,CAACA;oBACzCJ,YAACA;gBAADA,CAACA,AAXDD,IAWCA;gBAXYA,eAAKA,QAWjBA,CAAAA;gBAEDA;oBAA0BM,wBAAYA;oBAAtCA;wBAA0BC,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,OAQhBA,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 +{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI,EAAC,CAAC;gBACjC;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,IAAO,MAAM,CAoBZ;AApBD,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO,EAAC,CAAC;YAC5B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS,EAAC,CAAC;gBAExC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;wBAA0B,8BAAY;oBAQtC,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,EAA0B,YAAY,EAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,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 3b693f7c282fb..0036b8234d83e 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -117,10 +117,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(10, 5) Source(32, 15) + SourceIndex(0) name (Sample) -2 >Emitted(10, 9) Source(32, 15) + SourceIndex(0) name (Sample) -3 >Emitted(10, 16) Source(32, 22) + SourceIndex(0) name (Sample) -4 >Emitted(10, 17) Source(42, 2) + SourceIndex(0) name (Sample) +1 >Emitted(10, 5) Source(32, 15) + SourceIndex(0) +2 >Emitted(10, 9) Source(32, 15) + SourceIndex(0) +3 >Emitted(10, 16) Source(32, 22) + SourceIndex(0) +4 >Emitted(10, 17) Source(42, 2) + SourceIndex(0) --- >>> (function (Actions) { 1->^^^^ @@ -129,9 +129,9 @@ sourceFile:recursiveClassReferenceTest.ts 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(11, 5) Source(32, 15) + SourceIndex(0) +2 >Emitted(11, 16) Source(32, 15) + SourceIndex(0) +3 >Emitted(11, 23) Source(32, 22) + SourceIndex(0) --- >>> var Thing; 1 >^^^^^^^^ @@ -153,10 +153,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(12, 9) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -2 >Emitted(12, 13) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -3 >Emitted(12, 18) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -4 >Emitted(12, 19) Source(42, 2) + SourceIndex(0) name (Sample.Actions) +1 >Emitted(12, 9) Source(32, 23) + SourceIndex(0) +2 >Emitted(12, 13) Source(32, 23) + SourceIndex(0) +3 >Emitted(12, 18) Source(32, 28) + SourceIndex(0) +4 >Emitted(12, 19) Source(42, 2) + SourceIndex(0) --- >>> (function (Thing_1) { 1->^^^^^^^^ @@ -165,9 +165,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(13, 9) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -2 >Emitted(13, 20) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -3 >Emitted(13, 27) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +1->Emitted(13, 9) Source(32, 23) + SourceIndex(0) +2 >Emitted(13, 20) Source(32, 23) + SourceIndex(0) +3 >Emitted(13, 27) Source(32, 28) + SourceIndex(0) --- >>> var Find; 1 >^^^^^^^^^^^^ @@ -189,10 +189,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(14, 13) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -2 >Emitted(14, 17) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -3 >Emitted(14, 21) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -4 >Emitted(14, 22) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) +1 >Emitted(14, 13) Source(32, 29) + SourceIndex(0) +2 >Emitted(14, 17) Source(32, 29) + SourceIndex(0) +3 >Emitted(14, 21) Source(32, 33) + SourceIndex(0) +4 >Emitted(14, 22) Source(42, 2) + SourceIndex(0) --- >>> (function (Find) { 1->^^^^^^^^^^^^ @@ -206,24 +206,24 @@ sourceFile:recursiveClassReferenceTest.ts 3 > Find 4 > 5 > { -1->Emitted(15, 13) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -2 >Emitted(15, 24) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -3 >Emitted(15, 28) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -4 >Emitted(15, 30) Source(32, 34) + SourceIndex(0) name (Sample.Actions.Thing) -5 >Emitted(15, 31) Source(32, 35) + SourceIndex(0) name (Sample.Actions.Thing) +1->Emitted(15, 13) Source(32, 29) + SourceIndex(0) +2 >Emitted(15, 24) Source(32, 29) + SourceIndex(0) +3 >Emitted(15, 28) Source(32, 33) + SourceIndex(0) +4 >Emitted(15, 30) Source(32, 34) + SourceIndex(0) +5 >Emitted(15, 31) Source(32, 35) + SourceIndex(0) --- >>> var StartFindAction = (function () { 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(16, 17) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) +1->Emitted(16, 17) Source(33, 2) + SourceIndex(0) --- >>> function StartFindAction() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(17, 21) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +1->Emitted(17, 21) Source(33, 2) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^^^^^ @@ -239,8 +239,8 @@ sourceFile:recursiveClassReferenceTest.ts > } > 2 > } -1->Emitted(18, 21) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.constructor) -2 >Emitted(18, 22) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.constructor) +1->Emitted(18, 21) Source(41, 2) + SourceIndex(0) +2 >Emitted(18, 22) Source(41, 3) + SourceIndex(0) --- >>> StartFindAction.prototype.getId = function () { return "yo"; }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -263,16 +263,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(19, 21) Source(35, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(19, 52) Source(35, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -3 >Emitted(19, 55) Source(35, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -4 >Emitted(19, 69) Source(35, 20) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -5 >Emitted(19, 75) Source(35, 26) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -6 >Emitted(19, 76) Source(35, 27) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -7 >Emitted(19, 80) Source(35, 31) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -8 >Emitted(19, 81) Source(35, 32) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -9 >Emitted(19, 82) Source(35, 33) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -10>Emitted(19, 83) Source(35, 34) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +1->Emitted(19, 21) Source(35, 10) + SourceIndex(0) +2 >Emitted(19, 52) Source(35, 15) + SourceIndex(0) +3 >Emitted(19, 55) Source(35, 3) + SourceIndex(0) +4 >Emitted(19, 69) Source(35, 20) + SourceIndex(0) +5 >Emitted(19, 75) Source(35, 26) + SourceIndex(0) +6 >Emitted(19, 76) Source(35, 27) + SourceIndex(0) +7 >Emitted(19, 80) Source(35, 31) + SourceIndex(0) +8 >Emitted(19, 81) Source(35, 32) + SourceIndex(0) +9 >Emitted(19, 82) Source(35, 33) + SourceIndex(0) +10>Emitted(19, 83) Source(35, 34) + SourceIndex(0) --- >>> StartFindAction.prototype.run = function (Thing) { 1 >^^^^^^^^^^^^^^^^^^^^ @@ -287,11 +287,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(20, 21) Source(37, 10) + SourceIndex(0) +2 >Emitted(20, 50) Source(37, 13) + SourceIndex(0) +3 >Emitted(20, 53) Source(37, 3) + SourceIndex(0) +4 >Emitted(20, 63) Source(37, 14) + SourceIndex(0) +5 >Emitted(20, 68) Source(37, 43) + SourceIndex(0) --- >>> return true; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -306,11 +306,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(21, 25) Source(39, 4) + SourceIndex(0) +2 >Emitted(21, 31) Source(39, 10) + SourceIndex(0) +3 >Emitted(21, 32) Source(39, 11) + SourceIndex(0) +4 >Emitted(21, 36) Source(39, 15) + SourceIndex(0) +5 >Emitted(21, 37) Source(39, 16) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -319,8 +319,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(22, 21) Source(40, 3) + SourceIndex(0) +2 >Emitted(22, 22) Source(40, 4) + SourceIndex(0) --- >>> return StartFindAction; 1->^^^^^^^^^^^^^^^^^^^^ @@ -328,8 +328,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(23, 21) Source(41, 2) + SourceIndex(0) +2 >Emitted(23, 43) Source(41, 3) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -349,10 +349,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(24, 17) Source(41, 2) + SourceIndex(0) +2 >Emitted(24, 18) Source(41, 3) + SourceIndex(0) +3 >Emitted(24, 18) Source(33, 2) + SourceIndex(0) +4 >Emitted(24, 22) Source(41, 3) + SourceIndex(0) --- >>> Find.StartFindAction = StartFindAction; 1->^^^^^^^^^^^^^^^^ @@ -372,10 +372,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } 4 > -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, 55) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) -4 >Emitted(25, 56) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) +1->Emitted(25, 17) Source(33, 15) + SourceIndex(0) +2 >Emitted(25, 37) Source(33, 30) + SourceIndex(0) +3 >Emitted(25, 55) Source(41, 3) + SourceIndex(0) +4 >Emitted(25, 56) Source(41, 3) + SourceIndex(0) --- >>> })(Find = Thing_1.Find || (Thing_1.Find = {})); 1->^^^^^^^^^^^^ @@ -407,15 +407,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -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, 20) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -5 >Emitted(26, 23) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -6 >Emitted(26, 35) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -7 >Emitted(26, 40) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -8 >Emitted(26, 52) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -9 >Emitted(26, 60) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) +1->Emitted(26, 13) Source(42, 1) + SourceIndex(0) +2 >Emitted(26, 14) Source(42, 2) + SourceIndex(0) +3 >Emitted(26, 16) Source(32, 29) + SourceIndex(0) +4 >Emitted(26, 20) Source(32, 33) + SourceIndex(0) +5 >Emitted(26, 23) Source(32, 29) + SourceIndex(0) +6 >Emitted(26, 35) Source(32, 33) + SourceIndex(0) +7 >Emitted(26, 40) Source(32, 29) + SourceIndex(0) +8 >Emitted(26, 52) Source(32, 33) + SourceIndex(0) +9 >Emitted(26, 60) Source(42, 2) + SourceIndex(0) --- >>> })(Thing = Actions.Thing || (Actions.Thing = {})); 1 >^^^^^^^^ @@ -447,15 +447,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(27, 9) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing) -2 >Emitted(27, 10) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) -3 >Emitted(27, 12) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -4 >Emitted(27, 17) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -5 >Emitted(27, 20) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -6 >Emitted(27, 33) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -7 >Emitted(27, 38) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -8 >Emitted(27, 51) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -9 >Emitted(27, 59) Source(42, 2) + SourceIndex(0) name (Sample.Actions) +1 >Emitted(27, 9) Source(42, 1) + SourceIndex(0) +2 >Emitted(27, 10) Source(42, 2) + SourceIndex(0) +3 >Emitted(27, 12) Source(32, 23) + SourceIndex(0) +4 >Emitted(27, 17) Source(32, 28) + SourceIndex(0) +5 >Emitted(27, 20) Source(32, 23) + SourceIndex(0) +6 >Emitted(27, 33) Source(32, 28) + SourceIndex(0) +7 >Emitted(27, 38) Source(32, 23) + SourceIndex(0) +8 >Emitted(27, 51) Source(32, 28) + SourceIndex(0) +9 >Emitted(27, 59) Source(42, 2) + SourceIndex(0) --- >>> })(Actions = Sample.Actions || (Sample.Actions = {})); 1->^^^^ @@ -486,15 +486,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(28, 5) Source(42, 1) + SourceIndex(0) name (Sample.Actions) -2 >Emitted(28, 6) Source(42, 2) + SourceIndex(0) name (Sample.Actions) -3 >Emitted(28, 8) Source(32, 15) + SourceIndex(0) name (Sample) -4 >Emitted(28, 15) Source(32, 22) + SourceIndex(0) name (Sample) -5 >Emitted(28, 18) Source(32, 15) + SourceIndex(0) name (Sample) -6 >Emitted(28, 32) Source(32, 22) + SourceIndex(0) name (Sample) -7 >Emitted(28, 37) Source(32, 15) + SourceIndex(0) name (Sample) -8 >Emitted(28, 51) Source(32, 22) + SourceIndex(0) name (Sample) -9 >Emitted(28, 59) Source(42, 2) + SourceIndex(0) name (Sample) +1->Emitted(28, 5) Source(42, 1) + SourceIndex(0) +2 >Emitted(28, 6) Source(42, 2) + SourceIndex(0) +3 >Emitted(28, 8) Source(32, 15) + SourceIndex(0) +4 >Emitted(28, 15) Source(32, 22) + SourceIndex(0) +5 >Emitted(28, 18) Source(32, 15) + SourceIndex(0) +6 >Emitted(28, 32) Source(32, 22) + SourceIndex(0) +7 >Emitted(28, 37) Source(32, 15) + SourceIndex(0) +8 >Emitted(28, 51) Source(32, 22) + SourceIndex(0) +9 >Emitted(28, 59) Source(42, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -521,8 +521,8 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(29, 1) Source(42, 1) + SourceIndex(0) name (Sample) -2 >Emitted(29, 2) Source(42, 2) + SourceIndex(0) name (Sample) +1 >Emitted(29, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(29, 2) Source(42, 2) + SourceIndex(0) 3 >Emitted(29, 4) Source(32, 8) + SourceIndex(0) 4 >Emitted(29, 10) Source(32, 14) + SourceIndex(0) 5 >Emitted(29, 15) Source(32, 8) + SourceIndex(0) @@ -607,10 +607,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(32, 5) Source(44, 15) + SourceIndex(0) name (Sample) -2 >Emitted(32, 9) Source(44, 15) + SourceIndex(0) name (Sample) -3 >Emitted(32, 14) Source(44, 20) + SourceIndex(0) name (Sample) -4 >Emitted(32, 15) Source(64, 2) + SourceIndex(0) name (Sample) +1 >Emitted(32, 5) Source(44, 15) + SourceIndex(0) +2 >Emitted(32, 9) Source(44, 15) + SourceIndex(0) +3 >Emitted(32, 14) Source(44, 20) + SourceIndex(0) +4 >Emitted(32, 15) Source(64, 2) + SourceIndex(0) --- >>> (function (Thing) { 1->^^^^ @@ -620,9 +620,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(33, 5) Source(44, 15) + SourceIndex(0) name (Sample) -2 >Emitted(33, 16) Source(44, 15) + SourceIndex(0) name (Sample) -3 >Emitted(33, 21) Source(44, 20) + SourceIndex(0) name (Sample) +1->Emitted(33, 5) Source(44, 15) + SourceIndex(0) +2 >Emitted(33, 16) Source(44, 15) + SourceIndex(0) +3 >Emitted(33, 21) Source(44, 20) + SourceIndex(0) --- >>> var Widgets; 1->^^^^^^^^ @@ -654,10 +654,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(34, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(34, 13) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(34, 20) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(34, 21) Source(64, 2) + SourceIndex(0) name (Sample.Thing) +1->Emitted(34, 9) Source(44, 21) + SourceIndex(0) +2 >Emitted(34, 13) Source(44, 21) + SourceIndex(0) +3 >Emitted(34, 20) Source(44, 28) + SourceIndex(0) +4 >Emitted(34, 21) Source(64, 2) + SourceIndex(0) --- >>> (function (Widgets) { 1->^^^^^^^^ @@ -671,18 +671,18 @@ sourceFile:recursiveClassReferenceTest.ts 3 > Widgets 4 > 5 > { -1->Emitted(35, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(35, 20) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(35, 27) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(35, 29) Source(44, 29) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(35, 30) Source(44, 30) + SourceIndex(0) name (Sample.Thing) +1->Emitted(35, 9) Source(44, 21) + SourceIndex(0) +2 >Emitted(35, 20) Source(44, 21) + SourceIndex(0) +3 >Emitted(35, 27) Source(44, 28) + SourceIndex(0) +4 >Emitted(35, 29) Source(44, 29) + SourceIndex(0) +5 >Emitted(35, 30) Source(44, 30) + SourceIndex(0) --- >>> var FindWidget = (function () { 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(36, 13) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) +1->Emitted(36, 13) Source(45, 2) + SourceIndex(0) --- >>> function FindWidget(codeThing) { 1->^^^^^^^^^^^^^^^^ @@ -697,9 +697,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > codeThing: Sample.Thing.ICodeThing -1->Emitted(37, 17) Source(50, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(37, 37) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(37, 46) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(37, 17) Source(50, 3) + SourceIndex(0) +2 >Emitted(37, 37) Source(50, 23) + SourceIndex(0) +3 >Emitted(37, 46) Source(50, 57) + SourceIndex(0) --- >>> this.codeThing = codeThing; 1->^^^^^^^^^^^^^^^^^^^^ @@ -712,11 +712,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > codeThing 5 > : Sample.Thing.ICodeThing -1->Emitted(38, 21) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(38, 35) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(38, 38) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -4 >Emitted(38, 47) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -5 >Emitted(38, 48) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1->Emitted(38, 21) Source(50, 23) + SourceIndex(0) +2 >Emitted(38, 35) Source(50, 32) + SourceIndex(0) +3 >Emitted(38, 38) Source(50, 23) + SourceIndex(0) +4 >Emitted(38, 47) Source(50, 32) + SourceIndex(0) +5 >Emitted(38, 48) Source(50, 57) + SourceIndex(0) --- >>> this.domNode = null; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -729,11 +729,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > :any = 4 > null 5 > ; -1 >Emitted(39, 21) Source(49, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(39, 33) Source(49, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(39, 36) Source(49, 25) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -4 >Emitted(39, 40) Source(49, 29) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -5 >Emitted(39, 41) Source(49, 30) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1 >Emitted(39, 21) Source(49, 11) + SourceIndex(0) +2 >Emitted(39, 33) Source(49, 18) + SourceIndex(0) +3 >Emitted(39, 36) Source(49, 25) + SourceIndex(0) +4 >Emitted(39, 40) Source(49, 29) + SourceIndex(0) +5 >Emitted(39, 41) Source(49, 30) + SourceIndex(0) --- >>> // scenario 1 1 >^^^^^^^^^^^^^^^^^^^^ @@ -743,8 +743,8 @@ sourceFile:recursiveClassReferenceTest.ts > constructor(private codeThing: Sample.Thing.ICodeThing) { > 2 > // scenario 1 -1 >Emitted(40, 21) Source(51, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(40, 34) Source(51, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1 >Emitted(40, 21) Source(51, 7) + SourceIndex(0) +2 >Emitted(40, 34) Source(51, 20) + SourceIndex(0) --- >>> codeThing.addWidget("addWidget", this); 1->^^^^^^^^^^^^^^^^^^^^ @@ -768,16 +768,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > this 9 > ) 10> ; -1->Emitted(41, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(41, 30) Source(52, 16) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(41, 31) Source(52, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -4 >Emitted(41, 40) Source(52, 26) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -5 >Emitted(41, 41) Source(52, 27) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -6 >Emitted(41, 52) Source(52, 38) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -7 >Emitted(41, 54) Source(52, 40) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -8 >Emitted(41, 58) Source(52, 44) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -9 >Emitted(41, 59) Source(52, 45) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -10>Emitted(41, 60) Source(52, 46) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1->Emitted(41, 21) Source(52, 7) + SourceIndex(0) +2 >Emitted(41, 30) Source(52, 16) + SourceIndex(0) +3 >Emitted(41, 31) Source(52, 17) + SourceIndex(0) +4 >Emitted(41, 40) Source(52, 26) + SourceIndex(0) +5 >Emitted(41, 41) Source(52, 27) + SourceIndex(0) +6 >Emitted(41, 52) Source(52, 38) + SourceIndex(0) +7 >Emitted(41, 54) Source(52, 40) + SourceIndex(0) +8 >Emitted(41, 58) Source(52, 44) + SourceIndex(0) +9 >Emitted(41, 59) Source(52, 45) + SourceIndex(0) +10>Emitted(41, 60) Source(52, 46) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -786,8 +786,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(42, 17) Source(53, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(42, 18) Source(53, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1 >Emitted(42, 17) Source(53, 3) + SourceIndex(0) +2 >Emitted(42, 18) Source(53, 4) + SourceIndex(0) --- >>> FindWidget.prototype.gar = function (runner) { if (true) { 1->^^^^^^^^^^^^^^^^ @@ -816,19 +816,19 @@ sourceFile:recursiveClassReferenceTest.ts 11> ) 12> 13> { -1->Emitted(43, 17) Source(47, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(43, 41) Source(47, 13) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(43, 44) Source(47, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -4 >Emitted(43, 54) Source(47, 14) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -5 >Emitted(43, 60) Source(47, 55) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -6 >Emitted(43, 64) Source(47, 59) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -7 >Emitted(43, 66) Source(47, 61) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -8 >Emitted(43, 67) Source(47, 62) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -9 >Emitted(43, 68) Source(47, 63) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -10>Emitted(43, 72) Source(47, 67) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -11>Emitted(43, 73) Source(47, 68) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -12>Emitted(43, 74) Source(47, 69) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -13>Emitted(43, 75) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +1->Emitted(43, 17) Source(47, 10) + SourceIndex(0) +2 >Emitted(43, 41) Source(47, 13) + SourceIndex(0) +3 >Emitted(43, 44) Source(47, 3) + SourceIndex(0) +4 >Emitted(43, 54) Source(47, 14) + SourceIndex(0) +5 >Emitted(43, 60) Source(47, 55) + SourceIndex(0) +6 >Emitted(43, 64) Source(47, 59) + SourceIndex(0) +7 >Emitted(43, 66) Source(47, 61) + SourceIndex(0) +8 >Emitted(43, 67) Source(47, 62) + SourceIndex(0) +9 >Emitted(43, 68) Source(47, 63) + SourceIndex(0) +10>Emitted(43, 72) Source(47, 67) + SourceIndex(0) +11>Emitted(43, 73) Source(47, 68) + SourceIndex(0) +12>Emitted(43, 74) Source(47, 69) + SourceIndex(0) +13>Emitted(43, 75) Source(47, 70) + SourceIndex(0) --- >>> return runner(this); 1 >^^^^^^^^^^^^^^^^^^^^ @@ -847,14 +847,14 @@ sourceFile:recursiveClassReferenceTest.ts 6 > this 7 > ) 8 > ; -1 >Emitted(44, 21) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -2 >Emitted(44, 27) Source(47, 76) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -3 >Emitted(44, 28) Source(47, 77) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -4 >Emitted(44, 34) Source(47, 83) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -5 >Emitted(44, 35) Source(47, 84) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -6 >Emitted(44, 39) Source(47, 88) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -7 >Emitted(44, 40) Source(47, 89) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -8 >Emitted(44, 41) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +1 >Emitted(44, 21) Source(47, 70) + SourceIndex(0) +2 >Emitted(44, 27) Source(47, 76) + SourceIndex(0) +3 >Emitted(44, 28) Source(47, 77) + SourceIndex(0) +4 >Emitted(44, 34) Source(47, 83) + SourceIndex(0) +5 >Emitted(44, 35) Source(47, 84) + SourceIndex(0) +6 >Emitted(44, 39) Source(47, 88) + SourceIndex(0) +7 >Emitted(44, 40) Source(47, 89) + SourceIndex(0) +8 >Emitted(44, 41) Source(47, 90) + SourceIndex(0) --- >>> } }; 1 >^^^^^^^^^^^^^^^^ @@ -866,10 +866,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 > } 3 > 4 > } -1 >Emitted(45, 17) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -2 >Emitted(45, 18) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -3 >Emitted(45, 19) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -4 >Emitted(45, 20) Source(47, 92) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +1 >Emitted(45, 17) Source(47, 90) + SourceIndex(0) +2 >Emitted(45, 18) Source(47, 91) + SourceIndex(0) +3 >Emitted(45, 19) Source(47, 91) + SourceIndex(0) +4 >Emitted(45, 20) Source(47, 92) + SourceIndex(0) --- >>> FindWidget.prototype.getDomNode = function () { 1->^^^^^^^^^^^^^^^^ @@ -886,9 +886,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getDomNode 3 > -1->Emitted(46, 17) Source(55, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(46, 48) Source(55, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(46, 51) Source(55, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(46, 17) Source(55, 10) + SourceIndex(0) +2 >Emitted(46, 48) Source(55, 20) + SourceIndex(0) +3 >Emitted(46, 51) Source(55, 3) + SourceIndex(0) --- >>> return domNode; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -902,11 +902,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > domNode 5 > ; -1 >Emitted(47, 21) Source(56, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -2 >Emitted(47, 27) Source(56, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -3 >Emitted(47, 28) Source(56, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -4 >Emitted(47, 35) Source(56, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -5 >Emitted(47, 36) Source(56, 19) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +1 >Emitted(47, 21) Source(56, 4) + SourceIndex(0) +2 >Emitted(47, 27) Source(56, 10) + SourceIndex(0) +3 >Emitted(47, 28) Source(56, 11) + SourceIndex(0) +4 >Emitted(47, 35) Source(56, 18) + SourceIndex(0) +5 >Emitted(47, 36) Source(56, 19) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -915,8 +915,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(48, 17) Source(57, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -2 >Emitted(48, 18) Source(57, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +1 >Emitted(48, 17) Source(57, 3) + SourceIndex(0) +2 >Emitted(48, 18) Source(57, 4) + SourceIndex(0) --- >>> FindWidget.prototype.destroy = function () { 1->^^^^^^^^^^^^^^^^ @@ -927,9 +927,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > destroy 3 > -1->Emitted(49, 17) Source(59, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(49, 45) Source(59, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(49, 48) Source(59, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(49, 17) Source(59, 10) + SourceIndex(0) +2 >Emitted(49, 45) Source(59, 17) + SourceIndex(0) +3 >Emitted(49, 48) Source(59, 3) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -939,8 +939,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(50, 17) Source(61, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) -2 >Emitted(50, 18) Source(61, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) +1 >Emitted(50, 17) Source(61, 3) + SourceIndex(0) +2 >Emitted(50, 18) Source(61, 4) + SourceIndex(0) --- >>> return FindWidget; 1->^^^^^^^^^^^^^^^^ @@ -949,8 +949,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(51, 17) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(51, 34) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(51, 17) Source(63, 2) + SourceIndex(0) +2 >Emitted(51, 34) Source(63, 3) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -980,10 +980,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > > } -1 >Emitted(52, 13) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(52, 14) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(52, 14) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) -4 >Emitted(52, 18) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) +1 >Emitted(52, 13) Source(63, 2) + SourceIndex(0) +2 >Emitted(52, 14) Source(63, 3) + SourceIndex(0) +3 >Emitted(52, 14) Source(45, 2) + SourceIndex(0) +4 >Emitted(52, 18) Source(63, 3) + SourceIndex(0) --- >>> Widgets.FindWidget = FindWidget; 1->^^^^^^^^^^^^ @@ -1013,10 +1013,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(53, 13) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) -2 >Emitted(53, 31) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets) -3 >Emitted(53, 44) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) -4 >Emitted(53, 45) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) +1->Emitted(53, 13) Source(45, 15) + SourceIndex(0) +2 >Emitted(53, 31) Source(45, 25) + SourceIndex(0) +3 >Emitted(53, 44) Source(63, 3) + SourceIndex(0) +4 >Emitted(53, 45) Source(63, 3) + SourceIndex(0) --- >>> })(Widgets = Thing.Widgets || (Thing.Widgets = {})); 1->^^^^^^^^ @@ -1058,15 +1058,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(54, 9) Source(64, 1) + SourceIndex(0) name (Sample.Thing.Widgets) -2 >Emitted(54, 10) Source(64, 2) + SourceIndex(0) name (Sample.Thing.Widgets) -3 >Emitted(54, 12) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(54, 19) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(54, 22) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -6 >Emitted(54, 35) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -7 >Emitted(54, 40) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -8 >Emitted(54, 53) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -9 >Emitted(54, 61) Source(64, 2) + SourceIndex(0) name (Sample.Thing) +1->Emitted(54, 9) Source(64, 1) + SourceIndex(0) +2 >Emitted(54, 10) Source(64, 2) + SourceIndex(0) +3 >Emitted(54, 12) Source(44, 21) + SourceIndex(0) +4 >Emitted(54, 19) Source(44, 28) + SourceIndex(0) +5 >Emitted(54, 22) Source(44, 21) + SourceIndex(0) +6 >Emitted(54, 35) Source(44, 28) + SourceIndex(0) +7 >Emitted(54, 40) Source(44, 21) + SourceIndex(0) +8 >Emitted(54, 53) Source(44, 28) + SourceIndex(0) +9 >Emitted(54, 61) Source(64, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1107,15 +1107,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(55, 5) Source(64, 1) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(55, 6) Source(64, 2) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(55, 8) Source(44, 15) + SourceIndex(0) name (Sample) -4 >Emitted(55, 13) Source(44, 20) + SourceIndex(0) name (Sample) -5 >Emitted(55, 16) Source(44, 15) + SourceIndex(0) name (Sample) -6 >Emitted(55, 28) Source(44, 20) + SourceIndex(0) name (Sample) -7 >Emitted(55, 33) Source(44, 15) + SourceIndex(0) name (Sample) -8 >Emitted(55, 45) Source(44, 20) + SourceIndex(0) name (Sample) -9 >Emitted(55, 53) Source(64, 2) + SourceIndex(0) name (Sample) +1 >Emitted(55, 5) Source(64, 1) + SourceIndex(0) +2 >Emitted(55, 6) Source(64, 2) + SourceIndex(0) +3 >Emitted(55, 8) Source(44, 15) + SourceIndex(0) +4 >Emitted(55, 13) Source(44, 20) + SourceIndex(0) +5 >Emitted(55, 16) Source(44, 15) + SourceIndex(0) +6 >Emitted(55, 28) Source(44, 20) + SourceIndex(0) +7 >Emitted(55, 33) Source(44, 15) + SourceIndex(0) +8 >Emitted(55, 45) Source(44, 20) + SourceIndex(0) +9 >Emitted(55, 53) Source(64, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -1153,8 +1153,8 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(56, 1) Source(64, 1) + SourceIndex(0) name (Sample) -2 >Emitted(56, 2) Source(64, 2) + SourceIndex(0) name (Sample) +1 >Emitted(56, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(56, 2) Source(64, 2) + SourceIndex(0) 3 >Emitted(56, 4) Source(44, 8) + SourceIndex(0) 4 >Emitted(56, 10) Source(44, 14) + SourceIndex(0) 5 >Emitted(56, 15) Source(44, 8) + SourceIndex(0) @@ -1174,7 +1174,7 @@ sourceFile:recursiveClassReferenceTest.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(58, 5) Source(67, 1) + SourceIndex(0) name (AbstractMode) +1->Emitted(58, 5) Source(67, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -1182,8 +1182,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->class AbstractMode implements IMode { public getInitialState(): IState { return null;} 2 > } -1->Emitted(59, 5) Source(67, 88) + SourceIndex(0) name (AbstractMode.constructor) -2 >Emitted(59, 6) Source(67, 89) + SourceIndex(0) name (AbstractMode.constructor) +1->Emitted(59, 5) Source(67, 88) + SourceIndex(0) +2 >Emitted(59, 6) Source(67, 89) + SourceIndex(0) --- >>> AbstractMode.prototype.getInitialState = function () { return null; }; 1->^^^^ @@ -1206,24 +1206,24 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(60, 5) Source(67, 46) + SourceIndex(0) name (AbstractMode) -2 >Emitted(60, 43) Source(67, 61) + SourceIndex(0) name (AbstractMode) -3 >Emitted(60, 46) Source(67, 39) + SourceIndex(0) name (AbstractMode) -4 >Emitted(60, 60) Source(67, 74) + SourceIndex(0) name (AbstractMode.getInitialState) -5 >Emitted(60, 66) Source(67, 80) + SourceIndex(0) name (AbstractMode.getInitialState) -6 >Emitted(60, 67) Source(67, 81) + SourceIndex(0) name (AbstractMode.getInitialState) -7 >Emitted(60, 71) Source(67, 85) + SourceIndex(0) name (AbstractMode.getInitialState) -8 >Emitted(60, 72) Source(67, 86) + SourceIndex(0) name (AbstractMode.getInitialState) -9 >Emitted(60, 73) Source(67, 86) + SourceIndex(0) name (AbstractMode.getInitialState) -10>Emitted(60, 74) Source(67, 87) + SourceIndex(0) name (AbstractMode.getInitialState) +1->Emitted(60, 5) Source(67, 46) + SourceIndex(0) +2 >Emitted(60, 43) Source(67, 61) + SourceIndex(0) +3 >Emitted(60, 46) Source(67, 39) + SourceIndex(0) +4 >Emitted(60, 60) Source(67, 74) + SourceIndex(0) +5 >Emitted(60, 66) Source(67, 80) + SourceIndex(0) +6 >Emitted(60, 67) Source(67, 81) + SourceIndex(0) +7 >Emitted(60, 71) Source(67, 85) + SourceIndex(0) +8 >Emitted(60, 72) Source(67, 86) + SourceIndex(0) +9 >Emitted(60, 73) Source(67, 86) + SourceIndex(0) +10>Emitted(60, 74) Source(67, 87) + SourceIndex(0) --- >>> return AbstractMode; 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^ 1 > 2 > } -1 >Emitted(61, 5) Source(67, 88) + SourceIndex(0) name (AbstractMode) -2 >Emitted(61, 24) Source(67, 89) + SourceIndex(0) name (AbstractMode) +1 >Emitted(61, 5) Source(67, 88) + SourceIndex(0) +2 >Emitted(61, 24) Source(67, 89) + SourceIndex(0) --- >>>})(); 1 > @@ -1235,8 +1235,8 @@ sourceFile:recursiveClassReferenceTest.ts 2 >} 3 > 4 > class AbstractMode implements IMode { public getInitialState(): IState { return null;} } -1 >Emitted(62, 1) Source(67, 88) + SourceIndex(0) name (AbstractMode) -2 >Emitted(62, 2) Source(67, 89) + SourceIndex(0) name (AbstractMode) +1 >Emitted(62, 1) Source(67, 88) + SourceIndex(0) +2 >Emitted(62, 2) Source(67, 89) + SourceIndex(0) 3 >Emitted(62, 2) Source(67, 1) + SourceIndex(0) 4 >Emitted(62, 6) Source(67, 89) + SourceIndex(0) --- @@ -1333,10 +1333,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(65, 5) Source(76, 15) + SourceIndex(0) name (Sample) -2 >Emitted(65, 9) Source(76, 15) + SourceIndex(0) name (Sample) -3 >Emitted(65, 14) Source(76, 20) + SourceIndex(0) name (Sample) -4 >Emitted(65, 15) Source(100, 2) + SourceIndex(0) name (Sample) +1 >Emitted(65, 5) Source(76, 15) + SourceIndex(0) +2 >Emitted(65, 9) Source(76, 15) + SourceIndex(0) +3 >Emitted(65, 14) Source(76, 20) + SourceIndex(0) +4 >Emitted(65, 15) Source(100, 2) + SourceIndex(0) --- >>> (function (Thing) { 1->^^^^ @@ -1346,9 +1346,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(66, 5) Source(76, 15) + SourceIndex(0) name (Sample) -2 >Emitted(66, 16) Source(76, 15) + SourceIndex(0) name (Sample) -3 >Emitted(66, 21) Source(76, 20) + SourceIndex(0) name (Sample) +1->Emitted(66, 5) Source(76, 15) + SourceIndex(0) +2 >Emitted(66, 16) Source(76, 15) + SourceIndex(0) +3 >Emitted(66, 21) Source(76, 20) + SourceIndex(0) --- >>> var Languages; 1->^^^^^^^^ @@ -1384,10 +1384,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(67, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(67, 13) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(67, 22) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(67, 23) Source(100, 2) + SourceIndex(0) name (Sample.Thing) +1->Emitted(67, 9) Source(76, 21) + SourceIndex(0) +2 >Emitted(67, 13) Source(76, 21) + SourceIndex(0) +3 >Emitted(67, 22) Source(76, 30) + SourceIndex(0) +4 >Emitted(67, 23) Source(100, 2) + SourceIndex(0) --- >>> (function (Languages) { 1->^^^^^^^^ @@ -1396,9 +1396,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Languages -1->Emitted(68, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(68, 20) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(68, 29) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +1->Emitted(68, 9) Source(76, 21) + SourceIndex(0) +2 >Emitted(68, 20) Source(76, 21) + SourceIndex(0) +3 >Emitted(68, 29) Source(76, 30) + SourceIndex(0) --- >>> var PlainText; 1 >^^^^^^^^^^^^ @@ -1434,10 +1434,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(69, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -2 >Emitted(69, 17) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -3 >Emitted(69, 26) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -4 >Emitted(69, 27) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) +1 >Emitted(69, 13) Source(76, 31) + SourceIndex(0) +2 >Emitted(69, 17) Source(76, 31) + SourceIndex(0) +3 >Emitted(69, 26) Source(76, 40) + SourceIndex(0) +4 >Emitted(69, 27) Source(100, 2) + SourceIndex(0) --- >>> (function (PlainText) { 1->^^^^^^^^^^^^ @@ -1451,11 +1451,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > PlainText 4 > 5 > { -1->Emitted(70, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -2 >Emitted(70, 24) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -3 >Emitted(70, 33) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -4 >Emitted(70, 35) Source(76, 41) + SourceIndex(0) name (Sample.Thing.Languages) -5 >Emitted(70, 36) Source(76, 42) + SourceIndex(0) name (Sample.Thing.Languages) +1->Emitted(70, 13) Source(76, 31) + SourceIndex(0) +2 >Emitted(70, 24) Source(76, 31) + SourceIndex(0) +3 >Emitted(70, 33) Source(76, 40) + SourceIndex(0) +4 >Emitted(70, 35) Source(76, 41) + SourceIndex(0) +5 >Emitted(70, 36) Source(76, 42) + SourceIndex(0) --- >>> var State = (function () { 1->^^^^^^^^^^^^^^^^ @@ -1463,7 +1463,7 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > > -1->Emitted(71, 17) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(71, 17) Source(78, 2) + SourceIndex(0) --- >>> function State(mode) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1474,9 +1474,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > mode: IMode -1->Emitted(72, 21) Source(79, 9) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(72, 36) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(72, 40) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(72, 21) Source(79, 9) + SourceIndex(0) +2 >Emitted(72, 36) Source(79, 29) + SourceIndex(0) +3 >Emitted(72, 40) Source(79, 40) + SourceIndex(0) --- >>> this.mode = mode; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1489,11 +1489,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > mode 5 > : IMode -1->Emitted(73, 25) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -2 >Emitted(73, 34) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -3 >Emitted(73, 37) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -4 >Emitted(73, 41) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -5 >Emitted(73, 42) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +1->Emitted(73, 25) Source(79, 29) + SourceIndex(0) +2 >Emitted(73, 34) Source(79, 33) + SourceIndex(0) +3 >Emitted(73, 37) Source(79, 29) + SourceIndex(0) +4 >Emitted(73, 41) Source(79, 33) + SourceIndex(0) +5 >Emitted(73, 42) Source(79, 40) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1501,8 +1501,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(74, 21) Source(79, 44) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -2 >Emitted(74, 22) Source(79, 45) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +1 >Emitted(74, 21) Source(79, 44) + SourceIndex(0) +2 >Emitted(74, 22) Source(79, 45) + SourceIndex(0) --- >>> State.prototype.clone = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1512,9 +1512,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > clone 3 > -1->Emitted(75, 21) Source(80, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(75, 42) Source(80, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(75, 45) Source(80, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(75, 21) Source(80, 10) + SourceIndex(0) +2 >Emitted(75, 42) Source(80, 15) + SourceIndex(0) +3 >Emitted(75, 45) Source(80, 3) + SourceIndex(0) --- >>> return this; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1528,11 +1528,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > this 5 > ; -1 >Emitted(76, 25) Source(81, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -2 >Emitted(76, 31) Source(81, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -3 >Emitted(76, 32) Source(81, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -4 >Emitted(76, 36) Source(81, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -5 >Emitted(76, 37) Source(81, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +1 >Emitted(76, 25) Source(81, 4) + SourceIndex(0) +2 >Emitted(76, 31) Source(81, 10) + SourceIndex(0) +3 >Emitted(76, 32) Source(81, 11) + SourceIndex(0) +4 >Emitted(76, 36) Source(81, 15) + SourceIndex(0) +5 >Emitted(76, 37) Source(81, 16) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1541,8 +1541,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(77, 21) Source(82, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -2 >Emitted(77, 22) Source(82, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +1 >Emitted(77, 21) Source(82, 3) + SourceIndex(0) +2 >Emitted(77, 22) Source(82, 4) + SourceIndex(0) --- >>> State.prototype.equals = function (other) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1557,11 +1557,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public equals( 5 > other:IState -1->Emitted(78, 21) Source(84, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(78, 43) Source(84, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(78, 46) Source(84, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -4 >Emitted(78, 56) Source(84, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -5 >Emitted(78, 61) Source(84, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(78, 21) Source(84, 10) + SourceIndex(0) +2 >Emitted(78, 43) Source(84, 16) + SourceIndex(0) +3 >Emitted(78, 46) Source(84, 3) + SourceIndex(0) +4 >Emitted(78, 56) Source(84, 17) + SourceIndex(0) +5 >Emitted(78, 61) Source(84, 29) + SourceIndex(0) --- >>> return this === other; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1579,13 +1579,13 @@ sourceFile:recursiveClassReferenceTest.ts 5 > === 6 > other 7 > ; -1 >Emitted(79, 25) Source(85, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -2 >Emitted(79, 31) Source(85, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -3 >Emitted(79, 32) Source(85, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -4 >Emitted(79, 36) Source(85, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -5 >Emitted(79, 41) Source(85, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -6 >Emitted(79, 46) Source(85, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -7 >Emitted(79, 47) Source(85, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +1 >Emitted(79, 25) Source(85, 4) + SourceIndex(0) +2 >Emitted(79, 31) Source(85, 10) + SourceIndex(0) +3 >Emitted(79, 32) Source(85, 11) + SourceIndex(0) +4 >Emitted(79, 36) Source(85, 15) + SourceIndex(0) +5 >Emitted(79, 41) Source(85, 20) + SourceIndex(0) +6 >Emitted(79, 46) Source(85, 25) + SourceIndex(0) +7 >Emitted(79, 47) Source(85, 26) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1594,8 +1594,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(80, 21) Source(86, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -2 >Emitted(80, 22) Source(86, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +1 >Emitted(80, 21) Source(86, 3) + SourceIndex(0) +2 >Emitted(80, 22) Source(86, 4) + SourceIndex(0) --- >>> State.prototype.getMode = function () { return mode; }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1620,16 +1620,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(81, 21) Source(88, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(81, 44) Source(88, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(81, 47) Source(88, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -4 >Emitted(81, 61) Source(88, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -5 >Emitted(81, 67) Source(88, 35) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -6 >Emitted(81, 68) Source(88, 36) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -7 >Emitted(81, 72) Source(88, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -8 >Emitted(81, 73) Source(88, 41) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -9 >Emitted(81, 74) Source(88, 42) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -10>Emitted(81, 75) Source(88, 43) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +1->Emitted(81, 21) Source(88, 10) + SourceIndex(0) +2 >Emitted(81, 44) Source(88, 17) + SourceIndex(0) +3 >Emitted(81, 47) Source(88, 3) + SourceIndex(0) +4 >Emitted(81, 61) Source(88, 29) + SourceIndex(0) +5 >Emitted(81, 67) Source(88, 35) + SourceIndex(0) +6 >Emitted(81, 68) Source(88, 36) + SourceIndex(0) +7 >Emitted(81, 72) Source(88, 40) + SourceIndex(0) +8 >Emitted(81, 73) Source(88, 41) + SourceIndex(0) +9 >Emitted(81, 74) Source(88, 42) + SourceIndex(0) +10>Emitted(81, 75) Source(88, 43) + SourceIndex(0) --- >>> return State; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1637,8 +1637,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(82, 21) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(82, 33) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1 >Emitted(82, 21) Source(89, 2) + SourceIndex(0) +2 >Emitted(82, 33) Source(89, 3) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -1661,10 +1661,10 @@ sourceFile:recursiveClassReferenceTest.ts > > public getMode(): IMode { return mode; } > } -1 >Emitted(83, 17) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(83, 18) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(83, 18) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(83, 22) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1 >Emitted(83, 17) Source(89, 2) + SourceIndex(0) +2 >Emitted(83, 18) Source(89, 3) + SourceIndex(0) +3 >Emitted(83, 18) Source(78, 2) + SourceIndex(0) +4 >Emitted(83, 22) Source(89, 3) + SourceIndex(0) --- >>> PlainText.State = State; 1->^^^^^^^^^^^^^^^^ @@ -1687,10 +1687,10 @@ sourceFile:recursiveClassReferenceTest.ts > public getMode(): IMode { return mode; } > } 4 > -1->Emitted(84, 17) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(84, 32) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(84, 40) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(84, 41) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(84, 17) Source(78, 15) + SourceIndex(0) +2 >Emitted(84, 32) Source(78, 20) + SourceIndex(0) +3 >Emitted(84, 40) Source(89, 3) + SourceIndex(0) +4 >Emitted(84, 41) Source(89, 3) + SourceIndex(0) --- >>> var Mode = (function (_super) { 1->^^^^^^^^^^^^^^^^ @@ -1698,29 +1698,29 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > > -1->Emitted(85, 17) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(85, 17) Source(91, 2) + SourceIndex(0) --- >>> __extends(Mode, _super); 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class Mode extends 2 > AbstractMode -1->Emitted(86, 21) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(86, 45) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(86, 21) Source(91, 28) + SourceIndex(0) +2 >Emitted(86, 45) Source(91, 40) + SourceIndex(0) --- >>> function Mode() { 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(87, 21) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1 >Emitted(87, 21) Source(91, 2) + SourceIndex(0) --- >>> _super.apply(this, arguments); 1->^^^^^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class Mode extends 2 > AbstractMode -1->Emitted(88, 25) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) -2 >Emitted(88, 55) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +1->Emitted(88, 25) Source(91, 28) + SourceIndex(0) +2 >Emitted(88, 55) Source(91, 40) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1736,8 +1736,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(89, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) -2 >Emitted(89, 22) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +1 >Emitted(89, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(89, 22) Source(99, 3) + SourceIndex(0) --- >>> // scenario 2 1->^^^^^^^^^^^^^^^^^^^^ @@ -1745,8 +1745,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > // scenario 2 -1->Emitted(90, 21) Source(93, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(90, 34) Source(93, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(90, 21) Source(93, 3) + SourceIndex(0) +2 >Emitted(90, 34) Source(93, 16) + SourceIndex(0) --- >>> Mode.prototype.getInitialState = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1756,9 +1756,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getInitialState 3 > -1->Emitted(91, 21) Source(94, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(91, 51) Source(94, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -3 >Emitted(91, 54) Source(94, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(91, 21) Source(94, 10) + SourceIndex(0) +2 >Emitted(91, 51) Source(94, 25) + SourceIndex(0) +3 >Emitted(91, 54) Source(94, 3) + SourceIndex(0) --- >>> return new State(self); 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1780,15 +1780,15 @@ sourceFile:recursiveClassReferenceTest.ts 7 > self 8 > ) 9 > ; -1 >Emitted(92, 25) Source(95, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -2 >Emitted(92, 31) Source(95, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -3 >Emitted(92, 32) Source(95, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -4 >Emitted(92, 36) Source(95, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -5 >Emitted(92, 41) Source(95, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -6 >Emitted(92, 42) Source(95, 21) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -7 >Emitted(92, 46) Source(95, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -8 >Emitted(92, 47) Source(95, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -9 >Emitted(92, 48) Source(95, 27) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +1 >Emitted(92, 25) Source(95, 4) + SourceIndex(0) +2 >Emitted(92, 31) Source(95, 10) + SourceIndex(0) +3 >Emitted(92, 32) Source(95, 11) + SourceIndex(0) +4 >Emitted(92, 36) Source(95, 15) + SourceIndex(0) +5 >Emitted(92, 41) Source(95, 20) + SourceIndex(0) +6 >Emitted(92, 42) Source(95, 21) + SourceIndex(0) +7 >Emitted(92, 46) Source(95, 25) + SourceIndex(0) +8 >Emitted(92, 47) Source(95, 26) + SourceIndex(0) +9 >Emitted(92, 48) Source(95, 27) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1797,8 +1797,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(93, 21) Source(96, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -2 >Emitted(93, 22) Source(96, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +1 >Emitted(93, 21) Source(96, 3) + SourceIndex(0) +2 >Emitted(93, 22) Source(96, 4) + SourceIndex(0) --- >>> return Mode; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1809,8 +1809,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(94, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(94, 32) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(94, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(94, 32) Source(99, 3) + SourceIndex(0) --- >>> })(AbstractMode); 1->^^^^^^^^^^^^^^^^ @@ -1834,12 +1834,12 @@ sourceFile:recursiveClassReferenceTest.ts > > > } -1->Emitted(95, 17) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(95, 18) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -3 >Emitted(95, 18) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(95, 20) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -5 >Emitted(95, 32) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -6 >Emitted(95, 34) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(95, 17) Source(99, 2) + SourceIndex(0) +2 >Emitted(95, 18) Source(99, 3) + SourceIndex(0) +3 >Emitted(95, 18) Source(91, 2) + SourceIndex(0) +4 >Emitted(95, 20) Source(91, 28) + SourceIndex(0) +5 >Emitted(95, 32) Source(91, 40) + SourceIndex(0) +6 >Emitted(95, 34) Source(99, 3) + SourceIndex(0) --- >>> PlainText.Mode = Mode; 1->^^^^^^^^^^^^^^^^ @@ -1859,10 +1859,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(96, 17) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(96, 31) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(96, 38) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(96, 39) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(96, 17) Source(91, 15) + SourceIndex(0) +2 >Emitted(96, 31) Source(91, 19) + SourceIndex(0) +3 >Emitted(96, 38) Source(99, 3) + SourceIndex(0) +4 >Emitted(96, 39) Source(99, 3) + SourceIndex(0) --- >>> })(PlainText = Languages.PlainText || (Languages.PlainText = {})); 1->^^^^^^^^^^^^ @@ -1908,15 +1908,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(97, 13) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(97, 14) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(97, 16) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -4 >Emitted(97, 25) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -5 >Emitted(97, 28) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -6 >Emitted(97, 47) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -7 >Emitted(97, 52) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -8 >Emitted(97, 71) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -9 >Emitted(97, 79) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) +1->Emitted(97, 13) Source(100, 1) + SourceIndex(0) +2 >Emitted(97, 14) Source(100, 2) + SourceIndex(0) +3 >Emitted(97, 16) Source(76, 31) + SourceIndex(0) +4 >Emitted(97, 25) Source(76, 40) + SourceIndex(0) +5 >Emitted(97, 28) Source(76, 31) + SourceIndex(0) +6 >Emitted(97, 47) Source(76, 40) + SourceIndex(0) +7 >Emitted(97, 52) Source(76, 31) + SourceIndex(0) +8 >Emitted(97, 71) Source(76, 40) + SourceIndex(0) +9 >Emitted(97, 79) Source(100, 2) + SourceIndex(0) --- >>> })(Languages = Thing.Languages || (Thing.Languages = {})); 1 >^^^^^^^^ @@ -1961,15 +1961,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(98, 9) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages) -2 >Emitted(98, 10) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) -3 >Emitted(98, 12) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(98, 21) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(98, 24) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -6 >Emitted(98, 39) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -7 >Emitted(98, 44) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -8 >Emitted(98, 59) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -9 >Emitted(98, 67) Source(100, 2) + SourceIndex(0) name (Sample.Thing) +1 >Emitted(98, 9) Source(100, 1) + SourceIndex(0) +2 >Emitted(98, 10) Source(100, 2) + SourceIndex(0) +3 >Emitted(98, 12) Source(76, 21) + SourceIndex(0) +4 >Emitted(98, 21) Source(76, 30) + SourceIndex(0) +5 >Emitted(98, 24) Source(76, 21) + SourceIndex(0) +6 >Emitted(98, 39) Source(76, 30) + SourceIndex(0) +7 >Emitted(98, 44) Source(76, 21) + SourceIndex(0) +8 >Emitted(98, 59) Source(76, 30) + SourceIndex(0) +9 >Emitted(98, 67) Source(100, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -2014,15 +2014,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(99, 5) Source(100, 1) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(99, 6) Source(100, 2) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(99, 8) Source(76, 15) + SourceIndex(0) name (Sample) -4 >Emitted(99, 13) Source(76, 20) + SourceIndex(0) name (Sample) -5 >Emitted(99, 16) Source(76, 15) + SourceIndex(0) name (Sample) -6 >Emitted(99, 28) Source(76, 20) + SourceIndex(0) name (Sample) -7 >Emitted(99, 33) Source(76, 15) + SourceIndex(0) name (Sample) -8 >Emitted(99, 45) Source(76, 20) + SourceIndex(0) name (Sample) -9 >Emitted(99, 53) Source(100, 2) + SourceIndex(0) name (Sample) +1 >Emitted(99, 5) Source(100, 1) + SourceIndex(0) +2 >Emitted(99, 6) Source(100, 2) + SourceIndex(0) +3 >Emitted(99, 8) Source(76, 15) + SourceIndex(0) +4 >Emitted(99, 13) Source(76, 20) + SourceIndex(0) +5 >Emitted(99, 16) Source(76, 15) + SourceIndex(0) +6 >Emitted(99, 28) Source(76, 20) + SourceIndex(0) +7 >Emitted(99, 33) Source(76, 15) + SourceIndex(0) +8 >Emitted(99, 45) Source(76, 20) + SourceIndex(0) +9 >Emitted(99, 53) Source(100, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -2064,8 +2064,8 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(100, 1) Source(100, 1) + SourceIndex(0) name (Sample) -2 >Emitted(100, 2) Source(100, 2) + SourceIndex(0) name (Sample) +1 >Emitted(100, 1) Source(100, 1) + SourceIndex(0) +2 >Emitted(100, 2) Source(100, 2) + SourceIndex(0) 3 >Emitted(100, 4) Source(76, 8) + SourceIndex(0) 4 >Emitted(100, 10) Source(76, 14) + SourceIndex(0) 5 >Emitted(100, 15) Source(76, 8) + SourceIndex(0) diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType1.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType1.js index 866a54e964f7f..2cc10db27c0e1 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType1.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType1.js @@ -18,6 +18,7 @@ export var b: ClassB; // This should result in type ClassB //// [recursiveExportAssignmentAndFindAliasedType1_moduleB.js] define(["require", "exports"], function (require, exports) { + "use strict"; var ClassB = (function () { function ClassB() { } @@ -27,4 +28,5 @@ define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType1_moduleA.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType2.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType2.js index 8398d252c87f1..f1e5753360f97 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType2.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType2.js @@ -22,6 +22,7 @@ export var b: ClassB; // This should result in type ClassB //// [recursiveExportAssignmentAndFindAliasedType2_moduleB.js] define(["require", "exports"], function (require, exports) { + "use strict"; var ClassB = (function () { function ClassB() { } @@ -31,4 +32,5 @@ define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType2_moduleA.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType3.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType3.js index 9d992596f40da..c195f13a5edbe 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType3.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType3.js @@ -26,6 +26,7 @@ export var b: ClassB; // This should result in type ClassB //// [recursiveExportAssignmentAndFindAliasedType3_moduleB.js] define(["require", "exports"], function (require, exports) { + "use strict"; var ClassB = (function () { function ClassB() { } @@ -35,4 +36,5 @@ define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType3_moduleA.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js index 109950d030187..59726c68c258b 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js @@ -15,9 +15,11 @@ export var b: ClassB; // This should result in type ClassB //// [recursiveExportAssignmentAndFindAliasedType4_moduleC.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [recursiveExportAssignmentAndFindAliasedType4_moduleB.js] define(["require", "exports"], function (require, exports) { + "use strict"; var ClassB = (function () { function ClassB() { } @@ -27,4 +29,5 @@ define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType4_moduleA.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js index 2b5353f279605..7bd4b7dce4a41 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js @@ -19,12 +19,15 @@ export var b: ClassB; // This should result in type ClassB //// [recursiveExportAssignmentAndFindAliasedType5_moduleD.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [recursiveExportAssignmentAndFindAliasedType5_moduleC.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [recursiveExportAssignmentAndFindAliasedType5_moduleB.js] define(["require", "exports"], function (require, exports) { + "use strict"; var ClassB = (function () { function ClassB() { } @@ -34,4 +37,5 @@ define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType5_moduleA.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js index 6ae03f9c9b807..268352c001ab6 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js @@ -23,15 +23,19 @@ export var b: ClassB; // This should result in type ClassB //// [recursiveExportAssignmentAndFindAliasedType6_moduleE.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [recursiveExportAssignmentAndFindAliasedType6_moduleD.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [recursiveExportAssignmentAndFindAliasedType6_moduleC.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); //// [recursiveExportAssignmentAndFindAliasedType6_moduleB.js] define(["require", "exports"], function (require, exports) { + "use strict"; var ClassB = (function () { function ClassB() { } @@ -41,4 +45,5 @@ define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType6_moduleA.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType7.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType7.js index 8e87b0bc3a0df..be43b42e75f19 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType7.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType7.js @@ -24,19 +24,23 @@ export var b: ClassB; // This should result in type ClassB //// [recursiveExportAssignmentAndFindAliasedType7_moduleE.js] define(["require", "exports", "recursiveExportAssignmentAndFindAliasedType7_moduleC"], function (require, exports, self) { + "use strict"; return self; }); //// [recursiveExportAssignmentAndFindAliasedType7_moduleD.js] define(["require", "exports", "recursiveExportAssignmentAndFindAliasedType7_moduleE"], function (require, exports, self) { + "use strict"; return self; }); //// [recursiveExportAssignmentAndFindAliasedType7_moduleC.js] define(["require", "exports", "recursiveExportAssignmentAndFindAliasedType7_moduleD"], function (require, exports, self) { + "use strict"; var selfVar = self; return selfVar; }); //// [recursiveExportAssignmentAndFindAliasedType7_moduleB.js] define(["require", "exports"], function (require, exports) { + "use strict"; var ClassB = (function () { function ClassB() { } @@ -46,4 +50,5 @@ define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType7_moduleA.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/recursiveMods.js b/tests/baselines/reference/recursiveMods.js index f913ddec012be..b25daa169cae6 100644 --- a/tests/baselines/reference/recursiveMods.js +++ b/tests/baselines/reference/recursiveMods.js @@ -25,6 +25,7 @@ export module Foo { //// [recursiveMods.js] +"use strict"; var Foo; (function (Foo) { var C = (function () { diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index 5d534f1e3a32e..7c836e056e447 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -18,6 +18,7 @@ class x extends foo2.x {} //// [foo1.js] +"use strict"; var x = (function () { function x() { } @@ -25,11 +26,13 @@ var x = (function () { })(); module.exports = x; //// [foo2.js] +"use strict"; var foo1 = require('./foo1'); module.exports = { x: foo1 }; //// [foo3.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/relativePathMustResolve.js b/tests/baselines/reference/relativePathMustResolve.js index e149d382df665..c25ffd4ab65d8 100644 --- a/tests/baselines/reference/relativePathMustResolve.js +++ b/tests/baselines/reference/relativePathMustResolve.js @@ -9,5 +9,6 @@ var z = foo.x + 10; //// [foo_1.js] +"use strict"; var foo = require('./test/foo'); var z = foo.x + 10; diff --git a/tests/baselines/reference/relativePathToDeclarationFile.js b/tests/baselines/reference/relativePathToDeclarationFile.js index e50db2be92685..75d6539cb3cf4 100644 --- a/tests/baselines/reference/relativePathToDeclarationFile.js +++ b/tests/baselines/reference/relativePathToDeclarationFile.js @@ -27,6 +27,7 @@ if(foo.M2.x){ //// [file1.js] +"use strict"; var foo = require('foo'); var other = require('./other'); var relMod = require('./sub/relMod'); diff --git a/tests/baselines/reference/requireEmitSemicolon.js b/tests/baselines/reference/requireEmitSemicolon.js index 9fc2f8a8ad83a..ea0b4243ff483 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) { + "use strict"; var Models; (function (Models) { var Person = (function () { @@ -33,6 +34,7 @@ define(["require", "exports"], function (require, exports) { }); //// [requireEmitSemicolon_1.js] define(["require", "exports", "requireEmitSemicolon_0"], function (require, exports, P) { + "use strict"; var Database; (function (Database) { var DB = (function () { diff --git a/tests/baselines/reference/requireOfAnEmptyFile1.js b/tests/baselines/reference/requireOfAnEmptyFile1.js index b2079afa6ef56..5364227219191 100644 --- a/tests/baselines/reference/requireOfAnEmptyFile1.js +++ b/tests/baselines/reference/requireOfAnEmptyFile1.js @@ -11,3 +11,4 @@ import fs = require('./requireOfAnEmptyFile1_b'); //// [requireOfAnEmptyFile1_b.js] //// [requireOfAnEmptyFile1_a.js] //requireOfAnEmptyFile1 +"use strict"; diff --git a/tests/baselines/reference/reservedWords2.js b/tests/baselines/reference/reservedWords2.js index fb90a718ec350..69b071c911584 100644 --- a/tests/baselines/reference/reservedWords2.js +++ b/tests/baselines/reference/reservedWords2.js @@ -14,6 +14,7 @@ enum void {} //// [reservedWords2.js] +"use strict"; require(); while ( = require("dfdf")) ; diff --git a/tests/baselines/reference/reuseInnerModuleMember.js b/tests/baselines/reference/reuseInnerModuleMember.js index a15ec5e39a255..a8d254f56c18e 100644 --- a/tests/baselines/reference/reuseInnerModuleMember.js +++ b/tests/baselines/reference/reuseInnerModuleMember.js @@ -16,7 +16,9 @@ module bar { //// [reuseInnerModuleMember_0.js] +"use strict"; //// [reuseInnerModuleMember_1.js] +"use strict"; /// var bar; (function (bar) { diff --git a/tests/baselines/reference/scannerClass2.js b/tests/baselines/reference/scannerClass2.js index 88dd9919f9c40..0838df4d19f65 100644 --- a/tests/baselines/reference/scannerClass2.js +++ b/tests/baselines/reference/scannerClass2.js @@ -8,6 +8,7 @@ } //// [scannerClass2.js] +"use strict"; var LoggerAdapter = (function () { function LoggerAdapter(logger) { this.logger = logger; diff --git a/tests/baselines/reference/scannerEnum1.js b/tests/baselines/reference/scannerEnum1.js index b503de2c2b0df..e785a07ace2f6 100644 --- a/tests/baselines/reference/scannerEnum1.js +++ b/tests/baselines/reference/scannerEnum1.js @@ -5,6 +5,7 @@ } //// [scannerEnum1.js] +"use strict"; (function (CodeGenTarget) { CodeGenTarget[CodeGenTarget["ES3"] = 0] = "ES3"; CodeGenTarget[CodeGenTarget["ES5"] = 1] = "ES5"; diff --git a/tests/baselines/reference/shebangBeforeReferences.js b/tests/baselines/reference/shebangBeforeReferences.js new file mode 100644 index 0000000000000..6be2707277d0b --- /dev/null +++ b/tests/baselines/reference/shebangBeforeReferences.js @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/shebangBeforeReferences.ts] //// + +//// [f.d.ts] + +declare module "test" { + let x: number; +} + +//// [f.ts] +#!/usr/bin/env node + +/// + +declare function use(f: number): void; +import {x} from "test"; +use(x); + +//// [f.js] +#!/usr/bin/env node"use strict"; +var test_1 = require("test"); +use(test_1.x); diff --git a/tests/baselines/reference/shebangBeforeReferences.symbols b/tests/baselines/reference/shebangBeforeReferences.symbols new file mode 100644 index 0000000000000..23bfe58fc6294 --- /dev/null +++ b/tests/baselines/reference/shebangBeforeReferences.symbols @@ -0,0 +1,23 @@ +=== tests/cases/compiler/f.ts === +#!/usr/bin/env node + +/// + +declare function use(f: number): void; +>use : Symbol(use, Decl(f.ts, 0, 0)) +>f : Symbol(f, Decl(f.ts, 4, 21)) + +import {x} from "test"; +>x : Symbol(x, Decl(f.ts, 5, 8)) + +use(x); +>use : Symbol(use, Decl(f.ts, 0, 0)) +>x : Symbol(x, Decl(f.ts, 5, 8)) + +=== tests/cases/compiler/f.d.ts === + +declare module "test" { + let x: number; +>x : Symbol(x, Decl(f.d.ts, 2, 7)) +} + diff --git a/tests/baselines/reference/shebangBeforeReferences.types b/tests/baselines/reference/shebangBeforeReferences.types new file mode 100644 index 0000000000000..89b63a1a0b440 --- /dev/null +++ b/tests/baselines/reference/shebangBeforeReferences.types @@ -0,0 +1,24 @@ +=== tests/cases/compiler/f.ts === +#!/usr/bin/env node + +/// + +declare function use(f: number): void; +>use : (f: number) => void +>f : number + +import {x} from "test"; +>x : number + +use(x); +>use(x) : void +>use : (f: number) => void +>x : number + +=== tests/cases/compiler/f.d.ts === + +declare module "test" { + let x: number; +>x : number +} + diff --git a/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.errors.txt b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.errors.txt new file mode 100644 index 0000000000000..35fc45421c4ee --- /dev/null +++ b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.errors.txt @@ -0,0 +1,19 @@ +tests/cases/compiler/test.ts(2,19): error TS2307: Cannot find module './missingModule'. + + +==== tests/cases/compiler/existingModule.ts (0 errors) ==== + + export var x = 1; + +==== tests/cases/compiler/test.ts (1 errors) ==== + import {x} from './existingModule'; + import {foo} from './missingModule'; + ~~~~~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module './missingModule'. + + declare function use(a: any): void; + + const test = { x, foo }; + + use(x); + use(foo); \ No newline at end of file diff --git a/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js new file mode 100644 index 0000000000000..cab16b96bc305 --- /dev/null +++ b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/shorthandPropertyAssignmentInES6Module.ts] //// + +//// [existingModule.ts] + +export var x = 1; + +//// [test.ts] +import {x} from './existingModule'; +import {foo} from './missingModule'; + +declare function use(a: any): void; + +const test = { x, foo }; + +use(x); +use(foo); + +//// [existingModule.js] +"use strict"; +exports.x = 1; +//// [test.js] +"use strict"; +var existingModule_1 = require('./existingModule'); +var missingModule_1 = require('./missingModule'); +const test = { x: existingModule_1.x, foo: missingModule_1.foo }; +use(existingModule_1.x); +use(missingModule_1.foo); diff --git a/tests/baselines/reference/sourceMap-Comments.js.map b/tests/baselines/reference/sourceMap-Comments.js.map index 6e5e0dca07107..7f6c159c6eb26 100644 --- a/tests/baselines/reference/sourceMap-Comments.js.map +++ b/tests/baselines/reference/sourceMap-Comments.js.map @@ -1,2 +1,2 @@ //// [sourceMap-Comments.js.map] -{"version":3,"file":"sourceMap-Comments.js","sourceRoot":"","sources":["sourceMap-Comments.ts"],"names":["sas","sas.tools","sas.tools.Test","sas.tools.Test.constructor","sas.tools.Test.doX"],"mappings":"AAAA,IAAO,GAAG,CAkBT;AAlBD,WAAO,GAAG;IAACA,IAAAA,KAAKA,CAkBfA;IAlBUA,WAAAA,KAAKA,EAACA,CAACA;QACdC;YAAAC;YAeAC,CAACA;YAdUD,kBAAGA,GAAVA;gBACIE,IAAIA,CAACA,GAAWA,CAACA,CAACA;gBAClBA,MAAMA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;oBACRA,KAAKA,CAACA;wBACFA,KAAKA,CAACA;oBACVA,KAAKA,CAACA;wBACFA,gBAAgBA;wBAChBA,gBAAgBA;wBAChBA,KAAKA,CAACA;oBACVA,KAAKA,CAACA;wBACFA,WAAWA;wBACXA,KAAKA,CAACA;gBACdA,CAACA;YACLA,CAACA;YACLF,WAACA;QAADA,CAACA,AAfDD,IAeCA;QAfYA,UAAIA,OAehBA,CAAAA;IAELA,CAACA,EAlBUD,KAAKA,GAALA,SAAKA,KAALA,SAAKA,QAkBfA;AAADA,CAACA,EAlBM,GAAG,KAAH,GAAG,QAkBT"} \ No newline at end of file +{"version":3,"file":"sourceMap-Comments.js","sourceRoot":"","sources":["sourceMap-Comments.ts"],"names":[],"mappings":"AAAA,IAAO,GAAG,CAkBT;AAlBD,WAAO,GAAG;IAAC,IAAA,KAAK,CAkBf;IAlBU,WAAA,KAAK,EAAC,CAAC;QACd;YAAA;YAeA,CAAC;YAdU,kBAAG,GAAV;gBACI,IAAI,CAAC,GAAW,CAAC,CAAC;gBAClB,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBACR,KAAK,CAAC;wBACF,KAAK,CAAC;oBACV,KAAK,CAAC;wBACF,gBAAgB;wBAChB,gBAAgB;wBAChB,KAAK,CAAC;oBACV,KAAK,CAAC;wBACF,WAAW;wBACX,KAAK,CAAC;gBACd,CAAC;YACL,CAAC;YACL,WAAC;QAAD,CAAC,AAfD,IAeC;QAfY,UAAI,OAehB,CAAA;IAEL,CAAC,EAlBU,KAAK,GAAL,SAAK,KAAL,SAAK,QAkBf;AAAD,CAAC,EAlBM,GAAG,KAAH,GAAG,QAkBT"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMap-Comments.sourcemap.txt b/tests/baselines/reference/sourceMap-Comments.sourcemap.txt index fe0b9276994c5..ed6b510ac9416 100644 --- a/tests/baselines/reference/sourceMap-Comments.sourcemap.txt +++ b/tests/baselines/reference/sourceMap-Comments.sourcemap.txt @@ -81,10 +81,10 @@ sourceFile:sourceMap-Comments.ts > } > > } -1->Emitted(3, 5) Source(1, 12) + SourceIndex(0) name (sas) -2 >Emitted(3, 9) Source(1, 12) + SourceIndex(0) name (sas) -3 >Emitted(3, 14) Source(1, 17) + SourceIndex(0) name (sas) -4 >Emitted(3, 15) Source(19, 2) + SourceIndex(0) name (sas) +1->Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 9) Source(1, 12) + SourceIndex(0) +3 >Emitted(3, 14) Source(1, 17) + SourceIndex(0) +4 >Emitted(3, 15) Source(19, 2) + SourceIndex(0) --- >>> (function (tools) { 1->^^^^ @@ -98,24 +98,24 @@ sourceFile:sourceMap-Comments.ts 3 > tools 4 > 5 > { -1->Emitted(4, 5) Source(1, 12) + SourceIndex(0) name (sas) -2 >Emitted(4, 16) Source(1, 12) + SourceIndex(0) name (sas) -3 >Emitted(4, 21) Source(1, 17) + SourceIndex(0) name (sas) -4 >Emitted(4, 23) Source(1, 18) + SourceIndex(0) name (sas) -5 >Emitted(4, 24) Source(1, 19) + SourceIndex(0) name (sas) +1->Emitted(4, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(4, 16) Source(1, 12) + SourceIndex(0) +3 >Emitted(4, 21) Source(1, 17) + SourceIndex(0) +4 >Emitted(4, 23) Source(1, 18) + SourceIndex(0) +5 >Emitted(4, 24) Source(1, 19) + SourceIndex(0) --- >>> var Test = (function () { 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(5, 9) Source(2, 5) + SourceIndex(0) name (sas.tools) +1->Emitted(5, 9) Source(2, 5) + SourceIndex(0) --- >>> function Test() { 1->^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(6, 13) Source(2, 5) + SourceIndex(0) name (sas.tools.Test) +1->Emitted(6, 13) Source(2, 5) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^ @@ -138,8 +138,8 @@ sourceFile:sourceMap-Comments.ts > } > 2 > } -1->Emitted(7, 13) Source(17, 5) + SourceIndex(0) name (sas.tools.Test.constructor) -2 >Emitted(7, 14) Source(17, 6) + SourceIndex(0) name (sas.tools.Test.constructor) +1->Emitted(7, 13) Source(17, 5) + SourceIndex(0) +2 >Emitted(7, 14) Source(17, 6) + SourceIndex(0) --- >>> Test.prototype.doX = function () { 1->^^^^^^^^^^^^ @@ -148,9 +148,9 @@ sourceFile:sourceMap-Comments.ts 1-> 2 > doX 3 > -1->Emitted(8, 13) Source(3, 16) + SourceIndex(0) name (sas.tools.Test) -2 >Emitted(8, 31) Source(3, 19) + SourceIndex(0) name (sas.tools.Test) -3 >Emitted(8, 34) Source(3, 9) + SourceIndex(0) name (sas.tools.Test) +1->Emitted(8, 13) Source(3, 16) + SourceIndex(0) +2 >Emitted(8, 31) Source(3, 19) + SourceIndex(0) +3 >Emitted(8, 34) Source(3, 9) + SourceIndex(0) --- >>> var f = 2; 1 >^^^^^^^^^^^^^^^^ @@ -167,12 +167,12 @@ sourceFile:sourceMap-Comments.ts 4 > : number = 5 > 2 6 > ; -1 >Emitted(9, 17) Source(4, 13) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(9, 21) Source(4, 17) + SourceIndex(0) name (sas.tools.Test.doX) -3 >Emitted(9, 22) Source(4, 18) + SourceIndex(0) name (sas.tools.Test.doX) -4 >Emitted(9, 25) Source(4, 29) + SourceIndex(0) name (sas.tools.Test.doX) -5 >Emitted(9, 26) Source(4, 30) + SourceIndex(0) name (sas.tools.Test.doX) -6 >Emitted(9, 27) Source(4, 31) + SourceIndex(0) name (sas.tools.Test.doX) +1 >Emitted(9, 17) Source(4, 13) + SourceIndex(0) +2 >Emitted(9, 21) Source(4, 17) + SourceIndex(0) +3 >Emitted(9, 22) Source(4, 18) + SourceIndex(0) +4 >Emitted(9, 25) Source(4, 29) + SourceIndex(0) +5 >Emitted(9, 26) Source(4, 30) + SourceIndex(0) +6 >Emitted(9, 27) Source(4, 31) + SourceIndex(0) --- >>> switch (f) { 1->^^^^^^^^^^^^^^^^ @@ -192,14 +192,14 @@ sourceFile:sourceMap-Comments.ts 6 > ) 7 > 8 > { -1->Emitted(10, 17) Source(5, 13) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(10, 23) Source(5, 19) + SourceIndex(0) name (sas.tools.Test.doX) -3 >Emitted(10, 24) Source(5, 20) + SourceIndex(0) name (sas.tools.Test.doX) -4 >Emitted(10, 25) Source(5, 21) + SourceIndex(0) name (sas.tools.Test.doX) -5 >Emitted(10, 26) Source(5, 22) + SourceIndex(0) name (sas.tools.Test.doX) -6 >Emitted(10, 27) Source(5, 23) + SourceIndex(0) name (sas.tools.Test.doX) -7 >Emitted(10, 28) Source(5, 24) + SourceIndex(0) name (sas.tools.Test.doX) -8 >Emitted(10, 29) Source(5, 25) + SourceIndex(0) name (sas.tools.Test.doX) +1->Emitted(10, 17) Source(5, 13) + SourceIndex(0) +2 >Emitted(10, 23) Source(5, 19) + SourceIndex(0) +3 >Emitted(10, 24) Source(5, 20) + SourceIndex(0) +4 >Emitted(10, 25) Source(5, 21) + SourceIndex(0) +5 >Emitted(10, 26) Source(5, 22) + SourceIndex(0) +6 >Emitted(10, 27) Source(5, 23) + SourceIndex(0) +7 >Emitted(10, 28) Source(5, 24) + SourceIndex(0) +8 >Emitted(10, 29) Source(5, 25) + SourceIndex(0) --- >>> case 1: 1 >^^^^^^^^^^^^^^^^^^^^ @@ -210,9 +210,9 @@ sourceFile:sourceMap-Comments.ts > 2 > case 3 > 1 -1 >Emitted(11, 21) Source(6, 17) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(11, 26) Source(6, 22) + SourceIndex(0) name (sas.tools.Test.doX) -3 >Emitted(11, 27) Source(6, 23) + SourceIndex(0) name (sas.tools.Test.doX) +1 >Emitted(11, 21) Source(6, 17) + SourceIndex(0) +2 >Emitted(11, 26) Source(6, 22) + SourceIndex(0) +3 >Emitted(11, 27) Source(6, 23) + SourceIndex(0) --- >>> break; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -222,9 +222,9 @@ sourceFile:sourceMap-Comments.ts > 2 > break 3 > ; -1->Emitted(12, 25) Source(7, 21) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(12, 30) Source(7, 26) + SourceIndex(0) name (sas.tools.Test.doX) -3 >Emitted(12, 31) Source(7, 27) + SourceIndex(0) name (sas.tools.Test.doX) +1->Emitted(12, 25) Source(7, 21) + SourceIndex(0) +2 >Emitted(12, 30) Source(7, 26) + SourceIndex(0) +3 >Emitted(12, 31) Source(7, 27) + SourceIndex(0) --- >>> case 2: 1 >^^^^^^^^^^^^^^^^^^^^ @@ -235,9 +235,9 @@ sourceFile:sourceMap-Comments.ts > 2 > case 3 > 2 -1 >Emitted(13, 21) Source(8, 17) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(13, 26) Source(8, 22) + SourceIndex(0) name (sas.tools.Test.doX) -3 >Emitted(13, 27) Source(8, 23) + SourceIndex(0) name (sas.tools.Test.doX) +1 >Emitted(13, 21) Source(8, 17) + SourceIndex(0) +2 >Emitted(13, 26) Source(8, 22) + SourceIndex(0) +3 >Emitted(13, 27) Source(8, 23) + SourceIndex(0) --- >>> //line comment 1 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -246,8 +246,8 @@ sourceFile:sourceMap-Comments.ts 1->: > 2 > //line comment 1 -1->Emitted(14, 25) Source(9, 21) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(14, 41) Source(9, 37) + SourceIndex(0) name (sas.tools.Test.doX) +1->Emitted(14, 25) Source(9, 21) + SourceIndex(0) +2 >Emitted(14, 41) Source(9, 37) + SourceIndex(0) --- >>> //line comment 2 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -255,8 +255,8 @@ sourceFile:sourceMap-Comments.ts 1-> > 2 > //line comment 2 -1->Emitted(15, 25) Source(10, 21) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(15, 41) Source(10, 37) + SourceIndex(0) name (sas.tools.Test.doX) +1->Emitted(15, 25) Source(10, 21) + SourceIndex(0) +2 >Emitted(15, 41) Source(10, 37) + SourceIndex(0) --- >>> break; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -266,9 +266,9 @@ sourceFile:sourceMap-Comments.ts > 2 > break 3 > ; -1 >Emitted(16, 25) Source(11, 21) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(16, 30) Source(11, 26) + SourceIndex(0) name (sas.tools.Test.doX) -3 >Emitted(16, 31) Source(11, 27) + SourceIndex(0) name (sas.tools.Test.doX) +1 >Emitted(16, 25) Source(11, 21) + SourceIndex(0) +2 >Emitted(16, 30) Source(11, 26) + SourceIndex(0) +3 >Emitted(16, 31) Source(11, 27) + SourceIndex(0) --- >>> case 3: 1 >^^^^^^^^^^^^^^^^^^^^ @@ -279,9 +279,9 @@ sourceFile:sourceMap-Comments.ts > 2 > case 3 > 3 -1 >Emitted(17, 21) Source(12, 17) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(17, 26) Source(12, 22) + SourceIndex(0) name (sas.tools.Test.doX) -3 >Emitted(17, 27) Source(12, 23) + SourceIndex(0) name (sas.tools.Test.doX) +1 >Emitted(17, 21) Source(12, 17) + SourceIndex(0) +2 >Emitted(17, 26) Source(12, 22) + SourceIndex(0) +3 >Emitted(17, 27) Source(12, 23) + SourceIndex(0) --- >>> //a comment 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -289,8 +289,8 @@ sourceFile:sourceMap-Comments.ts 1->: > 2 > //a comment -1->Emitted(18, 25) Source(13, 21) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(18, 36) Source(13, 32) + SourceIndex(0) name (sas.tools.Test.doX) +1->Emitted(18, 25) Source(13, 21) + SourceIndex(0) +2 >Emitted(18, 36) Source(13, 32) + SourceIndex(0) --- >>> break; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -300,9 +300,9 @@ sourceFile:sourceMap-Comments.ts > 2 > break 3 > ; -1 >Emitted(19, 25) Source(14, 21) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(19, 30) Source(14, 26) + SourceIndex(0) name (sas.tools.Test.doX) -3 >Emitted(19, 31) Source(14, 27) + SourceIndex(0) name (sas.tools.Test.doX) +1 >Emitted(19, 25) Source(14, 21) + SourceIndex(0) +2 >Emitted(19, 30) Source(14, 26) + SourceIndex(0) +3 >Emitted(19, 31) Source(14, 27) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -310,8 +310,8 @@ sourceFile:sourceMap-Comments.ts 1 > > 2 > } -1 >Emitted(20, 17) Source(15, 13) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(20, 18) Source(15, 14) + SourceIndex(0) name (sas.tools.Test.doX) +1 >Emitted(20, 17) Source(15, 13) + SourceIndex(0) +2 >Emitted(20, 18) Source(15, 14) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^ @@ -320,8 +320,8 @@ sourceFile:sourceMap-Comments.ts 1 > > 2 > } -1 >Emitted(21, 13) Source(16, 9) + SourceIndex(0) name (sas.tools.Test.doX) -2 >Emitted(21, 14) Source(16, 10) + SourceIndex(0) name (sas.tools.Test.doX) +1 >Emitted(21, 13) Source(16, 9) + SourceIndex(0) +2 >Emitted(21, 14) Source(16, 10) + SourceIndex(0) --- >>> return Test; 1->^^^^^^^^^^^^ @@ -329,8 +329,8 @@ sourceFile:sourceMap-Comments.ts 1-> > 2 > } -1->Emitted(22, 13) Source(17, 5) + SourceIndex(0) name (sas.tools.Test) -2 >Emitted(22, 24) Source(17, 6) + SourceIndex(0) name (sas.tools.Test) +1->Emitted(22, 13) Source(17, 5) + SourceIndex(0) +2 >Emitted(22, 24) Source(17, 6) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^ @@ -357,10 +357,10 @@ sourceFile:sourceMap-Comments.ts > } > } > } -1 >Emitted(23, 9) Source(17, 5) + SourceIndex(0) name (sas.tools.Test) -2 >Emitted(23, 10) Source(17, 6) + SourceIndex(0) name (sas.tools.Test) -3 >Emitted(23, 10) Source(2, 5) + SourceIndex(0) name (sas.tools) -4 >Emitted(23, 14) Source(17, 6) + SourceIndex(0) name (sas.tools) +1 >Emitted(23, 9) Source(17, 5) + SourceIndex(0) +2 >Emitted(23, 10) Source(17, 6) + SourceIndex(0) +3 >Emitted(23, 10) Source(2, 5) + SourceIndex(0) +4 >Emitted(23, 14) Source(17, 6) + SourceIndex(0) --- >>> tools.Test = Test; 1->^^^^^^^^ @@ -387,10 +387,10 @@ sourceFile:sourceMap-Comments.ts > } > } 4 > -1->Emitted(24, 9) Source(2, 18) + SourceIndex(0) name (sas.tools) -2 >Emitted(24, 19) Source(2, 22) + SourceIndex(0) name (sas.tools) -3 >Emitted(24, 26) Source(17, 6) + SourceIndex(0) name (sas.tools) -4 >Emitted(24, 27) Source(17, 6) + SourceIndex(0) name (sas.tools) +1->Emitted(24, 9) Source(2, 18) + SourceIndex(0) +2 >Emitted(24, 19) Source(2, 22) + SourceIndex(0) +3 >Emitted(24, 26) Source(17, 6) + SourceIndex(0) +4 >Emitted(24, 27) Source(17, 6) + SourceIndex(0) --- >>> })(tools = sas.tools || (sas.tools = {})); 1->^^^^ @@ -431,15 +431,15 @@ sourceFile:sourceMap-Comments.ts > } > > } -1->Emitted(25, 5) Source(19, 1) + SourceIndex(0) name (sas.tools) -2 >Emitted(25, 6) Source(19, 2) + SourceIndex(0) name (sas.tools) -3 >Emitted(25, 8) Source(1, 12) + SourceIndex(0) name (sas) -4 >Emitted(25, 13) Source(1, 17) + SourceIndex(0) name (sas) -5 >Emitted(25, 16) Source(1, 12) + SourceIndex(0) name (sas) -6 >Emitted(25, 25) Source(1, 17) + SourceIndex(0) name (sas) -7 >Emitted(25, 30) Source(1, 12) + SourceIndex(0) name (sas) -8 >Emitted(25, 39) Source(1, 17) + SourceIndex(0) name (sas) -9 >Emitted(25, 47) Source(19, 2) + SourceIndex(0) name (sas) +1->Emitted(25, 5) Source(19, 1) + SourceIndex(0) +2 >Emitted(25, 6) Source(19, 2) + SourceIndex(0) +3 >Emitted(25, 8) Source(1, 12) + SourceIndex(0) +4 >Emitted(25, 13) Source(1, 17) + SourceIndex(0) +5 >Emitted(25, 16) Source(1, 12) + SourceIndex(0) +6 >Emitted(25, 25) Source(1, 17) + SourceIndex(0) +7 >Emitted(25, 30) Source(1, 12) + SourceIndex(0) +8 >Emitted(25, 39) Source(1, 17) + SourceIndex(0) +9 >Emitted(25, 47) Source(19, 2) + SourceIndex(0) --- >>>})(sas || (sas = {})); 1 > @@ -475,8 +475,8 @@ sourceFile:sourceMap-Comments.ts > } > > } -1 >Emitted(26, 1) Source(19, 1) + SourceIndex(0) name (sas) -2 >Emitted(26, 2) Source(19, 2) + SourceIndex(0) name (sas) +1 >Emitted(26, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(26, 2) Source(19, 2) + SourceIndex(0) 3 >Emitted(26, 4) Source(1, 8) + SourceIndex(0) 4 >Emitted(26, 7) Source(1, 11) + SourceIndex(0) 5 >Emitted(26, 12) Source(1, 8) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMap-Comments2.js.map b/tests/baselines/reference/sourceMap-Comments2.js.map index be5a88d795d7e..e5a5387a72f2e 100644 --- a/tests/baselines/reference/sourceMap-Comments2.js.map +++ b/tests/baselines/reference/sourceMap-Comments2.js.map @@ -1,2 +1,2 @@ //// [sourceMap-Comments2.js.map] -{"version":3,"file":"sourceMap-Comments2.js","sourceRoot":"","sources":["sourceMap-Comments2.ts"],"names":["foo","bar","baz","qat"],"mappings":"AAAA,aAAa,GAAW,EAAE,GAAW;IACjCA,MAAMA,CAACA;AACXA,CAACA;AAED;;GAEG;AACH,aAAa,GAAW,EAAE,GAAW;IACjCC,MAAMA,CAACA;AACXA,CAACA;AAED,uBAAuB;AACvB,aAAa,GAAW,EAAE,GAAW;IACjCC,MAAMA,CAACA;AACXA,CAACA;AAED,aAAa,GAAW,EAAE,GAAW;IACjCC,MAAMA,CAACA;AACXA,CAACA"} \ No newline at end of file +{"version":3,"file":"sourceMap-Comments2.js","sourceRoot":"","sources":["sourceMap-Comments2.ts"],"names":[],"mappings":"AAAA,aAAa,GAAW,EAAE,GAAW;IACjC,MAAM,CAAC;AACX,CAAC;AAED;;GAEG;AACH,aAAa,GAAW,EAAE,GAAW;IACjC,MAAM,CAAC;AACX,CAAC;AAED,uBAAuB;AACvB,aAAa,GAAW,EAAE,GAAW;IACjC,MAAM,CAAC;AACX,CAAC;AAED,aAAa,GAAW,EAAE,GAAW;IACjC,MAAM,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMap-Comments2.sourcemap.txt b/tests/baselines/reference/sourceMap-Comments2.sourcemap.txt index d6230b83dfbc5..88c78671f0f14 100644 --- a/tests/baselines/reference/sourceMap-Comments2.sourcemap.txt +++ b/tests/baselines/reference/sourceMap-Comments2.sourcemap.txt @@ -33,9 +33,9 @@ sourceFile:sourceMap-Comments2.ts > 2 > return 3 > ; -1 >Emitted(2, 5) Source(2, 5) + SourceIndex(0) name (foo) -2 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) name (foo) -3 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) name (foo) +1 >Emitted(2, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) +3 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) --- >>>} 1 > @@ -44,8 +44,8 @@ sourceFile:sourceMap-Comments2.ts 1 > > 2 >} -1 >Emitted(3, 1) Source(3, 1) + SourceIndex(0) name (foo) -2 >Emitted(3, 2) Source(3, 2) + SourceIndex(0) name (foo) +1 >Emitted(3, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(3, 2) Source(3, 2) + SourceIndex(0) --- >>>/** 1-> @@ -90,9 +90,9 @@ sourceFile:sourceMap-Comments2.ts > 2 > return 3 > ; -1 >Emitted(8, 5) Source(9, 5) + SourceIndex(0) name (bar) -2 >Emitted(8, 11) Source(9, 11) + SourceIndex(0) name (bar) -3 >Emitted(8, 12) Source(9, 12) + SourceIndex(0) name (bar) +1 >Emitted(8, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(8, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(8, 12) Source(9, 12) + SourceIndex(0) --- >>>} 1 > @@ -101,8 +101,8 @@ sourceFile:sourceMap-Comments2.ts 1 > > 2 >} -1 >Emitted(9, 1) Source(10, 1) + SourceIndex(0) name (bar) -2 >Emitted(9, 2) Source(10, 2) + SourceIndex(0) name (bar) +1 >Emitted(9, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(10, 2) + SourceIndex(0) --- >>>// some sort of comment 1-> @@ -141,9 +141,9 @@ sourceFile:sourceMap-Comments2.ts > 2 > return 3 > ; -1 >Emitted(12, 5) Source(14, 5) + SourceIndex(0) name (baz) -2 >Emitted(12, 11) Source(14, 11) + SourceIndex(0) name (baz) -3 >Emitted(12, 12) Source(14, 12) + SourceIndex(0) name (baz) +1 >Emitted(12, 5) Source(14, 5) + SourceIndex(0) +2 >Emitted(12, 11) Source(14, 11) + SourceIndex(0) +3 >Emitted(12, 12) Source(14, 12) + SourceIndex(0) --- >>>} 1 > @@ -152,8 +152,8 @@ sourceFile:sourceMap-Comments2.ts 1 > > 2 >} -1 >Emitted(13, 1) Source(15, 1) + SourceIndex(0) name (baz) -2 >Emitted(13, 2) Source(15, 2) + SourceIndex(0) name (baz) +1 >Emitted(13, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(15, 2) + SourceIndex(0) --- >>>function qat(str, num) { 1-> @@ -182,9 +182,9 @@ sourceFile:sourceMap-Comments2.ts > 2 > return 3 > ; -1 >Emitted(15, 5) Source(18, 5) + SourceIndex(0) name (qat) -2 >Emitted(15, 11) Source(18, 11) + SourceIndex(0) name (qat) -3 >Emitted(15, 12) Source(18, 12) + SourceIndex(0) name (qat) +1 >Emitted(15, 5) Source(18, 5) + SourceIndex(0) +2 >Emitted(15, 11) Source(18, 11) + SourceIndex(0) +3 >Emitted(15, 12) Source(18, 12) + SourceIndex(0) --- >>>} 1 > @@ -193,7 +193,7 @@ sourceFile:sourceMap-Comments2.ts 1 > > 2 >} -1 >Emitted(16, 1) Source(19, 1) + SourceIndex(0) name (qat) -2 >Emitted(16, 2) Source(19, 2) + SourceIndex(0) name (qat) +1 >Emitted(16, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(19, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMap-Comments2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMap-FileWithComments.js.map b/tests/baselines/reference/sourceMap-FileWithComments.js.map index 7e38a53a90226..f3e9674336df7 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.js.map +++ b/tests/baselines/reference/sourceMap-FileWithComments.js.map @@ -1,2 +1,2 @@ //// [sourceMap-FileWithComments.js.map] -{"version":3,"file":"sourceMap-FileWithComments.js","sourceRoot":"","sources":["sourceMap-FileWithComments.ts"],"names":["Shapes","Shapes.Point","Shapes.Point.constructor","Shapes.Point.getDist","Shapes.foo"],"mappings":"AAMA,SAAS;AACT,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM,EAAC,CAAC;IAEXA,QAAQA;IACRA;QACIC,cAAcA;QACdA,eAAmBA,CAASA,EAASA,CAASA;YAA3BC,MAACA,GAADA,CAACA,CAAQA;YAASA,MAACA,GAADA,CAACA,CAAQA;QAAIA,CAACA;QAEnDD,kBAAkBA;QAClBA,uBAAOA,GAAPA,cAAYE,MAAMA,CAACA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,CAACA,CAACA,GAAGA,IAAIA,CAACA,CAACA,GAAGA,IAAIA,CAACA,CAACA,GAAGA,IAAIA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;QAElEF,gBAAgBA;QACTA,YAAMA,GAAGA,IAAIA,KAAKA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA;QACpCA,YAACA;IAADA,CAACA,AATDD,IASCA;IATYA,YAAKA,QASjBA,CAAAA;IAEDA,+BAA+BA;IAC/BA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IAEXA;IACAI,CAACA;IADeJ,UAAGA,MAClBA,CAAAA;IAEDA;;MAEEA;IACFA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;AACfA,CAACA,EAxBM,MAAM,KAAN,MAAM,QAwBZ;AAED,qBAAqB;AACrB,IAAI,CAAC,GAAW,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvC,IAAI,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMap-FileWithComments.js","sourceRoot":"","sources":["sourceMap-FileWithComments.ts"],"names":[],"mappings":"AAMA,SAAS;AACT,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM,EAAC,CAAC;IAEX,QAAQ;IACR;QACI,cAAc;QACd,eAAmB,CAAS,EAAS,CAAS;YAA3B,MAAC,GAAD,CAAC,CAAQ;YAAS,MAAC,GAAD,CAAC,CAAQ;QAAI,CAAC;QAEnD,kBAAkB;QAClB,uBAAO,GAAP,cAAY,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAElE,gBAAgB;QACT,YAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACpC,YAAC;IAAD,CAAC,AATD,IASC;IATY,YAAK,QASjB,CAAA;IAED,+BAA+B;IAC/B,IAAI,CAAC,GAAG,EAAE,CAAC;IAEX;IACA,CAAC;IADe,UAAG,MAClB,CAAA;IAED;;MAEE;IACF,IAAI,CAAC,GAAG,EAAE,CAAC;AACf,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ;AAED,qBAAqB;AACrB,IAAI,CAAC,GAAW,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvC,IAAI,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt b/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt index 8f8fd8e84b375..c3909571fdddc 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt +++ b/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt @@ -88,15 +88,15 @@ sourceFile:sourceMap-FileWithComments.ts > > 2 > // Class -1 >Emitted(4, 5) Source(10, 5) + SourceIndex(0) name (Shapes) -2 >Emitted(4, 13) Source(10, 13) + SourceIndex(0) name (Shapes) +1 >Emitted(4, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(4, 13) Source(10, 13) + SourceIndex(0) --- >>> var Point = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(5, 5) Source(11, 5) + SourceIndex(0) name (Shapes) +1->Emitted(5, 5) Source(11, 5) + SourceIndex(0) --- >>> // Constructor 1->^^^^^^^^ @@ -105,8 +105,8 @@ sourceFile:sourceMap-FileWithComments.ts 1->export class Point implements IPoint { > 2 > // Constructor -1->Emitted(6, 9) Source(12, 9) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(6, 23) Source(12, 23) + SourceIndex(0) name (Shapes.Point) +1->Emitted(6, 9) Source(12, 9) + SourceIndex(0) +2 >Emitted(6, 23) Source(12, 23) + SourceIndex(0) --- >>> function Point(x, y) { 1->^^^^^^^^ @@ -120,11 +120,11 @@ sourceFile:sourceMap-FileWithComments.ts 3 > x: number 4 > , public 5 > y: number -1->Emitted(7, 9) Source(13, 9) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(7, 24) Source(13, 28) + SourceIndex(0) name (Shapes.Point) -3 >Emitted(7, 25) Source(13, 37) + SourceIndex(0) name (Shapes.Point) -4 >Emitted(7, 27) Source(13, 46) + SourceIndex(0) name (Shapes.Point) -5 >Emitted(7, 28) Source(13, 55) + SourceIndex(0) name (Shapes.Point) +1->Emitted(7, 9) Source(13, 9) + SourceIndex(0) +2 >Emitted(7, 24) Source(13, 28) + SourceIndex(0) +3 >Emitted(7, 25) Source(13, 37) + SourceIndex(0) +4 >Emitted(7, 27) Source(13, 46) + SourceIndex(0) +5 >Emitted(7, 28) Source(13, 55) + SourceIndex(0) --- >>> this.x = x; 1 >^^^^^^^^^^^^ @@ -138,11 +138,11 @@ sourceFile:sourceMap-FileWithComments.ts 3 > 4 > x 5 > : number -1 >Emitted(8, 13) Source(13, 28) + SourceIndex(0) name (Shapes.Point.constructor) -2 >Emitted(8, 19) Source(13, 29) + SourceIndex(0) name (Shapes.Point.constructor) -3 >Emitted(8, 22) Source(13, 28) + SourceIndex(0) name (Shapes.Point.constructor) -4 >Emitted(8, 23) Source(13, 29) + SourceIndex(0) name (Shapes.Point.constructor) -5 >Emitted(8, 24) Source(13, 37) + SourceIndex(0) name (Shapes.Point.constructor) +1 >Emitted(8, 13) Source(13, 28) + SourceIndex(0) +2 >Emitted(8, 19) Source(13, 29) + SourceIndex(0) +3 >Emitted(8, 22) Source(13, 28) + SourceIndex(0) +4 >Emitted(8, 23) Source(13, 29) + SourceIndex(0) +5 >Emitted(8, 24) Source(13, 37) + SourceIndex(0) --- >>> this.y = y; 1->^^^^^^^^^^^^ @@ -155,11 +155,11 @@ sourceFile:sourceMap-FileWithComments.ts 3 > 4 > y 5 > : number -1->Emitted(9, 13) Source(13, 46) + SourceIndex(0) name (Shapes.Point.constructor) -2 >Emitted(9, 19) Source(13, 47) + SourceIndex(0) name (Shapes.Point.constructor) -3 >Emitted(9, 22) Source(13, 46) + SourceIndex(0) name (Shapes.Point.constructor) -4 >Emitted(9, 23) Source(13, 47) + SourceIndex(0) name (Shapes.Point.constructor) -5 >Emitted(9, 24) Source(13, 55) + SourceIndex(0) name (Shapes.Point.constructor) +1->Emitted(9, 13) Source(13, 46) + SourceIndex(0) +2 >Emitted(9, 19) Source(13, 47) + SourceIndex(0) +3 >Emitted(9, 22) Source(13, 46) + SourceIndex(0) +4 >Emitted(9, 23) Source(13, 47) + SourceIndex(0) +5 >Emitted(9, 24) Source(13, 55) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -167,8 +167,8 @@ sourceFile:sourceMap-FileWithComments.ts 3 > ^^^^^^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(10, 9) Source(13, 59) + SourceIndex(0) name (Shapes.Point.constructor) -2 >Emitted(10, 10) Source(13, 60) + SourceIndex(0) name (Shapes.Point.constructor) +1 >Emitted(10, 9) Source(13, 59) + SourceIndex(0) +2 >Emitted(10, 10) Source(13, 60) + SourceIndex(0) --- >>> // Instance member 1->^^^^^^^^ @@ -178,8 +178,8 @@ sourceFile:sourceMap-FileWithComments.ts > > 2 > // Instance member -1->Emitted(11, 9) Source(15, 9) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(11, 27) Source(15, 27) + SourceIndex(0) name (Shapes.Point) +1->Emitted(11, 9) Source(15, 9) + SourceIndex(0) +2 >Emitted(11, 27) Source(15, 27) + SourceIndex(0) --- >>> Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; 1->^^^^^^^^ @@ -241,35 +241,35 @@ sourceFile:sourceMap-FileWithComments.ts 27> ; 28> 29> } -1->Emitted(12, 9) Source(16, 9) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(12, 32) Source(16, 16) + SourceIndex(0) name (Shapes.Point) -3 >Emitted(12, 35) Source(16, 9) + SourceIndex(0) name (Shapes.Point) -4 >Emitted(12, 49) Source(16, 21) + SourceIndex(0) name (Shapes.Point.getDist) -5 >Emitted(12, 55) Source(16, 27) + SourceIndex(0) name (Shapes.Point.getDist) -6 >Emitted(12, 56) Source(16, 28) + SourceIndex(0) name (Shapes.Point.getDist) -7 >Emitted(12, 60) Source(16, 32) + SourceIndex(0) name (Shapes.Point.getDist) -8 >Emitted(12, 61) Source(16, 33) + SourceIndex(0) name (Shapes.Point.getDist) -9 >Emitted(12, 65) Source(16, 37) + SourceIndex(0) name (Shapes.Point.getDist) -10>Emitted(12, 66) Source(16, 38) + SourceIndex(0) name (Shapes.Point.getDist) -11>Emitted(12, 70) Source(16, 42) + SourceIndex(0) name (Shapes.Point.getDist) -12>Emitted(12, 71) Source(16, 43) + SourceIndex(0) name (Shapes.Point.getDist) -13>Emitted(12, 72) Source(16, 44) + SourceIndex(0) name (Shapes.Point.getDist) -14>Emitted(12, 75) Source(16, 47) + SourceIndex(0) name (Shapes.Point.getDist) -15>Emitted(12, 79) Source(16, 51) + SourceIndex(0) name (Shapes.Point.getDist) -16>Emitted(12, 80) Source(16, 52) + SourceIndex(0) name (Shapes.Point.getDist) -17>Emitted(12, 81) Source(16, 53) + SourceIndex(0) name (Shapes.Point.getDist) -18>Emitted(12, 84) Source(16, 56) + SourceIndex(0) name (Shapes.Point.getDist) -19>Emitted(12, 88) Source(16, 60) + SourceIndex(0) name (Shapes.Point.getDist) -20>Emitted(12, 89) Source(16, 61) + SourceIndex(0) name (Shapes.Point.getDist) -21>Emitted(12, 90) Source(16, 62) + SourceIndex(0) name (Shapes.Point.getDist) -22>Emitted(12, 93) Source(16, 65) + SourceIndex(0) name (Shapes.Point.getDist) -23>Emitted(12, 97) Source(16, 69) + SourceIndex(0) name (Shapes.Point.getDist) -24>Emitted(12, 98) Source(16, 70) + SourceIndex(0) name (Shapes.Point.getDist) -25>Emitted(12, 99) Source(16, 71) + SourceIndex(0) name (Shapes.Point.getDist) -26>Emitted(12, 100) Source(16, 72) + SourceIndex(0) name (Shapes.Point.getDist) -27>Emitted(12, 101) Source(16, 73) + SourceIndex(0) name (Shapes.Point.getDist) -28>Emitted(12, 102) Source(16, 74) + SourceIndex(0) name (Shapes.Point.getDist) -29>Emitted(12, 103) Source(16, 75) + SourceIndex(0) name (Shapes.Point.getDist) +1->Emitted(12, 9) Source(16, 9) + SourceIndex(0) +2 >Emitted(12, 32) Source(16, 16) + SourceIndex(0) +3 >Emitted(12, 35) Source(16, 9) + SourceIndex(0) +4 >Emitted(12, 49) Source(16, 21) + SourceIndex(0) +5 >Emitted(12, 55) Source(16, 27) + SourceIndex(0) +6 >Emitted(12, 56) Source(16, 28) + SourceIndex(0) +7 >Emitted(12, 60) Source(16, 32) + SourceIndex(0) +8 >Emitted(12, 61) Source(16, 33) + SourceIndex(0) +9 >Emitted(12, 65) Source(16, 37) + SourceIndex(0) +10>Emitted(12, 66) Source(16, 38) + SourceIndex(0) +11>Emitted(12, 70) Source(16, 42) + SourceIndex(0) +12>Emitted(12, 71) Source(16, 43) + SourceIndex(0) +13>Emitted(12, 72) Source(16, 44) + SourceIndex(0) +14>Emitted(12, 75) Source(16, 47) + SourceIndex(0) +15>Emitted(12, 79) Source(16, 51) + SourceIndex(0) +16>Emitted(12, 80) Source(16, 52) + SourceIndex(0) +17>Emitted(12, 81) Source(16, 53) + SourceIndex(0) +18>Emitted(12, 84) Source(16, 56) + SourceIndex(0) +19>Emitted(12, 88) Source(16, 60) + SourceIndex(0) +20>Emitted(12, 89) Source(16, 61) + SourceIndex(0) +21>Emitted(12, 90) Source(16, 62) + SourceIndex(0) +22>Emitted(12, 93) Source(16, 65) + SourceIndex(0) +23>Emitted(12, 97) Source(16, 69) + SourceIndex(0) +24>Emitted(12, 98) Source(16, 70) + SourceIndex(0) +25>Emitted(12, 99) Source(16, 71) + SourceIndex(0) +26>Emitted(12, 100) Source(16, 72) + SourceIndex(0) +27>Emitted(12, 101) Source(16, 73) + SourceIndex(0) +28>Emitted(12, 102) Source(16, 74) + SourceIndex(0) +29>Emitted(12, 103) Source(16, 75) + SourceIndex(0) --- >>> // Static member 1 >^^^^^^^^ @@ -279,8 +279,8 @@ sourceFile:sourceMap-FileWithComments.ts > > 2 > // Static member -1 >Emitted(13, 9) Source(18, 9) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(13, 25) Source(18, 25) + SourceIndex(0) name (Shapes.Point) +1 >Emitted(13, 9) Source(18, 9) + SourceIndex(0) +2 >Emitted(13, 25) Source(18, 25) + SourceIndex(0) --- >>> Point.origin = new Point(0, 0); 1->^^^^^^^^ @@ -306,17 +306,17 @@ sourceFile:sourceMap-FileWithComments.ts 9 > 0 10> ) 11> ; -1->Emitted(14, 9) Source(19, 16) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(14, 21) Source(19, 22) + SourceIndex(0) name (Shapes.Point) -3 >Emitted(14, 24) Source(19, 25) + SourceIndex(0) name (Shapes.Point) -4 >Emitted(14, 28) Source(19, 29) + SourceIndex(0) name (Shapes.Point) -5 >Emitted(14, 33) Source(19, 34) + SourceIndex(0) name (Shapes.Point) -6 >Emitted(14, 34) Source(19, 35) + SourceIndex(0) name (Shapes.Point) -7 >Emitted(14, 35) Source(19, 36) + SourceIndex(0) name (Shapes.Point) -8 >Emitted(14, 37) Source(19, 38) + SourceIndex(0) name (Shapes.Point) -9 >Emitted(14, 38) Source(19, 39) + SourceIndex(0) name (Shapes.Point) -10>Emitted(14, 39) Source(19, 40) + SourceIndex(0) name (Shapes.Point) -11>Emitted(14, 40) Source(19, 41) + SourceIndex(0) name (Shapes.Point) +1->Emitted(14, 9) Source(19, 16) + SourceIndex(0) +2 >Emitted(14, 21) Source(19, 22) + SourceIndex(0) +3 >Emitted(14, 24) Source(19, 25) + SourceIndex(0) +4 >Emitted(14, 28) Source(19, 29) + SourceIndex(0) +5 >Emitted(14, 33) Source(19, 34) + SourceIndex(0) +6 >Emitted(14, 34) Source(19, 35) + SourceIndex(0) +7 >Emitted(14, 35) Source(19, 36) + SourceIndex(0) +8 >Emitted(14, 37) Source(19, 38) + SourceIndex(0) +9 >Emitted(14, 38) Source(19, 39) + SourceIndex(0) +10>Emitted(14, 39) Source(19, 40) + SourceIndex(0) +11>Emitted(14, 40) Source(19, 41) + SourceIndex(0) --- >>> return Point; 1 >^^^^^^^^ @@ -324,8 +324,8 @@ sourceFile:sourceMap-FileWithComments.ts 1 > > 2 > } -1 >Emitted(15, 9) Source(20, 5) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(15, 21) Source(20, 6) + SourceIndex(0) name (Shapes.Point) +1 >Emitted(15, 9) Source(20, 5) + SourceIndex(0) +2 >Emitted(15, 21) Source(20, 6) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -346,10 +346,10 @@ sourceFile:sourceMap-FileWithComments.ts > // Static member > static origin = new Point(0, 0); > } -1 >Emitted(16, 5) Source(20, 5) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(16, 6) Source(20, 6) + SourceIndex(0) name (Shapes.Point) -3 >Emitted(16, 6) Source(11, 5) + SourceIndex(0) name (Shapes) -4 >Emitted(16, 10) Source(20, 6) + SourceIndex(0) name (Shapes) +1 >Emitted(16, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(16, 6) Source(20, 6) + SourceIndex(0) +3 >Emitted(16, 6) Source(11, 5) + SourceIndex(0) +4 >Emitted(16, 10) Source(20, 6) + SourceIndex(0) --- >>> Shapes.Point = Point; 1->^^^^ @@ -370,10 +370,10 @@ sourceFile:sourceMap-FileWithComments.ts > static origin = new Point(0, 0); > } 4 > -1->Emitted(17, 5) Source(11, 18) + SourceIndex(0) name (Shapes) -2 >Emitted(17, 17) Source(11, 23) + SourceIndex(0) name (Shapes) -3 >Emitted(17, 25) Source(20, 6) + SourceIndex(0) name (Shapes) -4 >Emitted(17, 26) Source(20, 6) + SourceIndex(0) name (Shapes) +1->Emitted(17, 5) Source(11, 18) + SourceIndex(0) +2 >Emitted(17, 17) Source(11, 23) + SourceIndex(0) +3 >Emitted(17, 25) Source(20, 6) + SourceIndex(0) +4 >Emitted(17, 26) Source(20, 6) + SourceIndex(0) --- >>> // Variable comment after class 1->^^^^ @@ -382,8 +382,8 @@ sourceFile:sourceMap-FileWithComments.ts > > 2 > // Variable comment after class -1->Emitted(18, 5) Source(22, 5) + SourceIndex(0) name (Shapes) -2 >Emitted(18, 36) Source(22, 36) + SourceIndex(0) name (Shapes) +1->Emitted(18, 5) Source(22, 5) + SourceIndex(0) +2 >Emitted(18, 36) Source(22, 36) + SourceIndex(0) --- >>> var a = 10; 1 >^^^^ @@ -400,12 +400,12 @@ sourceFile:sourceMap-FileWithComments.ts 4 > = 5 > 10 6 > ; -1 >Emitted(19, 5) Source(23, 5) + SourceIndex(0) name (Shapes) -2 >Emitted(19, 9) Source(23, 9) + SourceIndex(0) name (Shapes) -3 >Emitted(19, 10) Source(23, 10) + SourceIndex(0) name (Shapes) -4 >Emitted(19, 13) Source(23, 13) + SourceIndex(0) name (Shapes) -5 >Emitted(19, 15) Source(23, 15) + SourceIndex(0) name (Shapes) -6 >Emitted(19, 16) Source(23, 16) + SourceIndex(0) name (Shapes) +1 >Emitted(19, 5) Source(23, 5) + SourceIndex(0) +2 >Emitted(19, 9) Source(23, 9) + SourceIndex(0) +3 >Emitted(19, 10) Source(23, 10) + SourceIndex(0) +4 >Emitted(19, 13) Source(23, 13) + SourceIndex(0) +5 >Emitted(19, 15) Source(23, 15) + SourceIndex(0) +6 >Emitted(19, 16) Source(23, 16) + SourceIndex(0) --- >>> function foo() { 1->^^^^ @@ -413,7 +413,7 @@ sourceFile:sourceMap-FileWithComments.ts 1-> > > -1->Emitted(20, 5) Source(25, 5) + SourceIndex(0) name (Shapes) +1->Emitted(20, 5) Source(25, 5) + SourceIndex(0) --- >>> } 1->^^^^ @@ -422,8 +422,8 @@ sourceFile:sourceMap-FileWithComments.ts 1->export function foo() { > 2 > } -1->Emitted(21, 5) Source(26, 5) + SourceIndex(0) name (Shapes.foo) -2 >Emitted(21, 6) Source(26, 6) + SourceIndex(0) name (Shapes.foo) +1->Emitted(21, 5) Source(26, 5) + SourceIndex(0) +2 >Emitted(21, 6) Source(26, 6) + SourceIndex(0) --- >>> Shapes.foo = foo; 1->^^^^ @@ -436,10 +436,10 @@ sourceFile:sourceMap-FileWithComments.ts 3 > () { > } 4 > -1->Emitted(22, 5) Source(25, 21) + SourceIndex(0) name (Shapes) -2 >Emitted(22, 15) Source(25, 24) + SourceIndex(0) name (Shapes) -3 >Emitted(22, 21) Source(26, 6) + SourceIndex(0) name (Shapes) -4 >Emitted(22, 22) Source(26, 6) + SourceIndex(0) name (Shapes) +1->Emitted(22, 5) Source(25, 21) + SourceIndex(0) +2 >Emitted(22, 15) Source(25, 24) + SourceIndex(0) +3 >Emitted(22, 21) Source(26, 6) + SourceIndex(0) +4 >Emitted(22, 22) Source(26, 6) + SourceIndex(0) --- >>> /** comment after function 1->^^^^ @@ -447,7 +447,7 @@ sourceFile:sourceMap-FileWithComments.ts 1-> > > -1->Emitted(23, 5) Source(28, 5) + SourceIndex(0) name (Shapes) +1->Emitted(23, 5) Source(28, 5) + SourceIndex(0) --- >>> * this is another comment >>> */ @@ -456,7 +456,7 @@ sourceFile:sourceMap-FileWithComments.ts 1->/** comment after function > * this is another comment > */ -1->Emitted(25, 7) Source(30, 7) + SourceIndex(0) name (Shapes) +1->Emitted(25, 7) Source(30, 7) + SourceIndex(0) --- >>> var b = 10; 1->^^^^ @@ -473,12 +473,12 @@ sourceFile:sourceMap-FileWithComments.ts 4 > = 5 > 10 6 > ; -1->Emitted(26, 5) Source(31, 5) + SourceIndex(0) name (Shapes) -2 >Emitted(26, 9) Source(31, 9) + SourceIndex(0) name (Shapes) -3 >Emitted(26, 10) Source(31, 10) + SourceIndex(0) name (Shapes) -4 >Emitted(26, 13) Source(31, 13) + SourceIndex(0) name (Shapes) -5 >Emitted(26, 15) Source(31, 15) + SourceIndex(0) name (Shapes) -6 >Emitted(26, 16) Source(31, 16) + SourceIndex(0) name (Shapes) +1->Emitted(26, 5) Source(31, 5) + SourceIndex(0) +2 >Emitted(26, 9) Source(31, 9) + SourceIndex(0) +3 >Emitted(26, 10) Source(31, 10) + SourceIndex(0) +4 >Emitted(26, 13) Source(31, 13) + SourceIndex(0) +5 >Emitted(26, 15) Source(31, 15) + SourceIndex(0) +6 >Emitted(26, 16) Source(31, 16) + SourceIndex(0) --- >>>})(Shapes || (Shapes = {})); 1-> @@ -520,8 +520,8 @@ sourceFile:sourceMap-FileWithComments.ts > */ > var b = 10; > } -1->Emitted(27, 1) Source(32, 1) + SourceIndex(0) name (Shapes) -2 >Emitted(27, 2) Source(32, 2) + SourceIndex(0) name (Shapes) +1->Emitted(27, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(27, 2) Source(32, 2) + SourceIndex(0) 3 >Emitted(27, 4) Source(8, 8) + SourceIndex(0) 4 >Emitted(27, 10) Source(8, 14) + SourceIndex(0) 5 >Emitted(27, 15) Source(8, 8) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMap-StringLiteralWithNewLine.js.map b/tests/baselines/reference/sourceMap-StringLiteralWithNewLine.js.map index a590744eddf00..27ec5d732b840 100644 --- a/tests/baselines/reference/sourceMap-StringLiteralWithNewLine.js.map +++ b/tests/baselines/reference/sourceMap-StringLiteralWithNewLine.js.map @@ -1,2 +1,2 @@ //// [sourceMap-StringLiteralWithNewLine.js.map] -{"version":3,"file":"sourceMap-StringLiteralWithNewLine.js","sourceRoot":"","sources":["sourceMap-StringLiteralWithNewLine.ts"],"names":["Foo"],"mappings":"AAQA,IAAO,GAAG,CAKT;AALD,WAAO,GAAG,EAAC,CAAC;IACRA,IAAIA,CAACA,GAAGA,OAAOA,CAACA;IAChBA,IAAIA,CAACA,GAAGA;wBACYA,CAACA;IACrBA,IAAIA,CAACA,GAAGA,MAAMA,CAACA,QAAQA,CAACA;AAC5BA,CAACA,EALM,GAAG,KAAH,GAAG,QAKT"} \ No newline at end of file +{"version":3,"file":"sourceMap-StringLiteralWithNewLine.js","sourceRoot":"","sources":["sourceMap-StringLiteralWithNewLine.ts"],"names":[],"mappings":"AAQA,IAAO,GAAG,CAKT;AALD,WAAO,GAAG,EAAC,CAAC;IACR,IAAI,CAAC,GAAG,OAAO,CAAC;IAChB,IAAI,CAAC,GAAG;wBACY,CAAC;IACrB,IAAI,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,CAAC,EALM,GAAG,KAAH,GAAG,QAKT"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMap-StringLiteralWithNewLine.sourcemap.txt b/tests/baselines/reference/sourceMap-StringLiteralWithNewLine.sourcemap.txt index 864cf2647843d..dd0ccd40c27e8 100644 --- a/tests/baselines/reference/sourceMap-StringLiteralWithNewLine.sourcemap.txt +++ b/tests/baselines/reference/sourceMap-StringLiteralWithNewLine.sourcemap.txt @@ -68,12 +68,12 @@ sourceFile:sourceMap-StringLiteralWithNewLine.ts 4 > = 5 > "test1" 6 > ; -1->Emitted(3, 5) Source(10, 5) + SourceIndex(0) name (Foo) -2 >Emitted(3, 9) Source(10, 9) + SourceIndex(0) name (Foo) -3 >Emitted(3, 10) Source(10, 10) + SourceIndex(0) name (Foo) -4 >Emitted(3, 13) Source(10, 13) + SourceIndex(0) name (Foo) -5 >Emitted(3, 20) Source(10, 20) + SourceIndex(0) name (Foo) -6 >Emitted(3, 21) Source(10, 21) + SourceIndex(0) name (Foo) +1->Emitted(3, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(3, 9) Source(10, 9) + SourceIndex(0) +3 >Emitted(3, 10) Source(10, 10) + SourceIndex(0) +4 >Emitted(3, 13) Source(10, 13) + SourceIndex(0) +5 >Emitted(3, 20) Source(10, 20) + SourceIndex(0) +6 >Emitted(3, 21) Source(10, 21) + SourceIndex(0) --- >>> var y = "test 2\ 1 >^^^^ @@ -86,10 +86,10 @@ sourceFile:sourceMap-StringLiteralWithNewLine.ts 2 > var 3 > y 4 > = -1 >Emitted(4, 5) Source(11, 5) + SourceIndex(0) name (Foo) -2 >Emitted(4, 9) Source(11, 9) + SourceIndex(0) name (Foo) -3 >Emitted(4, 10) Source(11, 10) + SourceIndex(0) name (Foo) -4 >Emitted(4, 13) Source(11, 13) + SourceIndex(0) name (Foo) +1 >Emitted(4, 5) Source(11, 5) + SourceIndex(0) +2 >Emitted(4, 9) Source(11, 9) + SourceIndex(0) +3 >Emitted(4, 10) Source(11, 10) + SourceIndex(0) +4 >Emitted(4, 13) Source(11, 13) + SourceIndex(0) --- >>>isn't this a lot of fun"; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -98,8 +98,8 @@ sourceFile:sourceMap-StringLiteralWithNewLine.ts 1->"test 2\ >isn't this a lot of fun" 2 > ; -1->Emitted(5, 25) Source(12, 25) + SourceIndex(0) name (Foo) -2 >Emitted(5, 26) Source(12, 26) + SourceIndex(0) name (Foo) +1->Emitted(5, 25) Source(12, 25) + SourceIndex(0) +2 >Emitted(5, 26) Source(12, 26) + SourceIndex(0) --- >>> var z = window.document; 1->^^^^ @@ -119,14 +119,14 @@ sourceFile:sourceMap-StringLiteralWithNewLine.ts 6 > . 7 > document 8 > ; -1->Emitted(6, 5) Source(13, 5) + SourceIndex(0) name (Foo) -2 >Emitted(6, 9) Source(13, 9) + SourceIndex(0) name (Foo) -3 >Emitted(6, 10) Source(13, 10) + SourceIndex(0) name (Foo) -4 >Emitted(6, 13) Source(13, 13) + SourceIndex(0) name (Foo) -5 >Emitted(6, 19) Source(13, 19) + SourceIndex(0) name (Foo) -6 >Emitted(6, 20) Source(13, 20) + SourceIndex(0) name (Foo) -7 >Emitted(6, 28) Source(13, 28) + SourceIndex(0) name (Foo) -8 >Emitted(6, 29) Source(13, 29) + SourceIndex(0) name (Foo) +1->Emitted(6, 5) Source(13, 5) + SourceIndex(0) +2 >Emitted(6, 9) Source(13, 9) + SourceIndex(0) +3 >Emitted(6, 10) Source(13, 10) + SourceIndex(0) +4 >Emitted(6, 13) Source(13, 13) + SourceIndex(0) +5 >Emitted(6, 19) Source(13, 19) + SourceIndex(0) +6 >Emitted(6, 20) Source(13, 20) + SourceIndex(0) +7 >Emitted(6, 28) Source(13, 28) + SourceIndex(0) +8 >Emitted(6, 29) Source(13, 29) + SourceIndex(0) --- >>>})(Foo || (Foo = {})); 1 > @@ -150,8 +150,8 @@ sourceFile:sourceMap-StringLiteralWithNewLine.ts > isn't this a lot of fun"; > var z = window.document; > } -1 >Emitted(7, 1) Source(14, 1) + SourceIndex(0) name (Foo) -2 >Emitted(7, 2) Source(14, 2) + SourceIndex(0) name (Foo) +1 >Emitted(7, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(14, 2) + SourceIndex(0) 3 >Emitted(7, 4) Source(9, 8) + SourceIndex(0) 4 >Emitted(7, 7) Source(9, 11) + SourceIndex(0) 5 >Emitted(7, 12) Source(9, 8) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.js.map b/tests/baselines/reference/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.js.map index 7f6604004701c..7c97d8f302f9b 100644 --- a/tests/baselines/reference/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.js.map +++ b/tests/baselines/reference/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.js.map @@ -1,2 +1,2 @@ //// [sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.js.map] -{"version":3,"file":"sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.js","sourceRoot":"","sources":["sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.ts"],"names":["Q","Q.P"],"mappings":"AAAA,IAAO,CAAC,CAKP;AALD,WAAO,CAAC,EAAC,CAAC;IACNA;QACIC,YAAYA;QACZA,IAAIA,CAACA,GAAGA,CAACA,CAACA;IACdA,CAACA;AACLD,CAACA,EALM,CAAC,KAAD,CAAC,QAKP"} \ No newline at end of file +{"version":3,"file":"sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.js","sourceRoot":"","sources":["sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.ts"],"names":[],"mappings":"AAAA,IAAO,CAAC,CAKP;AALD,WAAO,CAAC,EAAC,CAAC;IACN;QACI,YAAY;QACZ,IAAI,CAAC,GAAG,CAAC,CAAC;IACd,CAAC;AACL,CAAC,EALM,CAAC,KAAD,CAAC,QAKP"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.sourcemap.txt b/tests/baselines/reference/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.sourcemap.txt index 5413f4bbc2322..0872b1f31eb6c 100644 --- a/tests/baselines/reference/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.sourcemap.txt +++ b/tests/baselines/reference/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.sourcemap.txt @@ -51,7 +51,7 @@ sourceFile:sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.t 2 > ^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 5) + SourceIndex(0) name (Q) +1->Emitted(3, 5) Source(2, 5) + SourceIndex(0) --- >>> // Test this 1->^^^^^^^^ @@ -59,8 +59,8 @@ sourceFile:sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.t 1->function P() { > 2 > // Test this -1->Emitted(4, 9) Source(3, 9) + SourceIndex(0) name (Q.P) -2 >Emitted(4, 21) Source(3, 21) + SourceIndex(0) name (Q.P) +1->Emitted(4, 9) Source(3, 9) + SourceIndex(0) +2 >Emitted(4, 21) Source(3, 21) + SourceIndex(0) --- >>> var a = 1; 1 >^^^^^^^^ @@ -76,12 +76,12 @@ sourceFile:sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.t 4 > = 5 > 1 6 > ; -1 >Emitted(5, 9) Source(4, 9) + SourceIndex(0) name (Q.P) -2 >Emitted(5, 13) Source(4, 13) + SourceIndex(0) name (Q.P) -3 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (Q.P) -4 >Emitted(5, 17) Source(4, 17) + SourceIndex(0) name (Q.P) -5 >Emitted(5, 18) Source(4, 18) + SourceIndex(0) name (Q.P) -6 >Emitted(5, 19) Source(4, 19) + SourceIndex(0) name (Q.P) +1 >Emitted(5, 9) Source(4, 9) + SourceIndex(0) +2 >Emitted(5, 13) Source(4, 13) + SourceIndex(0) +3 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) +4 >Emitted(5, 17) Source(4, 17) + SourceIndex(0) +5 >Emitted(5, 18) Source(4, 18) + SourceIndex(0) +6 >Emitted(5, 19) Source(4, 19) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -90,8 +90,8 @@ sourceFile:sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.t 1 > > 2 > } -1 >Emitted(6, 5) Source(5, 5) + SourceIndex(0) name (Q.P) -2 >Emitted(6, 6) Source(5, 6) + SourceIndex(0) name (Q.P) +1 >Emitted(6, 5) Source(5, 5) + SourceIndex(0) +2 >Emitted(6, 6) Source(5, 6) + SourceIndex(0) --- >>>})(Q || (Q = {})); 1-> @@ -115,8 +115,8 @@ sourceFile:sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.t > var a = 1; > } > } -1->Emitted(7, 1) Source(6, 1) + SourceIndex(0) name (Q) -2 >Emitted(7, 2) Source(6, 2) + SourceIndex(0) name (Q) +1->Emitted(7, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(6, 2) + SourceIndex(0) 3 >Emitted(7, 4) Source(1, 8) + SourceIndex(0) 4 >Emitted(7, 5) Source(1, 9) + SourceIndex(0) 5 >Emitted(7, 10) Source(1, 8) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapForFunctionWithCommentPrecedingStatement01.js.map b/tests/baselines/reference/sourceMapForFunctionWithCommentPrecedingStatement01.js.map index bdfba243ab673..57f022d5ccc0e 100644 --- a/tests/baselines/reference/sourceMapForFunctionWithCommentPrecedingStatement01.js.map +++ b/tests/baselines/reference/sourceMapForFunctionWithCommentPrecedingStatement01.js.map @@ -1,2 +1,2 @@ //// [sourceMapForFunctionWithCommentPrecedingStatement01.js.map] -{"version":3,"file":"sourceMapForFunctionWithCommentPrecedingStatement01.js","sourceRoot":"","sources":["sourceMapForFunctionWithCommentPrecedingStatement01.ts"],"names":["P"],"mappings":"AAAA;IACIA,YAAYA;IACZA,IAAIA,CAACA,GAAGA,CAACA,CAACA;AACdA,CAACA"} \ No newline at end of file +{"version":3,"file":"sourceMapForFunctionWithCommentPrecedingStatement01.js","sourceRoot":"","sources":["sourceMapForFunctionWithCommentPrecedingStatement01.ts"],"names":[],"mappings":"AAAA;IACI,YAAY;IACZ,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapForFunctionWithCommentPrecedingStatement01.sourcemap.txt b/tests/baselines/reference/sourceMapForFunctionWithCommentPrecedingStatement01.sourcemap.txt index 65037c694374c..3c16823387c9b 100644 --- a/tests/baselines/reference/sourceMapForFunctionWithCommentPrecedingStatement01.sourcemap.txt +++ b/tests/baselines/reference/sourceMapForFunctionWithCommentPrecedingStatement01.sourcemap.txt @@ -20,8 +20,8 @@ sourceFile:sourceMapForFunctionWithCommentPrecedingStatement01.ts 1->function P() { > 2 > // Test this -1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) name (P) -2 >Emitted(2, 17) Source(2, 17) + SourceIndex(0) name (P) +1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(2, 17) Source(2, 17) + SourceIndex(0) --- >>> var a = 1; 1 >^^^^ @@ -37,12 +37,12 @@ sourceFile:sourceMapForFunctionWithCommentPrecedingStatement01.ts 4 > = 5 > 1 6 > ; -1 >Emitted(3, 5) Source(3, 5) + SourceIndex(0) name (P) -2 >Emitted(3, 9) Source(3, 9) + SourceIndex(0) name (P) -3 >Emitted(3, 10) Source(3, 10) + SourceIndex(0) name (P) -4 >Emitted(3, 13) Source(3, 13) + SourceIndex(0) name (P) -5 >Emitted(3, 14) Source(3, 14) + SourceIndex(0) name (P) -6 >Emitted(3, 15) Source(3, 15) + SourceIndex(0) name (P) +1 >Emitted(3, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(3, 9) Source(3, 9) + SourceIndex(0) +3 >Emitted(3, 10) Source(3, 10) + SourceIndex(0) +4 >Emitted(3, 13) Source(3, 13) + SourceIndex(0) +5 >Emitted(3, 14) Source(3, 14) + SourceIndex(0) +6 >Emitted(3, 15) Source(3, 15) + SourceIndex(0) --- >>>} 1 > @@ -51,7 +51,7 @@ sourceFile:sourceMapForFunctionWithCommentPrecedingStatement01.ts 1 > > 2 >} -1 >Emitted(4, 1) Source(4, 1) + SourceIndex(0) name (P) -2 >Emitted(4, 2) Source(4, 2) + SourceIndex(0) name (P) +1 >Emitted(4, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(4, 2) Source(4, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapForFunctionWithCommentPrecedingStatement01.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 615db73973a74..2429a04c88b9e 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,IAAAA,GAAGA,CAkCbA;IAlCUA,WAAAA,GAAGA,EAACA,CAACA;QACZC,YAAYA,CAACA;QAEbA;YACIC,iBAAmBA,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,aAAaA,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,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 +{"version":3,"file":"sourceMapSample.js","sourceRoot":"","sources":["sourceMapSample.ts"],"names":[],"mappings":"AAAA,IAAO,GAAG,CAkCT;AAlCD,WAAO,GAAG;IAAC,IAAA,GAAG,CAkCb;IAlCU,WAAA,GAAG,EAAC,CAAC;QACZ,YAAY,CAAC;QAEb;YACI,iBAAmB,QAAgB;gBAAhB,aAAQ,GAAR,QAAQ,CAAQ;YACnC,CAAC;YAED,uBAAK,GAAL;gBACI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YAC5C,CAAC;YACL,cAAC;QAAD,CAAC,AAPD,IAOC;QAGD,aAAa,QAAgB;YACzB,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;QAED,IAAI,OAAO,GAAG,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;QAC3C,IAAI,GAAG,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;QAE1B,cAAc,QAAgB;YAAE,uBAA0B;iBAA1B,WAA0B,CAA1B,sBAA0B,CAA1B,IAA0B;gBAA1B,sCAA0B;;YACtD,IAAI,QAAQ,GAAc,EAAE,CAAC;YAC7B,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;YACpC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC5C,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,CAAC;YAED,MAAM,CAAC,QAAQ,CAAC;QACpB,CAAC;QAED,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QACpC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAChC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;IACL,CAAC,EAlCU,GAAG,GAAH,OAAG,KAAH,OAAG,QAkCb;AAAD,CAAC,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 df35ff4257fe4..8ea198b312949 100644 --- a/tests/baselines/reference/sourceMapSample.sourcemap.txt +++ b/tests/baselines/reference/sourceMapSample.sourcemap.txt @@ -112,10 +112,10 @@ sourceFile:sourceMapSample.ts > 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) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 9) Source(1, 12) + SourceIndex(0) +3 >Emitted(3, 12) Source(1, 15) + SourceIndex(0) +4 >Emitted(3, 13) Source(35, 2) + SourceIndex(0) --- >>> (function (Bar) { 1->^^^^ @@ -129,11 +129,11 @@ sourceFile:sourceMapSample.ts 3 > Bar 4 > 5 > { -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) +1->Emitted(4, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(4, 16) Source(1, 12) + SourceIndex(0) +3 >Emitted(4, 19) Source(1, 15) + SourceIndex(0) +4 >Emitted(4, 21) Source(1, 16) + SourceIndex(0) +5 >Emitted(4, 22) Source(1, 17) + SourceIndex(0) --- >>> "use strict"; 1->^^^^^^^^ @@ -144,9 +144,9 @@ sourceFile:sourceMapSample.ts > 2 > "use strict" 3 > ; -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) +1->Emitted(5, 9) Source(2, 5) + SourceIndex(0) +2 >Emitted(5, 21) Source(2, 17) + SourceIndex(0) +3 >Emitted(5, 22) Source(2, 18) + SourceIndex(0) --- >>> var Greeter = (function () { 1->^^^^^^^^ @@ -154,7 +154,7 @@ sourceFile:sourceMapSample.ts 1-> > > -1->Emitted(6, 9) Source(4, 5) + SourceIndex(0) name (Foo.Bar) +1->Emitted(6, 9) Source(4, 5) + SourceIndex(0) --- >>> function Greeter(greeting) { 1->^^^^^^^^^^^^ @@ -165,9 +165,9 @@ sourceFile:sourceMapSample.ts > 2 > constructor(public 3 > greeting: string -1->Emitted(7, 13) Source(5, 9) + SourceIndex(0) name (Foo.Bar.Greeter) -2 >Emitted(7, 30) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter) -3 >Emitted(7, 38) Source(5, 44) + SourceIndex(0) name (Foo.Bar.Greeter) +1->Emitted(7, 13) Source(5, 9) + SourceIndex(0) +2 >Emitted(7, 30) Source(5, 28) + SourceIndex(0) +3 >Emitted(7, 38) Source(5, 44) + SourceIndex(0) --- >>> this.greeting = greeting; 1->^^^^^^^^^^^^^^^^ @@ -180,11 +180,11 @@ sourceFile:sourceMapSample.ts 3 > 4 > greeting 5 > : string -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->Emitted(8, 17) Source(5, 28) + SourceIndex(0) +2 >Emitted(8, 30) Source(5, 36) + SourceIndex(0) +3 >Emitted(8, 33) Source(5, 28) + SourceIndex(0) +4 >Emitted(8, 41) Source(5, 36) + SourceIndex(0) +5 >Emitted(8, 42) Source(5, 44) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^ @@ -193,8 +193,8 @@ sourceFile:sourceMapSample.ts 1 >) { > 2 > } -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) +1 >Emitted(9, 13) Source(6, 9) + SourceIndex(0) +2 >Emitted(9, 14) Source(6, 10) + SourceIndex(0) --- >>> Greeter.prototype.greet = function () { 1->^^^^^^^^^^^^ @@ -206,9 +206,9 @@ sourceFile:sourceMapSample.ts > 2 > greet 3 > -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) +1->Emitted(10, 13) Source(8, 9) + SourceIndex(0) +2 >Emitted(10, 36) Source(8, 14) + SourceIndex(0) +3 >Emitted(10, 39) Source(8, 9) + SourceIndex(0) --- >>> return "

" + this.greeting + "

"; 1->^^^^^^^^^^^^^^^^ @@ -234,17 +234,17 @@ sourceFile:sourceMapSample.ts 9 > + 10> "" 11> ; -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->Emitted(11, 17) Source(9, 13) + SourceIndex(0) +2 >Emitted(11, 23) Source(9, 19) + SourceIndex(0) +3 >Emitted(11, 24) Source(9, 20) + SourceIndex(0) +4 >Emitted(11, 30) Source(9, 26) + SourceIndex(0) +5 >Emitted(11, 33) Source(9, 29) + SourceIndex(0) +6 >Emitted(11, 37) Source(9, 33) + SourceIndex(0) +7 >Emitted(11, 38) Source(9, 34) + SourceIndex(0) +8 >Emitted(11, 46) Source(9, 42) + SourceIndex(0) +9 >Emitted(11, 49) Source(9, 45) + SourceIndex(0) +10>Emitted(11, 56) Source(9, 52) + SourceIndex(0) +11>Emitted(11, 57) Source(9, 53) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^ @@ -253,8 +253,8 @@ sourceFile:sourceMapSample.ts 1 > > 2 > } -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) +1 >Emitted(12, 13) Source(10, 9) + SourceIndex(0) +2 >Emitted(12, 14) Source(10, 10) + SourceIndex(0) --- >>> return Greeter; 1->^^^^^^^^^^^^ @@ -262,8 +262,8 @@ sourceFile:sourceMapSample.ts 1-> > 2 > } -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->Emitted(13, 13) Source(11, 5) + SourceIndex(0) +2 >Emitted(13, 27) Source(11, 6) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^ @@ -282,10 +282,10 @@ sourceFile:sourceMapSample.ts > return "

" + this.greeting + "

"; > } > } -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) +1 >Emitted(14, 9) Source(11, 5) + SourceIndex(0) +2 >Emitted(14, 10) Source(11, 6) + SourceIndex(0) +3 >Emitted(14, 10) Source(4, 5) + SourceIndex(0) +4 >Emitted(14, 14) Source(11, 6) + SourceIndex(0) --- >>> function foo(greeting) { 1->^^^^^^^^ @@ -298,9 +298,9 @@ sourceFile:sourceMapSample.ts > 2 > function foo( 3 > greeting: string -1->Emitted(15, 9) Source(14, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(15, 22) Source(14, 18) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(15, 30) Source(14, 34) + SourceIndex(0) name (Foo.Bar) +1->Emitted(15, 9) Source(14, 5) + SourceIndex(0) +2 >Emitted(15, 22) Source(14, 18) + SourceIndex(0) +3 >Emitted(15, 30) Source(14, 34) + SourceIndex(0) --- >>> return new Greeter(greeting); 1->^^^^^^^^^^^^ @@ -322,15 +322,15 @@ sourceFile:sourceMapSample.ts 7 > greeting 8 > ) 9 > ; -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->Emitted(16, 13) Source(15, 9) + SourceIndex(0) +2 >Emitted(16, 19) Source(15, 15) + SourceIndex(0) +3 >Emitted(16, 20) Source(15, 16) + SourceIndex(0) +4 >Emitted(16, 24) Source(15, 20) + SourceIndex(0) +5 >Emitted(16, 31) Source(15, 27) + SourceIndex(0) +6 >Emitted(16, 32) Source(15, 28) + SourceIndex(0) +7 >Emitted(16, 40) Source(15, 36) + SourceIndex(0) +8 >Emitted(16, 41) Source(15, 37) + SourceIndex(0) +9 >Emitted(16, 42) Source(15, 38) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -339,8 +339,8 @@ sourceFile:sourceMapSample.ts 1 > > 2 > } -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) +1 >Emitted(17, 9) Source(16, 5) + SourceIndex(0) +2 >Emitted(17, 10) Source(16, 6) + SourceIndex(0) --- >>> var greeter = new Greeter("Hello, world!"); 1->^^^^^^^^ @@ -365,16 +365,16 @@ sourceFile:sourceMapSample.ts 8 > "Hello, world!" 9 > ) 10> ; -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) +1->Emitted(18, 9) Source(18, 5) + SourceIndex(0) +2 >Emitted(18, 13) Source(18, 9) + SourceIndex(0) +3 >Emitted(18, 20) Source(18, 16) + SourceIndex(0) +4 >Emitted(18, 23) Source(18, 19) + SourceIndex(0) +5 >Emitted(18, 27) Source(18, 23) + SourceIndex(0) +6 >Emitted(18, 34) Source(18, 30) + SourceIndex(0) +7 >Emitted(18, 35) Source(18, 31) + SourceIndex(0) +8 >Emitted(18, 50) Source(18, 46) + SourceIndex(0) +9 >Emitted(18, 51) Source(18, 47) + SourceIndex(0) +10>Emitted(18, 52) Source(18, 48) + SourceIndex(0) --- >>> var str = greeter.greet(); 1 >^^^^^^^^ @@ -396,15 +396,15 @@ sourceFile:sourceMapSample.ts 7 > greet 8 > () 9 > ; -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) +1 >Emitted(19, 9) Source(19, 5) + SourceIndex(0) +2 >Emitted(19, 13) Source(19, 9) + SourceIndex(0) +3 >Emitted(19, 16) Source(19, 12) + SourceIndex(0) +4 >Emitted(19, 19) Source(19, 15) + SourceIndex(0) +5 >Emitted(19, 26) Source(19, 22) + SourceIndex(0) +6 >Emitted(19, 27) Source(19, 23) + SourceIndex(0) +7 >Emitted(19, 32) Source(19, 28) + SourceIndex(0) +8 >Emitted(19, 34) Source(19, 30) + SourceIndex(0) +9 >Emitted(19, 35) Source(19, 31) + SourceIndex(0) --- >>> function foo2(greeting) { 1 >^^^^^^^^ @@ -416,9 +416,9 @@ sourceFile:sourceMapSample.ts > 2 > function foo2( 3 > greeting: string -1 >Emitted(20, 9) Source(21, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(20, 23) Source(21, 19) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(20, 31) Source(21, 35) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(20, 9) Source(21, 5) + SourceIndex(0) +2 >Emitted(20, 23) Source(21, 19) + SourceIndex(0) +3 >Emitted(20, 31) Source(21, 35) + SourceIndex(0) --- >>> var restGreetings = []; 1->^^^^^^^^^^^^ @@ -426,8 +426,8 @@ sourceFile:sourceMapSample.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->, 2 > ...restGreetings: string[] -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) +1->Emitted(21, 13) Source(21, 37) + SourceIndex(0) +2 >Emitted(21, 36) Source(21, 63) + SourceIndex(0) --- >>> for (var _i = 1; _i < arguments.length; _i++) { 1->^^^^^^^^^^^^^^^^^ @@ -442,20 +442,20 @@ sourceFile:sourceMapSample.ts 4 > ...restGreetings: string[] 5 > 6 > ...restGreetings: string[] -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) +1->Emitted(22, 18) Source(21, 37) + SourceIndex(0) +2 >Emitted(22, 29) Source(21, 63) + SourceIndex(0) +3 >Emitted(22, 30) Source(21, 37) + SourceIndex(0) +4 >Emitted(22, 52) Source(21, 63) + SourceIndex(0) +5 >Emitted(22, 53) Source(21, 37) + SourceIndex(0) +6 >Emitted(22, 57) Source(21, 63) + SourceIndex(0) --- >>> restGreetings[_i - 1] = arguments[_i]; 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...restGreetings: string[] -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) +1 >Emitted(23, 17) Source(21, 37) + SourceIndex(0) +2 >Emitted(23, 55) Source(21, 63) + SourceIndex(0) --- >>> } >>> var greeters = []; @@ -473,12 +473,12 @@ sourceFile:sourceMapSample.ts 4 > : Greeter[] = 5 > [] 6 > ; -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) +1 >Emitted(25, 13) Source(22, 9) + SourceIndex(0) +2 >Emitted(25, 17) Source(22, 13) + SourceIndex(0) +3 >Emitted(25, 25) Source(22, 21) + SourceIndex(0) +4 >Emitted(25, 28) Source(22, 35) + SourceIndex(0) +5 >Emitted(25, 30) Source(22, 37) + SourceIndex(0) +6 >Emitted(25, 31) Source(22, 38) + SourceIndex(0) --- >>> greeters[0] = new Greeter(greeting); 1->^^^^^^^^^^^^ @@ -507,18 +507,18 @@ sourceFile:sourceMapSample.ts 10> greeting 11> ) 12> ; -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) +1->Emitted(26, 13) Source(23, 9) + SourceIndex(0) +2 >Emitted(26, 21) Source(23, 17) + SourceIndex(0) +3 >Emitted(26, 22) Source(23, 18) + SourceIndex(0) +4 >Emitted(26, 23) Source(23, 19) + SourceIndex(0) +5 >Emitted(26, 24) Source(23, 20) + SourceIndex(0) +6 >Emitted(26, 27) Source(23, 23) + SourceIndex(0) +7 >Emitted(26, 31) Source(23, 27) + SourceIndex(0) +8 >Emitted(26, 38) Source(23, 34) + SourceIndex(0) +9 >Emitted(26, 39) Source(23, 35) + SourceIndex(0) +10>Emitted(26, 47) Source(23, 43) + SourceIndex(0) +11>Emitted(26, 48) Source(23, 44) + SourceIndex(0) +12>Emitted(26, 49) Source(23, 45) + SourceIndex(0) --- >>> for (var i = 0; i < restGreetings.length; i++) { 1->^^^^^^^^^^^^ @@ -563,26 +563,26 @@ sourceFile:sourceMapSample.ts 18> ++ 19> ) 20> { -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) +1->Emitted(27, 13) Source(24, 9) + SourceIndex(0) +2 >Emitted(27, 16) Source(24, 12) + SourceIndex(0) +3 >Emitted(27, 17) Source(24, 13) + SourceIndex(0) +4 >Emitted(27, 18) Source(24, 14) + SourceIndex(0) +5 >Emitted(27, 21) Source(24, 17) + SourceIndex(0) +6 >Emitted(27, 22) Source(24, 18) + SourceIndex(0) +7 >Emitted(27, 23) Source(24, 19) + SourceIndex(0) +8 >Emitted(27, 26) Source(24, 22) + SourceIndex(0) +9 >Emitted(27, 27) Source(24, 23) + SourceIndex(0) +10>Emitted(27, 29) Source(24, 25) + SourceIndex(0) +11>Emitted(27, 30) Source(24, 26) + SourceIndex(0) +12>Emitted(27, 33) Source(24, 29) + SourceIndex(0) +13>Emitted(27, 46) Source(24, 42) + SourceIndex(0) +14>Emitted(27, 47) Source(24, 43) + SourceIndex(0) +15>Emitted(27, 53) Source(24, 49) + SourceIndex(0) +16>Emitted(27, 55) Source(24, 51) + SourceIndex(0) +17>Emitted(27, 56) Source(24, 52) + SourceIndex(0) +18>Emitted(27, 58) Source(24, 54) + SourceIndex(0) +19>Emitted(27, 60) Source(24, 56) + SourceIndex(0) +20>Emitted(27, 61) Source(24, 57) + SourceIndex(0) --- >>> greeters.push(new Greeter(restGreetings[i])); 1->^^^^^^^^^^^^^^^^ @@ -616,21 +616,21 @@ sourceFile:sourceMapSample.ts 13> ) 14> ) 15> ; -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->Emitted(28, 17) Source(25, 13) + SourceIndex(0) +2 >Emitted(28, 25) Source(25, 21) + SourceIndex(0) +3 >Emitted(28, 26) Source(25, 22) + SourceIndex(0) +4 >Emitted(28, 30) Source(25, 26) + SourceIndex(0) +5 >Emitted(28, 31) Source(25, 27) + SourceIndex(0) +6 >Emitted(28, 35) Source(25, 31) + SourceIndex(0) +7 >Emitted(28, 42) Source(25, 38) + SourceIndex(0) +8 >Emitted(28, 43) Source(25, 39) + SourceIndex(0) +9 >Emitted(28, 56) Source(25, 52) + SourceIndex(0) +10>Emitted(28, 57) Source(25, 53) + SourceIndex(0) +11>Emitted(28, 58) Source(25, 54) + SourceIndex(0) +12>Emitted(28, 59) Source(25, 55) + SourceIndex(0) +13>Emitted(28, 60) Source(25, 56) + SourceIndex(0) +14>Emitted(28, 61) Source(25, 57) + SourceIndex(0) +15>Emitted(28, 62) Source(25, 58) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^ @@ -639,8 +639,8 @@ sourceFile:sourceMapSample.ts 1 > > 2 > } -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) +1 >Emitted(29, 13) Source(26, 9) + SourceIndex(0) +2 >Emitted(29, 14) Source(26, 10) + SourceIndex(0) --- >>> return greeters; 1->^^^^^^^^^^^^ @@ -655,11 +655,11 @@ sourceFile:sourceMapSample.ts 3 > 4 > greeters 5 > ; -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->Emitted(30, 13) Source(28, 9) + SourceIndex(0) +2 >Emitted(30, 19) Source(28, 15) + SourceIndex(0) +3 >Emitted(30, 20) Source(28, 16) + SourceIndex(0) +4 >Emitted(30, 28) Source(28, 24) + SourceIndex(0) +5 >Emitted(30, 29) Source(28, 25) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -668,8 +668,8 @@ sourceFile:sourceMapSample.ts 1 > > 2 > } -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) +1 >Emitted(31, 9) Source(29, 5) + SourceIndex(0) +2 >Emitted(31, 10) Source(29, 6) + SourceIndex(0) --- >>> var b = foo2("Hello", "World", "!"); 1->^^^^^^^^ @@ -701,19 +701,19 @@ sourceFile:sourceMapSample.ts 11> "!" 12> ) 13> ; -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) +1->Emitted(32, 9) Source(31, 5) + SourceIndex(0) +2 >Emitted(32, 13) Source(31, 9) + SourceIndex(0) +3 >Emitted(32, 14) Source(31, 10) + SourceIndex(0) +4 >Emitted(32, 17) Source(31, 13) + SourceIndex(0) +5 >Emitted(32, 21) Source(31, 17) + SourceIndex(0) +6 >Emitted(32, 22) Source(31, 18) + SourceIndex(0) +7 >Emitted(32, 29) Source(31, 25) + SourceIndex(0) +8 >Emitted(32, 31) Source(31, 27) + SourceIndex(0) +9 >Emitted(32, 38) Source(31, 34) + SourceIndex(0) +10>Emitted(32, 40) Source(31, 36) + SourceIndex(0) +11>Emitted(32, 43) Source(31, 39) + SourceIndex(0) +12>Emitted(32, 44) Source(31, 40) + SourceIndex(0) +13>Emitted(32, 45) Source(31, 41) + SourceIndex(0) --- >>> for (var j = 0; j < b.length; j++) { 1->^^^^^^^^ @@ -757,26 +757,26 @@ sourceFile:sourceMapSample.ts 18> ++ 19> ) 20> { -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) +1->Emitted(33, 9) Source(32, 5) + SourceIndex(0) +2 >Emitted(33, 12) Source(32, 8) + SourceIndex(0) +3 >Emitted(33, 13) Source(32, 9) + SourceIndex(0) +4 >Emitted(33, 14) Source(32, 10) + SourceIndex(0) +5 >Emitted(33, 17) Source(32, 13) + SourceIndex(0) +6 >Emitted(33, 18) Source(32, 14) + SourceIndex(0) +7 >Emitted(33, 19) Source(32, 15) + SourceIndex(0) +8 >Emitted(33, 22) Source(32, 18) + SourceIndex(0) +9 >Emitted(33, 23) Source(32, 19) + SourceIndex(0) +10>Emitted(33, 25) Source(32, 21) + SourceIndex(0) +11>Emitted(33, 26) Source(32, 22) + SourceIndex(0) +12>Emitted(33, 29) Source(32, 25) + SourceIndex(0) +13>Emitted(33, 30) Source(32, 26) + SourceIndex(0) +14>Emitted(33, 31) Source(32, 27) + SourceIndex(0) +15>Emitted(33, 37) Source(32, 33) + SourceIndex(0) +16>Emitted(33, 39) Source(32, 35) + SourceIndex(0) +17>Emitted(33, 40) Source(32, 36) + SourceIndex(0) +18>Emitted(33, 42) Source(32, 38) + SourceIndex(0) +19>Emitted(33, 44) Source(32, 40) + SourceIndex(0) +20>Emitted(33, 45) Source(32, 41) + SourceIndex(0) --- >>> b[j].greet(); 1 >^^^^^^^^^^^^ @@ -798,15 +798,15 @@ sourceFile:sourceMapSample.ts 7 > greet 8 > () 9 > ; -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 >Emitted(34, 13) Source(33, 9) + SourceIndex(0) +2 >Emitted(34, 14) Source(33, 10) + SourceIndex(0) +3 >Emitted(34, 15) Source(33, 11) + SourceIndex(0) +4 >Emitted(34, 16) Source(33, 12) + SourceIndex(0) +5 >Emitted(34, 17) Source(33, 13) + SourceIndex(0) +6 >Emitted(34, 18) Source(33, 14) + SourceIndex(0) +7 >Emitted(34, 23) Source(33, 19) + SourceIndex(0) +8 >Emitted(34, 25) Source(33, 21) + SourceIndex(0) +9 >Emitted(34, 26) Source(33, 22) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -815,8 +815,8 @@ sourceFile:sourceMapSample.ts 1 > > 2 > } -1 >Emitted(35, 9) Source(34, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(35, 10) Source(34, 6) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(35, 9) Source(34, 5) + SourceIndex(0) +2 >Emitted(35, 10) Source(34, 6) + SourceIndex(0) --- >>> })(Bar = Foo.Bar || (Foo.Bar = {})); 1->^^^^ @@ -872,15 +872,15 @@ sourceFile:sourceMapSample.ts > 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) +1->Emitted(36, 5) Source(35, 1) + SourceIndex(0) +2 >Emitted(36, 6) Source(35, 2) + SourceIndex(0) +3 >Emitted(36, 8) Source(1, 12) + SourceIndex(0) +4 >Emitted(36, 11) Source(1, 15) + SourceIndex(0) +5 >Emitted(36, 14) Source(1, 12) + SourceIndex(0) +6 >Emitted(36, 21) Source(1, 15) + SourceIndex(0) +7 >Emitted(36, 26) Source(1, 12) + SourceIndex(0) +8 >Emitted(36, 33) Source(1, 15) + SourceIndex(0) +9 >Emitted(36, 41) Source(35, 2) + SourceIndex(0) --- >>>})(Foo || (Foo = {})); 1 > @@ -932,8 +932,8 @@ sourceFile:sourceMapSample.ts > b[j].greet(); > } > } -1 >Emitted(37, 1) Source(35, 1) + SourceIndex(0) name (Foo) -2 >Emitted(37, 2) Source(35, 2) + SourceIndex(0) name (Foo) +1 >Emitted(37, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(37, 2) Source(35, 2) + SourceIndex(0) 3 >Emitted(37, 4) Source(1, 8) + SourceIndex(0) 4 >Emitted(37, 7) Source(1, 11) + SourceIndex(0) 5 >Emitted(37, 12) Source(1, 8) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationClass.js.map b/tests/baselines/reference/sourceMapValidationClass.js.map index 8693cf5d0fe67..6176f13bc517e 100644 --- a/tests/baselines/reference/sourceMapValidationClass.js.map +++ b/tests/baselines/reference/sourceMapValidationClass.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClass.js.map] -{"version":3,"file":"sourceMapValidationClass.js","sourceRoot":"","sources":["sourceMapValidationClass.ts"],"names":["Greeter","Greeter.constructor","Greeter.greet","Greeter.fn","Greeter.greetings"],"mappings":"AAAA;IACIA,iBAAmBA,QAAgBA;QAAEC,WAAcA;aAAdA,WAAcA,CAAdA,sBAAcA,CAAdA,IAAcA;YAAdA,0BAAcA;;QAAhCA,aAAQA,GAARA,QAAQA,CAAQA;QAM3BA,OAAEA,GAAWA,EAAEA,CAACA;IALxBA,CAACA;IACDD,uBAAKA,GAALA;QACIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;IAC5CA,CAACA;IAGOF,oBAAEA,GAAVA;QACIG,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;IACzBA,CAACA;IACDH,sBAAIA,8BAASA;aAAbA;YACII,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;QACzBA,CAACA;aACDJ,UAAcA,SAAiBA;YAC3BI,IAAIA,CAACA,QAAQA,GAAGA,SAASA,CAACA;QAC9BA,CAACA;;;OAHAJ;IAILA,cAACA;AAADA,CAACA,AAjBD,IAiBC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationClass.js","sourceRoot":"","sources":["sourceMapValidationClass.ts"],"names":[],"mappings":"AAAA;IACI,iBAAmB,QAAgB;QAAE,WAAc;aAAd,WAAc,CAAd,sBAAc,CAAd,IAAc;YAAd,0BAAc;;QAAhC,aAAQ,GAAR,QAAQ,CAAQ;QAM3B,OAAE,GAAW,EAAE,CAAC;IALxB,CAAC;IACD,uBAAK,GAAL;QACI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5C,CAAC;IAGO,oBAAE,GAAV;QACI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IACD,sBAAI,8BAAS;aAAb;YACI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aACD,UAAc,SAAiB;YAC3B,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;;;OAHA;IAIL,cAAC;AAAD,CAAC,AAjBD,IAiBC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt index 0e019b487bbca..3b726492c8fd4 100644 --- a/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt @@ -22,9 +22,9 @@ sourceFile:sourceMapValidationClass.ts > 2 > constructor(public 3 > greeting: string -1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(2, 22) Source(2, 24) + SourceIndex(0) name (Greeter) -3 >Emitted(2, 30) Source(2, 40) + SourceIndex(0) name (Greeter) +1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(2, 22) Source(2, 24) + SourceIndex(0) +3 >Emitted(2, 30) Source(2, 40) + SourceIndex(0) --- >>> var b = []; 1 >^^^^^^^^ @@ -32,8 +32,8 @@ sourceFile:sourceMapValidationClass.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >, 2 > ...b: string[] -1 >Emitted(3, 9) Source(2, 42) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(3, 20) Source(2, 56) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(3, 9) Source(2, 42) + SourceIndex(0) +2 >Emitted(3, 20) Source(2, 56) + SourceIndex(0) --- >>> for (var _i = 1; _i < arguments.length; _i++) { 1->^^^^^^^^^^^^^ @@ -48,20 +48,20 @@ sourceFile:sourceMapValidationClass.ts 4 > ...b: string[] 5 > 6 > ...b: string[] -1->Emitted(4, 14) Source(2, 42) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(4, 25) Source(2, 56) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(4, 26) Source(2, 42) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(4, 48) Source(2, 56) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(4, 49) Source(2, 42) + SourceIndex(0) name (Greeter.constructor) -6 >Emitted(4, 53) Source(2, 56) + SourceIndex(0) name (Greeter.constructor) +1->Emitted(4, 14) Source(2, 42) + SourceIndex(0) +2 >Emitted(4, 25) Source(2, 56) + SourceIndex(0) +3 >Emitted(4, 26) Source(2, 42) + SourceIndex(0) +4 >Emitted(4, 48) Source(2, 56) + SourceIndex(0) +5 >Emitted(4, 49) Source(2, 42) + SourceIndex(0) +6 >Emitted(4, 53) Source(2, 56) + SourceIndex(0) --- >>> b[_i - 1] = arguments[_i]; 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: string[] -1 >Emitted(5, 13) Source(2, 42) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(5, 39) Source(2, 56) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(5, 13) Source(2, 42) + SourceIndex(0) +2 >Emitted(5, 39) Source(2, 56) + SourceIndex(0) --- >>> } >>> this.greeting = greeting; @@ -75,11 +75,11 @@ sourceFile:sourceMapValidationClass.ts 3 > 4 > greeting 5 > : string -1 >Emitted(7, 9) Source(2, 24) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(7, 22) Source(2, 32) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(7, 25) Source(2, 24) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(7, 33) Source(2, 32) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(7, 34) Source(2, 40) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(7, 9) Source(2, 24) + SourceIndex(0) +2 >Emitted(7, 22) Source(2, 32) + SourceIndex(0) +3 >Emitted(7, 25) Source(2, 24) + SourceIndex(0) +4 >Emitted(7, 33) Source(2, 32) + SourceIndex(0) +5 >Emitted(7, 34) Source(2, 40) + SourceIndex(0) --- >>> this.x1 = 10; 1 >^^^^^^^^ @@ -98,11 +98,11 @@ sourceFile:sourceMapValidationClass.ts 3 > : number = 4 > 10 5 > ; -1 >Emitted(8, 9) Source(8, 13) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(8, 16) Source(8, 15) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(8, 19) Source(8, 26) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(8, 21) Source(8, 28) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(8, 22) Source(8, 29) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(8, 9) Source(8, 13) + SourceIndex(0) +2 >Emitted(8, 16) Source(8, 15) + SourceIndex(0) +3 >Emitted(8, 19) Source(8, 26) + SourceIndex(0) +4 >Emitted(8, 21) Source(8, 28) + SourceIndex(0) +5 >Emitted(8, 22) Source(8, 29) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -110,8 +110,8 @@ sourceFile:sourceMapValidationClass.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 > } -1 >Emitted(9, 5) Source(3, 5) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(9, 6) Source(3, 6) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(9, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(9, 6) Source(3, 6) + SourceIndex(0) --- >>> Greeter.prototype.greet = function () { 1->^^^^ @@ -122,9 +122,9 @@ sourceFile:sourceMapValidationClass.ts > 2 > greet 3 > -1->Emitted(10, 5) Source(4, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(10, 28) Source(4, 10) + SourceIndex(0) name (Greeter) -3 >Emitted(10, 31) Source(4, 5) + SourceIndex(0) name (Greeter) +1->Emitted(10, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(10, 28) Source(4, 10) + SourceIndex(0) +3 >Emitted(10, 31) Source(4, 5) + SourceIndex(0) --- >>> return "

" + this.greeting + "

"; 1->^^^^^^^^ @@ -150,17 +150,17 @@ sourceFile:sourceMapValidationClass.ts 9 > + 10> "" 11> ; -1->Emitted(11, 9) Source(5, 9) + SourceIndex(0) name (Greeter.greet) -2 >Emitted(11, 15) Source(5, 15) + SourceIndex(0) name (Greeter.greet) -3 >Emitted(11, 16) Source(5, 16) + SourceIndex(0) name (Greeter.greet) -4 >Emitted(11, 22) Source(5, 22) + SourceIndex(0) name (Greeter.greet) -5 >Emitted(11, 25) Source(5, 25) + SourceIndex(0) name (Greeter.greet) -6 >Emitted(11, 29) Source(5, 29) + SourceIndex(0) name (Greeter.greet) -7 >Emitted(11, 30) Source(5, 30) + SourceIndex(0) name (Greeter.greet) -8 >Emitted(11, 38) Source(5, 38) + SourceIndex(0) name (Greeter.greet) -9 >Emitted(11, 41) Source(5, 41) + SourceIndex(0) name (Greeter.greet) -10>Emitted(11, 48) Source(5, 48) + SourceIndex(0) name (Greeter.greet) -11>Emitted(11, 49) Source(5, 49) + SourceIndex(0) name (Greeter.greet) +1->Emitted(11, 9) Source(5, 9) + SourceIndex(0) +2 >Emitted(11, 15) Source(5, 15) + SourceIndex(0) +3 >Emitted(11, 16) Source(5, 16) + SourceIndex(0) +4 >Emitted(11, 22) Source(5, 22) + SourceIndex(0) +5 >Emitted(11, 25) Source(5, 25) + SourceIndex(0) +6 >Emitted(11, 29) Source(5, 29) + SourceIndex(0) +7 >Emitted(11, 30) Source(5, 30) + SourceIndex(0) +8 >Emitted(11, 38) Source(5, 38) + SourceIndex(0) +9 >Emitted(11, 41) Source(5, 41) + SourceIndex(0) +10>Emitted(11, 48) Source(5, 48) + SourceIndex(0) +11>Emitted(11, 49) Source(5, 49) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -169,8 +169,8 @@ sourceFile:sourceMapValidationClass.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(6, 5) + SourceIndex(0) name (Greeter.greet) -2 >Emitted(12, 6) Source(6, 6) + SourceIndex(0) name (Greeter.greet) +1 >Emitted(12, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(12, 6) Source(6, 6) + SourceIndex(0) --- >>> Greeter.prototype.fn = function () { 1->^^^^ @@ -183,9 +183,9 @@ sourceFile:sourceMapValidationClass.ts > private 2 > fn 3 > -1->Emitted(13, 5) Source(9, 13) + SourceIndex(0) name (Greeter) -2 >Emitted(13, 25) Source(9, 15) + SourceIndex(0) name (Greeter) -3 >Emitted(13, 28) Source(9, 5) + SourceIndex(0) name (Greeter) +1->Emitted(13, 5) Source(9, 13) + SourceIndex(0) +2 >Emitted(13, 25) Source(9, 15) + SourceIndex(0) +3 >Emitted(13, 28) Source(9, 5) + SourceIndex(0) --- >>> return this.greeting; 1->^^^^^^^^ @@ -203,13 +203,13 @@ sourceFile:sourceMapValidationClass.ts 5 > . 6 > greeting 7 > ; -1->Emitted(14, 9) Source(10, 9) + SourceIndex(0) name (Greeter.fn) -2 >Emitted(14, 15) Source(10, 15) + SourceIndex(0) name (Greeter.fn) -3 >Emitted(14, 16) Source(10, 16) + SourceIndex(0) name (Greeter.fn) -4 >Emitted(14, 20) Source(10, 20) + SourceIndex(0) name (Greeter.fn) -5 >Emitted(14, 21) Source(10, 21) + SourceIndex(0) name (Greeter.fn) -6 >Emitted(14, 29) Source(10, 29) + SourceIndex(0) name (Greeter.fn) -7 >Emitted(14, 30) Source(10, 30) + SourceIndex(0) name (Greeter.fn) +1->Emitted(14, 9) Source(10, 9) + SourceIndex(0) +2 >Emitted(14, 15) Source(10, 15) + SourceIndex(0) +3 >Emitted(14, 16) Source(10, 16) + SourceIndex(0) +4 >Emitted(14, 20) Source(10, 20) + SourceIndex(0) +5 >Emitted(14, 21) Source(10, 21) + SourceIndex(0) +6 >Emitted(14, 29) Source(10, 29) + SourceIndex(0) +7 >Emitted(14, 30) Source(10, 30) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -218,8 +218,8 @@ sourceFile:sourceMapValidationClass.ts 1 > > 2 > } -1 >Emitted(15, 5) Source(11, 5) + SourceIndex(0) name (Greeter.fn) -2 >Emitted(15, 6) Source(11, 6) + SourceIndex(0) name (Greeter.fn) +1 >Emitted(15, 5) Source(11, 5) + SourceIndex(0) +2 >Emitted(15, 6) Source(11, 6) + SourceIndex(0) --- >>> Object.defineProperty(Greeter.prototype, "greetings", { 1->^^^^ @@ -229,15 +229,15 @@ sourceFile:sourceMapValidationClass.ts > 2 > get 3 > greetings -1->Emitted(16, 5) Source(12, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(16, 27) Source(12, 9) + SourceIndex(0) name (Greeter) -3 >Emitted(16, 57) Source(12, 18) + SourceIndex(0) name (Greeter) +1->Emitted(16, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(16, 27) Source(12, 9) + SourceIndex(0) +3 >Emitted(16, 57) Source(12, 18) + SourceIndex(0) --- >>> get: function () { 1 >^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(17, 14) Source(12, 5) + SourceIndex(0) name (Greeter) +1 >Emitted(17, 14) Source(12, 5) + SourceIndex(0) --- >>> return this.greeting; 1->^^^^^^^^^^^^ @@ -255,13 +255,13 @@ sourceFile:sourceMapValidationClass.ts 5 > . 6 > greeting 7 > ; -1->Emitted(18, 13) Source(13, 9) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(18, 19) Source(13, 15) + SourceIndex(0) name (Greeter.greetings) -3 >Emitted(18, 20) Source(13, 16) + SourceIndex(0) name (Greeter.greetings) -4 >Emitted(18, 24) Source(13, 20) + SourceIndex(0) name (Greeter.greetings) -5 >Emitted(18, 25) Source(13, 21) + SourceIndex(0) name (Greeter.greetings) -6 >Emitted(18, 33) Source(13, 29) + SourceIndex(0) name (Greeter.greetings) -7 >Emitted(18, 34) Source(13, 30) + SourceIndex(0) name (Greeter.greetings) +1->Emitted(18, 13) Source(13, 9) + SourceIndex(0) +2 >Emitted(18, 19) Source(13, 15) + SourceIndex(0) +3 >Emitted(18, 20) Source(13, 16) + SourceIndex(0) +4 >Emitted(18, 24) Source(13, 20) + SourceIndex(0) +5 >Emitted(18, 25) Source(13, 21) + SourceIndex(0) +6 >Emitted(18, 33) Source(13, 29) + SourceIndex(0) +7 >Emitted(18, 34) Source(13, 30) + SourceIndex(0) --- >>> }, 1 >^^^^^^^^ @@ -270,8 +270,8 @@ sourceFile:sourceMapValidationClass.ts 1 > > 2 > } -1 >Emitted(19, 9) Source(14, 5) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(19, 10) Source(14, 6) + SourceIndex(0) name (Greeter.greetings) +1 >Emitted(19, 9) Source(14, 5) + SourceIndex(0) +2 >Emitted(19, 10) Source(14, 6) + SourceIndex(0) --- >>> set: function (greetings) { 1->^^^^^^^^^^^^^ @@ -282,9 +282,9 @@ sourceFile:sourceMapValidationClass.ts > 2 > set greetings( 3 > greetings: string -1->Emitted(20, 14) Source(15, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(20, 24) Source(15, 19) + SourceIndex(0) name (Greeter) -3 >Emitted(20, 33) Source(15, 36) + SourceIndex(0) name (Greeter) +1->Emitted(20, 14) Source(15, 5) + SourceIndex(0) +2 >Emitted(20, 24) Source(15, 19) + SourceIndex(0) +3 >Emitted(20, 33) Source(15, 36) + SourceIndex(0) --- >>> this.greeting = greetings; 1->^^^^^^^^^^^^ @@ -302,13 +302,13 @@ sourceFile:sourceMapValidationClass.ts 5 > = 6 > greetings 7 > ; -1->Emitted(21, 13) Source(16, 9) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(21, 17) Source(16, 13) + SourceIndex(0) name (Greeter.greetings) -3 >Emitted(21, 18) Source(16, 14) + SourceIndex(0) name (Greeter.greetings) -4 >Emitted(21, 26) Source(16, 22) + SourceIndex(0) name (Greeter.greetings) -5 >Emitted(21, 29) Source(16, 25) + SourceIndex(0) name (Greeter.greetings) -6 >Emitted(21, 38) Source(16, 34) + SourceIndex(0) name (Greeter.greetings) -7 >Emitted(21, 39) Source(16, 35) + SourceIndex(0) name (Greeter.greetings) +1->Emitted(21, 13) Source(16, 9) + SourceIndex(0) +2 >Emitted(21, 17) Source(16, 13) + SourceIndex(0) +3 >Emitted(21, 18) Source(16, 14) + SourceIndex(0) +4 >Emitted(21, 26) Source(16, 22) + SourceIndex(0) +5 >Emitted(21, 29) Source(16, 25) + SourceIndex(0) +6 >Emitted(21, 38) Source(16, 34) + SourceIndex(0) +7 >Emitted(21, 39) Source(16, 35) + SourceIndex(0) --- >>> }, 1 >^^^^^^^^ @@ -317,8 +317,8 @@ sourceFile:sourceMapValidationClass.ts 1 > > 2 > } -1 >Emitted(22, 9) Source(17, 5) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(22, 10) Source(17, 6) + SourceIndex(0) name (Greeter.greetings) +1 >Emitted(22, 9) Source(17, 5) + SourceIndex(0) +2 >Emitted(22, 10) Source(17, 6) + SourceIndex(0) --- >>> enumerable: true, >>> configurable: true @@ -326,7 +326,7 @@ sourceFile:sourceMapValidationClass.ts 1->^^^^^^^ 2 > ^^^^^^^^^^^^^-> 1-> -1->Emitted(25, 8) Source(14, 6) + SourceIndex(0) name (Greeter) +1->Emitted(25, 8) Source(14, 6) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ @@ -337,8 +337,8 @@ sourceFile:sourceMapValidationClass.ts > } > 2 > } -1->Emitted(26, 5) Source(18, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(26, 19) Source(18, 2) + SourceIndex(0) name (Greeter) +1->Emitted(26, 5) Source(18, 1) + SourceIndex(0) +2 >Emitted(26, 19) Source(18, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -367,8 +367,8 @@ sourceFile:sourceMapValidationClass.ts > this.greeting = greetings; > } > } -1 >Emitted(27, 1) Source(18, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(27, 2) Source(18, 2) + SourceIndex(0) name (Greeter) +1 >Emitted(27, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(27, 2) Source(18, 2) + SourceIndex(0) 3 >Emitted(27, 2) Source(1, 1) + SourceIndex(0) 4 >Emitted(27, 6) Source(18, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.js.map index 07abb96ca91bd..86601e215d5ac 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.js.map +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClassWithDefaultConstructor.js.map] -{"version":3,"file":"sourceMapValidationClassWithDefaultConstructor.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructor.ts"],"names":["Greeter","Greeter.constructor"],"mappings":"AAAA;IAAAA;QACWC,MAACA,GAAGA,EAAEA,CAACA;QACPA,UAAKA,GAAGA,KAAKA,CAACA;IACzBA,CAACA;IAADD,cAACA;AAADA,CAACA,AAHD,IAGC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationClassWithDefaultConstructor.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructor.ts"],"names":[],"mappings":"AAAA;IAAA;QACW,MAAC,GAAG,EAAE,CAAC;QACP,UAAK,GAAG,KAAK,CAAC;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,IAGC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.sourcemap.txt index ede638b64d972..f07dbf92120e2 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.sourcemap.txt @@ -18,7 +18,7 @@ sourceFile:sourceMapValidationClassWithDefaultConstructor.ts 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (Greeter) +1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) --- >>> this.a = 10; 1->^^^^^^^^ @@ -33,11 +33,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructor.ts 3 > = 4 > 10 5 > ; -1->Emitted(3, 9) Source(2, 12) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(3, 15) Source(2, 13) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(3, 18) Source(2, 16) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(3, 20) Source(2, 18) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(3, 21) Source(2, 19) + SourceIndex(0) name (Greeter.constructor) +1->Emitted(3, 9) Source(2, 12) + SourceIndex(0) +2 >Emitted(3, 15) Source(2, 13) + SourceIndex(0) +3 >Emitted(3, 18) Source(2, 16) + SourceIndex(0) +4 >Emitted(3, 20) Source(2, 18) + SourceIndex(0) +5 >Emitted(3, 21) Source(2, 19) + SourceIndex(0) --- >>> this.nameA = "Ten"; 1->^^^^^^^^ @@ -51,11 +51,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructor.ts 3 > = 4 > "Ten" 5 > ; -1->Emitted(4, 9) Source(3, 12) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(4, 19) Source(3, 17) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(4, 22) Source(3, 20) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(4, 27) Source(3, 25) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(4, 28) Source(3, 26) + SourceIndex(0) name (Greeter.constructor) +1->Emitted(4, 9) Source(3, 12) + SourceIndex(0) +2 >Emitted(4, 19) Source(3, 17) + SourceIndex(0) +3 >Emitted(4, 22) Source(3, 20) + SourceIndex(0) +4 >Emitted(4, 27) Source(3, 25) + SourceIndex(0) +5 >Emitted(4, 28) Source(3, 26) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -64,16 +64,16 @@ sourceFile:sourceMapValidationClassWithDefaultConstructor.ts 1 > > 2 > } -1 >Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(6, 19) Source(4, 2) + SourceIndex(0) name (Greeter) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 19) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -88,8 +88,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructor.ts > public a = 10; > public nameA = "Ten"; > } -1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) name (Greeter) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(1, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map index b0325217c7a54..00bdfcdba6071 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map] -{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.ts"],"names":["Greeter","Greeter.constructor"],"mappings":"AAAA;IAAAA;QAAAC,iBAGCA;QAFUA,MAACA,GAAGA,EAAEA,CAACA;QACPA,YAAOA,GAAGA,cAAMA,OAAAA,KAAIA,CAACA,CAACA,EAANA,CAAMA,CAACA;IAClCA,CAACA;IAADD,cAACA;AAADA,CAACA,AAHD,IAGC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.ts"],"names":[],"mappings":"AAAA;IAAA;QAAA,iBAGC;QAFU,MAAC,GAAG,EAAE,CAAC;QACP,YAAO,GAAG,cAAM,OAAA,KAAI,CAAC,CAAC,EAAN,CAAM,CAAC;IAClC,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,IAGC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.sourcemap.txt index 555f1c096c242..fb58003ddcf2b 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.sourcemap.txt @@ -18,7 +18,7 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (Greeter) +1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) --- >>> var _this = this; 1->^^^^^^^^ @@ -28,8 +28,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen > public a = 10; > public returnA = () => this.a; > } -1->Emitted(3, 9) Source(1, 1) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(3, 26) Source(4, 2) + SourceIndex(0) name (Greeter.constructor) +1->Emitted(3, 9) Source(1, 1) + SourceIndex(0) +2 >Emitted(3, 26) Source(4, 2) + SourceIndex(0) --- >>> this.a = 10; 1 >^^^^^^^^ @@ -43,11 +43,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen 3 > = 4 > 10 5 > ; -1 >Emitted(4, 9) Source(2, 12) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(4, 15) Source(2, 13) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(4, 18) Source(2, 16) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(4, 20) Source(2, 18) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(4, 21) Source(2, 19) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(4, 9) Source(2, 12) + SourceIndex(0) +2 >Emitted(4, 15) Source(2, 13) + SourceIndex(0) +3 >Emitted(4, 18) Source(2, 16) + SourceIndex(0) +4 >Emitted(4, 20) Source(2, 18) + SourceIndex(0) +5 >Emitted(4, 21) Source(2, 19) + SourceIndex(0) --- >>> this.returnA = function () { return _this.a; }; 1->^^^^^^^^ @@ -73,17 +73,17 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen 9 > 10> this.a 11> ; -1->Emitted(5, 9) Source(3, 12) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(5, 21) Source(3, 19) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(5, 24) Source(3, 22) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(5, 38) Source(3, 28) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(5, 45) Source(3, 28) + SourceIndex(0) name (Greeter.constructor) -6 >Emitted(5, 50) Source(3, 32) + SourceIndex(0) name (Greeter.constructor) -7 >Emitted(5, 51) Source(3, 33) + SourceIndex(0) name (Greeter.constructor) -8 >Emitted(5, 52) Source(3, 34) + SourceIndex(0) name (Greeter.constructor) -9 >Emitted(5, 54) Source(3, 28) + SourceIndex(0) name (Greeter.constructor) -10>Emitted(5, 55) Source(3, 34) + SourceIndex(0) name (Greeter.constructor) -11>Emitted(5, 56) Source(3, 35) + SourceIndex(0) name (Greeter.constructor) +1->Emitted(5, 9) Source(3, 12) + SourceIndex(0) +2 >Emitted(5, 21) Source(3, 19) + SourceIndex(0) +3 >Emitted(5, 24) Source(3, 22) + SourceIndex(0) +4 >Emitted(5, 38) Source(3, 28) + SourceIndex(0) +5 >Emitted(5, 45) Source(3, 28) + SourceIndex(0) +6 >Emitted(5, 50) Source(3, 32) + SourceIndex(0) +7 >Emitted(5, 51) Source(3, 33) + SourceIndex(0) +8 >Emitted(5, 52) Source(3, 34) + SourceIndex(0) +9 >Emitted(5, 54) Source(3, 28) + SourceIndex(0) +10>Emitted(5, 55) Source(3, 34) + SourceIndex(0) +11>Emitted(5, 56) Source(3, 35) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -92,16 +92,16 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen 1 > > 2 > } -1 >Emitted(6, 5) Source(4, 1) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(7, 19) Source(4, 2) + SourceIndex(0) name (Greeter) +1->Emitted(7, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 19) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -116,8 +116,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen > public a = 10; > public returnA = () => this.a; > } -1 >Emitted(8, 1) Source(4, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(8, 2) Source(4, 2) + SourceIndex(0) name (Greeter) +1 >Emitted(8, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(8, 2) Source(1, 1) + SourceIndex(0) 4 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map index fad366e8ebbf0..cf0a189bef355 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map] -{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":["AbstractGreeter","AbstractGreeter.constructor","Greeter","Greeter.constructor"],"mappings":";;;;;AAAA;IAAAA;IACAC,CAACA;IAADD,sBAACA;AAADA,CAACA,AADD,IACC;AAED;IAAsBE,2BAAeA;IAArCA;QAAsBC,8BAAeA;QAC1BA,MAACA,GAAGA,EAAEA,CAACA;QACPA,UAAKA,GAAGA,KAAKA,CAACA;IACzBA,CAACA;IAADD,cAACA;AAADA,CAACA,AAHD,EAAsB,eAAe,EAGpC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAsB,8BAAe;QAC1B,MAAC,GAAG,EAAE,CAAC;QACP,UAAK,GAAG,KAAK,CAAC;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,EAAsB,eAAe,EAGpC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index aba9861a23039..86bbba306ff61 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -23,7 +23,7 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(7, 5) Source(1, 1) + SourceIndex(0) name (AbstractGreeter) +1->Emitted(7, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -32,16 +32,16 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1->class AbstractGreeter { > 2 > } -1->Emitted(8, 5) Source(2, 1) + SourceIndex(0) name (AbstractGreeter.constructor) -2 >Emitted(8, 6) Source(2, 2) + SourceIndex(0) name (AbstractGreeter.constructor) +1->Emitted(8, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(2, 2) + SourceIndex(0) --- >>> return AbstractGreeter; 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(9, 5) Source(2, 1) + SourceIndex(0) name (AbstractGreeter) -2 >Emitted(9, 27) Source(2, 2) + SourceIndex(0) name (AbstractGreeter) +1->Emitted(9, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(9, 27) Source(2, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -54,8 +54,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > 4 > class AbstractGreeter { > } -1 >Emitted(10, 1) Source(2, 1) + SourceIndex(0) name (AbstractGreeter) -2 >Emitted(10, 2) Source(2, 2) + SourceIndex(0) name (AbstractGreeter) +1 >Emitted(10, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(2, 2) + SourceIndex(0) 3 >Emitted(10, 2) Source(1, 1) + SourceIndex(0) 4 >Emitted(10, 6) Source(2, 2) + SourceIndex(0) --- @@ -72,22 +72,22 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->class Greeter extends 2 > AbstractGreeter -1->Emitted(12, 5) Source(4, 23) + SourceIndex(0) name (Greeter) -2 >Emitted(12, 32) Source(4, 38) + SourceIndex(0) name (Greeter) +1->Emitted(12, 5) Source(4, 23) + SourceIndex(0) +2 >Emitted(12, 32) Source(4, 38) + SourceIndex(0) --- >>> function Greeter() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(13, 5) Source(4, 1) + SourceIndex(0) name (Greeter) +1 >Emitted(13, 5) Source(4, 1) + SourceIndex(0) --- >>> _super.apply(this, arguments); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->class Greeter extends 2 > AbstractGreeter -1->Emitted(14, 9) Source(4, 23) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(14, 39) Source(4, 38) + SourceIndex(0) name (Greeter.constructor) +1->Emitted(14, 9) Source(4, 23) + SourceIndex(0) +2 >Emitted(14, 39) Source(4, 38) + SourceIndex(0) --- >>> this.a = 10; 1 >^^^^^^^^ @@ -102,11 +102,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > = 4 > 10 5 > ; -1 >Emitted(15, 9) Source(5, 12) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(15, 15) Source(5, 13) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(15, 18) Source(5, 16) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(15, 20) Source(5, 18) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(15, 21) Source(5, 19) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(15, 9) Source(5, 12) + SourceIndex(0) +2 >Emitted(15, 15) Source(5, 13) + SourceIndex(0) +3 >Emitted(15, 18) Source(5, 16) + SourceIndex(0) +4 >Emitted(15, 20) Source(5, 18) + SourceIndex(0) +5 >Emitted(15, 21) Source(5, 19) + SourceIndex(0) --- >>> this.nameA = "Ten"; 1->^^^^^^^^ @@ -120,11 +120,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > = 4 > "Ten" 5 > ; -1->Emitted(16, 9) Source(6, 12) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(16, 19) Source(6, 17) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(16, 22) Source(6, 20) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(16, 27) Source(6, 25) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(16, 28) Source(6, 26) + SourceIndex(0) name (Greeter.constructor) +1->Emitted(16, 9) Source(6, 12) + SourceIndex(0) +2 >Emitted(16, 19) Source(6, 17) + SourceIndex(0) +3 >Emitted(16, 22) Source(6, 20) + SourceIndex(0) +4 >Emitted(16, 27) Source(6, 25) + SourceIndex(0) +5 >Emitted(16, 28) Source(6, 26) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -133,8 +133,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1 > > 2 > } -1 >Emitted(17, 5) Source(7, 1) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(17, 6) Source(7, 2) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(17, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(17, 6) Source(7, 2) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ @@ -142,8 +142,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > ^^^-> 1-> 2 > } -1->Emitted(18, 5) Source(7, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(18, 19) Source(7, 2) + SourceIndex(0) name (Greeter) +1->Emitted(18, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(18, 19) Source(7, 2) + SourceIndex(0) --- >>>})(AbstractGreeter); 1-> @@ -162,8 +162,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(19, 1) Source(7, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(19, 2) Source(7, 2) + SourceIndex(0) name (Greeter) +1->Emitted(19, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(19, 2) Source(7, 2) + SourceIndex(0) 3 >Emitted(19, 2) Source(4, 1) + SourceIndex(0) 4 >Emitted(19, 4) Source(4, 23) + SourceIndex(0) 5 >Emitted(19, 19) Source(4, 38) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationClasses.js.map b/tests/baselines/reference/sourceMapValidationClasses.js.map index fcba248ef1a00..08ed68ebca70e 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,IAAAA,GAAGA,CAmCbA;IAnCUA,WAAAA,GAAGA,EAACA,CAACA;QACZC,YAAYA,CAACA;QAEbA;YACIC,iBAAmBA,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,aAAaA,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,cAAcA,QAAgBA;YAAEK,kBAAiBA,mBAAmBA,MAAUA;iBAA9CA,WAA8CA,CAA9CA,sBAA8CA,CAA9CA,IAA8CA;gBAA9CA,cAAiBA,mBAAmBA,yBAAUA;;YAC1EA,IAAIA,QAAQA,GAAcA,EAAEA,CAACA,CAACA,0BAA0BA;YACxDA,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,qCAAqCA;QACrCA,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 +{"version":3,"file":"sourceMapValidationClasses.js","sourceRoot":"","sources":["sourceMapValidationClasses.ts"],"names":[],"mappings":"AAAA,IAAO,GAAG,CAmCT;AAnCD,WAAO,GAAG;IAAC,IAAA,GAAG,CAmCb;IAnCU,WAAA,GAAG,EAAC,CAAC;QACZ,YAAY,CAAC;QAEb;YACI,iBAAmB,QAAgB;gBAAhB,aAAQ,GAAR,QAAQ,CAAQ;YACnC,CAAC;YAED,uBAAK,GAAL;gBACI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YAC5C,CAAC;YACL,cAAC;QAAD,CAAC,AAPD,IAOC;QAGD,aAAa,QAAgB;YACzB,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;QAED,IAAI,OAAO,GAAG,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;QAC3C,IAAI,GAAG,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;QAE1B,cAAc,QAAgB;YAAE,kBAAiB,mBAAmB,MAAU;iBAA9C,WAA8C,CAA9C,sBAA8C,CAA9C,IAA8C;gBAA9C,cAAiB,mBAAmB,yBAAU;;YAC1E,IAAI,QAAQ,GAAc,EAAE,CAAC,CAAC,0BAA0B;YACxD,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;YACpC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC5C,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,CAAC;YAED,MAAM,CAAC,QAAQ,CAAC;QACpB,CAAC;QAED,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QACpC,qCAAqC;QACrC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAChC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;IACL,CAAC,EAnCU,GAAG,GAAH,OAAG,KAAH,OAAG,QAmCb;AAAD,CAAC,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 4eb5e300422b5..bbf9aa3eb2ea3 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt @@ -114,10 +114,10 @@ sourceFile:sourceMapValidationClasses.ts > 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) +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(3, 9) Source(1, 12) + SourceIndex(0) +3 >Emitted(3, 12) Source(1, 15) + SourceIndex(0) +4 >Emitted(3, 13) Source(36, 2) + SourceIndex(0) --- >>> (function (Bar) { 1->^^^^ @@ -131,11 +131,11 @@ sourceFile:sourceMapValidationClasses.ts 3 > Bar 4 > 5 > { -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) +1->Emitted(4, 5) Source(1, 12) + SourceIndex(0) +2 >Emitted(4, 16) Source(1, 12) + SourceIndex(0) +3 >Emitted(4, 19) Source(1, 15) + SourceIndex(0) +4 >Emitted(4, 21) Source(1, 16) + SourceIndex(0) +5 >Emitted(4, 22) Source(1, 17) + SourceIndex(0) --- >>> "use strict"; 1->^^^^^^^^ @@ -146,9 +146,9 @@ sourceFile:sourceMapValidationClasses.ts > 2 > "use strict" 3 > ; -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) +1->Emitted(5, 9) Source(2, 5) + SourceIndex(0) +2 >Emitted(5, 21) Source(2, 17) + SourceIndex(0) +3 >Emitted(5, 22) Source(2, 18) + SourceIndex(0) --- >>> var Greeter = (function () { 1->^^^^^^^^ @@ -156,7 +156,7 @@ sourceFile:sourceMapValidationClasses.ts 1-> > > -1->Emitted(6, 9) Source(4, 5) + SourceIndex(0) name (Foo.Bar) +1->Emitted(6, 9) Source(4, 5) + SourceIndex(0) --- >>> function Greeter(greeting) { 1->^^^^^^^^^^^^ @@ -167,9 +167,9 @@ sourceFile:sourceMapValidationClasses.ts > 2 > constructor(public 3 > greeting: string -1->Emitted(7, 13) Source(5, 9) + SourceIndex(0) name (Foo.Bar.Greeter) -2 >Emitted(7, 30) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter) -3 >Emitted(7, 38) Source(5, 44) + SourceIndex(0) name (Foo.Bar.Greeter) +1->Emitted(7, 13) Source(5, 9) + SourceIndex(0) +2 >Emitted(7, 30) Source(5, 28) + SourceIndex(0) +3 >Emitted(7, 38) Source(5, 44) + SourceIndex(0) --- >>> this.greeting = greeting; 1->^^^^^^^^^^^^^^^^ @@ -182,11 +182,11 @@ sourceFile:sourceMapValidationClasses.ts 3 > 4 > greeting 5 > : string -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->Emitted(8, 17) Source(5, 28) + SourceIndex(0) +2 >Emitted(8, 30) Source(5, 36) + SourceIndex(0) +3 >Emitted(8, 33) Source(5, 28) + SourceIndex(0) +4 >Emitted(8, 41) Source(5, 36) + SourceIndex(0) +5 >Emitted(8, 42) Source(5, 44) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^ @@ -195,8 +195,8 @@ sourceFile:sourceMapValidationClasses.ts 1 >) { > 2 > } -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) +1 >Emitted(9, 13) Source(6, 9) + SourceIndex(0) +2 >Emitted(9, 14) Source(6, 10) + SourceIndex(0) --- >>> Greeter.prototype.greet = function () { 1->^^^^^^^^^^^^ @@ -208,9 +208,9 @@ sourceFile:sourceMapValidationClasses.ts > 2 > greet 3 > -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) +1->Emitted(10, 13) Source(8, 9) + SourceIndex(0) +2 >Emitted(10, 36) Source(8, 14) + SourceIndex(0) +3 >Emitted(10, 39) Source(8, 9) + SourceIndex(0) --- >>> return "

" + this.greeting + "

"; 1->^^^^^^^^^^^^^^^^ @@ -236,17 +236,17 @@ sourceFile:sourceMapValidationClasses.ts 9 > + 10> "" 11> ; -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->Emitted(11, 17) Source(9, 13) + SourceIndex(0) +2 >Emitted(11, 23) Source(9, 19) + SourceIndex(0) +3 >Emitted(11, 24) Source(9, 20) + SourceIndex(0) +4 >Emitted(11, 30) Source(9, 26) + SourceIndex(0) +5 >Emitted(11, 33) Source(9, 29) + SourceIndex(0) +6 >Emitted(11, 37) Source(9, 33) + SourceIndex(0) +7 >Emitted(11, 38) Source(9, 34) + SourceIndex(0) +8 >Emitted(11, 46) Source(9, 42) + SourceIndex(0) +9 >Emitted(11, 49) Source(9, 45) + SourceIndex(0) +10>Emitted(11, 56) Source(9, 52) + SourceIndex(0) +11>Emitted(11, 57) Source(9, 53) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^ @@ -255,8 +255,8 @@ sourceFile:sourceMapValidationClasses.ts 1 > > 2 > } -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) +1 >Emitted(12, 13) Source(10, 9) + SourceIndex(0) +2 >Emitted(12, 14) Source(10, 10) + SourceIndex(0) --- >>> return Greeter; 1->^^^^^^^^^^^^ @@ -264,8 +264,8 @@ sourceFile:sourceMapValidationClasses.ts 1-> > 2 > } -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->Emitted(13, 13) Source(11, 5) + SourceIndex(0) +2 >Emitted(13, 27) Source(11, 6) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^ @@ -284,10 +284,10 @@ sourceFile:sourceMapValidationClasses.ts > return "

" + this.greeting + "

"; > } > } -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) +1 >Emitted(14, 9) Source(11, 5) + SourceIndex(0) +2 >Emitted(14, 10) Source(11, 6) + SourceIndex(0) +3 >Emitted(14, 10) Source(4, 5) + SourceIndex(0) +4 >Emitted(14, 14) Source(11, 6) + SourceIndex(0) --- >>> function foo(greeting) { 1->^^^^^^^^ @@ -300,9 +300,9 @@ sourceFile:sourceMapValidationClasses.ts > 2 > function foo( 3 > greeting: string -1->Emitted(15, 9) Source(14, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(15, 22) Source(14, 18) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(15, 30) Source(14, 34) + SourceIndex(0) name (Foo.Bar) +1->Emitted(15, 9) Source(14, 5) + SourceIndex(0) +2 >Emitted(15, 22) Source(14, 18) + SourceIndex(0) +3 >Emitted(15, 30) Source(14, 34) + SourceIndex(0) --- >>> return new Greeter(greeting); 1->^^^^^^^^^^^^ @@ -324,15 +324,15 @@ sourceFile:sourceMapValidationClasses.ts 7 > greeting 8 > ) 9 > ; -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->Emitted(16, 13) Source(15, 9) + SourceIndex(0) +2 >Emitted(16, 19) Source(15, 15) + SourceIndex(0) +3 >Emitted(16, 20) Source(15, 16) + SourceIndex(0) +4 >Emitted(16, 24) Source(15, 20) + SourceIndex(0) +5 >Emitted(16, 31) Source(15, 27) + SourceIndex(0) +6 >Emitted(16, 32) Source(15, 28) + SourceIndex(0) +7 >Emitted(16, 40) Source(15, 36) + SourceIndex(0) +8 >Emitted(16, 41) Source(15, 37) + SourceIndex(0) +9 >Emitted(16, 42) Source(15, 38) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -341,8 +341,8 @@ sourceFile:sourceMapValidationClasses.ts 1 > > 2 > } -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) +1 >Emitted(17, 9) Source(16, 5) + SourceIndex(0) +2 >Emitted(17, 10) Source(16, 6) + SourceIndex(0) --- >>> var greeter = new Greeter("Hello, world!"); 1->^^^^^^^^ @@ -367,16 +367,16 @@ sourceFile:sourceMapValidationClasses.ts 8 > "Hello, world!" 9 > ) 10> ; -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) +1->Emitted(18, 9) Source(18, 5) + SourceIndex(0) +2 >Emitted(18, 13) Source(18, 9) + SourceIndex(0) +3 >Emitted(18, 20) Source(18, 16) + SourceIndex(0) +4 >Emitted(18, 23) Source(18, 19) + SourceIndex(0) +5 >Emitted(18, 27) Source(18, 23) + SourceIndex(0) +6 >Emitted(18, 34) Source(18, 30) + SourceIndex(0) +7 >Emitted(18, 35) Source(18, 31) + SourceIndex(0) +8 >Emitted(18, 50) Source(18, 46) + SourceIndex(0) +9 >Emitted(18, 51) Source(18, 47) + SourceIndex(0) +10>Emitted(18, 52) Source(18, 48) + SourceIndex(0) --- >>> var str = greeter.greet(); 1 >^^^^^^^^ @@ -398,15 +398,15 @@ sourceFile:sourceMapValidationClasses.ts 7 > greet 8 > () 9 > ; -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) +1 >Emitted(19, 9) Source(19, 5) + SourceIndex(0) +2 >Emitted(19, 13) Source(19, 9) + SourceIndex(0) +3 >Emitted(19, 16) Source(19, 12) + SourceIndex(0) +4 >Emitted(19, 19) Source(19, 15) + SourceIndex(0) +5 >Emitted(19, 26) Source(19, 22) + SourceIndex(0) +6 >Emitted(19, 27) Source(19, 23) + SourceIndex(0) +7 >Emitted(19, 32) Source(19, 28) + SourceIndex(0) +8 >Emitted(19, 34) Source(19, 30) + SourceIndex(0) +9 >Emitted(19, 35) Source(19, 31) + SourceIndex(0) --- >>> function foo2(greeting) { 1 >^^^^^^^^ @@ -418,9 +418,9 @@ sourceFile:sourceMapValidationClasses.ts > 2 > function foo2( 3 > greeting: string -1 >Emitted(20, 9) Source(21, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(20, 23) Source(21, 19) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(20, 31) Source(21, 35) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(20, 9) Source(21, 5) + SourceIndex(0) +2 >Emitted(20, 23) Source(21, 19) + SourceIndex(0) +3 >Emitted(20, 31) Source(21, 35) + SourceIndex(0) --- >>> var restGreetings /* more greeting */ = []; 1->^^^^^^^^^^^^ @@ -432,10 +432,10 @@ sourceFile:sourceMapValidationClasses.ts 2 > ...restGreetings 3 > /* more greeting */ 4 > : string[] -1->Emitted(21, 13) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(21, 31) Source(21, 54) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(21, 50) Source(21, 73) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(21, 56) Source(21, 83) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(21, 13) Source(21, 37) + SourceIndex(0) +2 >Emitted(21, 31) Source(21, 54) + SourceIndex(0) +3 >Emitted(21, 50) Source(21, 73) + SourceIndex(0) +4 >Emitted(21, 56) Source(21, 83) + SourceIndex(0) --- >>> for (var _i = 1; _i < arguments.length; _i++) { 1->^^^^^^^^^^^^^^^^^ @@ -451,12 +451,12 @@ sourceFile:sourceMapValidationClasses.ts 4 > ...restGreetings /* more greeting */: string[] 5 > 6 > ...restGreetings /* more greeting */: string[] -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) +1->Emitted(22, 18) Source(21, 37) + SourceIndex(0) +2 >Emitted(22, 29) Source(21, 83) + SourceIndex(0) +3 >Emitted(22, 30) Source(21, 37) + SourceIndex(0) +4 >Emitted(22, 52) Source(21, 83) + SourceIndex(0) +5 >Emitted(22, 53) Source(21, 37) + SourceIndex(0) +6 >Emitted(22, 57) Source(21, 83) + SourceIndex(0) --- >>> restGreetings /* more greeting */[_i - 1] = arguments[_i]; 1->^^^^^^^^^^^^^^^^ @@ -467,10 +467,10 @@ sourceFile:sourceMapValidationClasses.ts 2 > ...restGreetings 3 > /* more greeting */ 4 > : string[] -1->Emitted(23, 17) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(23, 31) Source(21, 54) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(23, 50) Source(21, 73) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(23, 75) Source(21, 83) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(23, 17) Source(21, 37) + SourceIndex(0) +2 >Emitted(23, 31) Source(21, 54) + SourceIndex(0) +3 >Emitted(23, 50) Source(21, 73) + SourceIndex(0) +4 >Emitted(23, 75) Source(21, 83) + SourceIndex(0) --- >>> } >>> var greeters = []; /* inline block comment */ @@ -491,14 +491,14 @@ sourceFile:sourceMapValidationClasses.ts 6 > ; 7 > 8 > /* inline block comment */ -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) -7 >Emitted(25, 32) Source(22, 39) + SourceIndex(0) name (Foo.Bar.foo2) -8 >Emitted(25, 58) Source(22, 65) + SourceIndex(0) name (Foo.Bar.foo2) +1 >Emitted(25, 13) Source(22, 9) + SourceIndex(0) +2 >Emitted(25, 17) Source(22, 13) + SourceIndex(0) +3 >Emitted(25, 25) Source(22, 21) + SourceIndex(0) +4 >Emitted(25, 28) Source(22, 35) + SourceIndex(0) +5 >Emitted(25, 30) Source(22, 37) + SourceIndex(0) +6 >Emitted(25, 31) Source(22, 38) + SourceIndex(0) +7 >Emitted(25, 32) Source(22, 39) + SourceIndex(0) +8 >Emitted(25, 58) Source(22, 65) + SourceIndex(0) --- >>> greeters[0] = new Greeter(greeting); 1 >^^^^^^^^^^^^ @@ -527,18 +527,18 @@ sourceFile:sourceMapValidationClasses.ts 10> greeting 11> ) 12> ; -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) +1 >Emitted(26, 13) Source(23, 9) + SourceIndex(0) +2 >Emitted(26, 21) Source(23, 17) + SourceIndex(0) +3 >Emitted(26, 22) Source(23, 18) + SourceIndex(0) +4 >Emitted(26, 23) Source(23, 19) + SourceIndex(0) +5 >Emitted(26, 24) Source(23, 20) + SourceIndex(0) +6 >Emitted(26, 27) Source(23, 23) + SourceIndex(0) +7 >Emitted(26, 31) Source(23, 27) + SourceIndex(0) +8 >Emitted(26, 38) Source(23, 34) + SourceIndex(0) +9 >Emitted(26, 39) Source(23, 35) + SourceIndex(0) +10>Emitted(26, 47) Source(23, 43) + SourceIndex(0) +11>Emitted(26, 48) Source(23, 44) + SourceIndex(0) +12>Emitted(26, 49) Source(23, 45) + SourceIndex(0) --- >>> for (var i = 0; i < restGreetings.length; i++) { 1->^^^^^^^^^^^^ @@ -583,26 +583,26 @@ sourceFile:sourceMapValidationClasses.ts 18> ++ 19> ) 20> { -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) +1->Emitted(27, 13) Source(24, 9) + SourceIndex(0) +2 >Emitted(27, 16) Source(24, 12) + SourceIndex(0) +3 >Emitted(27, 17) Source(24, 13) + SourceIndex(0) +4 >Emitted(27, 18) Source(24, 14) + SourceIndex(0) +5 >Emitted(27, 21) Source(24, 17) + SourceIndex(0) +6 >Emitted(27, 22) Source(24, 18) + SourceIndex(0) +7 >Emitted(27, 23) Source(24, 19) + SourceIndex(0) +8 >Emitted(27, 26) Source(24, 22) + SourceIndex(0) +9 >Emitted(27, 27) Source(24, 23) + SourceIndex(0) +10>Emitted(27, 29) Source(24, 25) + SourceIndex(0) +11>Emitted(27, 30) Source(24, 26) + SourceIndex(0) +12>Emitted(27, 33) Source(24, 29) + SourceIndex(0) +13>Emitted(27, 46) Source(24, 42) + SourceIndex(0) +14>Emitted(27, 47) Source(24, 43) + SourceIndex(0) +15>Emitted(27, 53) Source(24, 49) + SourceIndex(0) +16>Emitted(27, 55) Source(24, 51) + SourceIndex(0) +17>Emitted(27, 56) Source(24, 52) + SourceIndex(0) +18>Emitted(27, 58) Source(24, 54) + SourceIndex(0) +19>Emitted(27, 60) Source(24, 56) + SourceIndex(0) +20>Emitted(27, 61) Source(24, 57) + SourceIndex(0) --- >>> greeters.push(new Greeter(restGreetings[i])); 1->^^^^^^^^^^^^^^^^ @@ -636,21 +636,21 @@ sourceFile:sourceMapValidationClasses.ts 13> ) 14> ) 15> ; -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->Emitted(28, 17) Source(25, 13) + SourceIndex(0) +2 >Emitted(28, 25) Source(25, 21) + SourceIndex(0) +3 >Emitted(28, 26) Source(25, 22) + SourceIndex(0) +4 >Emitted(28, 30) Source(25, 26) + SourceIndex(0) +5 >Emitted(28, 31) Source(25, 27) + SourceIndex(0) +6 >Emitted(28, 35) Source(25, 31) + SourceIndex(0) +7 >Emitted(28, 42) Source(25, 38) + SourceIndex(0) +8 >Emitted(28, 43) Source(25, 39) + SourceIndex(0) +9 >Emitted(28, 56) Source(25, 52) + SourceIndex(0) +10>Emitted(28, 57) Source(25, 53) + SourceIndex(0) +11>Emitted(28, 58) Source(25, 54) + SourceIndex(0) +12>Emitted(28, 59) Source(25, 55) + SourceIndex(0) +13>Emitted(28, 60) Source(25, 56) + SourceIndex(0) +14>Emitted(28, 61) Source(25, 57) + SourceIndex(0) +15>Emitted(28, 62) Source(25, 58) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^ @@ -659,8 +659,8 @@ sourceFile:sourceMapValidationClasses.ts 1 > > 2 > } -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) +1 >Emitted(29, 13) Source(26, 9) + SourceIndex(0) +2 >Emitted(29, 14) Source(26, 10) + SourceIndex(0) --- >>> return greeters; 1->^^^^^^^^^^^^ @@ -675,11 +675,11 @@ sourceFile:sourceMapValidationClasses.ts 3 > 4 > greeters 5 > ; -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->Emitted(30, 13) Source(28, 9) + SourceIndex(0) +2 >Emitted(30, 19) Source(28, 15) + SourceIndex(0) +3 >Emitted(30, 20) Source(28, 16) + SourceIndex(0) +4 >Emitted(30, 28) Source(28, 24) + SourceIndex(0) +5 >Emitted(30, 29) Source(28, 25) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -688,8 +688,8 @@ sourceFile:sourceMapValidationClasses.ts 1 > > 2 > } -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) +1 >Emitted(31, 9) Source(29, 5) + SourceIndex(0) +2 >Emitted(31, 10) Source(29, 6) + SourceIndex(0) --- >>> var b = foo2("Hello", "World", "!"); 1->^^^^^^^^ @@ -721,19 +721,19 @@ sourceFile:sourceMapValidationClasses.ts 11> "!" 12> ) 13> ; -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) +1->Emitted(32, 9) Source(31, 5) + SourceIndex(0) +2 >Emitted(32, 13) Source(31, 9) + SourceIndex(0) +3 >Emitted(32, 14) Source(31, 10) + SourceIndex(0) +4 >Emitted(32, 17) Source(31, 13) + SourceIndex(0) +5 >Emitted(32, 21) Source(31, 17) + SourceIndex(0) +6 >Emitted(32, 22) Source(31, 18) + SourceIndex(0) +7 >Emitted(32, 29) Source(31, 25) + SourceIndex(0) +8 >Emitted(32, 31) Source(31, 27) + SourceIndex(0) +9 >Emitted(32, 38) Source(31, 34) + SourceIndex(0) +10>Emitted(32, 40) Source(31, 36) + SourceIndex(0) +11>Emitted(32, 43) Source(31, 39) + SourceIndex(0) +12>Emitted(32, 44) Source(31, 40) + SourceIndex(0) +13>Emitted(32, 45) Source(31, 41) + SourceIndex(0) --- >>> // This is simple signle line comment 1->^^^^^^^^ @@ -741,8 +741,8 @@ sourceFile:sourceMapValidationClasses.ts 1-> > 2 > // This is simple signle line comment -1->Emitted(33, 9) Source(32, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(33, 46) Source(32, 42) + SourceIndex(0) name (Foo.Bar) +1->Emitted(33, 9) Source(32, 5) + SourceIndex(0) +2 >Emitted(33, 46) Source(32, 42) + SourceIndex(0) --- >>> for (var j = 0; j < b.length; j++) { 1 >^^^^^^^^ @@ -786,26 +786,26 @@ sourceFile:sourceMapValidationClasses.ts 18> ++ 19> ) 20> { -1 >Emitted(34, 9) Source(33, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(34, 12) Source(33, 8) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(34, 13) Source(33, 9) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(34, 14) Source(33, 10) + 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, 19) Source(33, 15) + SourceIndex(0) name (Foo.Bar) -8 >Emitted(34, 22) Source(33, 18) + SourceIndex(0) name (Foo.Bar) -9 >Emitted(34, 23) Source(33, 19) + SourceIndex(0) name (Foo.Bar) -10>Emitted(34, 25) Source(33, 21) + SourceIndex(0) name (Foo.Bar) -11>Emitted(34, 26) Source(33, 22) + SourceIndex(0) name (Foo.Bar) -12>Emitted(34, 29) Source(33, 25) + SourceIndex(0) name (Foo.Bar) -13>Emitted(34, 30) Source(33, 26) + SourceIndex(0) name (Foo.Bar) -14>Emitted(34, 31) Source(33, 27) + SourceIndex(0) name (Foo.Bar) -15>Emitted(34, 37) Source(33, 33) + SourceIndex(0) name (Foo.Bar) -16>Emitted(34, 39) Source(33, 35) + SourceIndex(0) name (Foo.Bar) -17>Emitted(34, 40) Source(33, 36) + SourceIndex(0) name (Foo.Bar) -18>Emitted(34, 42) Source(33, 38) + SourceIndex(0) name (Foo.Bar) -19>Emitted(34, 44) Source(33, 40) + SourceIndex(0) name (Foo.Bar) -20>Emitted(34, 45) Source(33, 41) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(34, 9) Source(33, 5) + SourceIndex(0) +2 >Emitted(34, 12) Source(33, 8) + SourceIndex(0) +3 >Emitted(34, 13) Source(33, 9) + SourceIndex(0) +4 >Emitted(34, 14) Source(33, 10) + SourceIndex(0) +5 >Emitted(34, 17) Source(33, 13) + SourceIndex(0) +6 >Emitted(34, 18) Source(33, 14) + SourceIndex(0) +7 >Emitted(34, 19) Source(33, 15) + SourceIndex(0) +8 >Emitted(34, 22) Source(33, 18) + SourceIndex(0) +9 >Emitted(34, 23) Source(33, 19) + SourceIndex(0) +10>Emitted(34, 25) Source(33, 21) + SourceIndex(0) +11>Emitted(34, 26) Source(33, 22) + SourceIndex(0) +12>Emitted(34, 29) Source(33, 25) + SourceIndex(0) +13>Emitted(34, 30) Source(33, 26) + SourceIndex(0) +14>Emitted(34, 31) Source(33, 27) + SourceIndex(0) +15>Emitted(34, 37) Source(33, 33) + SourceIndex(0) +16>Emitted(34, 39) Source(33, 35) + SourceIndex(0) +17>Emitted(34, 40) Source(33, 36) + SourceIndex(0) +18>Emitted(34, 42) Source(33, 38) + SourceIndex(0) +19>Emitted(34, 44) Source(33, 40) + SourceIndex(0) +20>Emitted(34, 45) Source(33, 41) + SourceIndex(0) --- >>> b[j].greet(); 1 >^^^^^^^^^^^^ @@ -827,15 +827,15 @@ sourceFile:sourceMapValidationClasses.ts 7 > greet 8 > () 9 > ; -1 >Emitted(35, 13) Source(34, 9) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(35, 14) Source(34, 10) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(35, 15) Source(34, 11) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(35, 16) Source(34, 12) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(35, 17) Source(34, 13) + SourceIndex(0) name (Foo.Bar) -6 >Emitted(35, 18) Source(34, 14) + SourceIndex(0) name (Foo.Bar) -7 >Emitted(35, 23) Source(34, 19) + SourceIndex(0) name (Foo.Bar) -8 >Emitted(35, 25) Source(34, 21) + SourceIndex(0) name (Foo.Bar) -9 >Emitted(35, 26) Source(34, 22) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(35, 13) Source(34, 9) + SourceIndex(0) +2 >Emitted(35, 14) Source(34, 10) + SourceIndex(0) +3 >Emitted(35, 15) Source(34, 11) + SourceIndex(0) +4 >Emitted(35, 16) Source(34, 12) + SourceIndex(0) +5 >Emitted(35, 17) Source(34, 13) + SourceIndex(0) +6 >Emitted(35, 18) Source(34, 14) + SourceIndex(0) +7 >Emitted(35, 23) Source(34, 19) + SourceIndex(0) +8 >Emitted(35, 25) Source(34, 21) + SourceIndex(0) +9 >Emitted(35, 26) Source(34, 22) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -844,8 +844,8 @@ sourceFile:sourceMapValidationClasses.ts 1 > > 2 > } -1 >Emitted(36, 9) Source(35, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(36, 10) Source(35, 6) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(36, 9) Source(35, 5) + SourceIndex(0) +2 >Emitted(36, 10) Source(35, 6) + SourceIndex(0) --- >>> })(Bar = Foo.Bar || (Foo.Bar = {})); 1->^^^^ @@ -902,15 +902,15 @@ sourceFile:sourceMapValidationClasses.ts > b[j].greet(); > } > } -1->Emitted(37, 5) Source(36, 1) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(37, 6) Source(36, 2) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(37, 8) Source(1, 12) + SourceIndex(0) name (Foo) -4 >Emitted(37, 11) Source(1, 15) + SourceIndex(0) name (Foo) -5 >Emitted(37, 14) Source(1, 12) + SourceIndex(0) name (Foo) -6 >Emitted(37, 21) Source(1, 15) + SourceIndex(0) name (Foo) -7 >Emitted(37, 26) Source(1, 12) + SourceIndex(0) name (Foo) -8 >Emitted(37, 33) Source(1, 15) + SourceIndex(0) name (Foo) -9 >Emitted(37, 41) Source(36, 2) + SourceIndex(0) name (Foo) +1->Emitted(37, 5) Source(36, 1) + SourceIndex(0) +2 >Emitted(37, 6) Source(36, 2) + SourceIndex(0) +3 >Emitted(37, 8) Source(1, 12) + SourceIndex(0) +4 >Emitted(37, 11) Source(1, 15) + SourceIndex(0) +5 >Emitted(37, 14) Source(1, 12) + SourceIndex(0) +6 >Emitted(37, 21) Source(1, 15) + SourceIndex(0) +7 >Emitted(37, 26) Source(1, 12) + SourceIndex(0) +8 >Emitted(37, 33) Source(1, 15) + SourceIndex(0) +9 >Emitted(37, 41) Source(36, 2) + SourceIndex(0) --- >>>})(Foo || (Foo = {})); 1 > @@ -963,8 +963,8 @@ sourceFile:sourceMapValidationClasses.ts > b[j].greet(); > } > } -1 >Emitted(38, 1) Source(36, 1) + SourceIndex(0) name (Foo) -2 >Emitted(38, 2) Source(36, 2) + SourceIndex(0) name (Foo) +1 >Emitted(38, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(36, 2) + SourceIndex(0) 3 >Emitted(38, 4) Source(1, 8) + SourceIndex(0) 4 >Emitted(38, 7) Source(1, 11) + SourceIndex(0) 5 >Emitted(38, 12) Source(1, 8) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js.map b/tests/baselines/reference/sourceMapValidationDecorators.js.map index 4a8b3258659e0..0a6b45eb383d3 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js.map +++ b/tests/baselines/reference/sourceMapValidationDecorators.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDecorators.js.map] -{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":["Greeter","Greeter.constructor","Greeter.greet","Greeter.fn","Greeter.greetings"],"mappings":";;;;;;;;;AAOA;IAGIA,iBAGSA,QAAgBA;QAEvBC,WAEcA;aAFdA,WAEcA,CAFdA,sBAEcA,CAFdA,IAEcA;YAFdA,0BAEcA;;QAJPA,aAAQA,GAARA,QAAQA,CAAQA;IAKzBA,CAACA;IAIDD,uBAAKA,GAFLA;QAGIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;IAC5CA,CAACA;IAUOF,oBAAEA,GAAVA,UAGEA,CAASA;QACPG,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;IACzBA,CAACA;IAEDH,sBAEIA,8BAASA;aAFbA;YAGII,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;QACzBA,CAACA;aAEDJ,UAGEA,SAAiBA;YACfI,IAAIA,CAACA,QAAQA,GAAGA,SAASA,CAACA;QAC9BA,CAACA;;;OAPAJ;IAbcA,UAAEA,GAAWA,EAAEA,CAACA;IAZ/BA;QAACA,kBAAkBA;QAClBA,kBAAkBA,CAACA,EAAEA,CAACA;OACvBA,0BAAKA,QAEJA;IAEDA;QAACA,kBAAkBA;QAClBA,kBAAkBA,CAACA,EAAEA,CAACA;OACfA,sBAACA,UAASA;IAMlBA;QACEA,WAACA,mBAAmBA,CAAAA;QACpBA,WAACA,mBAAmBA,CAACA,EAAEA,CAACA,CAAAA;OAFlBA,uBAAEA,QAKTA;IAEDA;QAACA,kBAAkBA;QAClBA,kBAAkBA,CAACA,EAAEA,CAACA;QAMrBA,WAACA,mBAAmBA,CAAAA;QACpBA,WAACA,mBAAmBA,CAACA,EAAEA,CAACA,CAAAA;OANtBA,8BAASA,QAEZA;IAfDA;QAACA,kBAAkBA;QAClBA,kBAAkBA,CAACA,EAAEA,CAACA;OACRA,aAAEA,UAAcA;IAzBnCA;QAACA,eAAeA;QACfA,eAAeA,CAACA,EAAEA,CAACA;QAGdA,WAACA,mBAAmBA,CAAAA;QACpBA,WAACA,mBAAmBA,CAACA,EAAEA,CAACA,CAAAA;QAGxBA,WAACA,mBAAmBA,CAAAA;QACpBA,WAACA,mBAAmBA,CAACA,EAAEA,CAACA,CAAAA;gBAqC7BA;IAADA,cAACA;AAADA,CAACA,AA9CD,IA8CC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":[],"mappings":";;;;;;;;;AASA;IACI,iBAGS,QAAgB;QAIvB,WAAc;aAAd,WAAc,CAAd,sBAAc,CAAd,IAAc;YAAd,0BAAc;;QAJP,aAAQ,GAAR,QAAQ,CAAQ;IAKzB,CAAC;IAID,uBAAK,GAAL;QACI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5C,CAAC;IAUO,oBAAE,GAAV,UAGE,CAAS;QACP,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAID,sBAAI,8BAAS;aAAb;YACI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aAED,UAGE,SAAiB;YACf,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;;;OAPA;IAbc,UAAE,GAAW,EAAE,CAAC;IAZ/B;QAAC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;wCAAA;IAKvB;QAAC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;sCAAA;IAQrB;mBAAC,mBAAmB;mBACnB,mBAAmB,CAAC,EAAE,CAAC;qCAAA;IAK1B;QAAC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;mBAMpB,mBAAmB;mBACnB,mBAAmB,CAAC,EAAE,CAAC;4CAPH;IAZvB;QAAC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;6BAAA;IAxB3B;QAAC,eAAe;QACf,eAAe,CAAC,EAAE,CAAC;mBAGb,mBAAmB;mBACnB,mBAAmB,CAAC,EAAE,CAAC;mBAGvB,mBAAmB;mBACnB,mBAAmB,CAAC,EAAE,CAAC;eARV;IA6CpB,cAAC;AAAD,CAAC,AA5CD,IA4CC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt index d9c8d0cc976f0..418fee1f87f9f 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt @@ -27,25 +27,25 @@ sourceFile:sourceMapValidationDecorators.ts >declare function ParameterDecorator1(target: Object, key: string | symbol, paramIndex: number): void; >declare function ParameterDecorator2(x: number): (target: Object, key: string | symbol, paramIndex: number) => void; > + >@ClassDecorator1 + >@ClassDecorator2(10) > -1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(10, 1) + SourceIndex(0) --- >>> function Greeter(greeting) { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^ -1->@ClassDecorator1 - >@ClassDecorator2(10) - >class Greeter { +1->class Greeter { > 2 > constructor( > @ParameterDecorator1 > @ParameterDecorator2(20) > public 3 > greeting: string -1->Emitted(11, 5) Source(11, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(11, 22) Source(14, 14) + SourceIndex(0) name (Greeter) -3 >Emitted(11, 30) Source(14, 30) + SourceIndex(0) name (Greeter) +1->Emitted(11, 5) Source(11, 5) + SourceIndex(0) +2 >Emitted(11, 22) Source(14, 14) + SourceIndex(0) +3 >Emitted(11, 30) Source(14, 30) + SourceIndex(0) --- >>> var b = []; 1 >^^^^^^^^ @@ -53,12 +53,12 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >, > + > @ParameterDecorator1 + > @ParameterDecorator2(30) > -2 > @ParameterDecorator1 - > @ParameterDecorator2(30) - > ...b: string[] -1 >Emitted(12, 9) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(12, 20) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +2 > ...b: string[] +1 >Emitted(12, 9) Source(18, 7) + SourceIndex(0) +2 >Emitted(12, 20) Source(18, 21) + SourceIndex(0) --- >>> for (var _i = 1; _i < arguments.length; _i++) { 1->^^^^^^^^^^^^^ @@ -68,33 +68,25 @@ sourceFile:sourceMapValidationDecorators.ts 5 > ^ 6 > ^^^^ 1-> -2 > @ParameterDecorator1 - > @ParameterDecorator2(30) - > ...b: string[] +2 > ...b: string[] 3 > -4 > @ParameterDecorator1 - > @ParameterDecorator2(30) - > ...b: string[] +4 > ...b: string[] 5 > -6 > @ParameterDecorator1 - > @ParameterDecorator2(30) - > ...b: string[] -1->Emitted(13, 14) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(13, 25) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(13, 26) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(13, 48) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(13, 49) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -6 >Emitted(13, 53) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +6 > ...b: string[] +1->Emitted(13, 14) Source(18, 7) + SourceIndex(0) +2 >Emitted(13, 25) Source(18, 21) + SourceIndex(0) +3 >Emitted(13, 26) Source(18, 7) + SourceIndex(0) +4 >Emitted(13, 48) Source(18, 21) + SourceIndex(0) +5 >Emitted(13, 49) Source(18, 7) + SourceIndex(0) +6 >Emitted(13, 53) Source(18, 21) + SourceIndex(0) --- >>> b[_i - 1] = arguments[_i]; 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > @ParameterDecorator1 - > @ParameterDecorator2(30) - > ...b: string[] -1 >Emitted(14, 13) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(14, 39) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +2 > ...b: string[] +1 >Emitted(14, 13) Source(18, 7) + SourceIndex(0) +2 >Emitted(14, 39) Source(18, 21) + SourceIndex(0) --- >>> } >>> this.greeting = greeting; @@ -108,11 +100,11 @@ sourceFile:sourceMapValidationDecorators.ts 3 > 4 > greeting 5 > : string -1 >Emitted(16, 9) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(16, 22) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(16, 25) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(16, 33) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(16, 34) Source(14, 30) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(16, 9) Source(14, 14) + SourceIndex(0) +2 >Emitted(16, 22) Source(14, 22) + SourceIndex(0) +3 >Emitted(16, 25) Source(14, 14) + SourceIndex(0) +4 >Emitted(16, 33) Source(14, 22) + SourceIndex(0) +5 >Emitted(16, 34) Source(14, 30) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -125,8 +117,8 @@ sourceFile:sourceMapValidationDecorators.ts > ...b: string[]) { > 2 > } -1 >Emitted(17, 5) Source(19, 5) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(17, 6) Source(19, 6) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(17, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(17, 6) Source(19, 6) + SourceIndex(0) --- >>> Greeter.prototype.greet = function () { 1->^^^^ @@ -140,9 +132,9 @@ sourceFile:sourceMapValidationDecorators.ts > 2 > greet 3 > -1->Emitted(18, 5) Source(23, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(18, 28) Source(23, 10) + SourceIndex(0) name (Greeter) -3 >Emitted(18, 31) Source(21, 5) + SourceIndex(0) name (Greeter) +1->Emitted(18, 5) Source(23, 5) + SourceIndex(0) +2 >Emitted(18, 28) Source(23, 10) + SourceIndex(0) +3 >Emitted(18, 31) Source(23, 5) + SourceIndex(0) --- >>> return "

" + this.greeting + "

"; 1->^^^^^^^^ @@ -156,9 +148,7 @@ sourceFile:sourceMapValidationDecorators.ts 9 > ^^^ 10> ^^^^^^^ 11> ^ -1->@PropertyDecorator1 - > @PropertyDecorator2(40) - > greet() { +1->greet() { > 2 > return 3 > @@ -170,17 +160,17 @@ sourceFile:sourceMapValidationDecorators.ts 9 > + 10> "" 11> ; -1->Emitted(19, 9) Source(24, 9) + SourceIndex(0) name (Greeter.greet) -2 >Emitted(19, 15) Source(24, 15) + SourceIndex(0) name (Greeter.greet) -3 >Emitted(19, 16) Source(24, 16) + SourceIndex(0) name (Greeter.greet) -4 >Emitted(19, 22) Source(24, 22) + SourceIndex(0) name (Greeter.greet) -5 >Emitted(19, 25) Source(24, 25) + SourceIndex(0) name (Greeter.greet) -6 >Emitted(19, 29) Source(24, 29) + SourceIndex(0) name (Greeter.greet) -7 >Emitted(19, 30) Source(24, 30) + SourceIndex(0) name (Greeter.greet) -8 >Emitted(19, 38) Source(24, 38) + SourceIndex(0) name (Greeter.greet) -9 >Emitted(19, 41) Source(24, 41) + SourceIndex(0) name (Greeter.greet) -10>Emitted(19, 48) Source(24, 48) + SourceIndex(0) name (Greeter.greet) -11>Emitted(19, 49) Source(24, 49) + SourceIndex(0) name (Greeter.greet) +1->Emitted(19, 9) Source(24, 9) + SourceIndex(0) +2 >Emitted(19, 15) Source(24, 15) + SourceIndex(0) +3 >Emitted(19, 16) Source(24, 16) + SourceIndex(0) +4 >Emitted(19, 22) Source(24, 22) + SourceIndex(0) +5 >Emitted(19, 25) Source(24, 25) + SourceIndex(0) +6 >Emitted(19, 29) Source(24, 29) + SourceIndex(0) +7 >Emitted(19, 30) Source(24, 30) + SourceIndex(0) +8 >Emitted(19, 38) Source(24, 38) + SourceIndex(0) +9 >Emitted(19, 41) Source(24, 41) + SourceIndex(0) +10>Emitted(19, 48) Source(24, 48) + SourceIndex(0) +11>Emitted(19, 49) Source(24, 49) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -189,8 +179,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(20, 5) Source(25, 5) + SourceIndex(0) name (Greeter.greet) -2 >Emitted(20, 6) Source(25, 6) + SourceIndex(0) name (Greeter.greet) +1 >Emitted(20, 5) Source(25, 5) + SourceIndex(0) +2 >Emitted(20, 6) Source(25, 6) + SourceIndex(0) --- >>> Greeter.prototype.fn = function (x) { 1->^^^^ @@ -216,11 +206,11 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(70) > 5 > x: number -1->Emitted(21, 5) Source(35, 13) + SourceIndex(0) name (Greeter) -2 >Emitted(21, 25) Source(35, 15) + SourceIndex(0) name (Greeter) -3 >Emitted(21, 28) Source(35, 5) + SourceIndex(0) name (Greeter) -4 >Emitted(21, 38) Source(38, 7) + SourceIndex(0) name (Greeter) -5 >Emitted(21, 39) Source(38, 16) + SourceIndex(0) name (Greeter) +1->Emitted(21, 5) Source(35, 13) + SourceIndex(0) +2 >Emitted(21, 25) Source(35, 15) + SourceIndex(0) +3 >Emitted(21, 28) Source(35, 5) + SourceIndex(0) +4 >Emitted(21, 38) Source(38, 7) + SourceIndex(0) +5 >Emitted(21, 39) Source(38, 16) + SourceIndex(0) --- >>> return this.greeting; 1 >^^^^^^^^ @@ -238,13 +228,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > . 6 > greeting 7 > ; -1 >Emitted(22, 9) Source(39, 9) + SourceIndex(0) name (Greeter.fn) -2 >Emitted(22, 15) Source(39, 15) + SourceIndex(0) name (Greeter.fn) -3 >Emitted(22, 16) Source(39, 16) + SourceIndex(0) name (Greeter.fn) -4 >Emitted(22, 20) Source(39, 20) + SourceIndex(0) name (Greeter.fn) -5 >Emitted(22, 21) Source(39, 21) + SourceIndex(0) name (Greeter.fn) -6 >Emitted(22, 29) Source(39, 29) + SourceIndex(0) name (Greeter.fn) -7 >Emitted(22, 30) Source(39, 30) + SourceIndex(0) name (Greeter.fn) +1 >Emitted(22, 9) Source(39, 9) + SourceIndex(0) +2 >Emitted(22, 15) Source(39, 15) + SourceIndex(0) +3 >Emitted(22, 16) Source(39, 16) + SourceIndex(0) +4 >Emitted(22, 20) Source(39, 20) + SourceIndex(0) +5 >Emitted(22, 21) Source(39, 21) + SourceIndex(0) +6 >Emitted(22, 29) Source(39, 29) + SourceIndex(0) +7 >Emitted(22, 30) Source(39, 30) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -253,8 +243,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(23, 5) Source(40, 5) + SourceIndex(0) name (Greeter.fn) -2 >Emitted(23, 6) Source(40, 6) + SourceIndex(0) name (Greeter.fn) +1 >Emitted(23, 5) Source(40, 5) + SourceIndex(0) +2 >Emitted(23, 6) Source(40, 6) + SourceIndex(0) --- >>> Object.defineProperty(Greeter.prototype, "greetings", { 1->^^^^ @@ -262,20 +252,20 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> > + > @PropertyDecorator1 + > @PropertyDecorator2(80) > -2 > @PropertyDecorator1 - > @PropertyDecorator2(80) - > get +2 > get 3 > greetings -1->Emitted(24, 5) Source(42, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(24, 27) Source(44, 9) + SourceIndex(0) name (Greeter) -3 >Emitted(24, 57) Source(44, 18) + SourceIndex(0) name (Greeter) +1->Emitted(24, 5) Source(44, 5) + SourceIndex(0) +2 >Emitted(24, 27) Source(44, 9) + SourceIndex(0) +3 >Emitted(24, 57) Source(44, 18) + SourceIndex(0) --- >>> get: function () { 1 >^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(25, 14) Source(42, 5) + SourceIndex(0) name (Greeter) +1 >Emitted(25, 14) Source(44, 5) + SourceIndex(0) --- >>> return this.greeting; 1->^^^^^^^^^^^^ @@ -285,9 +275,7 @@ sourceFile:sourceMapValidationDecorators.ts 5 > ^ 6 > ^^^^^^^^ 7 > ^ -1->@PropertyDecorator1 - > @PropertyDecorator2(80) - > get greetings() { +1->get greetings() { > 2 > return 3 > @@ -295,13 +283,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > . 6 > greeting 7 > ; -1->Emitted(26, 13) Source(45, 9) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(26, 19) Source(45, 15) + SourceIndex(0) name (Greeter.greetings) -3 >Emitted(26, 20) Source(45, 16) + SourceIndex(0) name (Greeter.greetings) -4 >Emitted(26, 24) Source(45, 20) + SourceIndex(0) name (Greeter.greetings) -5 >Emitted(26, 25) Source(45, 21) + SourceIndex(0) name (Greeter.greetings) -6 >Emitted(26, 33) Source(45, 29) + SourceIndex(0) name (Greeter.greetings) -7 >Emitted(26, 34) Source(45, 30) + SourceIndex(0) name (Greeter.greetings) +1->Emitted(26, 13) Source(45, 9) + SourceIndex(0) +2 >Emitted(26, 19) Source(45, 15) + SourceIndex(0) +3 >Emitted(26, 20) Source(45, 16) + SourceIndex(0) +4 >Emitted(26, 24) Source(45, 20) + SourceIndex(0) +5 >Emitted(26, 25) Source(45, 21) + SourceIndex(0) +6 >Emitted(26, 33) Source(45, 29) + SourceIndex(0) +7 >Emitted(26, 34) Source(45, 30) + SourceIndex(0) --- >>> }, 1 >^^^^^^^^ @@ -310,8 +298,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(27, 9) Source(46, 5) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(27, 10) Source(46, 6) + SourceIndex(0) name (Greeter.greetings) +1 >Emitted(27, 9) Source(46, 5) + SourceIndex(0) +2 >Emitted(27, 10) Source(46, 6) + SourceIndex(0) --- >>> set: function (greetings) { 1->^^^^^^^^^^^^^ @@ -326,9 +314,9 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(90) > 3 > greetings: string -1->Emitted(28, 14) Source(48, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(28, 24) Source(51, 7) + SourceIndex(0) name (Greeter) -3 >Emitted(28, 33) Source(51, 24) + SourceIndex(0) name (Greeter) +1->Emitted(28, 14) Source(48, 5) + SourceIndex(0) +2 >Emitted(28, 24) Source(51, 7) + SourceIndex(0) +3 >Emitted(28, 33) Source(51, 24) + SourceIndex(0) --- >>> this.greeting = greetings; 1->^^^^^^^^^^^^ @@ -346,13 +334,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > = 6 > greetings 7 > ; -1->Emitted(29, 13) Source(52, 9) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(29, 17) Source(52, 13) + SourceIndex(0) name (Greeter.greetings) -3 >Emitted(29, 18) Source(52, 14) + SourceIndex(0) name (Greeter.greetings) -4 >Emitted(29, 26) Source(52, 22) + SourceIndex(0) name (Greeter.greetings) -5 >Emitted(29, 29) Source(52, 25) + SourceIndex(0) name (Greeter.greetings) -6 >Emitted(29, 38) Source(52, 34) + SourceIndex(0) name (Greeter.greetings) -7 >Emitted(29, 39) Source(52, 35) + SourceIndex(0) name (Greeter.greetings) +1->Emitted(29, 13) Source(52, 9) + SourceIndex(0) +2 >Emitted(29, 17) Source(52, 13) + SourceIndex(0) +3 >Emitted(29, 18) Source(52, 14) + SourceIndex(0) +4 >Emitted(29, 26) Source(52, 22) + SourceIndex(0) +5 >Emitted(29, 29) Source(52, 25) + SourceIndex(0) +6 >Emitted(29, 38) Source(52, 34) + SourceIndex(0) +7 >Emitted(29, 39) Source(52, 35) + SourceIndex(0) --- >>> }, 1 >^^^^^^^^ @@ -361,8 +349,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(30, 9) Source(53, 5) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(30, 10) Source(53, 6) + SourceIndex(0) name (Greeter.greetings) +1 >Emitted(30, 9) Source(53, 5) + SourceIndex(0) +2 >Emitted(30, 10) Source(53, 6) + SourceIndex(0) --- >>> enumerable: true, >>> configurable: true @@ -370,7 +358,7 @@ sourceFile:sourceMapValidationDecorators.ts 1->^^^^^^^ 2 > ^^^^^^^^^^^^^^-> 1-> -1->Emitted(33, 8) Source(46, 6) + SourceIndex(0) name (Greeter) +1->Emitted(33, 8) Source(46, 6) + SourceIndex(0) --- >>> Greeter.x1 = 10; 1->^^^^ @@ -383,17 +371,17 @@ sourceFile:sourceMapValidationDecorators.ts 3 > : number = 4 > 10 5 > ; -1->Emitted(34, 5) Source(33, 20) + SourceIndex(0) name (Greeter) -2 >Emitted(34, 15) Source(33, 22) + SourceIndex(0) name (Greeter) -3 >Emitted(34, 18) Source(33, 33) + SourceIndex(0) name (Greeter) -4 >Emitted(34, 20) Source(33, 35) + SourceIndex(0) name (Greeter) -5 >Emitted(34, 21) Source(33, 36) + SourceIndex(0) name (Greeter) +1->Emitted(34, 5) Source(33, 20) + SourceIndex(0) +2 >Emitted(34, 15) Source(33, 22) + SourceIndex(0) +3 >Emitted(34, 18) Source(33, 33) + SourceIndex(0) +4 >Emitted(34, 20) Source(33, 35) + SourceIndex(0) +5 >Emitted(34, 21) Source(33, 36) + SourceIndex(0) --- >>> __decorate([ 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(35, 5) Source(21, 5) + SourceIndex(0) name (Greeter) +1 >Emitted(35, 5) Source(21, 5) + SourceIndex(0) --- >>> PropertyDecorator1, 1->^^^^^^^^ @@ -401,8 +389,8 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^-> 1->@ 2 > PropertyDecorator1 -1->Emitted(36, 9) Source(21, 6) + SourceIndex(0) name (Greeter) -2 >Emitted(36, 27) Source(21, 24) + SourceIndex(0) name (Greeter) +1->Emitted(36, 9) Source(21, 6) + SourceIndex(0) +2 >Emitted(36, 27) Source(21, 24) + SourceIndex(0) --- >>> PropertyDecorator2(40) 1->^^^^^^^^ @@ -417,33 +405,27 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ( 4 > 40 5 > ) -1->Emitted(37, 9) Source(22, 6) + SourceIndex(0) name (Greeter) -2 >Emitted(37, 27) Source(22, 24) + SourceIndex(0) name (Greeter) -3 >Emitted(37, 28) Source(22, 25) + SourceIndex(0) name (Greeter) -4 >Emitted(37, 30) Source(22, 27) + SourceIndex(0) name (Greeter) -5 >Emitted(37, 31) Source(22, 28) + SourceIndex(0) name (Greeter) +1->Emitted(37, 9) Source(22, 6) + SourceIndex(0) +2 >Emitted(37, 27) Source(22, 24) + SourceIndex(0) +3 >Emitted(37, 28) Source(22, 25) + SourceIndex(0) +4 >Emitted(37, 30) Source(22, 27) + SourceIndex(0) +5 >Emitted(37, 31) Source(22, 28) + SourceIndex(0) --- >>> ], Greeter.prototype, "greet", null); -1->^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^ -1-> - > -2 > greet -3 > () { - > return "

" + this.greeting + "

"; - > } -1->Emitted(38, 8) Source(23, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(38, 34) Source(23, 10) + SourceIndex(0) name (Greeter) -3 >Emitted(38, 42) Source(25, 6) + SourceIndex(0) name (Greeter) +1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +1->Emitted(38, 41) Source(22, 28) + SourceIndex(0) --- >>> __decorate([ 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > + > greet() { + > return "

" + this.greeting + "

"; + > } > > -1 >Emitted(39, 5) Source(27, 5) + SourceIndex(0) name (Greeter) +1 >Emitted(39, 5) Source(27, 5) + SourceIndex(0) --- >>> PropertyDecorator1, 1->^^^^^^^^ @@ -451,8 +433,8 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^-> 1->@ 2 > PropertyDecorator1 -1->Emitted(40, 9) Source(27, 6) + SourceIndex(0) name (Greeter) -2 >Emitted(40, 27) Source(27, 24) + SourceIndex(0) name (Greeter) +1->Emitted(40, 9) Source(27, 6) + SourceIndex(0) +2 >Emitted(40, 27) Source(27, 24) + SourceIndex(0) --- >>> PropertyDecorator2(50) 1->^^^^^^^^ @@ -467,99 +449,73 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ( 4 > 50 5 > ) -1->Emitted(41, 9) Source(28, 6) + SourceIndex(0) name (Greeter) -2 >Emitted(41, 27) Source(28, 24) + SourceIndex(0) name (Greeter) -3 >Emitted(41, 28) Source(28, 25) + SourceIndex(0) name (Greeter) -4 >Emitted(41, 30) Source(28, 27) + SourceIndex(0) name (Greeter) -5 >Emitted(41, 31) Source(28, 28) + SourceIndex(0) name (Greeter) +1->Emitted(41, 9) Source(28, 6) + SourceIndex(0) +2 >Emitted(41, 27) Source(28, 24) + SourceIndex(0) +3 >Emitted(41, 28) Source(28, 25) + SourceIndex(0) +4 >Emitted(41, 30) Source(28, 27) + SourceIndex(0) +5 >Emitted(41, 31) Source(28, 28) + SourceIndex(0) --- >>> ], Greeter.prototype, "x", void 0); -1->^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^ -1-> - > private -2 > x -3 > : string; -1->Emitted(42, 8) Source(29, 13) + SourceIndex(0) name (Greeter) -2 >Emitted(42, 30) Source(29, 14) + SourceIndex(0) name (Greeter) -3 >Emitted(42, 40) Source(29, 23) + SourceIndex(0) name (Greeter) +1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +1->Emitted(42, 39) Source(28, 28) + SourceIndex(0) --- >>> __decorate([ 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > + > private x: string; > > @PropertyDecorator1 > @PropertyDecorator2(60) > private static x1: number = 10; > - > -1 >Emitted(43, 5) Source(35, 5) + SourceIndex(0) name (Greeter) + > private fn( + > +1 >Emitted(43, 5) Source(36, 7) + SourceIndex(0) --- >>> __param(0, ParameterDecorator1), -1->^^^^^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^-> -1->private fn( - > -2 > @ -3 > ParameterDecorator1 -4 > -1->Emitted(44, 9) Source(36, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(44, 20) Source(36, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(44, 39) Source(36, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(44, 40) Source(36, 27) + SourceIndex(0) name (Greeter) +1->^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^-> +1->@ +2 > ParameterDecorator1 +1->Emitted(44, 20) Source(36, 8) + SourceIndex(0) +2 >Emitted(44, 39) Source(36, 27) + SourceIndex(0) --- >>> __param(0, ParameterDecorator2(70)) -1->^^^^^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^ -6 > ^ -7 > ^ +1->^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ 1-> - > -2 > @ -3 > ParameterDecorator2 -4 > ( -5 > 70 -6 > ) -7 > -1->Emitted(45, 9) Source(37, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(45, 20) Source(37, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(45, 39) Source(37, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(45, 40) Source(37, 28) + SourceIndex(0) name (Greeter) -5 >Emitted(45, 42) Source(37, 30) + SourceIndex(0) name (Greeter) -6 >Emitted(45, 43) Source(37, 31) + SourceIndex(0) name (Greeter) -7 >Emitted(45, 44) Source(37, 31) + SourceIndex(0) name (Greeter) + > @ +2 > ParameterDecorator2 +3 > ( +4 > 70 +5 > ) +1->Emitted(45, 20) Source(37, 8) + SourceIndex(0) +2 >Emitted(45, 39) Source(37, 27) + SourceIndex(0) +3 >Emitted(45, 40) Source(37, 28) + SourceIndex(0) +4 >Emitted(45, 42) Source(37, 30) + SourceIndex(0) +5 >Emitted(45, 43) Source(37, 31) + SourceIndex(0) --- >>> ], Greeter.prototype, "fn", null); -1 >^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^ +1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > fn -3 > ( - > @ParameterDecorator1 - > @ParameterDecorator2(70) - > x: number) { - > return this.greeting; - > } -1 >Emitted(46, 8) Source(35, 13) + SourceIndex(0) name (Greeter) -2 >Emitted(46, 31) Source(35, 15) + SourceIndex(0) name (Greeter) -3 >Emitted(46, 39) Source(40, 6) + SourceIndex(0) name (Greeter) +1 >Emitted(46, 38) Source(37, 31) + SourceIndex(0) --- >>> __decorate([ 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > +1 > + > x: number) { + > return this.greeting; + > } > > -1 >Emitted(47, 5) Source(42, 5) + SourceIndex(0) name (Greeter) +1 >Emitted(47, 5) Source(42, 5) + SourceIndex(0) --- >>> PropertyDecorator1, 1->^^^^^^^^ @@ -567,8 +523,8 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^^-> 1->@ 2 > PropertyDecorator1 -1->Emitted(48, 9) Source(42, 6) + SourceIndex(0) name (Greeter) -2 >Emitted(48, 27) Source(42, 24) + SourceIndex(0) name (Greeter) +1->Emitted(48, 9) Source(42, 6) + SourceIndex(0) +2 >Emitted(48, 27) Source(42, 24) + SourceIndex(0) --- >>> PropertyDecorator2(80), 1->^^^^^^^^ @@ -583,76 +539,56 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ( 4 > 80 5 > ) -1->Emitted(49, 9) Source(43, 6) + SourceIndex(0) name (Greeter) -2 >Emitted(49, 27) Source(43, 24) + SourceIndex(0) name (Greeter) -3 >Emitted(49, 28) Source(43, 25) + SourceIndex(0) name (Greeter) -4 >Emitted(49, 30) Source(43, 27) + SourceIndex(0) name (Greeter) -5 >Emitted(49, 31) Source(43, 28) + SourceIndex(0) name (Greeter) +1->Emitted(49, 9) Source(43, 6) + SourceIndex(0) +2 >Emitted(49, 27) Source(43, 24) + SourceIndex(0) +3 >Emitted(49, 28) Source(43, 25) + SourceIndex(0) +4 >Emitted(49, 30) Source(43, 27) + SourceIndex(0) +5 >Emitted(49, 31) Source(43, 28) + SourceIndex(0) --- >>> __param(0, ParameterDecorator1), -1->^^^^^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^-> +1->^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^-> 1-> > get greetings() { > return this.greeting; > } > > set greetings( - > -2 > @ -3 > ParameterDecorator1 -4 > -1->Emitted(50, 9) Source(49, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(50, 20) Source(49, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(50, 39) Source(49, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(50, 40) Source(49, 27) + SourceIndex(0) name (Greeter) + > @ +2 > ParameterDecorator1 +1->Emitted(50, 20) Source(49, 8) + SourceIndex(0) +2 >Emitted(50, 39) Source(49, 27) + SourceIndex(0) --- >>> __param(0, ParameterDecorator2(90)) -1->^^^^^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^ -6 > ^ -7 > ^ -8 > ^^^-> +1->^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +6 > ^^^^-> 1-> - > -2 > @ -3 > ParameterDecorator2 -4 > ( -5 > 90 -6 > ) -7 > -1->Emitted(51, 9) Source(50, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(51, 20) Source(50, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(51, 39) Source(50, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(51, 40) Source(50, 28) + SourceIndex(0) name (Greeter) -5 >Emitted(51, 42) Source(50, 30) + SourceIndex(0) name (Greeter) -6 >Emitted(51, 43) Source(50, 31) + SourceIndex(0) name (Greeter) -7 >Emitted(51, 44) Source(50, 31) + SourceIndex(0) name (Greeter) + > @ +2 > ParameterDecorator2 +3 > ( +4 > 90 +5 > ) +1->Emitted(51, 20) Source(50, 8) + SourceIndex(0) +2 >Emitted(51, 39) Source(50, 27) + SourceIndex(0) +3 >Emitted(51, 40) Source(50, 28) + SourceIndex(0) +4 >Emitted(51, 42) Source(50, 30) + SourceIndex(0) +5 >Emitted(51, 43) Source(50, 31) + SourceIndex(0) --- >>> ], Greeter.prototype, "greetings", null); -1->^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > greetings -3 > () { - > return this.greeting; - > } -1->Emitted(52, 8) Source(44, 9) + SourceIndex(0) name (Greeter) -2 >Emitted(52, 38) Source(44, 18) + SourceIndex(0) name (Greeter) -3 >Emitted(52, 46) Source(46, 6) + SourceIndex(0) name (Greeter) +1->Emitted(52, 45) Source(43, 28) + SourceIndex(0) --- >>> __decorate([ 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(53, 5) Source(31, 5) + SourceIndex(0) name (Greeter) +1 >Emitted(53, 5) Source(31, 5) + SourceIndex(0) --- >>> PropertyDecorator1, 1->^^^^^^^^ @@ -660,8 +596,8 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^-> 1->@ 2 > PropertyDecorator1 -1->Emitted(54, 9) Source(31, 6) + SourceIndex(0) name (Greeter) -2 >Emitted(54, 27) Source(31, 24) + SourceIndex(0) name (Greeter) +1->Emitted(54, 9) Source(31, 6) + SourceIndex(0) +2 >Emitted(54, 27) Source(31, 24) + SourceIndex(0) --- >>> PropertyDecorator2(60) 1->^^^^^^^^ @@ -676,29 +612,22 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ( 4 > 60 5 > ) -1->Emitted(55, 9) Source(32, 6) + SourceIndex(0) name (Greeter) -2 >Emitted(55, 27) Source(32, 24) + SourceIndex(0) name (Greeter) -3 >Emitted(55, 28) Source(32, 25) + SourceIndex(0) name (Greeter) -4 >Emitted(55, 30) Source(32, 27) + SourceIndex(0) name (Greeter) -5 >Emitted(55, 31) Source(32, 28) + SourceIndex(0) name (Greeter) +1->Emitted(55, 9) Source(32, 6) + SourceIndex(0) +2 >Emitted(55, 27) Source(32, 24) + SourceIndex(0) +3 >Emitted(55, 28) Source(32, 25) + SourceIndex(0) +4 >Emitted(55, 30) Source(32, 27) + SourceIndex(0) +5 >Emitted(55, 31) Source(32, 28) + SourceIndex(0) --- >>> ], Greeter, "x1", void 0); -1->^^^^^^^ -2 > ^^^^^^^^^^^^^ -3 > ^^^^^^^^^^ -1-> - > private static -2 > x1 -3 > : number = 10; -1->Emitted(56, 8) Source(33, 20) + SourceIndex(0) name (Greeter) -2 >Emitted(56, 21) Source(33, 22) + SourceIndex(0) name (Greeter) -3 >Emitted(56, 31) Source(33, 36) + SourceIndex(0) name (Greeter) +1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +1->Emitted(56, 30) Source(32, 28) + SourceIndex(0) --- >>> Greeter = __decorate([ 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(57, 5) Source(8, 1) + SourceIndex(0) name (Greeter) +1 >Emitted(57, 5) Source(8, 1) + SourceIndex(0) --- >>> ClassDecorator1, 1->^^^^^^^^ @@ -706,8 +635,8 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^^-> 1->@ 2 > ClassDecorator1 -1->Emitted(58, 9) Source(8, 2) + SourceIndex(0) name (Greeter) -2 >Emitted(58, 24) Source(8, 17) + SourceIndex(0) name (Greeter) +1->Emitted(58, 9) Source(8, 2) + SourceIndex(0) +2 >Emitted(58, 24) Source(8, 17) + SourceIndex(0) --- >>> ClassDecorator2(10), 1->^^^^^^^^ @@ -722,100 +651,90 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ( 4 > 10 5 > ) -1->Emitted(59, 9) Source(9, 2) + SourceIndex(0) name (Greeter) -2 >Emitted(59, 24) Source(9, 17) + SourceIndex(0) name (Greeter) -3 >Emitted(59, 25) Source(9, 18) + SourceIndex(0) name (Greeter) -4 >Emitted(59, 27) Source(9, 20) + SourceIndex(0) name (Greeter) -5 >Emitted(59, 28) Source(9, 21) + SourceIndex(0) name (Greeter) +1->Emitted(59, 9) Source(9, 2) + SourceIndex(0) +2 >Emitted(59, 24) Source(9, 17) + SourceIndex(0) +3 >Emitted(59, 25) Source(9, 18) + SourceIndex(0) +4 >Emitted(59, 27) Source(9, 20) + SourceIndex(0) +5 >Emitted(59, 28) Source(9, 21) + SourceIndex(0) --- >>> __param(0, ParameterDecorator1), -1->^^^^^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^^-> +1->^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^-> 1-> >class Greeter { > constructor( - > -2 > @ -3 > ParameterDecorator1 -4 > -1->Emitted(60, 9) Source(12, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(60, 20) Source(12, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(60, 39) Source(12, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(60, 40) Source(12, 27) + SourceIndex(0) name (Greeter) + > @ +2 > ParameterDecorator1 +1->Emitted(60, 20) Source(12, 8) + SourceIndex(0) +2 >Emitted(60, 39) Source(12, 27) + SourceIndex(0) --- >>> __param(0, ParameterDecorator2(20)), -1->^^^^^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^ -6 > ^ -7 > ^ +1->^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ 1-> - > -2 > @ -3 > ParameterDecorator2 -4 > ( -5 > 20 -6 > ) -7 > -1->Emitted(61, 9) Source(13, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(61, 20) Source(13, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(61, 39) Source(13, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(61, 40) Source(13, 28) + SourceIndex(0) name (Greeter) -5 >Emitted(61, 42) Source(13, 30) + SourceIndex(0) name (Greeter) -6 >Emitted(61, 43) Source(13, 31) + SourceIndex(0) name (Greeter) -7 >Emitted(61, 44) Source(13, 31) + SourceIndex(0) name (Greeter) + > @ +2 > ParameterDecorator2 +3 > ( +4 > 20 +5 > ) +1->Emitted(61, 20) Source(13, 8) + SourceIndex(0) +2 >Emitted(61, 39) Source(13, 27) + SourceIndex(0) +3 >Emitted(61, 40) Source(13, 28) + SourceIndex(0) +4 >Emitted(61, 42) Source(13, 30) + SourceIndex(0) +5 >Emitted(61, 43) Source(13, 31) + SourceIndex(0) --- >>> __param(1, ParameterDecorator1), -1 >^^^^^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^-> +1 >^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^-> 1 > > public greeting: string, > - > -2 > @ -3 > ParameterDecorator1 -4 > -1 >Emitted(62, 9) Source(16, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(62, 20) Source(16, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(62, 39) Source(16, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(62, 40) Source(16, 27) + SourceIndex(0) name (Greeter) + > @ +2 > ParameterDecorator1 +1 >Emitted(62, 20) Source(16, 8) + SourceIndex(0) +2 >Emitted(62, 39) Source(16, 27) + SourceIndex(0) --- >>> __param(1, ParameterDecorator2(30)) -1->^^^^^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^ -6 > ^ -7 > ^ +1->^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ 1-> - > -2 > @ -3 > ParameterDecorator2 -4 > ( -5 > 30 -6 > ) -7 > -1->Emitted(63, 9) Source(17, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(63, 20) Source(17, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(63, 39) Source(17, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(63, 40) Source(17, 28) + SourceIndex(0) name (Greeter) -5 >Emitted(63, 42) Source(17, 30) + SourceIndex(0) name (Greeter) -6 >Emitted(63, 43) Source(17, 31) + SourceIndex(0) name (Greeter) -7 >Emitted(63, 44) Source(17, 31) + SourceIndex(0) name (Greeter) + > @ +2 > ParameterDecorator2 +3 > ( +4 > 30 +5 > ) +1->Emitted(63, 20) Source(17, 8) + SourceIndex(0) +2 >Emitted(63, 39) Source(17, 27) + SourceIndex(0) +3 >Emitted(63, 40) Source(17, 28) + SourceIndex(0) +4 >Emitted(63, 42) Source(17, 30) + SourceIndex(0) +5 >Emitted(63, 43) Source(17, 31) + SourceIndex(0) --- >>> ], Greeter); -1 >^^^^^^^^^^^^^^^^ -2 > ^^^^-> -1 > +1 >^^^^^^^^^^^^^^^ +2 > ^^^^^-> +1 > +1 >Emitted(64, 16) Source(9, 21) + SourceIndex(0) +--- +>>> return Greeter; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +1-> + >class Greeter { + > constructor( + > @ParameterDecorator1 + > @ParameterDecorator2(20) + > public greeting: string, + > + > @ParameterDecorator1 + > @ParameterDecorator2(30) > ...b: string[]) { > } > @@ -852,16 +771,10 @@ sourceFile:sourceMapValidationDecorators.ts > greetings: string) { > this.greeting = greetings; > } - >} -1 >Emitted(64, 17) Source(54, 2) + SourceIndex(0) name (Greeter) ---- ->>> return Greeter; -1->^^^^ -2 > ^^^^^^^^^^^^^^ -1-> + > 2 > } -1->Emitted(65, 5) Source(54, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(65, 19) Source(54, 2) + SourceIndex(0) name (Greeter) +1->Emitted(65, 5) Source(54, 1) + SourceIndex(0) +2 >Emitted(65, 19) Source(54, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -872,9 +785,7 @@ sourceFile:sourceMapValidationDecorators.ts 1 > 2 >} 3 > -4 > @ClassDecorator1 - > @ClassDecorator2(10) - > class Greeter { +4 > class Greeter { > constructor( > @ParameterDecorator1 > @ParameterDecorator2(20) @@ -919,9 +830,9 @@ sourceFile:sourceMapValidationDecorators.ts > this.greeting = greetings; > } > } -1 >Emitted(66, 1) Source(54, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(66, 2) Source(54, 2) + SourceIndex(0) name (Greeter) -3 >Emitted(66, 2) Source(8, 1) + SourceIndex(0) +1 >Emitted(66, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(66, 2) Source(54, 2) + SourceIndex(0) +3 >Emitted(66, 2) Source(10, 1) + SourceIndex(0) 4 >Emitted(66, 6) Source(54, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationDecorators.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationEnums.js.map b/tests/baselines/reference/sourceMapValidationEnums.js.map index 4729c3749b338..9b1ad5bf1571d 100644 --- a/tests/baselines/reference/sourceMapValidationEnums.js.map +++ b/tests/baselines/reference/sourceMapValidationEnums.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationEnums.js.map] -{"version":3,"file":"sourceMapValidationEnums.js","sourceRoot":"","sources":["sourceMapValidationEnums.ts"],"names":["e","e2","e3"],"mappings":"AAAA,IAAK,CAIJ;AAJD,WAAK,CAAC;IACFA,mBAACA,CAAAA;IACDA,mBAACA,CAAAA;IACDA,mBAACA,CAAAA;AACLA,CAACA,EAJI,CAAC,KAAD,CAAC,QAIL;AACD,IAAK,EAKJ;AALD,WAAK,EAAE;IACHC,sBAAMA,CAAAA;IACNA,sBAAMA,CAAAA;IACNA,sBAACA,CAAAA;IACDA,wBAAEA,CAAAA;AACNA,CAACA,EALI,EAAE,KAAF,EAAE,QAKN;AACD,IAAK,EACJ;AADD,WAAK,EAAE;AACPC,CAACA,EADI,EAAE,KAAF,EAAE,QACN"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationEnums.js","sourceRoot":"","sources":["sourceMapValidationEnums.ts"],"names":[],"mappings":"AAAA,IAAK,CAIJ;AAJD,WAAK,CAAC;IACF,mBAAC,CAAA;IACD,mBAAC,CAAA;IACD,mBAAC,CAAA;AACL,CAAC,EAJI,CAAC,KAAD,CAAC,QAIL;AACD,IAAK,EAKJ;AALD,WAAK,EAAE;IACH,sBAAM,CAAA;IACN,sBAAM,CAAA;IACN,sBAAC,CAAA;IACD,wBAAE,CAAA;AACN,CAAC,EALI,EAAE,KAAF,EAAE,QAKN;AACD,IAAK,EACJ;AADD,WAAK,EAAE;AACP,CAAC,EADI,EAAE,KAAF,EAAE,QACN"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationEnums.sourcemap.txt b/tests/baselines/reference/sourceMapValidationEnums.sourcemap.txt index 9d8b36ca5ed3b..4fb651552767c 100644 --- a/tests/baselines/reference/sourceMapValidationEnums.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationEnums.sourcemap.txt @@ -45,9 +45,9 @@ sourceFile:sourceMapValidationEnums.ts > 2 > x 3 > -1->Emitted(3, 5) Source(2, 5) + SourceIndex(0) name (e) -2 >Emitted(3, 24) Source(2, 6) + SourceIndex(0) name (e) -3 >Emitted(3, 25) Source(2, 6) + SourceIndex(0) name (e) +1->Emitted(3, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(3, 24) Source(2, 6) + SourceIndex(0) +3 >Emitted(3, 25) Source(2, 6) + SourceIndex(0) --- >>> e[e["y"] = 1] = "y"; 1->^^^^ @@ -58,9 +58,9 @@ sourceFile:sourceMapValidationEnums.ts > 2 > y 3 > -1->Emitted(4, 5) Source(3, 5) + SourceIndex(0) name (e) -2 >Emitted(4, 24) Source(3, 6) + SourceIndex(0) name (e) -3 >Emitted(4, 25) Source(3, 6) + SourceIndex(0) name (e) +1->Emitted(4, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(4, 24) Source(3, 6) + SourceIndex(0) +3 >Emitted(4, 25) Source(3, 6) + SourceIndex(0) --- >>> e[e["x"] = 2] = "x"; 1->^^^^ @@ -70,9 +70,9 @@ sourceFile:sourceMapValidationEnums.ts > 2 > x 3 > -1->Emitted(5, 5) Source(4, 5) + SourceIndex(0) name (e) -2 >Emitted(5, 24) Source(4, 6) + SourceIndex(0) name (e) -3 >Emitted(5, 25) Source(4, 6) + SourceIndex(0) name (e) +1->Emitted(5, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(5, 24) Source(4, 6) + SourceIndex(0) +3 >Emitted(5, 25) Source(4, 6) + SourceIndex(0) --- >>>})(e || (e = {})); 1 > @@ -94,8 +94,8 @@ sourceFile:sourceMapValidationEnums.ts > y, > x > } -1 >Emitted(6, 1) Source(5, 1) + SourceIndex(0) name (e) -2 >Emitted(6, 2) Source(5, 2) + SourceIndex(0) name (e) +1 >Emitted(6, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(6, 4) Source(1, 6) + SourceIndex(0) 4 >Emitted(6, 5) Source(1, 7) + SourceIndex(0) 5 >Emitted(6, 10) Source(1, 6) + SourceIndex(0) @@ -141,9 +141,9 @@ sourceFile:sourceMapValidationEnums.ts > 2 > x = 10 3 > -1->Emitted(9, 5) Source(7, 5) + SourceIndex(0) name (e2) -2 >Emitted(9, 27) Source(7, 11) + SourceIndex(0) name (e2) -3 >Emitted(9, 28) Source(7, 11) + SourceIndex(0) name (e2) +1->Emitted(9, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(9, 27) Source(7, 11) + SourceIndex(0) +3 >Emitted(9, 28) Source(7, 11) + SourceIndex(0) --- >>> e2[e2["y"] = 10] = "y"; 1->^^^^ @@ -154,9 +154,9 @@ sourceFile:sourceMapValidationEnums.ts > 2 > y = 10 3 > -1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (e2) -2 >Emitted(10, 27) Source(8, 11) + SourceIndex(0) name (e2) -3 >Emitted(10, 28) Source(8, 11) + SourceIndex(0) name (e2) +1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(10, 27) Source(8, 11) + SourceIndex(0) +3 >Emitted(10, 28) Source(8, 11) + SourceIndex(0) --- >>> e2[e2["z"] = 11] = "z"; 1->^^^^ @@ -167,9 +167,9 @@ sourceFile:sourceMapValidationEnums.ts > 2 > z 3 > -1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) name (e2) -2 >Emitted(11, 27) Source(9, 6) + SourceIndex(0) name (e2) -3 >Emitted(11, 28) Source(9, 6) + SourceIndex(0) name (e2) +1->Emitted(11, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(11, 27) Source(9, 6) + SourceIndex(0) +3 >Emitted(11, 28) Source(9, 6) + SourceIndex(0) --- >>> e2[e2["x2"] = 12] = "x2"; 1->^^^^ @@ -179,9 +179,9 @@ sourceFile:sourceMapValidationEnums.ts > 2 > x2 3 > -1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (e2) -2 >Emitted(12, 29) Source(10, 7) + SourceIndex(0) name (e2) -3 >Emitted(12, 30) Source(10, 7) + SourceIndex(0) name (e2) +1->Emitted(12, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(12, 29) Source(10, 7) + SourceIndex(0) +3 >Emitted(12, 30) Source(10, 7) + SourceIndex(0) --- >>>})(e2 || (e2 = {})); 1 > @@ -204,8 +204,8 @@ sourceFile:sourceMapValidationEnums.ts > z, > x2 > } -1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) name (e2) -2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) name (e2) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(11, 2) + SourceIndex(0) 3 >Emitted(13, 4) Source(6, 6) + SourceIndex(0) 4 >Emitted(13, 6) Source(6, 8) + SourceIndex(0) 5 >Emitted(13, 11) Source(6, 6) + SourceIndex(0) @@ -256,8 +256,8 @@ sourceFile:sourceMapValidationEnums.ts 6 > e3 7 > { > } -1->Emitted(16, 1) Source(13, 1) + SourceIndex(0) name (e3) -2 >Emitted(16, 2) Source(13, 2) + SourceIndex(0) name (e3) +1->Emitted(16, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(13, 2) + SourceIndex(0) 3 >Emitted(16, 4) Source(12, 6) + SourceIndex(0) 4 >Emitted(16, 6) Source(12, 8) + SourceIndex(0) 5 >Emitted(16, 11) Source(12, 6) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationExportAssignment.js b/tests/baselines/reference/sourceMapValidationExportAssignment.js index a1b0c1e167a36..635692ef81af0 100644 --- a/tests/baselines/reference/sourceMapValidationExportAssignment.js +++ b/tests/baselines/reference/sourceMapValidationExportAssignment.js @@ -6,6 +6,7 @@ export = a; //// [sourceMapValidationExportAssignment.js] define(["require", "exports"], function (require, exports) { + "use strict"; var a = (function () { function a() { } diff --git a/tests/baselines/reference/sourceMapValidationExportAssignment.js.map b/tests/baselines/reference/sourceMapValidationExportAssignment.js.map index 9ec681ced5284..05406bba8dcd3 100644 --- a/tests/baselines/reference/sourceMapValidationExportAssignment.js.map +++ b/tests/baselines/reference/sourceMapValidationExportAssignment.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationExportAssignment.js.map] -{"version":3,"file":"sourceMapValidationExportAssignment.js","sourceRoot":"","sources":["sourceMapValidationExportAssignment.ts"],"names":["a","a.constructor"],"mappings":";IAAA;QAAAA;QAEAC,CAACA;QAADD,QAACA;IAADA,CAACA,AAFD,IAEC;IACD,OAAS,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationExportAssignment.js","sourceRoot":"","sources":["sourceMapValidationExportAssignment.ts"],"names":[],"mappings":";;IAAA;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IACD,OAAS,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationExportAssignment.sourcemap.txt b/tests/baselines/reference/sourceMapValidationExportAssignment.sourcemap.txt index cf4adb6d5eaf3..2f30a6d1e104b 100644 --- a/tests/baselines/reference/sourceMapValidationExportAssignment.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationExportAssignment.sourcemap.txt @@ -9,17 +9,18 @@ emittedFile:tests/cases/compiler/sourceMapValidationExportAssignment.js sourceFile:sourceMapValidationExportAssignment.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> var a = (function () { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(2, 5) Source(1, 1) + SourceIndex(0) +1 >Emitted(3, 5) Source(1, 1) + SourceIndex(0) --- >>> function a() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(3, 9) Source(1, 1) + SourceIndex(0) name (a) +1->Emitted(4, 9) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -29,16 +30,16 @@ sourceFile:sourceMapValidationExportAssignment.ts > public c; > 2 > } -1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (a.constructor) -2 >Emitted(4, 10) Source(3, 2) + SourceIndex(0) name (a.constructor) +1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) +2 >Emitted(5, 10) Source(3, 2) + SourceIndex(0) --- >>> return a; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(5, 9) Source(3, 1) + SourceIndex(0) name (a) -2 >Emitted(5, 17) Source(3, 2) + SourceIndex(0) name (a) +1->Emitted(6, 9) Source(3, 1) + SourceIndex(0) +2 >Emitted(6, 17) Source(3, 2) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -52,10 +53,10 @@ sourceFile:sourceMapValidationExportAssignment.ts 4 > class a { > public c; > } -1 >Emitted(6, 5) Source(3, 1) + SourceIndex(0) name (a) -2 >Emitted(6, 6) Source(3, 2) + SourceIndex(0) name (a) -3 >Emitted(6, 6) Source(1, 1) + SourceIndex(0) -4 >Emitted(6, 10) Source(3, 2) + SourceIndex(0) +1 >Emitted(7, 5) Source(3, 1) + SourceIndex(0) +2 >Emitted(7, 6) Source(3, 2) + SourceIndex(0) +3 >Emitted(7, 6) Source(1, 1) + SourceIndex(0) +4 >Emitted(7, 10) Source(3, 2) + SourceIndex(0) --- >>> return a; 1->^^^^ @@ -67,10 +68,10 @@ sourceFile:sourceMapValidationExportAssignment.ts 2 > export = 3 > a 4 > ; -1->Emitted(7, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(7, 12) Source(4, 10) + SourceIndex(0) -3 >Emitted(7, 13) Source(4, 11) + SourceIndex(0) -4 >Emitted(7, 14) Source(4, 12) + SourceIndex(0) +1->Emitted(8, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(8, 12) Source(4, 10) + SourceIndex(0) +3 >Emitted(8, 13) Source(4, 11) + SourceIndex(0) +4 >Emitted(8, 14) Source(4, 12) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=sourceMapValidationExportAssignment.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.js b/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.js index 0a0b3feda5ff4..daa9391533f68 100644 --- a/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.js +++ b/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.js @@ -5,6 +5,7 @@ class a { export = a; //// [sourceMapValidationExportAssignmentCommonjs.js] +"use strict"; var a = (function () { function a() { } diff --git a/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.js.map b/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.js.map index 6da5d0f075ea1..73178e578fcba 100644 --- a/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.js.map +++ b/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationExportAssignmentCommonjs.js.map] -{"version":3,"file":"sourceMapValidationExportAssignmentCommonjs.js","sourceRoot":"","sources":["sourceMapValidationExportAssignmentCommonjs.ts"],"names":["a","a.constructor"],"mappings":"AAAA;IAAAA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC;AACD,iBAAS,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationExportAssignmentCommonjs.js","sourceRoot":"","sources":["sourceMapValidationExportAssignmentCommonjs.ts"],"names":[],"mappings":";AAAA;IAAA;IAEA,CAAC;IAAD,QAAC;AAAD,CAAC,AAFD,IAEC;AACD,iBAAS,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.sourcemap.txt b/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.sourcemap.txt index fc7862c8ad439..a25277da7b199 100644 --- a/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.sourcemap.txt @@ -8,17 +8,18 @@ sources: sourceMapValidationExportAssignmentCommonjs.ts emittedFile:tests/cases/compiler/sourceMapValidationExportAssignmentCommonjs.js sourceFile:sourceMapValidationExportAssignmentCommonjs.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var a = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) --- >>> function a() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (a) +1->Emitted(3, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -28,16 +29,16 @@ sourceFile:sourceMapValidationExportAssignmentCommonjs.ts > public c; > 2 > } -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) name (a.constructor) -2 >Emitted(3, 6) Source(3, 2) + SourceIndex(0) name (a.constructor) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) +2 >Emitted(4, 6) Source(3, 2) + SourceIndex(0) --- >>> return a; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (a) -2 >Emitted(4, 13) Source(3, 2) + SourceIndex(0) name (a) +1->Emitted(5, 5) Source(3, 1) + SourceIndex(0) +2 >Emitted(5, 13) Source(3, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -51,10 +52,10 @@ sourceFile:sourceMapValidationExportAssignmentCommonjs.ts 4 > class a { > public c; > } -1 >Emitted(5, 1) Source(3, 1) + SourceIndex(0) name (a) -2 >Emitted(5, 2) Source(3, 2) + SourceIndex(0) name (a) -3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0) -4 >Emitted(5, 6) Source(3, 2) + SourceIndex(0) +1 >Emitted(6, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(3, 2) + SourceIndex(0) +3 >Emitted(6, 2) Source(1, 1) + SourceIndex(0) +4 >Emitted(6, 6) Source(3, 2) + SourceIndex(0) --- >>>module.exports = a; 1-> @@ -67,9 +68,9 @@ sourceFile:sourceMapValidationExportAssignmentCommonjs.ts 2 >export = 3 > a 4 > ; -1->Emitted(6, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(6, 18) Source(4, 10) + SourceIndex(0) -3 >Emitted(6, 19) Source(4, 11) + SourceIndex(0) -4 >Emitted(6, 20) Source(4, 12) + SourceIndex(0) +1->Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 18) Source(4, 10) + SourceIndex(0) +3 >Emitted(7, 19) Source(4, 11) + SourceIndex(0) +4 >Emitted(7, 20) Source(4, 12) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationExportAssignmentCommonjs.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js.map b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js.map index 81066a66badb7..4f11f33d32224 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js.map +++ b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationFunctionPropertyAssignment.js.map] -{"version":3,"file":"sourceMapValidationFunctionPropertyAssignment.js","sourceRoot":"","sources":["sourceMapValidationFunctionPropertyAssignment.ts"],"names":["n"],"mappings":"AAAA,IAAI,CAAC,GAAG,EAAE,CAAC,gBAAKA,CAACA,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationFunctionPropertyAssignment.js","sourceRoot":"","sources":["sourceMapValidationFunctionPropertyAssignment.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,EAAE,CAAC,gBAAK,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt index 52a8bfe688c2a..a1a44c4ffb420 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt @@ -36,8 +36,8 @@ sourceFile:sourceMapValidationFunctionPropertyAssignment.ts 4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) 5 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) 6 >Emitted(1, 12) Source(1, 12) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 17) + SourceIndex(0) name (n) -8 >Emitted(1, 29) Source(1, 18) + SourceIndex(0) name (n) +7 >Emitted(1, 28) Source(1, 17) + SourceIndex(0) +8 >Emitted(1, 29) Source(1, 18) + SourceIndex(0) 9 >Emitted(1, 31) Source(1, 20) + SourceIndex(0) 10>Emitted(1, 32) Source(1, 21) + SourceIndex(0) --- diff --git a/tests/baselines/reference/sourceMapValidationFunctions.js.map b/tests/baselines/reference/sourceMapValidationFunctions.js.map index bb98f5b19d2cd..7578efc11f8e8 100644 --- a/tests/baselines/reference/sourceMapValidationFunctions.js.map +++ b/tests/baselines/reference/sourceMapValidationFunctions.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationFunctions.js.map] -{"version":3,"file":"sourceMapValidationFunctions.js","sourceRoot":"","sources":["sourceMapValidationFunctions.ts"],"names":["greet","greet2","foo"],"mappings":"AAAA,IAAI,SAAS,GAAG,CAAC,CAAC;AAClB,eAAe,QAAgB;IAC3BA,SAASA,EAAEA,CAACA;IACZA,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA;AACD,gBAAgB,QAAgB,EAAE,CAAM,EAAE,CAAU;IAAlBC,iBAAMA,GAANA,MAAMA;IAAcA,oBAAuBA;SAAvBA,WAAuBA,CAAvBA,sBAAuBA,CAAvBA,IAAuBA;QAAvBA,mCAAuBA;;IACzEA,SAASA,EAAEA,CAACA;IACZA,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA;AACD,aAAa,QAAgB,EAAE,CAAM,EAAE,CAAU;IAAlBC,iBAAMA,GAANA,MAAMA;IAAcA,oBAAuBA;SAAvBA,WAAuBA,CAAvBA,sBAAuBA,CAAvBA,IAAuBA;QAAvBA,mCAAuBA;;IAEtEA,MAAMA,CAACA;AACXA,CAACA"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationFunctions.js","sourceRoot":"","sources":["sourceMapValidationFunctions.ts"],"names":[],"mappings":"AAAA,IAAI,SAAS,GAAG,CAAC,CAAC;AAClB,eAAe,QAAgB;IAC3B,SAAS,EAAE,CAAC;IACZ,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC;AACD,gBAAgB,QAAgB,EAAE,CAAM,EAAE,CAAU;IAAlB,iBAAM,GAAN,MAAM;IAAc,oBAAuB;SAAvB,WAAuB,CAAvB,sBAAuB,CAAvB,IAAuB;QAAvB,mCAAuB;;IACzE,SAAS,EAAE,CAAC;IACZ,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC;AACD,aAAa,QAAgB,EAAE,CAAM,EAAE,CAAU;IAAlB,iBAAM,GAAN,MAAM;IAAc,oBAAuB;SAAvB,WAAuB,CAAvB,sBAAuB,CAAvB,IAAuB;QAAvB,mCAAuB;;IAEtE,MAAM,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctions.sourcemap.txt b/tests/baselines/reference/sourceMapValidationFunctions.sourcemap.txt index 830e9c459d7b5..95759f76f165b 100644 --- a/tests/baselines/reference/sourceMapValidationFunctions.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationFunctions.sourcemap.txt @@ -52,10 +52,10 @@ sourceFile:sourceMapValidationFunctions.ts 2 > greetings 3 > ++ 4 > ; -1 >Emitted(3, 5) Source(3, 5) + SourceIndex(0) name (greet) -2 >Emitted(3, 14) Source(3, 14) + SourceIndex(0) name (greet) -3 >Emitted(3, 16) Source(3, 16) + SourceIndex(0) name (greet) -4 >Emitted(3, 17) Source(3, 17) + SourceIndex(0) name (greet) +1 >Emitted(3, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(3, 14) Source(3, 14) + SourceIndex(0) +3 >Emitted(3, 16) Source(3, 16) + SourceIndex(0) +4 >Emitted(3, 17) Source(3, 17) + SourceIndex(0) --- >>> return greetings; 1->^^^^ @@ -69,11 +69,11 @@ sourceFile:sourceMapValidationFunctions.ts 3 > 4 > greetings 5 > ; -1->Emitted(4, 5) Source(4, 5) + SourceIndex(0) name (greet) -2 >Emitted(4, 11) Source(4, 11) + SourceIndex(0) name (greet) -3 >Emitted(4, 12) Source(4, 12) + SourceIndex(0) name (greet) -4 >Emitted(4, 21) Source(4, 21) + SourceIndex(0) name (greet) -5 >Emitted(4, 22) Source(4, 22) + SourceIndex(0) name (greet) +1->Emitted(4, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(4, 11) Source(4, 11) + SourceIndex(0) +3 >Emitted(4, 12) Source(4, 12) + SourceIndex(0) +4 >Emitted(4, 21) Source(4, 21) + SourceIndex(0) +5 >Emitted(4, 22) Source(4, 22) + SourceIndex(0) --- >>>} 1 > @@ -82,8 +82,8 @@ sourceFile:sourceMapValidationFunctions.ts 1 > > 2 >} -1 >Emitted(5, 1) Source(5, 1) + SourceIndex(0) name (greet) -2 >Emitted(5, 2) Source(5, 2) + SourceIndex(0) name (greet) +1 >Emitted(5, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(5, 2) + SourceIndex(0) --- >>>function greet2(greeting, n, x) { 1-> @@ -119,10 +119,10 @@ sourceFile:sourceMapValidationFunctions.ts 2 > n = 10 3 > 4 > n = 10 -1->Emitted(7, 5) Source(6, 35) + SourceIndex(0) name (greet2) -2 >Emitted(7, 22) Source(6, 41) + SourceIndex(0) name (greet2) -3 >Emitted(7, 25) Source(6, 35) + SourceIndex(0) name (greet2) -4 >Emitted(7, 31) Source(6, 41) + SourceIndex(0) name (greet2) +1->Emitted(7, 5) Source(6, 35) + SourceIndex(0) +2 >Emitted(7, 22) Source(6, 41) + SourceIndex(0) +3 >Emitted(7, 25) Source(6, 35) + SourceIndex(0) +4 >Emitted(7, 31) Source(6, 41) + SourceIndex(0) --- >>> var restParams = []; 1 >^^^^ @@ -130,8 +130,8 @@ sourceFile:sourceMapValidationFunctions.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >, x?: string, 2 > ...restParams: string[] -1 >Emitted(8, 5) Source(6, 55) + SourceIndex(0) name (greet2) -2 >Emitted(8, 25) Source(6, 78) + SourceIndex(0) name (greet2) +1 >Emitted(8, 5) Source(6, 55) + SourceIndex(0) +2 >Emitted(8, 25) Source(6, 78) + SourceIndex(0) --- >>> for (var _i = 3; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -146,20 +146,20 @@ sourceFile:sourceMapValidationFunctions.ts 4 > ...restParams: string[] 5 > 6 > ...restParams: string[] -1->Emitted(9, 10) Source(6, 55) + SourceIndex(0) name (greet2) -2 >Emitted(9, 21) Source(6, 78) + SourceIndex(0) name (greet2) -3 >Emitted(9, 22) Source(6, 55) + SourceIndex(0) name (greet2) -4 >Emitted(9, 44) Source(6, 78) + SourceIndex(0) name (greet2) -5 >Emitted(9, 45) Source(6, 55) + SourceIndex(0) name (greet2) -6 >Emitted(9, 49) Source(6, 78) + SourceIndex(0) name (greet2) +1->Emitted(9, 10) Source(6, 55) + SourceIndex(0) +2 >Emitted(9, 21) Source(6, 78) + SourceIndex(0) +3 >Emitted(9, 22) Source(6, 55) + SourceIndex(0) +4 >Emitted(9, 44) Source(6, 78) + SourceIndex(0) +5 >Emitted(9, 45) Source(6, 55) + SourceIndex(0) +6 >Emitted(9, 49) Source(6, 78) + SourceIndex(0) --- >>> restParams[_i - 3] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...restParams: string[] -1 >Emitted(10, 9) Source(6, 55) + SourceIndex(0) name (greet2) -2 >Emitted(10, 44) Source(6, 78) + SourceIndex(0) name (greet2) +1 >Emitted(10, 9) Source(6, 55) + SourceIndex(0) +2 >Emitted(10, 44) Source(6, 78) + SourceIndex(0) --- >>> } >>> greetings++; @@ -173,10 +173,10 @@ sourceFile:sourceMapValidationFunctions.ts 2 > greetings 3 > ++ 4 > ; -1 >Emitted(12, 5) Source(7, 5) + SourceIndex(0) name (greet2) -2 >Emitted(12, 14) Source(7, 14) + SourceIndex(0) name (greet2) -3 >Emitted(12, 16) Source(7, 16) + SourceIndex(0) name (greet2) -4 >Emitted(12, 17) Source(7, 17) + SourceIndex(0) name (greet2) +1 >Emitted(12, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(12, 14) Source(7, 14) + SourceIndex(0) +3 >Emitted(12, 16) Source(7, 16) + SourceIndex(0) +4 >Emitted(12, 17) Source(7, 17) + SourceIndex(0) --- >>> return greetings; 1->^^^^ @@ -190,11 +190,11 @@ sourceFile:sourceMapValidationFunctions.ts 3 > 4 > greetings 5 > ; -1->Emitted(13, 5) Source(8, 5) + SourceIndex(0) name (greet2) -2 >Emitted(13, 11) Source(8, 11) + SourceIndex(0) name (greet2) -3 >Emitted(13, 12) Source(8, 12) + SourceIndex(0) name (greet2) -4 >Emitted(13, 21) Source(8, 21) + SourceIndex(0) name (greet2) -5 >Emitted(13, 22) Source(8, 22) + SourceIndex(0) name (greet2) +1->Emitted(13, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(13, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(13, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(13, 21) Source(8, 21) + SourceIndex(0) +5 >Emitted(13, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -203,8 +203,8 @@ sourceFile:sourceMapValidationFunctions.ts 1 > > 2 >} -1 >Emitted(14, 1) Source(9, 1) + SourceIndex(0) name (greet2) -2 >Emitted(14, 2) Source(9, 2) + SourceIndex(0) name (greet2) +1 >Emitted(14, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(9, 2) + SourceIndex(0) --- >>>function foo(greeting, n, x) { 1-> @@ -240,10 +240,10 @@ sourceFile:sourceMapValidationFunctions.ts 2 > n = 10 3 > 4 > n = 10 -1->Emitted(16, 5) Source(10, 32) + SourceIndex(0) name (foo) -2 >Emitted(16, 22) Source(10, 38) + SourceIndex(0) name (foo) -3 >Emitted(16, 25) Source(10, 32) + SourceIndex(0) name (foo) -4 >Emitted(16, 31) Source(10, 38) + SourceIndex(0) name (foo) +1->Emitted(16, 5) Source(10, 32) + SourceIndex(0) +2 >Emitted(16, 22) Source(10, 38) + SourceIndex(0) +3 >Emitted(16, 25) Source(10, 32) + SourceIndex(0) +4 >Emitted(16, 31) Source(10, 38) + SourceIndex(0) --- >>> var restParams = []; 1 >^^^^ @@ -251,8 +251,8 @@ sourceFile:sourceMapValidationFunctions.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >, x?: string, 2 > ...restParams: string[] -1 >Emitted(17, 5) Source(10, 52) + SourceIndex(0) name (foo) -2 >Emitted(17, 25) Source(10, 75) + SourceIndex(0) name (foo) +1 >Emitted(17, 5) Source(10, 52) + SourceIndex(0) +2 >Emitted(17, 25) Source(10, 75) + SourceIndex(0) --- >>> for (var _i = 3; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -267,20 +267,20 @@ sourceFile:sourceMapValidationFunctions.ts 4 > ...restParams: string[] 5 > 6 > ...restParams: string[] -1->Emitted(18, 10) Source(10, 52) + SourceIndex(0) name (foo) -2 >Emitted(18, 21) Source(10, 75) + SourceIndex(0) name (foo) -3 >Emitted(18, 22) Source(10, 52) + SourceIndex(0) name (foo) -4 >Emitted(18, 44) Source(10, 75) + SourceIndex(0) name (foo) -5 >Emitted(18, 45) Source(10, 52) + SourceIndex(0) name (foo) -6 >Emitted(18, 49) Source(10, 75) + SourceIndex(0) name (foo) +1->Emitted(18, 10) Source(10, 52) + SourceIndex(0) +2 >Emitted(18, 21) Source(10, 75) + SourceIndex(0) +3 >Emitted(18, 22) Source(10, 52) + SourceIndex(0) +4 >Emitted(18, 44) Source(10, 75) + SourceIndex(0) +5 >Emitted(18, 45) Source(10, 52) + SourceIndex(0) +6 >Emitted(18, 49) Source(10, 75) + SourceIndex(0) --- >>> restParams[_i - 3] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...restParams: string[] -1 >Emitted(19, 9) Source(10, 52) + SourceIndex(0) name (foo) -2 >Emitted(19, 44) Source(10, 75) + SourceIndex(0) name (foo) +1 >Emitted(19, 9) Source(10, 52) + SourceIndex(0) +2 >Emitted(19, 44) Source(10, 75) + SourceIndex(0) --- >>> } >>> return; @@ -292,9 +292,9 @@ sourceFile:sourceMapValidationFunctions.ts > 2 > return 3 > ; -1 >Emitted(21, 5) Source(12, 5) + SourceIndex(0) name (foo) -2 >Emitted(21, 11) Source(12, 11) + SourceIndex(0) name (foo) -3 >Emitted(21, 12) Source(12, 12) + SourceIndex(0) name (foo) +1 >Emitted(21, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(21, 11) Source(12, 11) + SourceIndex(0) +3 >Emitted(21, 12) Source(12, 12) + SourceIndex(0) --- >>>} 1 > @@ -303,7 +303,7 @@ sourceFile:sourceMapValidationFunctions.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(13, 1) + SourceIndex(0) name (foo) -2 >Emitted(22, 2) Source(13, 2) + SourceIndex(0) name (foo) +1 >Emitted(22, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(22, 2) Source(13, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationFunctions.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationImport.js b/tests/baselines/reference/sourceMapValidationImport.js index 140846abbcbfc..5f829c4ba13d9 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] +"use strict"; var m; (function (m) { var c = (function () { diff --git a/tests/baselines/reference/sourceMapValidationImport.js.map b/tests/baselines/reference/sourceMapValidationImport.js.map index a5b9c2b03176a..2a1a549beffde 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,IAAc,CAAC,CAGd;AAHD,WAAc,CAAC,EAAC,CAAC;IACbA;QAAAC;QACAC,CAACA;QAADD,QAACA;IAADA,CAACA,AADDD,IACCA;IADYA,GAACA,IACbA,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 +{"version":3,"file":"sourceMapValidationImport.js","sourceRoot":"","sources":["sourceMapValidationImport.ts"],"names":[],"mappings":";AAAA,IAAc,CAAC,CAGd;AAHD,WAAc,CAAC,EAAC,CAAC;IACb;QAAA;QACA,CAAC;QAAD,QAAC;IAAD,CAAC,AADD,IACC;IADY,GAAC,IACb,CAAA;AACL,CAAC,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 73d7e48fb2877..43eb1963a91c2 100644 --- a/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt @@ -8,6 +8,7 @@ sources: sourceMapValidationImport.ts emittedFile:tests/cases/compiler/sourceMapValidationImport.js sourceFile:sourceMapValidationImport.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var m; 1 > 2 >^^^^ @@ -21,10 +22,10 @@ sourceFile:sourceMapValidationImport.ts > 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) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 15) + SourceIndex(0) +3 >Emitted(2, 6) Source(1, 16) + SourceIndex(0) +4 >Emitted(2, 7) Source(4, 2) + SourceIndex(0) --- >>>(function (m) { 1-> @@ -38,24 +39,24 @@ sourceFile:sourceMapValidationImport.ts 3 > m 4 > 5 > { -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) +1->Emitted(3, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(3, 12) Source(1, 15) + SourceIndex(0) +3 >Emitted(3, 13) Source(1, 16) + SourceIndex(0) +4 >Emitted(3, 15) Source(1, 17) + SourceIndex(0) +5 >Emitted(3, 16) Source(1, 18) + SourceIndex(0) --- >>> var c = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(2, 5) + SourceIndex(0) name (m) +1->Emitted(4, 5) Source(2, 5) + SourceIndex(0) --- >>> function c() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(4, 9) Source(2, 5) + SourceIndex(0) name (m.c) +1->Emitted(5, 9) Source(2, 5) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -64,16 +65,16 @@ sourceFile:sourceMapValidationImport.ts 1->export class c { > 2 > } -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) +1->Emitted(6, 9) Source(3, 5) + SourceIndex(0) +2 >Emitted(6, 10) Source(3, 6) + SourceIndex(0) --- >>> return c; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -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->Emitted(7, 9) Source(3, 5) + SourceIndex(0) +2 >Emitted(7, 17) Source(3, 6) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -86,10 +87,10 @@ sourceFile:sourceMapValidationImport.ts 3 > 4 > export class c { > } -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) +1 >Emitted(8, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(8, 6) Source(3, 6) + SourceIndex(0) +3 >Emitted(8, 6) Source(2, 5) + SourceIndex(0) +4 >Emitted(8, 10) Source(3, 6) + SourceIndex(0) --- >>> m.c = c; 1->^^^^ @@ -102,10 +103,10 @@ sourceFile:sourceMapValidationImport.ts 3 > { > } 4 > -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, 12) Source(3, 6) + SourceIndex(0) name (m) -4 >Emitted(8, 13) Source(3, 6) + SourceIndex(0) name (m) +1->Emitted(9, 5) Source(2, 18) + SourceIndex(0) +2 >Emitted(9, 8) Source(2, 19) + SourceIndex(0) +3 >Emitted(9, 12) Source(3, 6) + SourceIndex(0) +4 >Emitted(9, 13) Source(3, 6) + SourceIndex(0) --- >>>})(m = exports.m || (exports.m = {})); 1-> @@ -130,15 +131,15 @@ sourceFile:sourceMapValidationImport.ts > 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) +1->Emitted(10, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(10, 4) Source(1, 15) + SourceIndex(0) +4 >Emitted(10, 5) Source(1, 16) + SourceIndex(0) +5 >Emitted(10, 8) Source(1, 15) + SourceIndex(0) +6 >Emitted(10, 17) Source(1, 16) + SourceIndex(0) +7 >Emitted(10, 22) Source(1, 15) + SourceIndex(0) +8 >Emitted(10, 31) Source(1, 16) + SourceIndex(0) +9 >Emitted(10, 39) Source(4, 2) + SourceIndex(0) --- >>>var a = m.c; 1 > @@ -159,14 +160,14 @@ sourceFile:sourceMapValidationImport.ts 6 > . 7 > c 8 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 8) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 9) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 12) + SourceIndex(0) -5 >Emitted(10, 10) Source(5, 13) + SourceIndex(0) -6 >Emitted(10, 11) Source(5, 14) + SourceIndex(0) -7 >Emitted(10, 12) Source(5, 15) + SourceIndex(0) -8 >Emitted(10, 13) Source(5, 16) + SourceIndex(0) +1 >Emitted(11, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(11, 5) Source(5, 8) + SourceIndex(0) +3 >Emitted(11, 6) Source(5, 9) + SourceIndex(0) +4 >Emitted(11, 9) Source(5, 12) + SourceIndex(0) +5 >Emitted(11, 10) Source(5, 13) + SourceIndex(0) +6 >Emitted(11, 11) Source(5, 14) + SourceIndex(0) +7 >Emitted(11, 12) Source(5, 15) + SourceIndex(0) +8 >Emitted(11, 13) Source(5, 16) + SourceIndex(0) --- >>>exports.b = m.c; 1-> @@ -185,13 +186,13 @@ sourceFile:sourceMapValidationImport.ts 5 > . 6 > c 7 > ; -1->Emitted(11, 1) Source(6, 15) + SourceIndex(0) -2 >Emitted(11, 10) Source(6, 16) + SourceIndex(0) -3 >Emitted(11, 13) Source(6, 19) + SourceIndex(0) -4 >Emitted(11, 14) Source(6, 20) + SourceIndex(0) -5 >Emitted(11, 15) Source(6, 21) + SourceIndex(0) -6 >Emitted(11, 16) Source(6, 22) + SourceIndex(0) -7 >Emitted(11, 17) Source(6, 23) + SourceIndex(0) +1->Emitted(12, 1) Source(6, 15) + SourceIndex(0) +2 >Emitted(12, 10) Source(6, 16) + SourceIndex(0) +3 >Emitted(12, 13) Source(6, 19) + SourceIndex(0) +4 >Emitted(12, 14) Source(6, 20) + SourceIndex(0) +5 >Emitted(12, 15) Source(6, 21) + SourceIndex(0) +6 >Emitted(12, 16) Source(6, 22) + SourceIndex(0) +7 >Emitted(12, 17) Source(6, 23) + SourceIndex(0) --- >>>var x = new a(); 1-> @@ -212,14 +213,14 @@ sourceFile:sourceMapValidationImport.ts 6 > a 7 > () 8 > ; -1->Emitted(12, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(12, 5) Source(7, 5) + SourceIndex(0) -3 >Emitted(12, 6) Source(7, 6) + SourceIndex(0) -4 >Emitted(12, 9) Source(7, 9) + SourceIndex(0) -5 >Emitted(12, 13) Source(7, 13) + SourceIndex(0) -6 >Emitted(12, 14) Source(7, 14) + SourceIndex(0) -7 >Emitted(12, 16) Source(7, 16) + SourceIndex(0) -8 >Emitted(12, 17) Source(7, 17) + SourceIndex(0) +1->Emitted(13, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(13, 5) Source(7, 5) + SourceIndex(0) +3 >Emitted(13, 6) Source(7, 6) + SourceIndex(0) +4 >Emitted(13, 9) Source(7, 9) + SourceIndex(0) +5 >Emitted(13, 13) Source(7, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(7, 14) + SourceIndex(0) +7 >Emitted(13, 16) Source(7, 16) + SourceIndex(0) +8 >Emitted(13, 17) Source(7, 17) + SourceIndex(0) --- >>>var y = new exports.b(); 1-> @@ -240,13 +241,13 @@ sourceFile:sourceMapValidationImport.ts 6 > b 7 > () 8 > ; -1->Emitted(13, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(13, 5) Source(8, 5) + SourceIndex(0) -3 >Emitted(13, 6) Source(8, 6) + SourceIndex(0) -4 >Emitted(13, 9) Source(8, 9) + SourceIndex(0) -5 >Emitted(13, 13) Source(8, 13) + SourceIndex(0) -6 >Emitted(13, 22) Source(8, 14) + SourceIndex(0) -7 >Emitted(13, 24) Source(8, 16) + SourceIndex(0) -8 >Emitted(13, 25) Source(8, 17) + SourceIndex(0) +1->Emitted(14, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(14, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(14, 6) Source(8, 6) + SourceIndex(0) +4 >Emitted(14, 9) Source(8, 9) + SourceIndex(0) +5 >Emitted(14, 13) Source(8, 13) + SourceIndex(0) +6 >Emitted(14, 22) Source(8, 14) + SourceIndex(0) +7 >Emitted(14, 24) Source(8, 16) + SourceIndex(0) +8 >Emitted(14, 25) Source(8, 17) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationImport.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.js b/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.js new file mode 100644 index 0000000000000..ec6b5682edd62 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.js @@ -0,0 +1,10 @@ +//// [sourceMapValidationLambdaSpanningMultipleLines.ts] +((item: string) => + item +) + +//// [sourceMapValidationLambdaSpanningMultipleLines.js] +(function (item) { + return item; +}); +//# sourceMappingURL=sourceMapValidationLambdaSpanningMultipleLines.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.js.map b/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.js.map new file mode 100644 index 0000000000000..c0151106e7c46 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationLambdaSpanningMultipleLines.js.map] +{"version":3,"file":"sourceMapValidationLambdaSpanningMultipleLines.js","sourceRoot":"","sources":["sourceMapValidationLambdaSpanningMultipleLines.ts"],"names":[],"mappings":"AAAA,CAAC,UAAC,IAAY;IACV,OAAA,IAAI;AAAJ,CAAI,CACP,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.sourcemap.txt b/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.sourcemap.txt new file mode 100644 index 0000000000000..475aa1debeff2 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.sourcemap.txt @@ -0,0 +1,54 @@ +=================================================================== +JsFile: sourceMapValidationLambdaSpanningMultipleLines.js +mapUrl: sourceMapValidationLambdaSpanningMultipleLines.js.map +sourceRoot: +sources: sourceMapValidationLambdaSpanningMultipleLines.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationLambdaSpanningMultipleLines.js +sourceFile:sourceMapValidationLambdaSpanningMultipleLines.ts +------------------------------------------------------------------- +>>>(function (item) { +1 > +2 >^ +3 > ^^^^^^^^^^ +4 > ^^^^ +5 > ^^-> +1 > +2 >( +3 > ( +4 > item: string +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(1, 2) Source(1, 2) + SourceIndex(0) +3 >Emitted(1, 12) Source(1, 3) + SourceIndex(0) +4 >Emitted(1, 16) Source(1, 15) + SourceIndex(0) +--- +>>> return item; +1->^^^^ +2 > ^^^^^^^ +3 > ^^^^ +1->) => + > +2 > +3 > item +1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(2, 12) Source(2, 5) + SourceIndex(0) +3 >Emitted(2, 16) Source(2, 9) + SourceIndex(0) +--- +>>>}); +1 > +2 >^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >item +3 > + > ) +4 > +1 >Emitted(3, 1) Source(2, 5) + SourceIndex(0) +2 >Emitted(3, 2) Source(2, 9) + SourceIndex(0) +3 >Emitted(3, 3) Source(3, 2) + SourceIndex(0) +4 >Emitted(3, 4) Source(3, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationLambdaSpanningMultipleLines.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.symbols b/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.symbols new file mode 100644 index 0000000000000..c7ff4ca9d9fb6 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.symbols @@ -0,0 +1,8 @@ +=== tests/cases/compiler/sourceMapValidationLambdaSpanningMultipleLines.ts === +((item: string) => +>item : Symbol(item, Decl(sourceMapValidationLambdaSpanningMultipleLines.ts, 0, 2)) + + item +>item : Symbol(item, Decl(sourceMapValidationLambdaSpanningMultipleLines.ts, 0, 2)) + +) diff --git a/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.types b/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.types new file mode 100644 index 0000000000000..d39119cbd9126 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationLambdaSpanningMultipleLines.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/sourceMapValidationLambdaSpanningMultipleLines.ts === +((item: string) => +>((item: string) => item) : (item: string) => string +>(item: string) => item : (item: string) => string +>item : string + + item +>item : string + +) diff --git a/tests/baselines/reference/sourceMapValidationModule.js.map b/tests/baselines/reference/sourceMapValidationModule.js.map index b56797bbf98ac..4cc15e902ed39 100644 --- a/tests/baselines/reference/sourceMapValidationModule.js.map +++ b/tests/baselines/reference/sourceMapValidationModule.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationModule.js.map] -{"version":3,"file":"sourceMapValidationModule.js","sourceRoot":"","sources":["sourceMapValidationModule.ts"],"names":["m2","m3","m3.m4","m3.foo"],"mappings":"AAAA,IAAO,EAAE,CAGR;AAHD,WAAO,EAAE,EAAC,CAAC;IACPA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IACXA,CAACA,EAAEA,CAACA;AACRA,CAACA,EAHM,EAAE,KAAF,EAAE,QAGR;AACD,IAAO,EAAE,CAQR;AARD,WAAO,EAAE,EAAC,CAAC;IACPC,IAAOA,EAAEA,CAERA;IAFDA,WAAOA,EAAEA,EAACA,CAACA;QACIC,IAACA,GAAGA,EAAEA,CAACA;IACtBA,CAACA,EAFMD,EAAEA,KAAFA,EAAEA,QAERA;IAEDA;QACIE,MAAMA,CAACA,EAAEA,CAACA,CAACA,CAACA;IAChBA,CAACA;IAFeF,MAAGA,MAElBA,CAAAA;AACLA,CAACA,EARM,EAAE,KAAF,EAAE,QAQR"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationModule.js","sourceRoot":"","sources":["sourceMapValidationModule.ts"],"names":[],"mappings":"AAAA,IAAO,EAAE,CAGR;AAHD,WAAO,EAAE,EAAC,CAAC;IACP,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,CAAC,EAAE,CAAC;AACR,CAAC,EAHM,EAAE,KAAF,EAAE,QAGR;AACD,IAAO,EAAE,CAQR;AARD,WAAO,EAAE,EAAC,CAAC;IACP,IAAO,EAAE,CAER;IAFD,WAAO,EAAE,EAAC,CAAC;QACI,IAAC,GAAG,EAAE,CAAC;IACtB,CAAC,EAFM,EAAE,KAAF,EAAE,QAER;IAED;QACI,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IAChB,CAAC;IAFe,MAAG,MAElB,CAAA;AACL,CAAC,EARM,EAAE,KAAF,EAAE,QAQR"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationModule.sourcemap.txt b/tests/baselines/reference/sourceMapValidationModule.sourcemap.txt index 286fffb44691e..a03e3567b8c73 100644 --- a/tests/baselines/reference/sourceMapValidationModule.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationModule.sourcemap.txt @@ -57,12 +57,12 @@ sourceFile:sourceMapValidationModule.ts 4 > = 5 > 10 6 > ; -1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0) name (m2) -2 >Emitted(3, 9) Source(2, 9) + SourceIndex(0) name (m2) -3 >Emitted(3, 10) Source(2, 10) + SourceIndex(0) name (m2) -4 >Emitted(3, 13) Source(2, 13) + SourceIndex(0) name (m2) -5 >Emitted(3, 15) Source(2, 15) + SourceIndex(0) name (m2) -6 >Emitted(3, 16) Source(2, 16) + SourceIndex(0) name (m2) +1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(3, 9) Source(2, 9) + SourceIndex(0) +3 >Emitted(3, 10) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 13) Source(2, 13) + SourceIndex(0) +5 >Emitted(3, 15) Source(2, 15) + SourceIndex(0) +6 >Emitted(3, 16) Source(2, 16) + SourceIndex(0) --- >>> a++; 1 >^^^^ @@ -75,10 +75,10 @@ sourceFile:sourceMapValidationModule.ts 2 > a 3 > ++ 4 > ; -1 >Emitted(4, 5) Source(3, 5) + SourceIndex(0) name (m2) -2 >Emitted(4, 6) Source(3, 6) + SourceIndex(0) name (m2) -3 >Emitted(4, 8) Source(3, 8) + SourceIndex(0) name (m2) -4 >Emitted(4, 9) Source(3, 9) + SourceIndex(0) name (m2) +1 >Emitted(4, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(4, 6) Source(3, 6) + SourceIndex(0) +3 >Emitted(4, 8) Source(3, 8) + SourceIndex(0) +4 >Emitted(4, 9) Source(3, 9) + SourceIndex(0) --- >>>})(m2 || (m2 = {})); 1-> @@ -99,8 +99,8 @@ sourceFile:sourceMapValidationModule.ts > var a = 10; > a++; > } -1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) name (m2) -2 >Emitted(5, 2) Source(4, 2) + SourceIndex(0) name (m2) +1->Emitted(5, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(5, 4) Source(1, 8) + SourceIndex(0) 4 >Emitted(5, 6) Source(1, 10) + SourceIndex(0) 5 >Emitted(5, 11) Source(1, 8) + SourceIndex(0) @@ -161,10 +161,10 @@ sourceFile:sourceMapValidationModule.ts 4 > { > export var x = 30; > } -1 >Emitted(8, 5) Source(6, 5) + SourceIndex(0) name (m3) -2 >Emitted(8, 9) Source(6, 12) + SourceIndex(0) name (m3) -3 >Emitted(8, 11) Source(6, 14) + SourceIndex(0) name (m3) -4 >Emitted(8, 12) Source(8, 6) + SourceIndex(0) name (m3) +1 >Emitted(8, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(8, 9) Source(6, 12) + SourceIndex(0) +3 >Emitted(8, 11) Source(6, 14) + SourceIndex(0) +4 >Emitted(8, 12) Source(8, 6) + SourceIndex(0) --- >>> (function (m4) { 1->^^^^ @@ -177,11 +177,11 @@ sourceFile:sourceMapValidationModule.ts 3 > m4 4 > 5 > { -1->Emitted(9, 5) Source(6, 5) + SourceIndex(0) name (m3) -2 >Emitted(9, 16) Source(6, 12) + SourceIndex(0) name (m3) -3 >Emitted(9, 18) Source(6, 14) + SourceIndex(0) name (m3) -4 >Emitted(9, 20) Source(6, 15) + SourceIndex(0) name (m3) -5 >Emitted(9, 21) Source(6, 16) + SourceIndex(0) name (m3) +1->Emitted(9, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(9, 16) Source(6, 12) + SourceIndex(0) +3 >Emitted(9, 18) Source(6, 14) + SourceIndex(0) +4 >Emitted(9, 20) Source(6, 15) + SourceIndex(0) +5 >Emitted(9, 21) Source(6, 16) + SourceIndex(0) --- >>> m4.x = 30; 1 >^^^^^^^^ @@ -196,11 +196,11 @@ sourceFile:sourceMapValidationModule.ts 3 > = 4 > 30 5 > ; -1 >Emitted(10, 9) Source(7, 20) + SourceIndex(0) name (m3.m4) -2 >Emitted(10, 13) Source(7, 21) + SourceIndex(0) name (m3.m4) -3 >Emitted(10, 16) Source(7, 24) + SourceIndex(0) name (m3.m4) -4 >Emitted(10, 18) Source(7, 26) + SourceIndex(0) name (m3.m4) -5 >Emitted(10, 19) Source(7, 27) + SourceIndex(0) name (m3.m4) +1 >Emitted(10, 9) Source(7, 20) + SourceIndex(0) +2 >Emitted(10, 13) Source(7, 21) + SourceIndex(0) +3 >Emitted(10, 16) Source(7, 24) + SourceIndex(0) +4 >Emitted(10, 18) Source(7, 26) + SourceIndex(0) +5 >Emitted(10, 19) Source(7, 27) + SourceIndex(0) --- >>> })(m4 || (m4 = {})); 1->^^^^ @@ -220,13 +220,13 @@ sourceFile:sourceMapValidationModule.ts 7 > { > export var x = 30; > } -1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) name (m3.m4) -2 >Emitted(11, 6) Source(8, 6) + SourceIndex(0) name (m3.m4) -3 >Emitted(11, 8) Source(6, 12) + SourceIndex(0) name (m3) -4 >Emitted(11, 10) Source(6, 14) + SourceIndex(0) name (m3) -5 >Emitted(11, 15) Source(6, 12) + SourceIndex(0) name (m3) -6 >Emitted(11, 17) Source(6, 14) + SourceIndex(0) name (m3) -7 >Emitted(11, 25) Source(8, 6) + SourceIndex(0) name (m3) +1->Emitted(11, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(11, 6) Source(8, 6) + SourceIndex(0) +3 >Emitted(11, 8) Source(6, 12) + SourceIndex(0) +4 >Emitted(11, 10) Source(6, 14) + SourceIndex(0) +5 >Emitted(11, 15) Source(6, 12) + SourceIndex(0) +6 >Emitted(11, 17) Source(6, 14) + SourceIndex(0) +7 >Emitted(11, 25) Source(8, 6) + SourceIndex(0) --- >>> function foo() { 1 >^^^^ @@ -234,7 +234,7 @@ sourceFile:sourceMapValidationModule.ts 1 > > > -1 >Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (m3) +1 >Emitted(12, 5) Source(10, 5) + SourceIndex(0) --- >>> return m4.x; 1->^^^^^^^^ @@ -252,13 +252,13 @@ sourceFile:sourceMapValidationModule.ts 5 > . 6 > x 7 > ; -1->Emitted(13, 9) Source(11, 9) + SourceIndex(0) name (m3.foo) -2 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) name (m3.foo) -3 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) name (m3.foo) -4 >Emitted(13, 18) Source(11, 18) + SourceIndex(0) name (m3.foo) -5 >Emitted(13, 19) Source(11, 19) + SourceIndex(0) name (m3.foo) -6 >Emitted(13, 20) Source(11, 20) + SourceIndex(0) name (m3.foo) -7 >Emitted(13, 21) Source(11, 21) + SourceIndex(0) name (m3.foo) +1->Emitted(13, 9) Source(11, 9) + SourceIndex(0) +2 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +3 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) +4 >Emitted(13, 18) Source(11, 18) + SourceIndex(0) +5 >Emitted(13, 19) Source(11, 19) + SourceIndex(0) +6 >Emitted(13, 20) Source(11, 20) + SourceIndex(0) +7 >Emitted(13, 21) Source(11, 21) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -267,8 +267,8 @@ sourceFile:sourceMapValidationModule.ts 1 > > 2 > } -1 >Emitted(14, 5) Source(12, 5) + SourceIndex(0) name (m3.foo) -2 >Emitted(14, 6) Source(12, 6) + SourceIndex(0) name (m3.foo) +1 >Emitted(14, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(14, 6) Source(12, 6) + SourceIndex(0) --- >>> m3.foo = foo; 1->^^^^ @@ -282,10 +282,10 @@ sourceFile:sourceMapValidationModule.ts > return m4.x; > } 4 > -1->Emitted(15, 5) Source(10, 21) + SourceIndex(0) name (m3) -2 >Emitted(15, 11) Source(10, 24) + SourceIndex(0) name (m3) -3 >Emitted(15, 17) Source(12, 6) + SourceIndex(0) name (m3) -4 >Emitted(15, 18) Source(12, 6) + SourceIndex(0) name (m3) +1->Emitted(15, 5) Source(10, 21) + SourceIndex(0) +2 >Emitted(15, 11) Source(10, 24) + SourceIndex(0) +3 >Emitted(15, 17) Source(12, 6) + SourceIndex(0) +4 >Emitted(15, 18) Source(12, 6) + SourceIndex(0) --- >>>})(m3 || (m3 = {})); 1-> @@ -312,8 +312,8 @@ sourceFile:sourceMapValidationModule.ts > return m4.x; > } > } -1->Emitted(16, 1) Source(13, 1) + SourceIndex(0) name (m3) -2 >Emitted(16, 2) Source(13, 2) + SourceIndex(0) name (m3) +1->Emitted(16, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(13, 2) + SourceIndex(0) 3 >Emitted(16, 4) Source(5, 8) + SourceIndex(0) 4 >Emitted(16, 6) Source(5, 10) + SourceIndex(0) 5 >Emitted(16, 11) Source(5, 8) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationStatements.js.map b/tests/baselines/reference/sourceMapValidationStatements.js.map index a1ea3b1db796b..b4b5c48fc2237 100644 --- a/tests/baselines/reference/sourceMapValidationStatements.js.map +++ b/tests/baselines/reference/sourceMapValidationStatements.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationStatements.js.map] -{"version":3,"file":"sourceMapValidationStatements.js","sourceRoot":"","sources":["sourceMapValidationStatements.ts"],"names":["f"],"mappings":"AAAA;IACIA,IAAIA,CAACA,CAACA;IACNA,IAAIA,CAACA,GAAGA,CAACA,CAACA;IACVA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,EAAEA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;QAC1BA,CAACA,IAAIA,CAACA,CAACA;QACPA,CAACA,IAAIA,CAACA,CAACA;IACXA,CAACA;IACDA,EAAEA,CAACA,CAACA,CAACA,GAAGA,EAAEA,CAACA,CAACA,CAACA;QACTA,CAACA,IAAIA,CAACA,CAACA;IACXA,CAACA;IAACA,IAAIA,CAACA,CAACA;QACJA,CAACA,IAAIA,EAAEA,CAACA;QACRA,CAACA,EAAEA,CAACA;IACRA,CAACA;IACDA,IAAIA,CAACA,GAAGA;QACJA,CAACA;QACDA,CAACA;QACDA,CAACA;KACJA,CAACA;IACFA,IAAIA,GAAGA,GAAGA;QACNA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,OAAOA;KACbA,CAACA;IACFA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;QACdA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA;QACbA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IACfA,CAACA;IACDA,IAAIA,CAACA;QACDA,GAAGA,CAACA,CAACA,GAAGA,MAAMA,CAACA;IACnBA,CAAEA;IAAAA,KAAKA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;QACTA,EAAEA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,EAAEA,CAACA,CAACA,CAACA;YACbA,GAAGA,CAACA,CAACA,GAAGA,EAAEA,CAACA;QACfA,CAACA;QAACA,IAAIA,CAACA,CAACA;YACJA,GAAGA,CAACA,CAACA,GAAGA,KAAKA,CAACA;QAClBA,CAACA;IACLA,CAACA;IACDA,IAAIA,CAACA;QACDA,MAAMA,IAAIA,KAAKA,EAAEA,CAACA;IACtBA,CAAEA;IAAAA,KAAKA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA;QACVA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IACfA,CAACA;YAASA,CAACA;QACPA,CAACA,GAAGA,EAAEA,CAACA;IACXA,CAACA;IACDA,MAAMA,GAAGA,EAAEA,CAACA;QACRA,CAACA,GAAGA,CAACA,CAACA;QACNA,CAACA,GAAGA,EAAEA,CAACA;IACXA,CAACA;IACDA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA;QACZA,KAAKA,CAACA,EAAEA,CAACA;YACLA,CAACA,EAAEA,CAACA;YACJA,KAAKA,CAACA;QAEVA,CAACA;QACDA,KAAKA,CAACA,EAAEA,CAACA;YACLA,CAACA,EAAEA,CAACA;YACJA,KAAKA,CAACA;QAEVA,CAACA;QACDA,SAASA,CAACA;YACNA,CAACA,IAAIA,CAACA,CAACA;YACPA,CAACA,GAAGA,EAAEA,CAACA;YACPA,KAAKA,CAACA;QAEVA,CAACA;IACLA,CAACA;IACDA,OAAOA,CAACA,GAAGA,EAAEA,EAAEA,CAACA;QACZA,CAACA,EAAEA,CAACA;IACRA,CAACA;IACDA,GAAGA,CAACA;QACAA,CAACA,EAAEA,CAACA;IACRA,CAACA,QAAQA,CAACA,GAAGA,CAACA,EAACA;IACfA,CAACA,GAAGA,CAACA,CAACA;IACNA,IAAIA,CAACA,GAAGA,CAACA,CAACA,IAAIA,CAACA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,CAACA;IACjCA,CAACA,CAACA,IAAIA,CAACA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,CAACA;IACzBA,CAACA,KAAKA,CAACA,CAACA;IACRA,CAACA,GAAGA,CAACA,GAAGA,EAAEA,CAACA;IACXA,IAAIA,CAACA,GAAGA,CAACA,CAACA;IACVA,MAAMA,CAACA;AACXA,CAACA;AACD,IAAI,CAAC,GAAG;IACJ,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC,CAAC;AACF,CAAC,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationStatements.js","sourceRoot":"","sources":["sourceMapValidationStatements.ts"],"names":[],"mappings":"AAAA;IACI,IAAI,CAAC,CAAC;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1B,CAAC,IAAI,CAAC,CAAC;QACP,CAAC,IAAI,CAAC,CAAC;IACX,CAAC;IACD,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACT,CAAC,IAAI,CAAC,CAAC;IACX,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,CAAC,IAAI,EAAE,CAAC;QACR,CAAC,EAAE,CAAC;IACR,CAAC;IACD,IAAI,CAAC,GAAG;QACJ,CAAC;QACD,CAAC;QACD,CAAC;KACJ,CAAC;IACF,IAAI,GAAG,GAAG;QACN,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,OAAO;KACb,CAAC;IACF,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACd,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACb,IAAI,CAAC,GAAG,EAAE,CAAC;IACf,CAAC;IACD,IAAI,CAAC;QACD,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACnB,CAAE;IAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACT,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACb,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;QACf,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;QAClB,CAAC;IACL,CAAC;IACD,IAAI,CAAC;QACD,MAAM,IAAI,KAAK,EAAE,CAAC;IACtB,CAAE;IAAA,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACV,IAAI,CAAC,GAAG,EAAE,CAAC;IACf,CAAC;YAAS,CAAC;QACP,CAAC,GAAG,EAAE,CAAC;IACX,CAAC;IACD,MAAM,GAAG,EAAE,CAAC;QACR,CAAC,GAAG,CAAC,CAAC;QACN,CAAC,GAAG,EAAE,CAAC;IACX,CAAC;IACD,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACZ,KAAK,CAAC,EAAE,CAAC;YACL,CAAC,EAAE,CAAC;YACJ,KAAK,CAAC;QAEV,CAAC;QACD,KAAK,CAAC,EAAE,CAAC;YACL,CAAC,EAAE,CAAC;YACJ,KAAK,CAAC;QAEV,CAAC;QACD,SAAS,CAAC;YACN,CAAC,IAAI,CAAC,CAAC;YACP,CAAC,GAAG,EAAE,CAAC;YACP,KAAK,CAAC;QAEV,CAAC;IACL,CAAC;IACD,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;QACZ,CAAC,EAAE,CAAC;IACR,CAAC;IACD,GAAG,CAAC;QACA,CAAC,EAAE,CAAC;IACR,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAC;IACf,CAAC,GAAG,CAAC,CAAC;IACN,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC,KAAK,CAAC,CAAC;IACR,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IACX,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,MAAM,CAAC;AACX,CAAC;AACD,IAAI,CAAC,GAAG;IACJ,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC,CAAC;AACF,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt b/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt index 2a2daed01db76..41212b9b3db51 100644 --- a/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt @@ -25,10 +25,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > var 3 > y 4 > ; -1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) name (f) -2 >Emitted(2, 9) Source(2, 9) + SourceIndex(0) name (f) -3 >Emitted(2, 10) Source(2, 10) + SourceIndex(0) name (f) -4 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) name (f) +1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(2, 9) Source(2, 9) + SourceIndex(0) +3 >Emitted(2, 10) Source(2, 10) + SourceIndex(0) +4 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) --- >>> var x = 0; 1->^^^^ @@ -45,12 +45,12 @@ sourceFile:sourceMapValidationStatements.ts 4 > = 5 > 0 6 > ; -1->Emitted(3, 5) Source(3, 5) + SourceIndex(0) name (f) -2 >Emitted(3, 9) Source(3, 9) + SourceIndex(0) name (f) -3 >Emitted(3, 10) Source(3, 10) + SourceIndex(0) name (f) -4 >Emitted(3, 13) Source(3, 13) + SourceIndex(0) name (f) -5 >Emitted(3, 14) Source(3, 14) + SourceIndex(0) name (f) -6 >Emitted(3, 15) Source(3, 15) + SourceIndex(0) name (f) +1->Emitted(3, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(3, 9) Source(3, 9) + SourceIndex(0) +3 >Emitted(3, 10) Source(3, 10) + SourceIndex(0) +4 >Emitted(3, 13) Source(3, 13) + SourceIndex(0) +5 >Emitted(3, 14) Source(3, 14) + SourceIndex(0) +6 >Emitted(3, 15) Source(3, 15) + SourceIndex(0) --- >>> for (var i = 0; i < 10; i++) { 1->^^^^ @@ -90,24 +90,24 @@ sourceFile:sourceMapValidationStatements.ts 16> ++ 17> ) 18> { -1->Emitted(4, 5) Source(4, 5) + SourceIndex(0) name (f) -2 >Emitted(4, 8) Source(4, 8) + SourceIndex(0) name (f) -3 >Emitted(4, 9) Source(4, 9) + SourceIndex(0) name (f) -4 >Emitted(4, 10) Source(4, 10) + SourceIndex(0) name (f) -5 >Emitted(4, 13) Source(4, 13) + SourceIndex(0) name (f) -6 >Emitted(4, 14) Source(4, 14) + SourceIndex(0) name (f) -7 >Emitted(4, 15) Source(4, 15) + SourceIndex(0) name (f) -8 >Emitted(4, 18) Source(4, 18) + SourceIndex(0) name (f) -9 >Emitted(4, 19) Source(4, 19) + SourceIndex(0) name (f) -10>Emitted(4, 21) Source(4, 21) + SourceIndex(0) name (f) -11>Emitted(4, 22) Source(4, 22) + SourceIndex(0) name (f) -12>Emitted(4, 25) Source(4, 25) + SourceIndex(0) name (f) -13>Emitted(4, 27) Source(4, 27) + SourceIndex(0) name (f) -14>Emitted(4, 29) Source(4, 29) + SourceIndex(0) name (f) -15>Emitted(4, 30) Source(4, 30) + SourceIndex(0) name (f) -16>Emitted(4, 32) Source(4, 32) + SourceIndex(0) name (f) -17>Emitted(4, 34) Source(4, 34) + SourceIndex(0) name (f) -18>Emitted(4, 35) Source(4, 35) + SourceIndex(0) name (f) +1->Emitted(4, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(4, 8) Source(4, 8) + SourceIndex(0) +3 >Emitted(4, 9) Source(4, 9) + SourceIndex(0) +4 >Emitted(4, 10) Source(4, 10) + SourceIndex(0) +5 >Emitted(4, 13) Source(4, 13) + SourceIndex(0) +6 >Emitted(4, 14) Source(4, 14) + SourceIndex(0) +7 >Emitted(4, 15) Source(4, 15) + SourceIndex(0) +8 >Emitted(4, 18) Source(4, 18) + SourceIndex(0) +9 >Emitted(4, 19) Source(4, 19) + SourceIndex(0) +10>Emitted(4, 21) Source(4, 21) + SourceIndex(0) +11>Emitted(4, 22) Source(4, 22) + SourceIndex(0) +12>Emitted(4, 25) Source(4, 25) + SourceIndex(0) +13>Emitted(4, 27) Source(4, 27) + SourceIndex(0) +14>Emitted(4, 29) Source(4, 29) + SourceIndex(0) +15>Emitted(4, 30) Source(4, 30) + SourceIndex(0) +16>Emitted(4, 32) Source(4, 32) + SourceIndex(0) +17>Emitted(4, 34) Source(4, 34) + SourceIndex(0) +18>Emitted(4, 35) Source(4, 35) + SourceIndex(0) --- >>> x += i; 1 >^^^^^^^^ @@ -122,11 +122,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > += 4 > i 5 > ; -1 >Emitted(5, 9) Source(5, 9) + SourceIndex(0) name (f) -2 >Emitted(5, 10) Source(5, 10) + SourceIndex(0) name (f) -3 >Emitted(5, 14) Source(5, 14) + SourceIndex(0) name (f) -4 >Emitted(5, 15) Source(5, 15) + SourceIndex(0) name (f) -5 >Emitted(5, 16) Source(5, 16) + SourceIndex(0) name (f) +1 >Emitted(5, 9) Source(5, 9) + SourceIndex(0) +2 >Emitted(5, 10) Source(5, 10) + SourceIndex(0) +3 >Emitted(5, 14) Source(5, 14) + SourceIndex(0) +4 >Emitted(5, 15) Source(5, 15) + SourceIndex(0) +5 >Emitted(5, 16) Source(5, 16) + SourceIndex(0) --- >>> x *= 0; 1->^^^^^^^^ @@ -140,11 +140,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > *= 4 > 0 5 > ; -1->Emitted(6, 9) Source(6, 9) + SourceIndex(0) name (f) -2 >Emitted(6, 10) Source(6, 10) + SourceIndex(0) name (f) -3 >Emitted(6, 14) Source(6, 14) + SourceIndex(0) name (f) -4 >Emitted(6, 15) Source(6, 15) + SourceIndex(0) name (f) -5 >Emitted(6, 16) Source(6, 16) + SourceIndex(0) name (f) +1->Emitted(6, 9) Source(6, 9) + SourceIndex(0) +2 >Emitted(6, 10) Source(6, 10) + SourceIndex(0) +3 >Emitted(6, 14) Source(6, 14) + SourceIndex(0) +4 >Emitted(6, 15) Source(6, 15) + SourceIndex(0) +5 >Emitted(6, 16) Source(6, 16) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -153,8 +153,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(7, 5) Source(7, 5) + SourceIndex(0) name (f) -2 >Emitted(7, 6) Source(7, 6) + SourceIndex(0) name (f) +1 >Emitted(7, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(7, 6) Source(7, 6) + SourceIndex(0) --- >>> if (x > 17) { 1->^^^^ @@ -178,16 +178,16 @@ sourceFile:sourceMapValidationStatements.ts 8 > ) 9 > 10> { -1->Emitted(8, 5) Source(8, 5) + SourceIndex(0) name (f) -2 >Emitted(8, 7) Source(8, 7) + SourceIndex(0) name (f) -3 >Emitted(8, 8) Source(8, 8) + SourceIndex(0) name (f) -4 >Emitted(8, 9) Source(8, 9) + SourceIndex(0) name (f) -5 >Emitted(8, 10) Source(8, 10) + SourceIndex(0) name (f) -6 >Emitted(8, 13) Source(8, 13) + SourceIndex(0) name (f) -7 >Emitted(8, 15) Source(8, 15) + SourceIndex(0) name (f) -8 >Emitted(8, 16) Source(8, 16) + SourceIndex(0) name (f) -9 >Emitted(8, 17) Source(8, 17) + SourceIndex(0) name (f) -10>Emitted(8, 18) Source(8, 18) + SourceIndex(0) name (f) +1->Emitted(8, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(8, 7) Source(8, 7) + SourceIndex(0) +3 >Emitted(8, 8) Source(8, 8) + SourceIndex(0) +4 >Emitted(8, 9) Source(8, 9) + SourceIndex(0) +5 >Emitted(8, 10) Source(8, 10) + SourceIndex(0) +6 >Emitted(8, 13) Source(8, 13) + SourceIndex(0) +7 >Emitted(8, 15) Source(8, 15) + SourceIndex(0) +8 >Emitted(8, 16) Source(8, 16) + SourceIndex(0) +9 >Emitted(8, 17) Source(8, 17) + SourceIndex(0) +10>Emitted(8, 18) Source(8, 18) + SourceIndex(0) --- >>> x /= 9; 1 >^^^^^^^^ @@ -201,11 +201,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > /= 4 > 9 5 > ; -1 >Emitted(9, 9) Source(9, 9) + SourceIndex(0) name (f) -2 >Emitted(9, 10) Source(9, 10) + SourceIndex(0) name (f) -3 >Emitted(9, 14) Source(9, 14) + SourceIndex(0) name (f) -4 >Emitted(9, 15) Source(9, 15) + SourceIndex(0) name (f) -5 >Emitted(9, 16) Source(9, 16) + SourceIndex(0) name (f) +1 >Emitted(9, 9) Source(9, 9) + SourceIndex(0) +2 >Emitted(9, 10) Source(9, 10) + SourceIndex(0) +3 >Emitted(9, 14) Source(9, 14) + SourceIndex(0) +4 >Emitted(9, 15) Source(9, 15) + SourceIndex(0) +5 >Emitted(9, 16) Source(9, 16) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -214,8 +214,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(10, 5) Source(10, 5) + SourceIndex(0) name (f) -2 >Emitted(10, 6) Source(10, 6) + SourceIndex(0) name (f) +1 >Emitted(10, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(10, 6) Source(10, 6) + SourceIndex(0) --- >>> else { 1->^^^^ @@ -227,10 +227,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > else 3 > 4 > { -1->Emitted(11, 5) Source(10, 7) + SourceIndex(0) name (f) -2 >Emitted(11, 9) Source(10, 11) + SourceIndex(0) name (f) -3 >Emitted(11, 10) Source(10, 12) + SourceIndex(0) name (f) -4 >Emitted(11, 11) Source(10, 13) + SourceIndex(0) name (f) +1->Emitted(11, 5) Source(10, 7) + SourceIndex(0) +2 >Emitted(11, 9) Source(10, 11) + SourceIndex(0) +3 >Emitted(11, 10) Source(10, 12) + SourceIndex(0) +4 >Emitted(11, 11) Source(10, 13) + SourceIndex(0) --- >>> x += 10; 1->^^^^^^^^ @@ -244,11 +244,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > += 4 > 10 5 > ; -1->Emitted(12, 9) Source(11, 9) + SourceIndex(0) name (f) -2 >Emitted(12, 10) Source(11, 10) + SourceIndex(0) name (f) -3 >Emitted(12, 14) Source(11, 14) + SourceIndex(0) name (f) -4 >Emitted(12, 16) Source(11, 16) + SourceIndex(0) name (f) -5 >Emitted(12, 17) Source(11, 17) + SourceIndex(0) name (f) +1->Emitted(12, 9) Source(11, 9) + SourceIndex(0) +2 >Emitted(12, 10) Source(11, 10) + SourceIndex(0) +3 >Emitted(12, 14) Source(11, 14) + SourceIndex(0) +4 >Emitted(12, 16) Source(11, 16) + SourceIndex(0) +5 >Emitted(12, 17) Source(11, 17) + SourceIndex(0) --- >>> x++; 1 >^^^^^^^^ @@ -260,10 +260,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > x 3 > ++ 4 > ; -1 >Emitted(13, 9) Source(12, 9) + SourceIndex(0) name (f) -2 >Emitted(13, 10) Source(12, 10) + SourceIndex(0) name (f) -3 >Emitted(13, 12) Source(12, 12) + SourceIndex(0) name (f) -4 >Emitted(13, 13) Source(12, 13) + SourceIndex(0) name (f) +1 >Emitted(13, 9) Source(12, 9) + SourceIndex(0) +2 >Emitted(13, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(13, 12) Source(12, 12) + SourceIndex(0) +4 >Emitted(13, 13) Source(12, 13) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -272,8 +272,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(14, 5) Source(13, 5) + SourceIndex(0) name (f) -2 >Emitted(14, 6) Source(13, 6) + SourceIndex(0) name (f) +1 >Emitted(14, 5) Source(13, 5) + SourceIndex(0) +2 >Emitted(14, 6) Source(13, 6) + SourceIndex(0) --- >>> var a = [ 1->^^^^ @@ -285,10 +285,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > var 3 > a 4 > = -1->Emitted(15, 5) Source(14, 5) + SourceIndex(0) name (f) -2 >Emitted(15, 9) Source(14, 9) + SourceIndex(0) name (f) -3 >Emitted(15, 10) Source(14, 10) + SourceIndex(0) name (f) -4 >Emitted(15, 13) Source(14, 13) + SourceIndex(0) name (f) +1->Emitted(15, 5) Source(14, 5) + SourceIndex(0) +2 >Emitted(15, 9) Source(14, 9) + SourceIndex(0) +3 >Emitted(15, 10) Source(14, 10) + SourceIndex(0) +4 >Emitted(15, 13) Source(14, 13) + SourceIndex(0) --- >>> 1, 1 >^^^^^^^^ @@ -297,8 +297,8 @@ sourceFile:sourceMapValidationStatements.ts 1 >[ > 2 > 1 -1 >Emitted(16, 9) Source(15, 9) + SourceIndex(0) name (f) -2 >Emitted(16, 10) Source(15, 10) + SourceIndex(0) name (f) +1 >Emitted(16, 9) Source(15, 9) + SourceIndex(0) +2 >Emitted(16, 10) Source(15, 10) + SourceIndex(0) --- >>> 2, 1->^^^^^^^^ @@ -307,8 +307,8 @@ sourceFile:sourceMapValidationStatements.ts 1->, > 2 > 2 -1->Emitted(17, 9) Source(16, 9) + SourceIndex(0) name (f) -2 >Emitted(17, 10) Source(16, 10) + SourceIndex(0) name (f) +1->Emitted(17, 9) Source(16, 9) + SourceIndex(0) +2 >Emitted(17, 10) Source(16, 10) + SourceIndex(0) --- >>> 3 1->^^^^^^^^ @@ -316,8 +316,8 @@ sourceFile:sourceMapValidationStatements.ts 1->, > 2 > 3 -1->Emitted(18, 9) Source(17, 9) + SourceIndex(0) name (f) -2 >Emitted(18, 10) Source(17, 10) + SourceIndex(0) name (f) +1->Emitted(18, 9) Source(17, 9) + SourceIndex(0) +2 >Emitted(18, 10) Source(17, 10) + SourceIndex(0) --- >>> ]; 1 >^^^^^ @@ -326,8 +326,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > ] 2 > ; -1 >Emitted(19, 6) Source(18, 6) + SourceIndex(0) name (f) -2 >Emitted(19, 7) Source(18, 7) + SourceIndex(0) name (f) +1 >Emitted(19, 6) Source(18, 6) + SourceIndex(0) +2 >Emitted(19, 7) Source(18, 7) + SourceIndex(0) --- >>> var obj = { 1->^^^^ @@ -339,10 +339,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > var 3 > obj 4 > = -1->Emitted(20, 5) Source(19, 5) + SourceIndex(0) name (f) -2 >Emitted(20, 9) Source(19, 9) + SourceIndex(0) name (f) -3 >Emitted(20, 12) Source(19, 12) + SourceIndex(0) name (f) -4 >Emitted(20, 15) Source(19, 15) + SourceIndex(0) name (f) +1->Emitted(20, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(20, 9) Source(19, 9) + SourceIndex(0) +3 >Emitted(20, 12) Source(19, 12) + SourceIndex(0) +4 >Emitted(20, 15) Source(19, 15) + SourceIndex(0) --- >>> z: 1, 1 >^^^^^^^^ @@ -355,10 +355,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > z 3 > : 4 > 1 -1 >Emitted(21, 9) Source(20, 9) + SourceIndex(0) name (f) -2 >Emitted(21, 10) Source(20, 10) + SourceIndex(0) name (f) -3 >Emitted(21, 12) Source(20, 12) + SourceIndex(0) name (f) -4 >Emitted(21, 13) Source(20, 13) + SourceIndex(0) name (f) +1 >Emitted(21, 9) Source(20, 9) + SourceIndex(0) +2 >Emitted(21, 10) Source(20, 10) + SourceIndex(0) +3 >Emitted(21, 12) Source(20, 12) + SourceIndex(0) +4 >Emitted(21, 13) Source(20, 13) + SourceIndex(0) --- >>> q: "hello" 1->^^^^^^^^ @@ -370,10 +370,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > q 3 > : 4 > "hello" -1->Emitted(22, 9) Source(21, 9) + SourceIndex(0) name (f) -2 >Emitted(22, 10) Source(21, 10) + SourceIndex(0) name (f) -3 >Emitted(22, 12) Source(21, 12) + SourceIndex(0) name (f) -4 >Emitted(22, 19) Source(21, 19) + SourceIndex(0) name (f) +1->Emitted(22, 9) Source(21, 9) + SourceIndex(0) +2 >Emitted(22, 10) Source(21, 10) + SourceIndex(0) +3 >Emitted(22, 12) Source(21, 12) + SourceIndex(0) +4 >Emitted(22, 19) Source(21, 19) + SourceIndex(0) --- >>> }; 1 >^^^^^ @@ -382,8 +382,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > } 2 > ; -1 >Emitted(23, 6) Source(22, 6) + SourceIndex(0) name (f) -2 >Emitted(23, 7) Source(22, 7) + SourceIndex(0) name (f) +1 >Emitted(23, 6) Source(22, 6) + SourceIndex(0) +2 >Emitted(23, 7) Source(22, 7) + SourceIndex(0) --- >>> for (var j in a) { 1->^^^^ @@ -411,18 +411,18 @@ sourceFile:sourceMapValidationStatements.ts 10> ) 11> 12> { -1->Emitted(24, 5) Source(23, 5) + SourceIndex(0) name (f) -2 >Emitted(24, 8) Source(23, 8) + SourceIndex(0) name (f) -3 >Emitted(24, 9) Source(23, 9) + SourceIndex(0) name (f) -4 >Emitted(24, 10) Source(23, 10) + SourceIndex(0) name (f) -5 >Emitted(24, 13) Source(23, 13) + SourceIndex(0) name (f) -6 >Emitted(24, 14) Source(23, 14) + SourceIndex(0) name (f) -7 >Emitted(24, 15) Source(23, 15) + SourceIndex(0) name (f) -8 >Emitted(24, 19) Source(23, 19) + SourceIndex(0) name (f) -9 >Emitted(24, 20) Source(23, 20) + SourceIndex(0) name (f) -10>Emitted(24, 21) Source(23, 21) + SourceIndex(0) name (f) -11>Emitted(24, 22) Source(23, 22) + SourceIndex(0) name (f) -12>Emitted(24, 23) Source(23, 23) + SourceIndex(0) name (f) +1->Emitted(24, 5) Source(23, 5) + SourceIndex(0) +2 >Emitted(24, 8) Source(23, 8) + SourceIndex(0) +3 >Emitted(24, 9) Source(23, 9) + SourceIndex(0) +4 >Emitted(24, 10) Source(23, 10) + SourceIndex(0) +5 >Emitted(24, 13) Source(23, 13) + SourceIndex(0) +6 >Emitted(24, 14) Source(23, 14) + SourceIndex(0) +7 >Emitted(24, 15) Source(23, 15) + SourceIndex(0) +8 >Emitted(24, 19) Source(23, 19) + SourceIndex(0) +9 >Emitted(24, 20) Source(23, 20) + SourceIndex(0) +10>Emitted(24, 21) Source(23, 21) + SourceIndex(0) +11>Emitted(24, 22) Source(23, 22) + SourceIndex(0) +12>Emitted(24, 23) Source(23, 23) + SourceIndex(0) --- >>> obj.z = a[j]; 1 >^^^^^^^^ @@ -446,16 +446,16 @@ sourceFile:sourceMapValidationStatements.ts 8 > j 9 > ] 10> ; -1 >Emitted(25, 9) Source(24, 9) + SourceIndex(0) name (f) -2 >Emitted(25, 12) Source(24, 12) + SourceIndex(0) name (f) -3 >Emitted(25, 13) Source(24, 13) + SourceIndex(0) name (f) -4 >Emitted(25, 14) Source(24, 14) + SourceIndex(0) name (f) -5 >Emitted(25, 17) Source(24, 17) + SourceIndex(0) name (f) -6 >Emitted(25, 18) Source(24, 18) + SourceIndex(0) name (f) -7 >Emitted(25, 19) Source(24, 19) + SourceIndex(0) name (f) -8 >Emitted(25, 20) Source(24, 20) + SourceIndex(0) name (f) -9 >Emitted(25, 21) Source(24, 21) + SourceIndex(0) name (f) -10>Emitted(25, 22) Source(24, 22) + SourceIndex(0) name (f) +1 >Emitted(25, 9) Source(24, 9) + SourceIndex(0) +2 >Emitted(25, 12) Source(24, 12) + SourceIndex(0) +3 >Emitted(25, 13) Source(24, 13) + SourceIndex(0) +4 >Emitted(25, 14) Source(24, 14) + SourceIndex(0) +5 >Emitted(25, 17) Source(24, 17) + SourceIndex(0) +6 >Emitted(25, 18) Source(24, 18) + SourceIndex(0) +7 >Emitted(25, 19) Source(24, 19) + SourceIndex(0) +8 >Emitted(25, 20) Source(24, 20) + SourceIndex(0) +9 >Emitted(25, 21) Source(24, 21) + SourceIndex(0) +10>Emitted(25, 22) Source(24, 22) + SourceIndex(0) --- >>> var v = 10; 1 >^^^^^^^^ @@ -471,12 +471,12 @@ sourceFile:sourceMapValidationStatements.ts 4 > = 5 > 10 6 > ; -1 >Emitted(26, 9) Source(25, 9) + SourceIndex(0) name (f) -2 >Emitted(26, 13) Source(25, 13) + SourceIndex(0) name (f) -3 >Emitted(26, 14) Source(25, 14) + SourceIndex(0) name (f) -4 >Emitted(26, 17) Source(25, 17) + SourceIndex(0) name (f) -5 >Emitted(26, 19) Source(25, 19) + SourceIndex(0) name (f) -6 >Emitted(26, 20) Source(25, 20) + SourceIndex(0) name (f) +1 >Emitted(26, 9) Source(25, 9) + SourceIndex(0) +2 >Emitted(26, 13) Source(25, 13) + SourceIndex(0) +3 >Emitted(26, 14) Source(25, 14) + SourceIndex(0) +4 >Emitted(26, 17) Source(25, 17) + SourceIndex(0) +5 >Emitted(26, 19) Source(25, 19) + SourceIndex(0) +6 >Emitted(26, 20) Source(25, 20) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -485,8 +485,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(27, 5) Source(26, 5) + SourceIndex(0) name (f) -2 >Emitted(27, 6) Source(26, 6) + SourceIndex(0) name (f) +1 >Emitted(27, 5) Source(26, 5) + SourceIndex(0) +2 >Emitted(27, 6) Source(26, 6) + SourceIndex(0) --- >>> try { 1->^^^^ @@ -497,9 +497,9 @@ sourceFile:sourceMapValidationStatements.ts > 2 > try 3 > { -1->Emitted(28, 5) Source(27, 5) + SourceIndex(0) name (f) -2 >Emitted(28, 9) Source(27, 9) + SourceIndex(0) name (f) -3 >Emitted(28, 10) Source(27, 10) + SourceIndex(0) name (f) +1->Emitted(28, 5) Source(27, 5) + SourceIndex(0) +2 >Emitted(28, 9) Source(27, 9) + SourceIndex(0) +3 >Emitted(28, 10) Source(27, 10) + SourceIndex(0) --- >>> obj.q = "ohhh"; 1->^^^^^^^^ @@ -517,13 +517,13 @@ sourceFile:sourceMapValidationStatements.ts 5 > = 6 > "ohhh" 7 > ; -1->Emitted(29, 9) Source(28, 9) + SourceIndex(0) name (f) -2 >Emitted(29, 12) Source(28, 12) + SourceIndex(0) name (f) -3 >Emitted(29, 13) Source(28, 13) + SourceIndex(0) name (f) -4 >Emitted(29, 14) Source(28, 14) + SourceIndex(0) name (f) -5 >Emitted(29, 17) Source(28, 17) + SourceIndex(0) name (f) -6 >Emitted(29, 23) Source(28, 23) + SourceIndex(0) name (f) -7 >Emitted(29, 24) Source(28, 24) + SourceIndex(0) name (f) +1->Emitted(29, 9) Source(28, 9) + SourceIndex(0) +2 >Emitted(29, 12) Source(28, 12) + SourceIndex(0) +3 >Emitted(29, 13) Source(28, 13) + SourceIndex(0) +4 >Emitted(29, 14) Source(28, 14) + SourceIndex(0) +5 >Emitted(29, 17) Source(28, 17) + SourceIndex(0) +6 >Emitted(29, 23) Source(28, 23) + SourceIndex(0) +7 >Emitted(29, 24) Source(28, 24) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -532,8 +532,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(30, 5) Source(29, 5) + SourceIndex(0) name (f) -2 >Emitted(30, 6) Source(29, 7) + SourceIndex(0) name (f) +1 >Emitted(30, 5) Source(29, 5) + SourceIndex(0) +2 >Emitted(30, 6) Source(29, 7) + SourceIndex(0) --- >>> catch (e) { 1->^^^^ @@ -553,14 +553,14 @@ sourceFile:sourceMapValidationStatements.ts 6 > ) 7 > 8 > { -1->Emitted(31, 5) Source(29, 7) + SourceIndex(0) name (f) -2 >Emitted(31, 10) Source(29, 12) + SourceIndex(0) name (f) -3 >Emitted(31, 11) Source(29, 13) + SourceIndex(0) name (f) -4 >Emitted(31, 12) Source(29, 14) + SourceIndex(0) name (f) -5 >Emitted(31, 13) Source(29, 15) + SourceIndex(0) name (f) -6 >Emitted(31, 14) Source(29, 16) + SourceIndex(0) name (f) -7 >Emitted(31, 15) Source(29, 17) + SourceIndex(0) name (f) -8 >Emitted(31, 16) Source(29, 18) + SourceIndex(0) name (f) +1->Emitted(31, 5) Source(29, 7) + SourceIndex(0) +2 >Emitted(31, 10) Source(29, 12) + SourceIndex(0) +3 >Emitted(31, 11) Source(29, 13) + SourceIndex(0) +4 >Emitted(31, 12) Source(29, 14) + SourceIndex(0) +5 >Emitted(31, 13) Source(29, 15) + SourceIndex(0) +6 >Emitted(31, 14) Source(29, 16) + SourceIndex(0) +7 >Emitted(31, 15) Source(29, 17) + SourceIndex(0) +8 >Emitted(31, 16) Source(29, 18) + SourceIndex(0) --- >>> if (obj.z < 10) { 1->^^^^^^^^ @@ -588,18 +588,18 @@ sourceFile:sourceMapValidationStatements.ts 10> ) 11> 12> { -1->Emitted(32, 9) Source(30, 9) + SourceIndex(0) name (f) -2 >Emitted(32, 11) Source(30, 11) + SourceIndex(0) name (f) -3 >Emitted(32, 12) Source(30, 12) + SourceIndex(0) name (f) -4 >Emitted(32, 13) Source(30, 13) + SourceIndex(0) name (f) -5 >Emitted(32, 16) Source(30, 16) + SourceIndex(0) name (f) -6 >Emitted(32, 17) Source(30, 17) + SourceIndex(0) name (f) -7 >Emitted(32, 18) Source(30, 18) + SourceIndex(0) name (f) -8 >Emitted(32, 21) Source(30, 21) + SourceIndex(0) name (f) -9 >Emitted(32, 23) Source(30, 23) + SourceIndex(0) name (f) -10>Emitted(32, 24) Source(30, 24) + SourceIndex(0) name (f) -11>Emitted(32, 25) Source(30, 25) + SourceIndex(0) name (f) -12>Emitted(32, 26) Source(30, 26) + SourceIndex(0) name (f) +1->Emitted(32, 9) Source(30, 9) + SourceIndex(0) +2 >Emitted(32, 11) Source(30, 11) + SourceIndex(0) +3 >Emitted(32, 12) Source(30, 12) + SourceIndex(0) +4 >Emitted(32, 13) Source(30, 13) + SourceIndex(0) +5 >Emitted(32, 16) Source(30, 16) + SourceIndex(0) +6 >Emitted(32, 17) Source(30, 17) + SourceIndex(0) +7 >Emitted(32, 18) Source(30, 18) + SourceIndex(0) +8 >Emitted(32, 21) Source(30, 21) + SourceIndex(0) +9 >Emitted(32, 23) Source(30, 23) + SourceIndex(0) +10>Emitted(32, 24) Source(30, 24) + SourceIndex(0) +11>Emitted(32, 25) Source(30, 25) + SourceIndex(0) +12>Emitted(32, 26) Source(30, 26) + SourceIndex(0) --- >>> obj.z = 12; 1 >^^^^^^^^^^^^ @@ -617,13 +617,13 @@ sourceFile:sourceMapValidationStatements.ts 5 > = 6 > 12 7 > ; -1 >Emitted(33, 13) Source(31, 13) + SourceIndex(0) name (f) -2 >Emitted(33, 16) Source(31, 16) + SourceIndex(0) name (f) -3 >Emitted(33, 17) Source(31, 17) + SourceIndex(0) name (f) -4 >Emitted(33, 18) Source(31, 18) + SourceIndex(0) name (f) -5 >Emitted(33, 21) Source(31, 21) + SourceIndex(0) name (f) -6 >Emitted(33, 23) Source(31, 23) + SourceIndex(0) name (f) -7 >Emitted(33, 24) Source(31, 24) + SourceIndex(0) name (f) +1 >Emitted(33, 13) Source(31, 13) + SourceIndex(0) +2 >Emitted(33, 16) Source(31, 16) + SourceIndex(0) +3 >Emitted(33, 17) Source(31, 17) + SourceIndex(0) +4 >Emitted(33, 18) Source(31, 18) + SourceIndex(0) +5 >Emitted(33, 21) Source(31, 21) + SourceIndex(0) +6 >Emitted(33, 23) Source(31, 23) + SourceIndex(0) +7 >Emitted(33, 24) Source(31, 24) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -632,8 +632,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(34, 9) Source(32, 9) + SourceIndex(0) name (f) -2 >Emitted(34, 10) Source(32, 10) + SourceIndex(0) name (f) +1 >Emitted(34, 9) Source(32, 9) + SourceIndex(0) +2 >Emitted(34, 10) Source(32, 10) + SourceIndex(0) --- >>> else { 1->^^^^^^^^ @@ -645,10 +645,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > else 3 > 4 > { -1->Emitted(35, 9) Source(32, 11) + SourceIndex(0) name (f) -2 >Emitted(35, 13) Source(32, 15) + SourceIndex(0) name (f) -3 >Emitted(35, 14) Source(32, 16) + SourceIndex(0) name (f) -4 >Emitted(35, 15) Source(32, 17) + SourceIndex(0) name (f) +1->Emitted(35, 9) Source(32, 11) + SourceIndex(0) +2 >Emitted(35, 13) Source(32, 15) + SourceIndex(0) +3 >Emitted(35, 14) Source(32, 16) + SourceIndex(0) +4 >Emitted(35, 15) Source(32, 17) + SourceIndex(0) --- >>> obj.q = "hmm"; 1->^^^^^^^^^^^^ @@ -666,13 +666,13 @@ sourceFile:sourceMapValidationStatements.ts 5 > = 6 > "hmm" 7 > ; -1->Emitted(36, 13) Source(33, 13) + SourceIndex(0) name (f) -2 >Emitted(36, 16) Source(33, 16) + SourceIndex(0) name (f) -3 >Emitted(36, 17) Source(33, 17) + SourceIndex(0) name (f) -4 >Emitted(36, 18) Source(33, 18) + SourceIndex(0) name (f) -5 >Emitted(36, 21) Source(33, 21) + SourceIndex(0) name (f) -6 >Emitted(36, 26) Source(33, 26) + SourceIndex(0) name (f) -7 >Emitted(36, 27) Source(33, 27) + SourceIndex(0) name (f) +1->Emitted(36, 13) Source(33, 13) + SourceIndex(0) +2 >Emitted(36, 16) Source(33, 16) + SourceIndex(0) +3 >Emitted(36, 17) Source(33, 17) + SourceIndex(0) +4 >Emitted(36, 18) Source(33, 18) + SourceIndex(0) +5 >Emitted(36, 21) Source(33, 21) + SourceIndex(0) +6 >Emitted(36, 26) Source(33, 26) + SourceIndex(0) +7 >Emitted(36, 27) Source(33, 27) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -680,8 +680,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(37, 9) Source(34, 9) + SourceIndex(0) name (f) -2 >Emitted(37, 10) Source(34, 10) + SourceIndex(0) name (f) +1 >Emitted(37, 9) Source(34, 9) + SourceIndex(0) +2 >Emitted(37, 10) Source(34, 10) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -690,8 +690,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(38, 5) Source(35, 5) + SourceIndex(0) name (f) -2 >Emitted(38, 6) Source(35, 6) + SourceIndex(0) name (f) +1 >Emitted(38, 5) Source(35, 5) + SourceIndex(0) +2 >Emitted(38, 6) Source(35, 6) + SourceIndex(0) --- >>> try { 1->^^^^ @@ -702,9 +702,9 @@ sourceFile:sourceMapValidationStatements.ts > 2 > try 3 > { -1->Emitted(39, 5) Source(36, 5) + SourceIndex(0) name (f) -2 >Emitted(39, 9) Source(36, 9) + SourceIndex(0) name (f) -3 >Emitted(39, 10) Source(36, 10) + SourceIndex(0) name (f) +1->Emitted(39, 5) Source(36, 5) + SourceIndex(0) +2 >Emitted(39, 9) Source(36, 9) + SourceIndex(0) +3 >Emitted(39, 10) Source(36, 10) + SourceIndex(0) --- >>> throw new Error(); 1->^^^^^^^^ @@ -720,12 +720,12 @@ sourceFile:sourceMapValidationStatements.ts 4 > Error 5 > () 6 > ; -1->Emitted(40, 9) Source(37, 9) + SourceIndex(0) name (f) -2 >Emitted(40, 15) Source(37, 15) + SourceIndex(0) name (f) -3 >Emitted(40, 19) Source(37, 19) + SourceIndex(0) name (f) -4 >Emitted(40, 24) Source(37, 24) + SourceIndex(0) name (f) -5 >Emitted(40, 26) Source(37, 26) + SourceIndex(0) name (f) -6 >Emitted(40, 27) Source(37, 27) + SourceIndex(0) name (f) +1->Emitted(40, 9) Source(37, 9) + SourceIndex(0) +2 >Emitted(40, 15) Source(37, 15) + SourceIndex(0) +3 >Emitted(40, 19) Source(37, 19) + SourceIndex(0) +4 >Emitted(40, 24) Source(37, 24) + SourceIndex(0) +5 >Emitted(40, 26) Source(37, 26) + SourceIndex(0) +6 >Emitted(40, 27) Source(37, 27) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -734,8 +734,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(41, 5) Source(38, 5) + SourceIndex(0) name (f) -2 >Emitted(41, 6) Source(38, 7) + SourceIndex(0) name (f) +1 >Emitted(41, 5) Source(38, 5) + SourceIndex(0) +2 >Emitted(41, 6) Source(38, 7) + SourceIndex(0) --- >>> catch (e1) { 1->^^^^ @@ -755,14 +755,14 @@ sourceFile:sourceMapValidationStatements.ts 6 > ) 7 > 8 > { -1->Emitted(42, 5) Source(38, 7) + SourceIndex(0) name (f) -2 >Emitted(42, 10) Source(38, 12) + SourceIndex(0) name (f) -3 >Emitted(42, 11) Source(38, 13) + SourceIndex(0) name (f) -4 >Emitted(42, 12) Source(38, 14) + SourceIndex(0) name (f) -5 >Emitted(42, 14) Source(38, 16) + SourceIndex(0) name (f) -6 >Emitted(42, 15) Source(38, 17) + SourceIndex(0) name (f) -7 >Emitted(42, 16) Source(38, 18) + SourceIndex(0) name (f) -8 >Emitted(42, 17) Source(38, 19) + SourceIndex(0) name (f) +1->Emitted(42, 5) Source(38, 7) + SourceIndex(0) +2 >Emitted(42, 10) Source(38, 12) + SourceIndex(0) +3 >Emitted(42, 11) Source(38, 13) + SourceIndex(0) +4 >Emitted(42, 12) Source(38, 14) + SourceIndex(0) +5 >Emitted(42, 14) Source(38, 16) + SourceIndex(0) +6 >Emitted(42, 15) Source(38, 17) + SourceIndex(0) +7 >Emitted(42, 16) Source(38, 18) + SourceIndex(0) +8 >Emitted(42, 17) Source(38, 19) + SourceIndex(0) --- >>> var b = e1; 1->^^^^^^^^ @@ -778,12 +778,12 @@ sourceFile:sourceMapValidationStatements.ts 4 > = 5 > e1 6 > ; -1->Emitted(43, 9) Source(39, 9) + SourceIndex(0) name (f) -2 >Emitted(43, 13) Source(39, 13) + SourceIndex(0) name (f) -3 >Emitted(43, 14) Source(39, 14) + SourceIndex(0) name (f) -4 >Emitted(43, 17) Source(39, 17) + SourceIndex(0) name (f) -5 >Emitted(43, 19) Source(39, 19) + SourceIndex(0) name (f) -6 >Emitted(43, 20) Source(39, 20) + SourceIndex(0) name (f) +1->Emitted(43, 9) Source(39, 9) + SourceIndex(0) +2 >Emitted(43, 13) Source(39, 13) + SourceIndex(0) +3 >Emitted(43, 14) Source(39, 14) + SourceIndex(0) +4 >Emitted(43, 17) Source(39, 17) + SourceIndex(0) +5 >Emitted(43, 19) Source(39, 19) + SourceIndex(0) +6 >Emitted(43, 20) Source(39, 20) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -792,8 +792,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(44, 5) Source(40, 5) + SourceIndex(0) name (f) -2 >Emitted(44, 6) Source(40, 6) + SourceIndex(0) name (f) +1 >Emitted(44, 5) Source(40, 5) + SourceIndex(0) +2 >Emitted(44, 6) Source(40, 6) + SourceIndex(0) --- >>> finally { 1->^^^^^^^^^^^^ @@ -801,8 +801,8 @@ sourceFile:sourceMapValidationStatements.ts 3 > ^^^-> 1-> finally 2 > { -1->Emitted(45, 13) Source(40, 15) + SourceIndex(0) name (f) -2 >Emitted(45, 14) Source(40, 16) + SourceIndex(0) name (f) +1->Emitted(45, 13) Source(40, 15) + SourceIndex(0) +2 >Emitted(45, 14) Source(40, 16) + SourceIndex(0) --- >>> y = 70; 1->^^^^^^^^ @@ -816,11 +816,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > = 4 > 70 5 > ; -1->Emitted(46, 9) Source(41, 9) + SourceIndex(0) name (f) -2 >Emitted(46, 10) Source(41, 10) + SourceIndex(0) name (f) -3 >Emitted(46, 13) Source(41, 13) + SourceIndex(0) name (f) -4 >Emitted(46, 15) Source(41, 15) + SourceIndex(0) name (f) -5 >Emitted(46, 16) Source(41, 16) + SourceIndex(0) name (f) +1->Emitted(46, 9) Source(41, 9) + SourceIndex(0) +2 >Emitted(46, 10) Source(41, 10) + SourceIndex(0) +3 >Emitted(46, 13) Source(41, 13) + SourceIndex(0) +4 >Emitted(46, 15) Source(41, 15) + SourceIndex(0) +5 >Emitted(46, 16) Source(41, 16) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -829,8 +829,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(47, 5) Source(42, 5) + SourceIndex(0) name (f) -2 >Emitted(47, 6) Source(42, 6) + SourceIndex(0) name (f) +1 >Emitted(47, 5) Source(42, 5) + SourceIndex(0) +2 >Emitted(47, 6) Source(42, 6) + SourceIndex(0) --- >>> with (obj) { 1->^^^^ @@ -844,11 +844,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > obj 4 > ) 5 > { -1->Emitted(48, 5) Source(43, 5) + SourceIndex(0) name (f) -2 >Emitted(48, 11) Source(43, 11) + SourceIndex(0) name (f) -3 >Emitted(48, 14) Source(43, 14) + SourceIndex(0) name (f) -4 >Emitted(48, 16) Source(43, 16) + SourceIndex(0) name (f) -5 >Emitted(48, 17) Source(43, 17) + SourceIndex(0) name (f) +1->Emitted(48, 5) Source(43, 5) + SourceIndex(0) +2 >Emitted(48, 11) Source(43, 11) + SourceIndex(0) +3 >Emitted(48, 14) Source(43, 14) + SourceIndex(0) +4 >Emitted(48, 16) Source(43, 16) + SourceIndex(0) +5 >Emitted(48, 17) Source(43, 17) + SourceIndex(0) --- >>> i = 2; 1 >^^^^^^^^ @@ -863,11 +863,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > = 4 > 2 5 > ; -1 >Emitted(49, 9) Source(44, 9) + SourceIndex(0) name (f) -2 >Emitted(49, 10) Source(44, 10) + SourceIndex(0) name (f) -3 >Emitted(49, 13) Source(44, 13) + SourceIndex(0) name (f) -4 >Emitted(49, 14) Source(44, 14) + SourceIndex(0) name (f) -5 >Emitted(49, 15) Source(44, 15) + SourceIndex(0) name (f) +1 >Emitted(49, 9) Source(44, 9) + SourceIndex(0) +2 >Emitted(49, 10) Source(44, 10) + SourceIndex(0) +3 >Emitted(49, 13) Source(44, 13) + SourceIndex(0) +4 >Emitted(49, 14) Source(44, 14) + SourceIndex(0) +5 >Emitted(49, 15) Source(44, 15) + SourceIndex(0) --- >>> z = 10; 1->^^^^^^^^ @@ -881,11 +881,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > = 4 > 10 5 > ; -1->Emitted(50, 9) Source(45, 9) + SourceIndex(0) name (f) -2 >Emitted(50, 10) Source(45, 10) + SourceIndex(0) name (f) -3 >Emitted(50, 13) Source(45, 13) + SourceIndex(0) name (f) -4 >Emitted(50, 15) Source(45, 15) + SourceIndex(0) name (f) -5 >Emitted(50, 16) Source(45, 16) + SourceIndex(0) name (f) +1->Emitted(50, 9) Source(45, 9) + SourceIndex(0) +2 >Emitted(50, 10) Source(45, 10) + SourceIndex(0) +3 >Emitted(50, 13) Source(45, 13) + SourceIndex(0) +4 >Emitted(50, 15) Source(45, 15) + SourceIndex(0) +5 >Emitted(50, 16) Source(45, 16) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -894,8 +894,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(51, 5) Source(46, 5) + SourceIndex(0) name (f) -2 >Emitted(51, 6) Source(46, 6) + SourceIndex(0) name (f) +1 >Emitted(51, 5) Source(46, 5) + SourceIndex(0) +2 >Emitted(51, 6) Source(46, 6) + SourceIndex(0) --- >>> switch (obj.z) { 1->^^^^ @@ -919,16 +919,16 @@ sourceFile:sourceMapValidationStatements.ts 8 > ) 9 > 10> { -1->Emitted(52, 5) Source(47, 5) + SourceIndex(0) name (f) -2 >Emitted(52, 11) Source(47, 11) + SourceIndex(0) name (f) -3 >Emitted(52, 12) Source(47, 12) + SourceIndex(0) name (f) -4 >Emitted(52, 13) Source(47, 13) + SourceIndex(0) name (f) -5 >Emitted(52, 16) Source(47, 16) + SourceIndex(0) name (f) -6 >Emitted(52, 17) Source(47, 17) + SourceIndex(0) name (f) -7 >Emitted(52, 18) Source(47, 18) + SourceIndex(0) name (f) -8 >Emitted(52, 19) Source(47, 19) + SourceIndex(0) name (f) -9 >Emitted(52, 20) Source(47, 20) + SourceIndex(0) name (f) -10>Emitted(52, 21) Source(47, 21) + SourceIndex(0) name (f) +1->Emitted(52, 5) Source(47, 5) + SourceIndex(0) +2 >Emitted(52, 11) Source(47, 11) + SourceIndex(0) +3 >Emitted(52, 12) Source(47, 12) + SourceIndex(0) +4 >Emitted(52, 13) Source(47, 13) + SourceIndex(0) +5 >Emitted(52, 16) Source(47, 16) + SourceIndex(0) +6 >Emitted(52, 17) Source(47, 17) + SourceIndex(0) +7 >Emitted(52, 18) Source(47, 18) + SourceIndex(0) +8 >Emitted(52, 19) Source(47, 19) + SourceIndex(0) +9 >Emitted(52, 20) Source(47, 20) + SourceIndex(0) +10>Emitted(52, 21) Source(47, 21) + SourceIndex(0) --- >>> case 0: { 1 >^^^^^^^^ @@ -942,11 +942,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > 0 4 > : 5 > { -1 >Emitted(53, 9) Source(48, 9) + SourceIndex(0) name (f) -2 >Emitted(53, 14) Source(48, 14) + SourceIndex(0) name (f) -3 >Emitted(53, 15) Source(48, 15) + SourceIndex(0) name (f) -4 >Emitted(53, 17) Source(48, 17) + SourceIndex(0) name (f) -5 >Emitted(53, 18) Source(48, 18) + SourceIndex(0) name (f) +1 >Emitted(53, 9) Source(48, 9) + SourceIndex(0) +2 >Emitted(53, 14) Source(48, 14) + SourceIndex(0) +3 >Emitted(53, 15) Source(48, 15) + SourceIndex(0) +4 >Emitted(53, 17) Source(48, 17) + SourceIndex(0) +5 >Emitted(53, 18) Source(48, 18) + SourceIndex(0) --- >>> x++; 1 >^^^^^^^^^^^^ @@ -959,10 +959,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > x 3 > ++ 4 > ; -1 >Emitted(54, 13) Source(49, 13) + SourceIndex(0) name (f) -2 >Emitted(54, 14) Source(49, 14) + SourceIndex(0) name (f) -3 >Emitted(54, 16) Source(49, 16) + SourceIndex(0) name (f) -4 >Emitted(54, 17) Source(49, 17) + SourceIndex(0) name (f) +1 >Emitted(54, 13) Source(49, 13) + SourceIndex(0) +2 >Emitted(54, 14) Source(49, 14) + SourceIndex(0) +3 >Emitted(54, 16) Source(49, 16) + SourceIndex(0) +4 >Emitted(54, 17) Source(49, 17) + SourceIndex(0) --- >>> break; 1->^^^^^^^^^^^^ @@ -972,9 +972,9 @@ sourceFile:sourceMapValidationStatements.ts > 2 > break 3 > ; -1->Emitted(55, 13) Source(50, 13) + SourceIndex(0) name (f) -2 >Emitted(55, 18) Source(50, 18) + SourceIndex(0) name (f) -3 >Emitted(55, 19) Source(50, 19) + SourceIndex(0) name (f) +1->Emitted(55, 13) Source(50, 13) + SourceIndex(0) +2 >Emitted(55, 18) Source(50, 18) + SourceIndex(0) +3 >Emitted(55, 19) Source(50, 19) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -984,8 +984,8 @@ sourceFile:sourceMapValidationStatements.ts > > 2 > } -1 >Emitted(56, 9) Source(52, 9) + SourceIndex(0) name (f) -2 >Emitted(56, 10) Source(52, 10) + SourceIndex(0) name (f) +1 >Emitted(56, 9) Source(52, 9) + SourceIndex(0) +2 >Emitted(56, 10) Source(52, 10) + SourceIndex(0) --- >>> case 1: { 1->^^^^^^^^ @@ -999,11 +999,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > 1 4 > : 5 > { -1->Emitted(57, 9) Source(53, 9) + SourceIndex(0) name (f) -2 >Emitted(57, 14) Source(53, 14) + SourceIndex(0) name (f) -3 >Emitted(57, 15) Source(53, 15) + SourceIndex(0) name (f) -4 >Emitted(57, 17) Source(53, 17) + SourceIndex(0) name (f) -5 >Emitted(57, 18) Source(53, 18) + SourceIndex(0) name (f) +1->Emitted(57, 9) Source(53, 9) + SourceIndex(0) +2 >Emitted(57, 14) Source(53, 14) + SourceIndex(0) +3 >Emitted(57, 15) Source(53, 15) + SourceIndex(0) +4 >Emitted(57, 17) Source(53, 17) + SourceIndex(0) +5 >Emitted(57, 18) Source(53, 18) + SourceIndex(0) --- >>> x--; 1 >^^^^^^^^^^^^ @@ -1016,10 +1016,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > x 3 > -- 4 > ; -1 >Emitted(58, 13) Source(54, 13) + SourceIndex(0) name (f) -2 >Emitted(58, 14) Source(54, 14) + SourceIndex(0) name (f) -3 >Emitted(58, 16) Source(54, 16) + SourceIndex(0) name (f) -4 >Emitted(58, 17) Source(54, 17) + SourceIndex(0) name (f) +1 >Emitted(58, 13) Source(54, 13) + SourceIndex(0) +2 >Emitted(58, 14) Source(54, 14) + SourceIndex(0) +3 >Emitted(58, 16) Source(54, 16) + SourceIndex(0) +4 >Emitted(58, 17) Source(54, 17) + SourceIndex(0) --- >>> break; 1->^^^^^^^^^^^^ @@ -1029,9 +1029,9 @@ sourceFile:sourceMapValidationStatements.ts > 2 > break 3 > ; -1->Emitted(59, 13) Source(55, 13) + SourceIndex(0) name (f) -2 >Emitted(59, 18) Source(55, 18) + SourceIndex(0) name (f) -3 >Emitted(59, 19) Source(55, 19) + SourceIndex(0) name (f) +1->Emitted(59, 13) Source(55, 13) + SourceIndex(0) +2 >Emitted(59, 18) Source(55, 18) + SourceIndex(0) +3 >Emitted(59, 19) Source(55, 19) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -1041,8 +1041,8 @@ sourceFile:sourceMapValidationStatements.ts > > 2 > } -1 >Emitted(60, 9) Source(57, 9) + SourceIndex(0) name (f) -2 >Emitted(60, 10) Source(57, 10) + SourceIndex(0) name (f) +1 >Emitted(60, 9) Source(57, 9) + SourceIndex(0) +2 >Emitted(60, 10) Source(57, 10) + SourceIndex(0) --- >>> default: { 1->^^^^^^^^ @@ -1053,9 +1053,9 @@ sourceFile:sourceMapValidationStatements.ts > 2 > default: 3 > { -1->Emitted(61, 9) Source(58, 9) + SourceIndex(0) name (f) -2 >Emitted(61, 18) Source(58, 18) + SourceIndex(0) name (f) -3 >Emitted(61, 19) Source(58, 19) + SourceIndex(0) name (f) +1->Emitted(61, 9) Source(58, 9) + SourceIndex(0) +2 >Emitted(61, 18) Source(58, 18) + SourceIndex(0) +3 >Emitted(61, 19) Source(58, 19) + SourceIndex(0) --- >>> x *= 2; 1->^^^^^^^^^^^^ @@ -1070,11 +1070,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > *= 4 > 2 5 > ; -1->Emitted(62, 13) Source(59, 13) + SourceIndex(0) name (f) -2 >Emitted(62, 14) Source(59, 14) + SourceIndex(0) name (f) -3 >Emitted(62, 18) Source(59, 18) + SourceIndex(0) name (f) -4 >Emitted(62, 19) Source(59, 19) + SourceIndex(0) name (f) -5 >Emitted(62, 20) Source(59, 20) + SourceIndex(0) name (f) +1->Emitted(62, 13) Source(59, 13) + SourceIndex(0) +2 >Emitted(62, 14) Source(59, 14) + SourceIndex(0) +3 >Emitted(62, 18) Source(59, 18) + SourceIndex(0) +4 >Emitted(62, 19) Source(59, 19) + SourceIndex(0) +5 >Emitted(62, 20) Source(59, 20) + SourceIndex(0) --- >>> x = 50; 1->^^^^^^^^^^^^ @@ -1088,11 +1088,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > = 4 > 50 5 > ; -1->Emitted(63, 13) Source(60, 13) + SourceIndex(0) name (f) -2 >Emitted(63, 14) Source(60, 14) + SourceIndex(0) name (f) -3 >Emitted(63, 17) Source(60, 17) + SourceIndex(0) name (f) -4 >Emitted(63, 19) Source(60, 19) + SourceIndex(0) name (f) -5 >Emitted(63, 20) Source(60, 20) + SourceIndex(0) name (f) +1->Emitted(63, 13) Source(60, 13) + SourceIndex(0) +2 >Emitted(63, 14) Source(60, 14) + SourceIndex(0) +3 >Emitted(63, 17) Source(60, 17) + SourceIndex(0) +4 >Emitted(63, 19) Source(60, 19) + SourceIndex(0) +5 >Emitted(63, 20) Source(60, 20) + SourceIndex(0) --- >>> break; 1 >^^^^^^^^^^^^ @@ -1102,9 +1102,9 @@ sourceFile:sourceMapValidationStatements.ts > 2 > break 3 > ; -1 >Emitted(64, 13) Source(61, 13) + SourceIndex(0) name (f) -2 >Emitted(64, 18) Source(61, 18) + SourceIndex(0) name (f) -3 >Emitted(64, 19) Source(61, 19) + SourceIndex(0) name (f) +1 >Emitted(64, 13) Source(61, 13) + SourceIndex(0) +2 >Emitted(64, 18) Source(61, 18) + SourceIndex(0) +3 >Emitted(64, 19) Source(61, 19) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -1113,8 +1113,8 @@ sourceFile:sourceMapValidationStatements.ts > > 2 > } -1 >Emitted(65, 9) Source(63, 9) + SourceIndex(0) name (f) -2 >Emitted(65, 10) Source(63, 10) + SourceIndex(0) name (f) +1 >Emitted(65, 9) Source(63, 9) + SourceIndex(0) +2 >Emitted(65, 10) Source(63, 10) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -1123,8 +1123,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(66, 5) Source(64, 5) + SourceIndex(0) name (f) -2 >Emitted(66, 6) Source(64, 6) + SourceIndex(0) name (f) +1 >Emitted(66, 5) Source(64, 5) + SourceIndex(0) +2 >Emitted(66, 6) Source(64, 6) + SourceIndex(0) --- >>> while (x < 10) { 1->^^^^ @@ -1142,13 +1142,13 @@ sourceFile:sourceMapValidationStatements.ts 5 > 10 6 > ) 7 > { -1->Emitted(67, 5) Source(65, 5) + SourceIndex(0) name (f) -2 >Emitted(67, 12) Source(65, 12) + SourceIndex(0) name (f) -3 >Emitted(67, 13) Source(65, 13) + SourceIndex(0) name (f) -4 >Emitted(67, 16) Source(65, 16) + SourceIndex(0) name (f) -5 >Emitted(67, 18) Source(65, 18) + SourceIndex(0) name (f) -6 >Emitted(67, 20) Source(65, 20) + SourceIndex(0) name (f) -7 >Emitted(67, 21) Source(65, 21) + SourceIndex(0) name (f) +1->Emitted(67, 5) Source(65, 5) + SourceIndex(0) +2 >Emitted(67, 12) Source(65, 12) + SourceIndex(0) +3 >Emitted(67, 13) Source(65, 13) + SourceIndex(0) +4 >Emitted(67, 16) Source(65, 16) + SourceIndex(0) +5 >Emitted(67, 18) Source(65, 18) + SourceIndex(0) +6 >Emitted(67, 20) Source(65, 20) + SourceIndex(0) +7 >Emitted(67, 21) Source(65, 21) + SourceIndex(0) --- >>> x++; 1 >^^^^^^^^ @@ -1160,10 +1160,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > x 3 > ++ 4 > ; -1 >Emitted(68, 9) Source(66, 9) + SourceIndex(0) name (f) -2 >Emitted(68, 10) Source(66, 10) + SourceIndex(0) name (f) -3 >Emitted(68, 12) Source(66, 12) + SourceIndex(0) name (f) -4 >Emitted(68, 13) Source(66, 13) + SourceIndex(0) name (f) +1 >Emitted(68, 9) Source(66, 9) + SourceIndex(0) +2 >Emitted(68, 10) Source(66, 10) + SourceIndex(0) +3 >Emitted(68, 12) Source(66, 12) + SourceIndex(0) +4 >Emitted(68, 13) Source(66, 13) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -1172,8 +1172,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(69, 5) Source(67, 5) + SourceIndex(0) name (f) -2 >Emitted(69, 6) Source(67, 6) + SourceIndex(0) name (f) +1 >Emitted(69, 5) Source(67, 5) + SourceIndex(0) +2 >Emitted(69, 6) Source(67, 6) + SourceIndex(0) --- >>> do { 1->^^^^ @@ -1184,9 +1184,9 @@ sourceFile:sourceMapValidationStatements.ts > 2 > do 3 > { -1->Emitted(70, 5) Source(68, 5) + SourceIndex(0) name (f) -2 >Emitted(70, 8) Source(68, 8) + SourceIndex(0) name (f) -3 >Emitted(70, 9) Source(68, 9) + SourceIndex(0) name (f) +1->Emitted(70, 5) Source(68, 5) + SourceIndex(0) +2 >Emitted(70, 8) Source(68, 8) + SourceIndex(0) +3 >Emitted(70, 9) Source(68, 9) + SourceIndex(0) --- >>> x--; 1->^^^^^^^^ @@ -1199,10 +1199,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > x 3 > -- 4 > ; -1->Emitted(71, 9) Source(69, 9) + SourceIndex(0) name (f) -2 >Emitted(71, 10) Source(69, 10) + SourceIndex(0) name (f) -3 >Emitted(71, 12) Source(69, 12) + SourceIndex(0) name (f) -4 >Emitted(71, 13) Source(69, 13) + SourceIndex(0) name (f) +1->Emitted(71, 9) Source(69, 9) + SourceIndex(0) +2 >Emitted(71, 10) Source(69, 10) + SourceIndex(0) +3 >Emitted(71, 12) Source(69, 12) + SourceIndex(0) +4 >Emitted(71, 13) Source(69, 13) + SourceIndex(0) --- >>> } while (x > 4); 1->^^^^ @@ -1220,13 +1220,13 @@ sourceFile:sourceMapValidationStatements.ts 5 > > 6 > 4 7 > ) -1->Emitted(72, 5) Source(70, 5) + SourceIndex(0) name (f) -2 >Emitted(72, 6) Source(70, 6) + SourceIndex(0) name (f) -3 >Emitted(72, 14) Source(70, 14) + SourceIndex(0) name (f) -4 >Emitted(72, 15) Source(70, 15) + SourceIndex(0) name (f) -5 >Emitted(72, 18) Source(70, 18) + SourceIndex(0) name (f) -6 >Emitted(72, 19) Source(70, 19) + SourceIndex(0) name (f) -7 >Emitted(72, 21) Source(70, 20) + SourceIndex(0) name (f) +1->Emitted(72, 5) Source(70, 5) + SourceIndex(0) +2 >Emitted(72, 6) Source(70, 6) + SourceIndex(0) +3 >Emitted(72, 14) Source(70, 14) + SourceIndex(0) +4 >Emitted(72, 15) Source(70, 15) + SourceIndex(0) +5 >Emitted(72, 18) Source(70, 18) + SourceIndex(0) +6 >Emitted(72, 19) Source(70, 19) + SourceIndex(0) +7 >Emitted(72, 21) Source(70, 20) + SourceIndex(0) --- >>> x = y; 1 >^^^^ @@ -1241,11 +1241,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > = 4 > y 5 > ; -1 >Emitted(73, 5) Source(71, 5) + SourceIndex(0) name (f) -2 >Emitted(73, 6) Source(71, 6) + SourceIndex(0) name (f) -3 >Emitted(73, 9) Source(71, 9) + SourceIndex(0) name (f) -4 >Emitted(73, 10) Source(71, 10) + SourceIndex(0) name (f) -5 >Emitted(73, 11) Source(71, 11) + SourceIndex(0) name (f) +1 >Emitted(73, 5) Source(71, 5) + SourceIndex(0) +2 >Emitted(73, 6) Source(71, 6) + SourceIndex(0) +3 >Emitted(73, 9) Source(71, 9) + SourceIndex(0) +4 >Emitted(73, 10) Source(71, 10) + SourceIndex(0) +5 >Emitted(73, 11) Source(71, 11) + SourceIndex(0) --- >>> var z = (x == 1) ? x + 1 : x - 1; 1->^^^^ @@ -1285,24 +1285,24 @@ sourceFile:sourceMapValidationStatements.ts 16> - 17> 1 18> ; -1->Emitted(74, 5) Source(72, 5) + SourceIndex(0) name (f) -2 >Emitted(74, 9) Source(72, 9) + SourceIndex(0) name (f) -3 >Emitted(74, 10) Source(72, 10) + SourceIndex(0) name (f) -4 >Emitted(74, 13) Source(72, 13) + SourceIndex(0) name (f) -5 >Emitted(74, 14) Source(72, 14) + SourceIndex(0) name (f) -6 >Emitted(74, 15) Source(72, 15) + SourceIndex(0) name (f) -7 >Emitted(74, 19) Source(72, 19) + SourceIndex(0) name (f) -8 >Emitted(74, 20) Source(72, 20) + SourceIndex(0) name (f) -9 >Emitted(74, 21) Source(72, 21) + SourceIndex(0) name (f) -10>Emitted(74, 24) Source(72, 24) + SourceIndex(0) name (f) -11>Emitted(74, 25) Source(72, 25) + SourceIndex(0) name (f) -12>Emitted(74, 28) Source(72, 28) + SourceIndex(0) name (f) -13>Emitted(74, 29) Source(72, 29) + SourceIndex(0) name (f) -14>Emitted(74, 32) Source(72, 32) + SourceIndex(0) name (f) -15>Emitted(74, 33) Source(72, 33) + SourceIndex(0) name (f) -16>Emitted(74, 36) Source(72, 36) + SourceIndex(0) name (f) -17>Emitted(74, 37) Source(72, 37) + SourceIndex(0) name (f) -18>Emitted(74, 38) Source(72, 38) + SourceIndex(0) name (f) +1->Emitted(74, 5) Source(72, 5) + SourceIndex(0) +2 >Emitted(74, 9) Source(72, 9) + SourceIndex(0) +3 >Emitted(74, 10) Source(72, 10) + SourceIndex(0) +4 >Emitted(74, 13) Source(72, 13) + SourceIndex(0) +5 >Emitted(74, 14) Source(72, 14) + SourceIndex(0) +6 >Emitted(74, 15) Source(72, 15) + SourceIndex(0) +7 >Emitted(74, 19) Source(72, 19) + SourceIndex(0) +8 >Emitted(74, 20) Source(72, 20) + SourceIndex(0) +9 >Emitted(74, 21) Source(72, 21) + SourceIndex(0) +10>Emitted(74, 24) Source(72, 24) + SourceIndex(0) +11>Emitted(74, 25) Source(72, 25) + SourceIndex(0) +12>Emitted(74, 28) Source(72, 28) + SourceIndex(0) +13>Emitted(74, 29) Source(72, 29) + SourceIndex(0) +14>Emitted(74, 32) Source(72, 32) + SourceIndex(0) +15>Emitted(74, 33) Source(72, 33) + SourceIndex(0) +16>Emitted(74, 36) Source(72, 36) + SourceIndex(0) +17>Emitted(74, 37) Source(72, 37) + SourceIndex(0) +18>Emitted(74, 38) Source(72, 38) + SourceIndex(0) --- >>> (x == 1) ? x + 1 : x - 1; 1 >^^^^ @@ -1336,21 +1336,21 @@ sourceFile:sourceMapValidationStatements.ts 13> - 14> 1 15> ; -1 >Emitted(75, 5) Source(73, 5) + SourceIndex(0) name (f) -2 >Emitted(75, 6) Source(73, 6) + SourceIndex(0) name (f) -3 >Emitted(75, 7) Source(73, 7) + SourceIndex(0) name (f) -4 >Emitted(75, 11) Source(73, 11) + SourceIndex(0) name (f) -5 >Emitted(75, 12) Source(73, 12) + SourceIndex(0) name (f) -6 >Emitted(75, 13) Source(73, 13) + SourceIndex(0) name (f) -7 >Emitted(75, 16) Source(73, 16) + SourceIndex(0) name (f) -8 >Emitted(75, 17) Source(73, 17) + SourceIndex(0) name (f) -9 >Emitted(75, 20) Source(73, 20) + SourceIndex(0) name (f) -10>Emitted(75, 21) Source(73, 21) + SourceIndex(0) name (f) -11>Emitted(75, 24) Source(73, 24) + SourceIndex(0) name (f) -12>Emitted(75, 25) Source(73, 25) + SourceIndex(0) name (f) -13>Emitted(75, 28) Source(73, 28) + SourceIndex(0) name (f) -14>Emitted(75, 29) Source(73, 29) + SourceIndex(0) name (f) -15>Emitted(75, 30) Source(73, 30) + SourceIndex(0) name (f) +1 >Emitted(75, 5) Source(73, 5) + SourceIndex(0) +2 >Emitted(75, 6) Source(73, 6) + SourceIndex(0) +3 >Emitted(75, 7) Source(73, 7) + SourceIndex(0) +4 >Emitted(75, 11) Source(73, 11) + SourceIndex(0) +5 >Emitted(75, 12) Source(73, 12) + SourceIndex(0) +6 >Emitted(75, 13) Source(73, 13) + SourceIndex(0) +7 >Emitted(75, 16) Source(73, 16) + SourceIndex(0) +8 >Emitted(75, 17) Source(73, 17) + SourceIndex(0) +9 >Emitted(75, 20) Source(73, 20) + SourceIndex(0) +10>Emitted(75, 21) Source(73, 21) + SourceIndex(0) +11>Emitted(75, 24) Source(73, 24) + SourceIndex(0) +12>Emitted(75, 25) Source(73, 25) + SourceIndex(0) +13>Emitted(75, 28) Source(73, 28) + SourceIndex(0) +14>Emitted(75, 29) Source(73, 29) + SourceIndex(0) +15>Emitted(75, 30) Source(73, 30) + SourceIndex(0) --- >>> x === 1; 1 >^^^^ @@ -1365,11 +1365,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > === 4 > 1 5 > ; -1 >Emitted(76, 5) Source(74, 5) + SourceIndex(0) name (f) -2 >Emitted(76, 6) Source(74, 6) + SourceIndex(0) name (f) -3 >Emitted(76, 11) Source(74, 11) + SourceIndex(0) name (f) -4 >Emitted(76, 12) Source(74, 12) + SourceIndex(0) name (f) -5 >Emitted(76, 13) Source(74, 13) + SourceIndex(0) name (f) +1 >Emitted(76, 5) Source(74, 5) + SourceIndex(0) +2 >Emitted(76, 6) Source(74, 6) + SourceIndex(0) +3 >Emitted(76, 11) Source(74, 11) + SourceIndex(0) +4 >Emitted(76, 12) Source(74, 12) + SourceIndex(0) +5 >Emitted(76, 13) Source(74, 13) + SourceIndex(0) --- >>> x = z = 40; 1->^^^^ @@ -1387,13 +1387,13 @@ sourceFile:sourceMapValidationStatements.ts 5 > = 6 > 40 7 > ; -1->Emitted(77, 5) Source(75, 5) + SourceIndex(0) name (f) -2 >Emitted(77, 6) Source(75, 6) + SourceIndex(0) name (f) -3 >Emitted(77, 9) Source(75, 9) + SourceIndex(0) name (f) -4 >Emitted(77, 10) Source(75, 10) + SourceIndex(0) name (f) -5 >Emitted(77, 13) Source(75, 13) + SourceIndex(0) name (f) -6 >Emitted(77, 15) Source(75, 15) + SourceIndex(0) name (f) -7 >Emitted(77, 16) Source(75, 16) + SourceIndex(0) name (f) +1->Emitted(77, 5) Source(75, 5) + SourceIndex(0) +2 >Emitted(77, 6) Source(75, 6) + SourceIndex(0) +3 >Emitted(77, 9) Source(75, 9) + SourceIndex(0) +4 >Emitted(77, 10) Source(75, 10) + SourceIndex(0) +5 >Emitted(77, 13) Source(75, 13) + SourceIndex(0) +6 >Emitted(77, 15) Source(75, 15) + SourceIndex(0) +7 >Emitted(77, 16) Source(75, 16) + SourceIndex(0) --- >>> eval("y"); 1 >^^^^ @@ -1409,12 +1409,12 @@ sourceFile:sourceMapValidationStatements.ts 4 > "y" 5 > ) 6 > ; -1 >Emitted(78, 5) Source(76, 5) + SourceIndex(0) name (f) -2 >Emitted(78, 9) Source(76, 9) + SourceIndex(0) name (f) -3 >Emitted(78, 10) Source(76, 10) + SourceIndex(0) name (f) -4 >Emitted(78, 13) Source(76, 13) + SourceIndex(0) name (f) -5 >Emitted(78, 14) Source(76, 14) + SourceIndex(0) name (f) -6 >Emitted(78, 15) Source(76, 15) + SourceIndex(0) name (f) +1 >Emitted(78, 5) Source(76, 5) + SourceIndex(0) +2 >Emitted(78, 9) Source(76, 9) + SourceIndex(0) +3 >Emitted(78, 10) Source(76, 10) + SourceIndex(0) +4 >Emitted(78, 13) Source(76, 13) + SourceIndex(0) +5 >Emitted(78, 14) Source(76, 14) + SourceIndex(0) +6 >Emitted(78, 15) Source(76, 15) + SourceIndex(0) --- >>> return; 1 >^^^^ @@ -1424,9 +1424,9 @@ sourceFile:sourceMapValidationStatements.ts > 2 > return 3 > ; -1 >Emitted(79, 5) Source(77, 5) + SourceIndex(0) name (f) -2 >Emitted(79, 11) Source(77, 11) + SourceIndex(0) name (f) -3 >Emitted(79, 12) Source(77, 12) + SourceIndex(0) name (f) +1 >Emitted(79, 5) Source(77, 5) + SourceIndex(0) +2 >Emitted(79, 11) Source(77, 11) + SourceIndex(0) +3 >Emitted(79, 12) Source(77, 12) + SourceIndex(0) --- >>>} 1 > @@ -1435,8 +1435,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 >} -1 >Emitted(80, 1) Source(78, 1) + SourceIndex(0) name (f) -2 >Emitted(80, 2) Source(78, 2) + SourceIndex(0) name (f) +1 >Emitted(80, 1) Source(78, 1) + SourceIndex(0) +2 >Emitted(80, 2) Source(78, 2) + SourceIndex(0) --- >>>var b = function () { 1-> diff --git a/tests/baselines/reference/sourceMapValidationWithComments.js.map b/tests/baselines/reference/sourceMapValidationWithComments.js.map index 59c8ee5748e68..4b41c7072359d 100644 --- a/tests/baselines/reference/sourceMapValidationWithComments.js.map +++ b/tests/baselines/reference/sourceMapValidationWithComments.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationWithComments.js.map] -{"version":3,"file":"sourceMapValidationWithComments.js","sourceRoot":"","sources":["sourceMapValidationWithComments.ts"],"names":["DebugClass","DebugClass.constructor","DebugClass.debugFunc"],"mappings":"AAAA;IAAAA;IAoBAC,CAACA;IAlBiBD,oBAASA,GAAvBA;QAEIE,2BAA2BA;QAC3BA,IAAIA,CAACA,GAAGA,CAACA,CAACA;QACVA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,CAACA;QACJA,yBAAyBA;QAGzBA,MAAMA,CAACA,IAAIA,CAACA;IAChBA,CAACA;IACLF,iBAACA;AAADA,CAACA,AApBD,IAoBC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationWithComments.js","sourceRoot":"","sources":["sourceMapValidationWithComments.ts"],"names":[],"mappings":"AAAA;IAAA;IAoBA,CAAC;IAlBiB,oBAAS,GAAvB;QAEI,2BAA2B;QAC3B,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,yBAAyB;QAGzB,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IACL,iBAAC;AAAD,CAAC,AApBD,IAoBC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationWithComments.sourcemap.txt b/tests/baselines/reference/sourceMapValidationWithComments.sourcemap.txt index 239a418183fc6..77a63842cc47c 100644 --- a/tests/baselines/reference/sourceMapValidationWithComments.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationWithComments.sourcemap.txt @@ -18,7 +18,7 @@ sourceFile:sourceMapValidationWithComments.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (DebugClass) +1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -46,8 +46,8 @@ sourceFile:sourceMapValidationWithComments.ts > } > 2 > } -1->Emitted(3, 5) Source(21, 1) + SourceIndex(0) name (DebugClass.constructor) -2 >Emitted(3, 6) Source(21, 2) + SourceIndex(0) name (DebugClass.constructor) +1->Emitted(3, 5) Source(21, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(21, 2) + SourceIndex(0) --- >>> DebugClass.debugFunc = function () { 1->^^^^ @@ -57,9 +57,9 @@ sourceFile:sourceMapValidationWithComments.ts 1-> 2 > debugFunc 3 > -1->Emitted(4, 5) Source(3, 19) + SourceIndex(0) name (DebugClass) -2 >Emitted(4, 25) Source(3, 28) + SourceIndex(0) name (DebugClass) -3 >Emitted(4, 28) Source(3, 5) + SourceIndex(0) name (DebugClass) +1->Emitted(4, 5) Source(3, 19) + SourceIndex(0) +2 >Emitted(4, 25) Source(3, 28) + SourceIndex(0) +3 >Emitted(4, 28) Source(3, 5) + SourceIndex(0) --- >>> // Start Debugger Test Code 1->^^^^^^^^ @@ -68,8 +68,8 @@ sourceFile:sourceMapValidationWithComments.ts > > 2 > // Start Debugger Test Code -1->Emitted(5, 9) Source(5, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(5, 36) Source(5, 36) + SourceIndex(0) name (DebugClass.debugFunc) +1->Emitted(5, 9) Source(5, 9) + SourceIndex(0) +2 >Emitted(5, 36) Source(5, 36) + SourceIndex(0) --- >>> var i = 0; 1 >^^^^^^^^ @@ -85,12 +85,12 @@ sourceFile:sourceMapValidationWithComments.ts 4 > = 5 > 0 6 > ; -1 >Emitted(6, 9) Source(6, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(6, 13) Source(6, 13) + SourceIndex(0) name (DebugClass.debugFunc) -3 >Emitted(6, 14) Source(6, 14) + SourceIndex(0) name (DebugClass.debugFunc) -4 >Emitted(6, 17) Source(6, 17) + SourceIndex(0) name (DebugClass.debugFunc) -5 >Emitted(6, 18) Source(6, 18) + SourceIndex(0) name (DebugClass.debugFunc) -6 >Emitted(6, 19) Source(6, 19) + SourceIndex(0) name (DebugClass.debugFunc) +1 >Emitted(6, 9) Source(6, 9) + SourceIndex(0) +2 >Emitted(6, 13) Source(6, 13) + SourceIndex(0) +3 >Emitted(6, 14) Source(6, 14) + SourceIndex(0) +4 >Emitted(6, 17) Source(6, 17) + SourceIndex(0) +5 >Emitted(6, 18) Source(6, 18) + SourceIndex(0) +6 >Emitted(6, 19) Source(6, 19) + SourceIndex(0) --- >>> i++; 1 >^^^^^^^^ @@ -103,10 +103,10 @@ sourceFile:sourceMapValidationWithComments.ts 2 > i 3 > ++ 4 > ; -1 >Emitted(7, 9) Source(7, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(7, 10) Source(7, 10) + SourceIndex(0) name (DebugClass.debugFunc) -3 >Emitted(7, 12) Source(7, 12) + SourceIndex(0) name (DebugClass.debugFunc) -4 >Emitted(7, 13) Source(7, 13) + SourceIndex(0) name (DebugClass.debugFunc) +1 >Emitted(7, 9) Source(7, 9) + SourceIndex(0) +2 >Emitted(7, 10) Source(7, 10) + SourceIndex(0) +3 >Emitted(7, 12) Source(7, 12) + SourceIndex(0) +4 >Emitted(7, 13) Source(7, 13) + SourceIndex(0) --- >>> i++; 1->^^^^^^^^ @@ -119,10 +119,10 @@ sourceFile:sourceMapValidationWithComments.ts 2 > i 3 > ++ 4 > ; -1->Emitted(8, 9) Source(8, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(8, 10) Source(8, 10) + SourceIndex(0) name (DebugClass.debugFunc) -3 >Emitted(8, 12) Source(8, 12) + SourceIndex(0) name (DebugClass.debugFunc) -4 >Emitted(8, 13) Source(8, 13) + SourceIndex(0) name (DebugClass.debugFunc) +1->Emitted(8, 9) Source(8, 9) + SourceIndex(0) +2 >Emitted(8, 10) Source(8, 10) + SourceIndex(0) +3 >Emitted(8, 12) Source(8, 12) + SourceIndex(0) +4 >Emitted(8, 13) Source(8, 13) + SourceIndex(0) --- >>> i++; 1->^^^^^^^^ @@ -135,10 +135,10 @@ sourceFile:sourceMapValidationWithComments.ts 2 > i 3 > ++ 4 > ; -1->Emitted(9, 9) Source(9, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(9, 10) Source(9, 10) + SourceIndex(0) name (DebugClass.debugFunc) -3 >Emitted(9, 12) Source(9, 12) + SourceIndex(0) name (DebugClass.debugFunc) -4 >Emitted(9, 13) Source(9, 13) + SourceIndex(0) name (DebugClass.debugFunc) +1->Emitted(9, 9) Source(9, 9) + SourceIndex(0) +2 >Emitted(9, 10) Source(9, 10) + SourceIndex(0) +3 >Emitted(9, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(9, 13) Source(9, 13) + SourceIndex(0) --- >>> i++; 1->^^^^^^^^ @@ -151,10 +151,10 @@ sourceFile:sourceMapValidationWithComments.ts 2 > i 3 > ++ 4 > ; -1->Emitted(10, 9) Source(10, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(10, 10) Source(10, 10) + SourceIndex(0) name (DebugClass.debugFunc) -3 >Emitted(10, 12) Source(10, 12) + SourceIndex(0) name (DebugClass.debugFunc) -4 >Emitted(10, 13) Source(10, 13) + SourceIndex(0) name (DebugClass.debugFunc) +1->Emitted(10, 9) Source(10, 9) + SourceIndex(0) +2 >Emitted(10, 10) Source(10, 10) + SourceIndex(0) +3 >Emitted(10, 12) Source(10, 12) + SourceIndex(0) +4 >Emitted(10, 13) Source(10, 13) + SourceIndex(0) --- >>> i++; 1->^^^^^^^^ @@ -167,10 +167,10 @@ sourceFile:sourceMapValidationWithComments.ts 2 > i 3 > ++ 4 > ; -1->Emitted(11, 9) Source(11, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(11, 10) Source(11, 10) + SourceIndex(0) name (DebugClass.debugFunc) -3 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) name (DebugClass.debugFunc) -4 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) name (DebugClass.debugFunc) +1->Emitted(11, 9) Source(11, 9) + SourceIndex(0) +2 >Emitted(11, 10) Source(11, 10) + SourceIndex(0) +3 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) +4 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) --- >>> i++; 1->^^^^^^^^ @@ -183,10 +183,10 @@ sourceFile:sourceMapValidationWithComments.ts 2 > i 3 > ++ 4 > ; -1->Emitted(12, 9) Source(12, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) name (DebugClass.debugFunc) -3 >Emitted(12, 12) Source(12, 12) + SourceIndex(0) name (DebugClass.debugFunc) -4 >Emitted(12, 13) Source(12, 13) + SourceIndex(0) name (DebugClass.debugFunc) +1->Emitted(12, 9) Source(12, 9) + SourceIndex(0) +2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(12, 12) Source(12, 12) + SourceIndex(0) +4 >Emitted(12, 13) Source(12, 13) + SourceIndex(0) --- >>> i++; 1->^^^^^^^^ @@ -199,10 +199,10 @@ sourceFile:sourceMapValidationWithComments.ts 2 > i 3 > ++ 4 > ; -1->Emitted(13, 9) Source(13, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(13, 10) Source(13, 10) + SourceIndex(0) name (DebugClass.debugFunc) -3 >Emitted(13, 12) Source(13, 12) + SourceIndex(0) name (DebugClass.debugFunc) -4 >Emitted(13, 13) Source(13, 13) + SourceIndex(0) name (DebugClass.debugFunc) +1->Emitted(13, 9) Source(13, 9) + SourceIndex(0) +2 >Emitted(13, 10) Source(13, 10) + SourceIndex(0) +3 >Emitted(13, 12) Source(13, 12) + SourceIndex(0) +4 >Emitted(13, 13) Source(13, 13) + SourceIndex(0) --- >>> i++; 1->^^^^^^^^ @@ -215,10 +215,10 @@ sourceFile:sourceMapValidationWithComments.ts 2 > i 3 > ++ 4 > ; -1->Emitted(14, 9) Source(14, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(14, 10) Source(14, 10) + SourceIndex(0) name (DebugClass.debugFunc) -3 >Emitted(14, 12) Source(14, 12) + SourceIndex(0) name (DebugClass.debugFunc) -4 >Emitted(14, 13) Source(14, 13) + SourceIndex(0) name (DebugClass.debugFunc) +1->Emitted(14, 9) Source(14, 9) + SourceIndex(0) +2 >Emitted(14, 10) Source(14, 10) + SourceIndex(0) +3 >Emitted(14, 12) Source(14, 12) + SourceIndex(0) +4 >Emitted(14, 13) Source(14, 13) + SourceIndex(0) --- >>> i++; 1->^^^^^^^^ @@ -231,10 +231,10 @@ sourceFile:sourceMapValidationWithComments.ts 2 > i 3 > ++ 4 > ; -1->Emitted(15, 9) Source(15, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(15, 10) Source(15, 10) + SourceIndex(0) name (DebugClass.debugFunc) -3 >Emitted(15, 12) Source(15, 12) + SourceIndex(0) name (DebugClass.debugFunc) -4 >Emitted(15, 13) Source(15, 13) + SourceIndex(0) name (DebugClass.debugFunc) +1->Emitted(15, 9) Source(15, 9) + SourceIndex(0) +2 >Emitted(15, 10) Source(15, 10) + SourceIndex(0) +3 >Emitted(15, 12) Source(15, 12) + SourceIndex(0) +4 >Emitted(15, 13) Source(15, 13) + SourceIndex(0) --- >>> // End Debugger Test Code 1->^^^^^^^^ @@ -242,8 +242,8 @@ sourceFile:sourceMapValidationWithComments.ts 1-> > 2 > // End Debugger Test Code -1->Emitted(16, 9) Source(16, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(16, 34) Source(16, 34) + SourceIndex(0) name (DebugClass.debugFunc) +1->Emitted(16, 9) Source(16, 9) + SourceIndex(0) +2 >Emitted(16, 34) Source(16, 34) + SourceIndex(0) --- >>> return true; 1 >^^^^^^^^ @@ -259,11 +259,11 @@ sourceFile:sourceMapValidationWithComments.ts 3 > 4 > true 5 > ; -1 >Emitted(17, 9) Source(19, 9) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(17, 15) Source(19, 15) + SourceIndex(0) name (DebugClass.debugFunc) -3 >Emitted(17, 16) Source(19, 16) + SourceIndex(0) name (DebugClass.debugFunc) -4 >Emitted(17, 20) Source(19, 20) + SourceIndex(0) name (DebugClass.debugFunc) -5 >Emitted(17, 21) Source(19, 21) + SourceIndex(0) name (DebugClass.debugFunc) +1 >Emitted(17, 9) Source(19, 9) + SourceIndex(0) +2 >Emitted(17, 15) Source(19, 15) + SourceIndex(0) +3 >Emitted(17, 16) Source(19, 16) + SourceIndex(0) +4 >Emitted(17, 20) Source(19, 20) + SourceIndex(0) +5 >Emitted(17, 21) Source(19, 21) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -272,8 +272,8 @@ sourceFile:sourceMapValidationWithComments.ts 1 > > 2 > } -1 >Emitted(18, 5) Source(20, 5) + SourceIndex(0) name (DebugClass.debugFunc) -2 >Emitted(18, 6) Source(20, 6) + SourceIndex(0) name (DebugClass.debugFunc) +1 >Emitted(18, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(18, 6) Source(20, 6) + SourceIndex(0) --- >>> return DebugClass; 1->^^^^ @@ -281,8 +281,8 @@ sourceFile:sourceMapValidationWithComments.ts 1-> > 2 > } -1->Emitted(19, 5) Source(21, 1) + SourceIndex(0) name (DebugClass) -2 >Emitted(19, 22) Source(21, 2) + SourceIndex(0) name (DebugClass) +1->Emitted(19, 5) Source(21, 1) + SourceIndex(0) +2 >Emitted(19, 22) Source(21, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -314,8 +314,8 @@ sourceFile:sourceMapValidationWithComments.ts > return true; > } > } -1 >Emitted(20, 1) Source(21, 1) + SourceIndex(0) name (DebugClass) -2 >Emitted(20, 2) Source(21, 2) + SourceIndex(0) name (DebugClass) +1 >Emitted(20, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(20, 2) Source(21, 2) + SourceIndex(0) 3 >Emitted(20, 2) Source(1, 1) + SourceIndex(0) 4 >Emitted(20, 6) Source(21, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.js.map b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.js.map index d10b3f8f28160..f34c47f221010 100644 --- a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.js.map +++ b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.js.map @@ -1,2 +1,2 @@ //// [fooResult.js.map] -{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["../testFiles/app.ts","../testFiles/app2.ts"],"names":["c","c.constructor","d","d.constructor"],"mappings":"AAAA,gFAAgF;AAChF,wIAAwI;AACxI;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC;ACHD;IAAAE;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"} \ No newline at end of file +{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["../testFiles/app.ts","../testFiles/app2.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wIAAwI;AACxI;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC;ACHD;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.sourcemap.txt b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.sourcemap.txt index fdc67bf563d8c..a83b5f4bb9c9b 100644 --- a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.sourcemap.txt +++ b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.sourcemap.txt @@ -37,7 +37,7 @@ sourceFile:../testFiles/app.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -46,16 +46,16 @@ sourceFile:../testFiles/app.ts 1->class c { > 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c.constructor) -2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) name (c.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return c; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) name (c) -2 >Emitted(6, 13) Source(4, 2) + SourceIndex(0) name (c) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 13) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -68,8 +68,8 @@ sourceFile:../testFiles/app.ts 3 > 4 > class c { > } -1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) name (c) -2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) name (c) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- @@ -87,7 +87,7 @@ sourceFile:../testFiles/app2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(9, 5) Source(1, 1) + SourceIndex(1) name (d) +1->Emitted(9, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -96,16 +96,16 @@ sourceFile:../testFiles/app2.ts 1->class d { > 2 > } -1->Emitted(10, 5) Source(2, 1) + SourceIndex(1) name (d.constructor) -2 >Emitted(10, 6) Source(2, 2) + SourceIndex(1) name (d.constructor) +1->Emitted(10, 5) Source(2, 1) + SourceIndex(1) +2 >Emitted(10, 6) Source(2, 2) + SourceIndex(1) --- >>> return d; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(11, 5) Source(2, 1) + SourceIndex(1) name (d) -2 >Emitted(11, 13) Source(2, 2) + SourceIndex(1) name (d) +1->Emitted(11, 5) Source(2, 1) + SourceIndex(1) +2 >Emitted(11, 13) Source(2, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -118,8 +118,8 @@ sourceFile:../testFiles/app2.ts 3 > 4 > class d { > } -1 >Emitted(12, 1) Source(2, 1) + SourceIndex(1) name (d) -2 >Emitted(12, 2) Source(2, 2) + SourceIndex(1) name (d) +1 >Emitted(12, 1) Source(2, 1) + SourceIndex(1) +2 >Emitted(12, 2) Source(2, 2) + SourceIndex(1) 3 >Emitted(12, 2) Source(1, 1) + SourceIndex(1) 4 >Emitted(12, 6) Source(2, 2) + SourceIndex(1) --- diff --git a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.js.map b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.js.map index 5317cf7c306df..7a172c4e0a7f9 100644 --- a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.js.map +++ b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.js.map @@ -1,3 +1,3 @@ //// [app.js.map] -{"version":3,"file":"app.js","sourceRoot":"","sources":["../testFiles/app.ts"],"names":["c","c.constructor"],"mappings":"AAAA,gFAAgF;AAChF,wIAAwI;AACxI;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}//// [app2.js.map] -{"version":3,"file":"app2.js","sourceRoot":"","sources":["../testFiles/app2.ts"],"names":["d","d.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"} \ No newline at end of file +{"version":3,"file":"app.js","sourceRoot":"","sources":["../testFiles/app.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wIAAwI;AACxI;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"}//// [app2.js.map] +{"version":3,"file":"app2.js","sourceRoot":"","sources":["../testFiles/app2.ts"],"names":[],"mappings":"AAAA;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.sourcemap.txt b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.sourcemap.txt index 44dd1b4104852..e02fb678ae288 100644 --- a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.sourcemap.txt +++ b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.sourcemap.txt @@ -37,7 +37,7 @@ sourceFile:../testFiles/app.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -46,16 +46,16 @@ sourceFile:../testFiles/app.ts 1->class c { > 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c.constructor) -2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) name (c.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return c; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) name (c) -2 >Emitted(6, 13) Source(4, 2) + SourceIndex(0) name (c) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 13) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -68,8 +68,8 @@ sourceFile:../testFiles/app.ts 3 > 4 > class c { > } -1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) name (c) -2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) name (c) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- @@ -93,7 +93,7 @@ sourceFile:../testFiles/app2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (d) +1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -102,16 +102,16 @@ sourceFile:../testFiles/app2.ts 1->class d { > 2 > } -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (d.constructor) -2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (d.constructor) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) --- >>> return d; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (d) -2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (d) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -124,8 +124,8 @@ sourceFile:../testFiles/app2.ts 3 > 4 > class d { > } -1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (d) -2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (d) +1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) 3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0) 4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map b/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map index bac55383fff05..39f552b2002b5 100644 --- a/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map +++ b/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map @@ -1,2 +1,2 @@ //// [fooResult.js.map] -{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/b.ts"],"names":["M","m1","m1.c1","m1.c1.constructor"],"mappings":"AAAA,IAAO,CAAC,CAEP;AAFD,WAAO,CAAC,EAAC,CAAC;IACKA,GAACA,GAAGA,CAACA,CAACA;AACrBA,CAACA,EAFM,CAAC,KAAD,CAAC,QAEP;ACFD,IAAO,EAAE,CAGR;AAHD,WAAO,EAAE,EAAC,CAAC;IACPC;QAAAC;QACAC,CAACA;QAADD,SAACA;IAADA,CAACA,AADDD,IACCA;IADYA,KAAEA,KACdA,CAAAA;AACLA,CAACA,EAHM,EAAE,KAAF,EAAE,QAGR"} \ No newline at end of file +{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":"AAAA,IAAO,CAAC,CAEP;AAFD,WAAO,CAAC,EAAC,CAAC;IACK,GAAC,GAAG,CAAC,CAAC;AACrB,CAAC,EAFM,CAAC,KAAD,CAAC,QAEP;ACFD,IAAO,EAAE,CAGR;AAHD,WAAO,EAAE,EAAC,CAAC;IACP;QAAA;QACA,CAAC;QAAD,SAAC;IAAD,CAAC,AADD,IACC;IADY,KAAE,KACd,CAAA;AACL,CAAC,EAHM,EAAE,KAAF,EAAE,QAGR"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt b/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt index 63d4cec6ef17f..7ad34d2976110 100644 --- a/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt +++ b/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt @@ -55,11 +55,11 @@ sourceFile:tests/cases/compiler/a.ts 3 > = 4 > 1 5 > ; -1 >Emitted(3, 5) Source(2, 16) + SourceIndex(0) name (M) -2 >Emitted(3, 8) Source(2, 17) + SourceIndex(0) name (M) -3 >Emitted(3, 11) Source(2, 20) + SourceIndex(0) name (M) -4 >Emitted(3, 12) Source(2, 21) + SourceIndex(0) name (M) -5 >Emitted(3, 13) Source(2, 22) + SourceIndex(0) name (M) +1 >Emitted(3, 5) Source(2, 16) + SourceIndex(0) +2 >Emitted(3, 8) Source(2, 17) + SourceIndex(0) +3 >Emitted(3, 11) Source(2, 20) + SourceIndex(0) +4 >Emitted(3, 12) Source(2, 21) + SourceIndex(0) +5 >Emitted(3, 13) Source(2, 22) + SourceIndex(0) --- >>>})(M || (M = {})); 1-> @@ -79,8 +79,8 @@ sourceFile:tests/cases/compiler/a.ts 7 > { > export var X = 1; > } -1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) name (M) -2 >Emitted(4, 2) Source(3, 2) + SourceIndex(0) name (M) +1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(4, 2) Source(3, 2) + SourceIndex(0) 3 >Emitted(4, 4) Source(1, 8) + SourceIndex(0) 4 >Emitted(4, 5) Source(1, 9) + SourceIndex(0) 5 >Emitted(4, 10) Source(1, 8) + SourceIndex(0) @@ -132,13 +132,13 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(7, 5) Source(2, 5) + SourceIndex(1) name (m1) +1->Emitted(7, 5) Source(2, 5) + SourceIndex(1) --- >>> function c1() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(8, 9) Source(2, 5) + SourceIndex(1) name (m1.c1) +1->Emitted(8, 9) Source(2, 5) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -147,16 +147,16 @@ sourceFile:tests/cases/compiler/b.ts 1->export class c1 { > 2 > } -1->Emitted(9, 9) Source(3, 5) + SourceIndex(1) name (m1.c1.constructor) -2 >Emitted(9, 10) Source(3, 6) + SourceIndex(1) name (m1.c1.constructor) +1->Emitted(9, 9) Source(3, 5) + SourceIndex(1) +2 >Emitted(9, 10) Source(3, 6) + SourceIndex(1) --- >>> return c1; 1->^^^^^^^^ 2 > ^^^^^^^^^ 1-> 2 > } -1->Emitted(10, 9) Source(3, 5) + SourceIndex(1) name (m1.c1) -2 >Emitted(10, 18) Source(3, 6) + SourceIndex(1) name (m1.c1) +1->Emitted(10, 9) Source(3, 5) + SourceIndex(1) +2 >Emitted(10, 18) Source(3, 6) + SourceIndex(1) --- >>> })(); 1 >^^^^ @@ -169,10 +169,10 @@ sourceFile:tests/cases/compiler/b.ts 3 > 4 > export class c1 { > } -1 >Emitted(11, 5) Source(3, 5) + SourceIndex(1) name (m1.c1) -2 >Emitted(11, 6) Source(3, 6) + SourceIndex(1) name (m1.c1) -3 >Emitted(11, 6) Source(2, 5) + SourceIndex(1) name (m1) -4 >Emitted(11, 10) Source(3, 6) + SourceIndex(1) name (m1) +1 >Emitted(11, 5) Source(3, 5) + SourceIndex(1) +2 >Emitted(11, 6) Source(3, 6) + SourceIndex(1) +3 >Emitted(11, 6) Source(2, 5) + SourceIndex(1) +4 >Emitted(11, 10) Source(3, 6) + SourceIndex(1) --- >>> m1.c1 = c1; 1->^^^^ @@ -185,10 +185,10 @@ sourceFile:tests/cases/compiler/b.ts 3 > { > } 4 > -1->Emitted(12, 5) Source(2, 18) + SourceIndex(1) name (m1) -2 >Emitted(12, 10) Source(2, 20) + SourceIndex(1) name (m1) -3 >Emitted(12, 15) Source(3, 6) + SourceIndex(1) name (m1) -4 >Emitted(12, 16) Source(3, 6) + SourceIndex(1) name (m1) +1->Emitted(12, 5) Source(2, 18) + SourceIndex(1) +2 >Emitted(12, 10) Source(2, 20) + SourceIndex(1) +3 >Emitted(12, 15) Source(3, 6) + SourceIndex(1) +4 >Emitted(12, 16) Source(3, 6) + SourceIndex(1) --- >>>})(m1 || (m1 = {})); 1-> @@ -210,8 +210,8 @@ sourceFile:tests/cases/compiler/b.ts > export class c1 { > } > } -1->Emitted(13, 1) Source(4, 1) + SourceIndex(1) name (m1) -2 >Emitted(13, 2) Source(4, 2) + SourceIndex(1) name (m1) +1->Emitted(13, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(13, 2) Source(4, 2) + SourceIndex(1) 3 >Emitted(13, 4) Source(1, 8) + SourceIndex(1) 4 >Emitted(13, 6) Source(1, 10) + SourceIndex(1) 5 >Emitted(13, 11) Source(1, 8) + SourceIndex(1) diff --git a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.js.map b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.js.map index 200edeccc5b23..57e8ff298657f 100644 --- a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.js.map +++ b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.js.map @@ -1,2 +1,2 @@ //// [fooResult.js.map] -{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["app.ts","app2.ts"],"names":["c","c.constructor","d","d.constructor"],"mappings":"AAAA,gFAAgF;AAChF,0GAA0G;AAC1G;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC;ACHD;IAAAE;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"} \ No newline at end of file +{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["app.ts","app2.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,0GAA0G;AAC1G;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC;ACHD;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt index 790d64c7963a1..28b2e240b8b7f 100644 --- a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt +++ b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt @@ -37,7 +37,7 @@ sourceFile:app.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -46,16 +46,16 @@ sourceFile:app.ts 1->class c { > 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c.constructor) -2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) name (c.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return c; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) name (c) -2 >Emitted(6, 13) Source(4, 2) + SourceIndex(0) name (c) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 13) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -68,8 +68,8 @@ sourceFile:app.ts 3 > 4 > class c { > } -1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) name (c) -2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) name (c) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- @@ -87,7 +87,7 @@ sourceFile:app2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(9, 5) Source(1, 1) + SourceIndex(1) name (d) +1->Emitted(9, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -96,16 +96,16 @@ sourceFile:app2.ts 1->class d { > 2 > } -1->Emitted(10, 5) Source(2, 1) + SourceIndex(1) name (d.constructor) -2 >Emitted(10, 6) Source(2, 2) + SourceIndex(1) name (d.constructor) +1->Emitted(10, 5) Source(2, 1) + SourceIndex(1) +2 >Emitted(10, 6) Source(2, 2) + SourceIndex(1) --- >>> return d; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(11, 5) Source(2, 1) + SourceIndex(1) name (d) -2 >Emitted(11, 13) Source(2, 2) + SourceIndex(1) name (d) +1->Emitted(11, 5) Source(2, 1) + SourceIndex(1) +2 >Emitted(11, 13) Source(2, 2) + SourceIndex(1) --- >>>})(); 1 > @@ -118,8 +118,8 @@ sourceFile:app2.ts 3 > 4 > class d { > } -1 >Emitted(12, 1) Source(2, 1) + SourceIndex(1) name (d) -2 >Emitted(12, 2) Source(2, 2) + SourceIndex(1) name (d) +1 >Emitted(12, 1) Source(2, 1) + SourceIndex(1) +2 >Emitted(12, 2) Source(2, 2) + SourceIndex(1) 3 >Emitted(12, 2) Source(1, 1) + SourceIndex(1) 4 >Emitted(12, 6) Source(2, 2) + SourceIndex(1) --- diff --git a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.js.map b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.js.map index 97826d80eb896..5025ed2212ac2 100644 --- a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.js.map +++ b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.js.map @@ -1,3 +1,3 @@ //// [app.js.map] -{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":["c","c.constructor"],"mappings":"AAAA,gFAAgF;AAChF,0GAA0G;AAC1G;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}//// [app2.js.map] -{"version":3,"file":"app2.js","sourceRoot":"","sources":["app2.ts"],"names":["d","d.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"} \ No newline at end of file +{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,0GAA0G;AAC1G;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"}//// [app2.js.map] +{"version":3,"file":"app2.js","sourceRoot":"","sources":["app2.ts"],"names":[],"mappings":"AAAA;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.sourcemap.txt b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.sourcemap.txt index 6987b7bbd2134..af6ed80a85bf3 100644 --- a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.sourcemap.txt +++ b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.sourcemap.txt @@ -37,7 +37,7 @@ sourceFile:app.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) +1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -46,16 +46,16 @@ sourceFile:app.ts 1->class c { > 2 > } -1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c.constructor) -2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) name (c.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) --- >>> return c; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) name (c) -2 >Emitted(6, 13) Source(4, 2) + SourceIndex(0) name (c) +1->Emitted(6, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 13) Source(4, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -68,8 +68,8 @@ sourceFile:app.ts 3 > 4 > class c { > } -1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) name (c) -2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) name (c) +1 >Emitted(7, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(4, 2) + SourceIndex(0) 3 >Emitted(7, 2) Source(3, 1) + SourceIndex(0) 4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- @@ -93,7 +93,7 @@ sourceFile:app2.ts 1->^^^^ 2 > ^^-> 1-> -1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (d) +1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -102,16 +102,16 @@ sourceFile:app2.ts 1->class d { > 2 > } -1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (d.constructor) -2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (d.constructor) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) --- >>> return d; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (d) -2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (d) +1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) --- >>>})(); 1 > @@ -124,8 +124,8 @@ sourceFile:app2.ts 3 > 4 > class d { > } -1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (d) -2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (d) +1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) 3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0) 4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0) --- diff --git a/tests/baselines/reference/sourcemapValidationDuplicateNames.js.map b/tests/baselines/reference/sourcemapValidationDuplicateNames.js.map index 65bb725231c40..c32505b01ae13 100644 --- a/tests/baselines/reference/sourcemapValidationDuplicateNames.js.map +++ b/tests/baselines/reference/sourcemapValidationDuplicateNames.js.map @@ -1,2 +1,2 @@ //// [sourcemapValidationDuplicateNames.js.map] -{"version":3,"file":"sourcemapValidationDuplicateNames.js","sourceRoot":"","sources":["sourcemapValidationDuplicateNames.ts"],"names":["m1","m1.c","m1.c.constructor"],"mappings":"AAAA,IAAO,EAAE,CAIR;AAJD,WAAO,EAAE,EAAC,CAAC;IACPA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IACXA;QAAAC;QACAC,CAACA;QAADD,QAACA;IAADA,CAACA,AADDD,IACCA;IADYA,IAACA,IACbA,CAAAA;AACLA,CAACA,EAJM,EAAE,KAAF,EAAE,QAIR;AACD,IAAO,EAAE,CAER;AAFD,WAAO,EAAE,EAAC,CAAC;IACPA,IAAIA,CAACA,GAAGA,IAAIA,EAAEA,CAACA,CAACA,EAAEA,CAACA;AACvBA,CAACA,EAFM,EAAE,KAAF,EAAE,QAER"} \ No newline at end of file +{"version":3,"file":"sourcemapValidationDuplicateNames.js","sourceRoot":"","sources":["sourcemapValidationDuplicateNames.ts"],"names":[],"mappings":"AAAA,IAAO,EAAE,CAIR;AAJD,WAAO,EAAE,EAAC,CAAC;IACP,IAAI,CAAC,GAAG,EAAE,CAAC;IACX;QAAA;QACA,CAAC;QAAD,QAAC;IAAD,CAAC,AADD,IACC;IADY,IAAC,IACb,CAAA;AACL,CAAC,EAJM,EAAE,KAAF,EAAE,QAIR;AACD,IAAO,EAAE,CAER;AAFD,WAAO,EAAE,EAAC,CAAC;IACP,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;AACvB,CAAC,EAFM,EAAE,KAAF,EAAE,QAER"} \ No newline at end of file diff --git a/tests/baselines/reference/sourcemapValidationDuplicateNames.sourcemap.txt b/tests/baselines/reference/sourcemapValidationDuplicateNames.sourcemap.txt index a5d1f637a1548..50302c30a22dc 100644 --- a/tests/baselines/reference/sourcemapValidationDuplicateNames.sourcemap.txt +++ b/tests/baselines/reference/sourcemapValidationDuplicateNames.sourcemap.txt @@ -59,25 +59,25 @@ sourceFile:sourcemapValidationDuplicateNames.ts 4 > = 5 > 10 6 > ; -1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0) name (m1) -2 >Emitted(3, 9) Source(2, 9) + SourceIndex(0) name (m1) -3 >Emitted(3, 10) Source(2, 10) + SourceIndex(0) name (m1) -4 >Emitted(3, 13) Source(2, 13) + SourceIndex(0) name (m1) -5 >Emitted(3, 15) Source(2, 15) + SourceIndex(0) name (m1) -6 >Emitted(3, 16) Source(2, 16) + SourceIndex(0) name (m1) +1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(3, 9) Source(2, 9) + SourceIndex(0) +3 >Emitted(3, 10) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 13) Source(2, 13) + SourceIndex(0) +5 >Emitted(3, 15) Source(2, 15) + SourceIndex(0) +6 >Emitted(3, 16) Source(2, 16) + SourceIndex(0) --- >>> var c = (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(4, 5) Source(3, 5) + SourceIndex(0) name (m1) +1->Emitted(4, 5) Source(3, 5) + SourceIndex(0) --- >>> function c() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(5, 9) Source(3, 5) + SourceIndex(0) name (m1.c) +1->Emitted(5, 9) Source(3, 5) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -86,16 +86,16 @@ sourceFile:sourcemapValidationDuplicateNames.ts 1->export class c { > 2 > } -1->Emitted(6, 9) Source(4, 5) + SourceIndex(0) name (m1.c.constructor) -2 >Emitted(6, 10) Source(4, 6) + SourceIndex(0) name (m1.c.constructor) +1->Emitted(6, 9) Source(4, 5) + SourceIndex(0) +2 >Emitted(6, 10) Source(4, 6) + SourceIndex(0) --- >>> return c; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(7, 9) Source(4, 5) + SourceIndex(0) name (m1.c) -2 >Emitted(7, 17) Source(4, 6) + SourceIndex(0) name (m1.c) +1->Emitted(7, 9) Source(4, 5) + SourceIndex(0) +2 >Emitted(7, 17) Source(4, 6) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -108,10 +108,10 @@ sourceFile:sourcemapValidationDuplicateNames.ts 3 > 4 > export class c { > } -1 >Emitted(8, 5) Source(4, 5) + SourceIndex(0) name (m1.c) -2 >Emitted(8, 6) Source(4, 6) + SourceIndex(0) name (m1.c) -3 >Emitted(8, 6) Source(3, 5) + SourceIndex(0) name (m1) -4 >Emitted(8, 10) Source(4, 6) + SourceIndex(0) name (m1) +1 >Emitted(8, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(8, 6) Source(4, 6) + SourceIndex(0) +3 >Emitted(8, 6) Source(3, 5) + SourceIndex(0) +4 >Emitted(8, 10) Source(4, 6) + SourceIndex(0) --- >>> m1.c = c; 1->^^^^ @@ -124,10 +124,10 @@ sourceFile:sourcemapValidationDuplicateNames.ts 3 > { > } 4 > -1->Emitted(9, 5) Source(3, 18) + SourceIndex(0) name (m1) -2 >Emitted(9, 9) Source(3, 19) + SourceIndex(0) name (m1) -3 >Emitted(9, 13) Source(4, 6) + SourceIndex(0) name (m1) -4 >Emitted(9, 14) Source(4, 6) + SourceIndex(0) name (m1) +1->Emitted(9, 5) Source(3, 18) + SourceIndex(0) +2 >Emitted(9, 9) Source(3, 19) + SourceIndex(0) +3 >Emitted(9, 13) Source(4, 6) + SourceIndex(0) +4 >Emitted(9, 14) Source(4, 6) + SourceIndex(0) --- >>>})(m1 || (m1 = {})); 1-> @@ -149,8 +149,8 @@ sourceFile:sourcemapValidationDuplicateNames.ts > export class c { > } > } -1->Emitted(10, 1) Source(5, 1) + SourceIndex(0) name (m1) -2 >Emitted(10, 2) Source(5, 2) + SourceIndex(0) name (m1) +1->Emitted(10, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(5, 2) + SourceIndex(0) 3 >Emitted(10, 4) Source(1, 8) + SourceIndex(0) 4 >Emitted(10, 6) Source(1, 10) + SourceIndex(0) 5 >Emitted(10, 11) Source(1, 8) + SourceIndex(0) @@ -215,16 +215,16 @@ sourceFile:sourcemapValidationDuplicateNames.ts 8 > c 9 > () 10> ; -1->Emitted(13, 5) Source(7, 5) + SourceIndex(0) name (m1) -2 >Emitted(13, 9) Source(7, 9) + SourceIndex(0) name (m1) -3 >Emitted(13, 10) Source(7, 10) + SourceIndex(0) name (m1) -4 >Emitted(13, 13) Source(7, 13) + SourceIndex(0) name (m1) -5 >Emitted(13, 17) Source(7, 17) + SourceIndex(0) name (m1) -6 >Emitted(13, 19) Source(7, 19) + SourceIndex(0) name (m1) -7 >Emitted(13, 20) Source(7, 20) + SourceIndex(0) name (m1) -8 >Emitted(13, 21) Source(7, 21) + SourceIndex(0) name (m1) -9 >Emitted(13, 23) Source(7, 23) + SourceIndex(0) name (m1) -10>Emitted(13, 24) Source(7, 24) + SourceIndex(0) name (m1) +1->Emitted(13, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(13, 9) Source(7, 9) + SourceIndex(0) +3 >Emitted(13, 10) Source(7, 10) + SourceIndex(0) +4 >Emitted(13, 13) Source(7, 13) + SourceIndex(0) +5 >Emitted(13, 17) Source(7, 17) + SourceIndex(0) +6 >Emitted(13, 19) Source(7, 19) + SourceIndex(0) +7 >Emitted(13, 20) Source(7, 20) + SourceIndex(0) +8 >Emitted(13, 21) Source(7, 21) + SourceIndex(0) +9 >Emitted(13, 23) Source(7, 23) + SourceIndex(0) +10>Emitted(13, 24) Source(7, 24) + SourceIndex(0) --- >>>})(m1 || (m1 = {})); 1 > @@ -245,8 +245,8 @@ sourceFile:sourcemapValidationDuplicateNames.ts 7 > { > var b = new m1.c(); > } -1 >Emitted(14, 1) Source(8, 1) + SourceIndex(0) name (m1) -2 >Emitted(14, 2) Source(8, 2) + SourceIndex(0) name (m1) +1 >Emitted(14, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(8, 2) + SourceIndex(0) 3 >Emitted(14, 4) Source(6, 8) + SourceIndex(0) 4 >Emitted(14, 6) Source(6, 10) + SourceIndex(0) 5 >Emitted(14, 11) Source(6, 8) + SourceIndex(0) diff --git a/tests/baselines/reference/specializedSignatureInInterface.types b/tests/baselines/reference/specializedSignatureInInterface.types index c8f76f4cb9b09..b9621af7b8be0 100644 --- a/tests/baselines/reference/specializedSignatureInInterface.types +++ b/tests/baselines/reference/specializedSignatureInInterface.types @@ -11,8 +11,8 @@ interface B extends A { >A : A (key:'foo'):string; ->key : 'foo' +>key : "foo" (key:'bar'):string; ->key : 'bar' +>key : "bar" } diff --git a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types index cb86966d65a0b..b27a935ced687 100644 --- a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types +++ b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types @@ -3,30 +3,30 @@ // All the below should not be errors function foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; } ->x : 'a' +>foo : { (x: "a"): any; (x: string): any; } +>x : "a" function foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; } +>foo : { (x: "a"): any; (x: string): any; } >x : string function foo(x: any) { } ->foo : { (x: 'a'): any; (x: string): any; } +>foo : { (x: "a"): any; (x: string): any; } >x : any class C { >C : C foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; } ->x : 'a' +>foo : { (x: "a"): any; (x: string): any; } +>x : "a" foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; } +>foo : { (x: "a"): any; (x: string): any; } >x : string foo(x: any) { } ->foo : { (x: 'a'): any; (x: string): any; } +>foo : { (x: "a"): any; (x: string): any; } >x : any } @@ -35,20 +35,20 @@ class C2 { >T : T foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } ->x : 'a' +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>x : "a" foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } >x : string foo(x: T); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } >x : T >T : T foo(x: any) { } ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } >x : any } @@ -58,20 +58,20 @@ class C3 { >String : String foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } ->x : 'a' +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>x : "a" foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } >x : string foo(x: T); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } >x : T >T : T foo(x: any) { } ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } >x : any } @@ -79,7 +79,7 @@ interface I { >I : I (x: 'a'); ->x : 'a' +>x : "a" (x: number); >x : number @@ -88,15 +88,15 @@ interface I { >x : string foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; (x: number): any; } ->x : 'a' +>foo : { (x: "a"): any; (x: string): any; (x: number): any; } +>x : "a" foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; (x: number): any; } +>foo : { (x: "a"): any; (x: string): any; (x: number): any; } >x : string foo(x: number); ->foo : { (x: 'a'): any; (x: string): any; (x: number): any; } +>foo : { (x: "a"): any; (x: string): any; (x: number): any; } >x : number } @@ -105,7 +105,7 @@ interface I2 { >T : T (x: 'a'); ->x : 'a' +>x : "a" (x: T); >x : T @@ -115,15 +115,15 @@ interface I2 { >x : string foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } ->x : 'a' +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>x : "a" foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } >x : string foo(x: T); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } >x : T >T : T } @@ -134,7 +134,7 @@ interface I3 { >String : String (x: 'a'); ->x : 'a' +>x : "a" (x: string); >x : string @@ -144,49 +144,49 @@ interface I3 { >T : T foo(x: 'a'); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } ->x : 'a' +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } +>x : "a" foo(x: string); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } >x : string foo(x: T); ->foo : { (x: 'a'): any; (x: string): any; (x: T): any; } +>foo : { (x: "a"): any; (x: string): any; (x: T): any; } >x : T >T : T } var a: { ->a : { (x: string): any; (x: 'a'): any; (x: number): any; foo(x: string): any; foo(x: 'a'): any; foo(x: number): any; } +>a : { (x: string): any; (x: "a"): any; (x: number): any; foo(x: string): any; foo(x: "a"): any; foo(x: number): any; } (x: string); >x : string (x: 'a'); ->x : 'a' +>x : "a" (x: number); >x : number foo(x: string); ->foo : { (x: string): any; (x: 'a'): any; (x: number): any; } +>foo : { (x: string): any; (x: "a"): any; (x: number): any; } >x : string foo(x: 'a'); ->foo : { (x: string): any; (x: 'a'): any; (x: number): any; } ->x : 'a' +>foo : { (x: string): any; (x: "a"): any; (x: number): any; } +>x : "a" foo(x: number); ->foo : { (x: string): any; (x: 'a'): any; (x: number): any; } +>foo : { (x: string): any; (x: "a"): any; (x: number): any; } >x : number } var a2: { ->a2 : { (x: 'a'): any; (x: string): any; (x: T): any; foo(x: string): any; foo(x: 'a'): any; foo(x: T): any; } +>a2 : { (x: "a"): any; (x: string): any; (x: T): any; foo(x: string): any; foo(x: "a"): any; foo(x: T): any; } (x: 'a'); ->x : 'a' +>x : "a" (x: string); >x : string @@ -197,25 +197,25 @@ var a2: { >T : T foo(x: string); ->foo : { (x: string): any; (x: 'a'): any; (x: T): any; } +>foo : { (x: string): any; (x: "a"): any; (x: T): any; } >x : string foo(x: 'a'); ->foo : { (x: string): any; (x: 'a'): any; (x: T): any; } ->x : 'a' +>foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>x : "a" foo(x: T); ->foo : { (x: string): any; (x: 'a'): any; (x: T): any; } +>foo : { (x: string): any; (x: "a"): any; (x: T): any; } >T : T >x : T >T : T } var a3: { ->a3 : { (x: 'a'): any; (x: T): any; (x: string): any; foo(x: string): any; foo(x: 'a'): any; foo(x: T): any; } +>a3 : { (x: "a"): any; (x: T): any; (x: string): any; foo(x: string): any; foo(x: "a"): any; foo(x: T): any; } (x: 'a'); ->x : 'a' +>x : "a" (x: T); >T : T @@ -226,15 +226,15 @@ var a3: { >x : string foo(x: string); ->foo : { (x: string): any; (x: 'a'): any; (x: T): any; } +>foo : { (x: string): any; (x: "a"): any; (x: T): any; } >x : string foo(x: 'a'); ->foo : { (x: string): any; (x: 'a'): any; (x: T): any; } ->x : 'a' +>foo : { (x: string): any; (x: "a"): any; (x: T): any; } +>x : "a" foo(x: T); ->foo : { (x: string): any; (x: 'a'): any; (x: T): any; } +>foo : { (x: string): any; (x: "a"): any; (x: T): any; } >T : T >String : String >x : T diff --git a/tests/baselines/reference/staticInstanceResolution3.js b/tests/baselines/reference/staticInstanceResolution3.js index 0a41cd7790941..265d3e5b3e608 100644 --- a/tests/baselines/reference/staticInstanceResolution3.js +++ b/tests/baselines/reference/staticInstanceResolution3.js @@ -13,6 +13,7 @@ import WinJS = require('./staticInstanceResolution3_0'); WinJS.Promise.timeout(10); //// [staticInstanceResolution3_0.js] +"use strict"; var Promise = (function () { function Promise() { } @@ -23,6 +24,7 @@ var Promise = (function () { })(); exports.Promise = Promise; //// [staticInstanceResolution3_1.js] +"use strict"; /// var WinJS = require('./staticInstanceResolution3_0'); WinJS.Promise.timeout(10); diff --git a/tests/baselines/reference/staticInstanceResolution5.js b/tests/baselines/reference/staticInstanceResolution5.js index 843b79ec6f1c9..58def522978b3 100644 --- a/tests/baselines/reference/staticInstanceResolution5.js +++ b/tests/baselines/reference/staticInstanceResolution5.js @@ -18,6 +18,7 @@ function z(w3: WinJS) { } //// [staticInstanceResolution5_1.js] define(["require", "exports"], function (require, exports) { + "use strict"; // these 3 should be errors var x = function (w1) { }; var y = function (w2) { }; diff --git a/tests/baselines/reference/staticMethodWithTypeParameterExtendsClauseDeclFile.js b/tests/baselines/reference/staticMethodWithTypeParameterExtendsClauseDeclFile.js index ba2ca1ae758a9..3a14dde64478d 100644 --- a/tests/baselines/reference/staticMethodWithTypeParameterExtendsClauseDeclFile.js +++ b/tests/baselines/reference/staticMethodWithTypeParameterExtendsClauseDeclFile.js @@ -22,6 +22,7 @@ export class publicClassWithWithPrivateTypeParameters { //// [staticMethodWithTypeParameterExtendsClauseDeclFile.js] +"use strict"; var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/stringLiteralCheckedInIf01.js b/tests/baselines/reference/stringLiteralCheckedInIf01.js new file mode 100644 index 0000000000000..161c39b96efa4 --- /dev/null +++ b/tests/baselines/reference/stringLiteralCheckedInIf01.js @@ -0,0 +1,29 @@ +//// [stringLiteralCheckedInIf01.ts] + +type S = "a" | "b"; +type T = S[] | S; + +function f(foo: T) { + if (foo === "a") { + return foo; + } + else if (foo === "b") { + return foo; + } + else { + return (foo as S[])[0]; + } +} + +//// [stringLiteralCheckedInIf01.js] +function f(foo) { + if (foo === "a") { + return foo; + } + else if (foo === "b") { + return foo; + } + else { + return foo[0]; + } +} diff --git a/tests/baselines/reference/stringLiteralCheckedInIf01.symbols b/tests/baselines/reference/stringLiteralCheckedInIf01.symbols new file mode 100644 index 0000000000000..1b4d5e6b07125 --- /dev/null +++ b/tests/baselines/reference/stringLiteralCheckedInIf01.symbols @@ -0,0 +1,33 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf01.ts === + +type S = "a" | "b"; +>S : Symbol(S, Decl(stringLiteralCheckedInIf01.ts, 0, 0)) + +type T = S[] | S; +>T : Symbol(T, Decl(stringLiteralCheckedInIf01.ts, 1, 19)) +>S : Symbol(S, Decl(stringLiteralCheckedInIf01.ts, 0, 0)) +>S : Symbol(S, Decl(stringLiteralCheckedInIf01.ts, 0, 0)) + +function f(foo: T) { +>f : Symbol(f, Decl(stringLiteralCheckedInIf01.ts, 2, 17)) +>foo : Symbol(foo, Decl(stringLiteralCheckedInIf01.ts, 4, 11)) +>T : Symbol(T, Decl(stringLiteralCheckedInIf01.ts, 1, 19)) + + if (foo === "a") { +>foo : Symbol(foo, Decl(stringLiteralCheckedInIf01.ts, 4, 11)) + + return foo; +>foo : Symbol(foo, Decl(stringLiteralCheckedInIf01.ts, 4, 11)) + } + else if (foo === "b") { +>foo : Symbol(foo, Decl(stringLiteralCheckedInIf01.ts, 4, 11)) + + return foo; +>foo : Symbol(foo, Decl(stringLiteralCheckedInIf01.ts, 4, 11)) + } + else { + return (foo as S[])[0]; +>foo : Symbol(foo, Decl(stringLiteralCheckedInIf01.ts, 4, 11)) +>S : Symbol(S, Decl(stringLiteralCheckedInIf01.ts, 0, 0)) + } +} diff --git a/tests/baselines/reference/stringLiteralCheckedInIf01.types b/tests/baselines/reference/stringLiteralCheckedInIf01.types new file mode 100644 index 0000000000000..75b7eadbc19b4 --- /dev/null +++ b/tests/baselines/reference/stringLiteralCheckedInIf01.types @@ -0,0 +1,41 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf01.ts === + +type S = "a" | "b"; +>S : "a" | "b" + +type T = S[] | S; +>T : ("a" | "b")[] | "a" | "b" +>S : "a" | "b" +>S : "a" | "b" + +function f(foo: T) { +>f : (foo: ("a" | "b")[] | "a" | "b") => ("a" | "b")[] | "a" | "b" +>foo : ("a" | "b")[] | "a" | "b" +>T : ("a" | "b")[] | "a" | "b" + + if (foo === "a") { +>foo === "a" : boolean +>foo : ("a" | "b")[] | "a" | "b" +>"a" : string + + return foo; +>foo : ("a" | "b")[] | "a" | "b" + } + else if (foo === "b") { +>foo === "b" : boolean +>foo : ("a" | "b")[] | "a" | "b" +>"b" : string + + return foo; +>foo : ("a" | "b")[] | "a" | "b" + } + else { + return (foo as S[])[0]; +>(foo as S[])[0] : "a" | "b" +>(foo as S[]) : ("a" | "b")[] +>foo as S[] : ("a" | "b")[] +>foo : ("a" | "b")[] | "a" | "b" +>S : "a" | "b" +>0 : number + } +} diff --git a/tests/baselines/reference/stringLiteralCheckedInIf02.js b/tests/baselines/reference/stringLiteralCheckedInIf02.js new file mode 100644 index 0000000000000..22bd6359f6187 --- /dev/null +++ b/tests/baselines/reference/stringLiteralCheckedInIf02.js @@ -0,0 +1,30 @@ +//// [stringLiteralCheckedInIf02.ts] + +type S = "a" | "b"; +type T = S[] | S; + +function isS(t: T): t is S { + return t === "a" || t === "b"; +} + +function f(foo: T) { + if (isS(foo)) { + return foo; + } + else { + return foo[0]; + } +} + +//// [stringLiteralCheckedInIf02.js] +function isS(t) { + return t === "a" || t === "b"; +} +function f(foo) { + if (isS(foo)) { + return foo; + } + else { + return foo[0]; + } +} diff --git a/tests/baselines/reference/stringLiteralCheckedInIf02.symbols b/tests/baselines/reference/stringLiteralCheckedInIf02.symbols new file mode 100644 index 0000000000000..629f990b91260 --- /dev/null +++ b/tests/baselines/reference/stringLiteralCheckedInIf02.symbols @@ -0,0 +1,39 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf02.ts === + +type S = "a" | "b"; +>S : Symbol(S, Decl(stringLiteralCheckedInIf02.ts, 0, 0)) + +type T = S[] | S; +>T : Symbol(T, Decl(stringLiteralCheckedInIf02.ts, 1, 19)) +>S : Symbol(S, Decl(stringLiteralCheckedInIf02.ts, 0, 0)) +>S : Symbol(S, Decl(stringLiteralCheckedInIf02.ts, 0, 0)) + +function isS(t: T): t is S { +>isS : Symbol(isS, Decl(stringLiteralCheckedInIf02.ts, 2, 17)) +>t : Symbol(t, Decl(stringLiteralCheckedInIf02.ts, 4, 13)) +>T : Symbol(T, Decl(stringLiteralCheckedInIf02.ts, 1, 19)) +>t : Symbol(t, Decl(stringLiteralCheckedInIf02.ts, 4, 13)) +>S : Symbol(S, Decl(stringLiteralCheckedInIf02.ts, 0, 0)) + + return t === "a" || t === "b"; +>t : Symbol(t, Decl(stringLiteralCheckedInIf02.ts, 4, 13)) +>t : Symbol(t, Decl(stringLiteralCheckedInIf02.ts, 4, 13)) +} + +function f(foo: T) { +>f : Symbol(f, Decl(stringLiteralCheckedInIf02.ts, 6, 1)) +>foo : Symbol(foo, Decl(stringLiteralCheckedInIf02.ts, 8, 11)) +>T : Symbol(T, Decl(stringLiteralCheckedInIf02.ts, 1, 19)) + + if (isS(foo)) { +>isS : Symbol(isS, Decl(stringLiteralCheckedInIf02.ts, 2, 17)) +>foo : Symbol(foo, Decl(stringLiteralCheckedInIf02.ts, 8, 11)) + + return foo; +>foo : Symbol(foo, Decl(stringLiteralCheckedInIf02.ts, 8, 11)) + } + else { + return foo[0]; +>foo : Symbol(foo, Decl(stringLiteralCheckedInIf02.ts, 8, 11)) + } +} diff --git a/tests/baselines/reference/stringLiteralCheckedInIf02.types b/tests/baselines/reference/stringLiteralCheckedInIf02.types new file mode 100644 index 0000000000000..79f4c6a223a71 --- /dev/null +++ b/tests/baselines/reference/stringLiteralCheckedInIf02.types @@ -0,0 +1,47 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf02.ts === + +type S = "a" | "b"; +>S : "a" | "b" + +type T = S[] | S; +>T : ("a" | "b")[] | "a" | "b" +>S : "a" | "b" +>S : "a" | "b" + +function isS(t: T): t is S { +>isS : (t: ("a" | "b")[] | "a" | "b") => t is "a" | "b" +>t : ("a" | "b")[] | "a" | "b" +>T : ("a" | "b")[] | "a" | "b" +>t : any +>S : "a" | "b" + + return t === "a" || t === "b"; +>t === "a" || t === "b" : boolean +>t === "a" : boolean +>t : ("a" | "b")[] | "a" | "b" +>"a" : string +>t === "b" : boolean +>t : ("a" | "b")[] | "a" | "b" +>"b" : string +} + +function f(foo: T) { +>f : (foo: ("a" | "b")[] | "a" | "b") => "a" | "b" +>foo : ("a" | "b")[] | "a" | "b" +>T : ("a" | "b")[] | "a" | "b" + + if (isS(foo)) { +>isS(foo) : boolean +>isS : (t: ("a" | "b")[] | "a" | "b") => t is "a" | "b" +>foo : ("a" | "b")[] | "a" | "b" + + return foo; +>foo : "a" | "b" + } + else { + return foo[0]; +>foo[0] : "a" | "b" +>foo : ("a" | "b")[] +>0 : number + } +} diff --git a/tests/baselines/reference/stringLiteralMatchedInSwitch01.js b/tests/baselines/reference/stringLiteralMatchedInSwitch01.js new file mode 100644 index 0000000000000..b9b24cf0c66b3 --- /dev/null +++ b/tests/baselines/reference/stringLiteralMatchedInSwitch01.js @@ -0,0 +1,25 @@ +//// [stringLiteralMatchedInSwitch01.ts] + +type S = "a" | "b"; +type T = S[] | S; + +var foo: T; +switch (foo) { + case "a": + case "b": + break; + default: + foo = (foo as S[])[0]; + break; +} + +//// [stringLiteralMatchedInSwitch01.js] +var foo; +switch (foo) { + case "a": + case "b": + break; + default: + foo = foo[0]; + break; +} diff --git a/tests/baselines/reference/stringLiteralMatchedInSwitch01.symbols b/tests/baselines/reference/stringLiteralMatchedInSwitch01.symbols new file mode 100644 index 0000000000000..0323371c3070d --- /dev/null +++ b/tests/baselines/reference/stringLiteralMatchedInSwitch01.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralMatchedInSwitch01.ts === + +type S = "a" | "b"; +>S : Symbol(S, Decl(stringLiteralMatchedInSwitch01.ts, 0, 0)) + +type T = S[] | S; +>T : Symbol(T, Decl(stringLiteralMatchedInSwitch01.ts, 1, 19)) +>S : Symbol(S, Decl(stringLiteralMatchedInSwitch01.ts, 0, 0)) +>S : Symbol(S, Decl(stringLiteralMatchedInSwitch01.ts, 0, 0)) + +var foo: T; +>foo : Symbol(foo, Decl(stringLiteralMatchedInSwitch01.ts, 4, 3)) +>T : Symbol(T, Decl(stringLiteralMatchedInSwitch01.ts, 1, 19)) + +switch (foo) { +>foo : Symbol(foo, Decl(stringLiteralMatchedInSwitch01.ts, 4, 3)) + + case "a": + case "b": + break; + default: + foo = (foo as S[])[0]; +>foo : Symbol(foo, Decl(stringLiteralMatchedInSwitch01.ts, 4, 3)) +>foo : Symbol(foo, Decl(stringLiteralMatchedInSwitch01.ts, 4, 3)) +>S : Symbol(S, Decl(stringLiteralMatchedInSwitch01.ts, 0, 0)) + + break; +} diff --git a/tests/baselines/reference/stringLiteralMatchedInSwitch01.types b/tests/baselines/reference/stringLiteralMatchedInSwitch01.types new file mode 100644 index 0000000000000..cfbb77e07e0a3 --- /dev/null +++ b/tests/baselines/reference/stringLiteralMatchedInSwitch01.types @@ -0,0 +1,37 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralMatchedInSwitch01.ts === + +type S = "a" | "b"; +>S : "a" | "b" + +type T = S[] | S; +>T : ("a" | "b")[] | "a" | "b" +>S : "a" | "b" +>S : "a" | "b" + +var foo: T; +>foo : ("a" | "b")[] | "a" | "b" +>T : ("a" | "b")[] | "a" | "b" + +switch (foo) { +>foo : ("a" | "b")[] | "a" | "b" + + case "a": +>"a" : string + + case "b": +>"b" : string + + break; + default: + foo = (foo as S[])[0]; +>foo = (foo as S[])[0] : "a" | "b" +>foo : ("a" | "b")[] | "a" | "b" +>(foo as S[])[0] : "a" | "b" +>(foo as S[]) : ("a" | "b")[] +>foo as S[] : ("a" | "b")[] +>foo : ("a" | "b")[] | "a" | "b" +>S : "a" | "b" +>0 : number + + break; +} diff --git a/tests/baselines/reference/stringLiteralType.errors.txt b/tests/baselines/reference/stringLiteralType.errors.txt deleted file mode 100644 index 275db139cf7b3..0000000000000 --- a/tests/baselines/reference/stringLiteralType.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -tests/cases/conformance/types/primitives/stringLiteral/stringLiteralType.ts(1,8): error TS1110: Type expected. - - -==== tests/cases/conformance/types/primitives/stringLiteral/stringLiteralType.ts (1 errors) ==== - var x: 'hi'; - ~~~~ -!!! error TS1110: Type expected. - - function f(x: 'hi'); - function f(x: string); - function f(x: any) { - } \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralType.js b/tests/baselines/reference/stringLiteralType.js index 35f35f1cbef78..a6926453c47b0 100644 --- a/tests/baselines/reference/stringLiteralType.js +++ b/tests/baselines/reference/stringLiteralType.js @@ -7,6 +7,6 @@ function f(x: any) { } //// [stringLiteralType.js] -var x = 'hi'; +var x; function f(x) { } diff --git a/tests/baselines/reference/stringLiteralType.symbols b/tests/baselines/reference/stringLiteralType.symbols new file mode 100644 index 0000000000000..687d305244218 --- /dev/null +++ b/tests/baselines/reference/stringLiteralType.symbols @@ -0,0 +1,16 @@ +=== tests/cases/conformance/types/primitives/stringLiteral/stringLiteralType.ts === +var x: 'hi'; +>x : Symbol(x, Decl(stringLiteralType.ts, 0, 3)) + +function f(x: 'hi'); +>f : Symbol(f, Decl(stringLiteralType.ts, 0, 12), Decl(stringLiteralType.ts, 2, 20), Decl(stringLiteralType.ts, 3, 22)) +>x : Symbol(x, Decl(stringLiteralType.ts, 2, 11)) + +function f(x: string); +>f : Symbol(f, Decl(stringLiteralType.ts, 0, 12), Decl(stringLiteralType.ts, 2, 20), Decl(stringLiteralType.ts, 3, 22)) +>x : Symbol(x, Decl(stringLiteralType.ts, 3, 11)) + +function f(x: any) { +>f : Symbol(f, Decl(stringLiteralType.ts, 0, 12), Decl(stringLiteralType.ts, 2, 20), Decl(stringLiteralType.ts, 3, 22)) +>x : Symbol(x, Decl(stringLiteralType.ts, 4, 11)) +} diff --git a/tests/baselines/reference/stringLiteralType.types b/tests/baselines/reference/stringLiteralType.types new file mode 100644 index 0000000000000..affa995c2f30f --- /dev/null +++ b/tests/baselines/reference/stringLiteralType.types @@ -0,0 +1,16 @@ +=== tests/cases/conformance/types/primitives/stringLiteral/stringLiteralType.ts === +var x: 'hi'; +>x : "hi" + +function f(x: 'hi'); +>f : { (x: "hi"): any; (x: string): any; } +>x : "hi" + +function f(x: string); +>f : { (x: "hi"): any; (x: string): any; } +>x : string + +function f(x: any) { +>f : { (x: "hi"): any; (x: string): any; } +>x : any +} diff --git a/tests/baselines/reference/stringLiteralTypeAssertion01.js b/tests/baselines/reference/stringLiteralTypeAssertion01.js new file mode 100644 index 0000000000000..7877004cf01ab --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypeAssertion01.js @@ -0,0 +1,53 @@ +//// [stringLiteralTypeAssertion01.ts] + +type S = "a" | "b"; +type T = S[] | S; + +var s: S; +var t: T; +var str: string; + +//////////////// + +s = t; +s = t as S; + +s = str; +s = str as S; + +//////////////// + +t = s; +t = s as T; + +t = str; +t = str as T; + +//////////////// + +str = s; +str = s as string; + +str = t; +str = t as string; + + +//// [stringLiteralTypeAssertion01.js] +var s; +var t; +var str; +//////////////// +s = t; +s = t; +s = str; +s = str; +//////////////// +t = s; +t = s; +t = str; +t = str; +//////////////// +str = s; +str = s; +str = t; +str = t; diff --git a/tests/baselines/reference/stringLiteralTypeAssertion01.symbols b/tests/baselines/reference/stringLiteralTypeAssertion01.symbols new file mode 100644 index 0000000000000..1491a32b6f8bf --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypeAssertion01.symbols @@ -0,0 +1,83 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypeAssertion01.ts === + +type S = "a" | "b"; +>S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) + +type T = S[] | S; +>T : Symbol(T, Decl(stringLiteralTypeAssertion01.ts, 1, 19)) +>S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) +>S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) + +var s: S; +>s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) +>S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) + +var t: T; +>t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) +>T : Symbol(T, Decl(stringLiteralTypeAssertion01.ts, 1, 19)) + +var str: string; +>str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) + +//////////////// + +s = t; +>s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) +>S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) +>t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) + +s = t as S; +>s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) +>t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) +>S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) + +s = str; +>s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) +>S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) +>str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) + +s = str as S; +>s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) +>str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) +>S : Symbol(S, Decl(stringLiteralTypeAssertion01.ts, 0, 0)) + +//////////////// + +t = s; +>t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) +>T : Symbol(T, Decl(stringLiteralTypeAssertion01.ts, 1, 19)) +>s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) + +t = s as T; +>t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) +>s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) +>T : Symbol(T, Decl(stringLiteralTypeAssertion01.ts, 1, 19)) + +t = str; +>t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) +>T : Symbol(T, Decl(stringLiteralTypeAssertion01.ts, 1, 19)) +>str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) + +t = str as T; +>t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) +>str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) +>T : Symbol(T, Decl(stringLiteralTypeAssertion01.ts, 1, 19)) + +//////////////// + +str = s; +>str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) +>s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) + +str = s as string; +>str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) +>s : Symbol(s, Decl(stringLiteralTypeAssertion01.ts, 4, 3)) + +str = t; +>str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) +>t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) + +str = t as string; +>str : Symbol(str, Decl(stringLiteralTypeAssertion01.ts, 6, 3)) +>t : Symbol(t, Decl(stringLiteralTypeAssertion01.ts, 5, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypeAssertion01.types b/tests/baselines/reference/stringLiteralTypeAssertion01.types new file mode 100644 index 0000000000000..f70313f834700 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypeAssertion01.types @@ -0,0 +1,107 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypeAssertion01.ts === + +type S = "a" | "b"; +>S : "a" | "b" + +type T = S[] | S; +>T : ("a" | "b")[] | "a" | "b" +>S : "a" | "b" +>S : "a" | "b" + +var s: S; +>s : "a" | "b" +>S : "a" | "b" + +var t: T; +>t : ("a" | "b")[] | "a" | "b" +>T : ("a" | "b")[] | "a" | "b" + +var str: string; +>str : string + +//////////////// + +s = t; +>s = t : "a" | "b" +>s : "a" | "b" +>t : "a" | "b" +>S : "a" | "b" +>t : ("a" | "b")[] | "a" | "b" + +s = t as S; +>s = t as S : "a" | "b" +>s : "a" | "b" +>t as S : "a" | "b" +>t : ("a" | "b")[] | "a" | "b" +>S : "a" | "b" + +s = str; +>s = str : "a" | "b" +>s : "a" | "b" +>str : "a" | "b" +>S : "a" | "b" +>str : string + +s = str as S; +>s = str as S : "a" | "b" +>s : "a" | "b" +>str as S : "a" | "b" +>str : string +>S : "a" | "b" + +//////////////// + +t = s; +>t = s : ("a" | "b")[] | "a" | "b" +>t : ("a" | "b")[] | "a" | "b" +>s : ("a" | "b")[] | "a" | "b" +>T : ("a" | "b")[] | "a" | "b" +>s : "a" | "b" + +t = s as T; +>t = s as T : ("a" | "b")[] | "a" | "b" +>t : ("a" | "b")[] | "a" | "b" +>s as T : ("a" | "b")[] | "a" | "b" +>s : "a" | "b" +>T : ("a" | "b")[] | "a" | "b" + +t = str; +>t = str : ("a" | "b")[] | "a" | "b" +>t : ("a" | "b")[] | "a" | "b" +>str : ("a" | "b")[] | "a" | "b" +>T : ("a" | "b")[] | "a" | "b" +>str : string + +t = str as T; +>t = str as T : ("a" | "b")[] | "a" | "b" +>t : ("a" | "b")[] | "a" | "b" +>str as T : ("a" | "b")[] | "a" | "b" +>str : string +>T : ("a" | "b")[] | "a" | "b" + +//////////////// + +str = s; +>str = s : string +>str : string +>s : string +>s : "a" | "b" + +str = s as string; +>str = s as string : string +>str : string +>s as string : string +>s : "a" | "b" + +str = t; +>str = t : string +>str : string +>t : string +>t : ("a" | "b")[] | "a" | "b" + +str = t as string; +>str = t as string : string +>str : string +>t as string : string +>t : ("a" | "b")[] | "a" | "b" + diff --git a/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.js b/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.js new file mode 100644 index 0000000000000..479256b18b7e5 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.js @@ -0,0 +1,26 @@ +//// [stringLiteralTypesAndLogicalOrExpressions01.ts] + +declare function myRandBool(): boolean; + +let a: "foo" = "foo"; +let b = a || "foo"; +let c: "foo" = b; +let d = b || "bar"; +let e: "foo" | "bar" = d; + + +//// [stringLiteralTypesAndLogicalOrExpressions01.js] +var a = "foo"; +var b = a || "foo"; +var c = b; +var d = b || "bar"; +var e = d; + + +//// [stringLiteralTypesAndLogicalOrExpressions01.d.ts] +declare function myRandBool(): boolean; +declare let a: "foo"; +declare let b: "foo"; +declare let c: "foo"; +declare let d: "foo" | "bar"; +declare let e: "foo" | "bar"; diff --git a/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.symbols b/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.symbols new file mode 100644 index 0000000000000..2a9f28e85a5ca --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.symbols @@ -0,0 +1,24 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndLogicalOrExpressions01.ts === + +declare function myRandBool(): boolean; +>myRandBool : Symbol(myRandBool, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 0, 0)) + +let a: "foo" = "foo"; +>a : Symbol(a, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 3, 3)) + +let b = a || "foo"; +>b : Symbol(b, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 4, 3)) +>a : Symbol(a, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 3, 3)) + +let c: "foo" = b; +>c : Symbol(c, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 5, 3)) +>b : Symbol(b, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 4, 3)) + +let d = b || "bar"; +>d : Symbol(d, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 6, 3)) +>b : Symbol(b, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 4, 3)) + +let e: "foo" | "bar" = d; +>e : Symbol(e, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 7, 3)) +>d : Symbol(d, Decl(stringLiteralTypesAndLogicalOrExpressions01.ts, 6, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.types b/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.types new file mode 100644 index 0000000000000..ddc79b818579e --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAndLogicalOrExpressions01.types @@ -0,0 +1,29 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndLogicalOrExpressions01.ts === + +declare function myRandBool(): boolean; +>myRandBool : () => boolean + +let a: "foo" = "foo"; +>a : "foo" +>"foo" : "foo" + +let b = a || "foo"; +>b : "foo" +>a || "foo" : "foo" +>a : "foo" +>"foo" : "foo" + +let c: "foo" = b; +>c : "foo" +>b : "foo" + +let d = b || "bar"; +>d : "foo" | "bar" +>b || "bar" : "foo" | "bar" +>b : "foo" +>"bar" : "bar" + +let e: "foo" | "bar" = d; +>e : "foo" | "bar" +>d : "foo" | "bar" + diff --git a/tests/baselines/reference/stringLiteralTypesAndParenthesizedExpressions01.js b/tests/baselines/reference/stringLiteralTypesAndParenthesizedExpressions01.js new file mode 100644 index 0000000000000..1fe1225c6f40d --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAndParenthesizedExpressions01.js @@ -0,0 +1,23 @@ +//// [stringLiteralTypesAndParenthesizedExpressions01.ts] + +declare function myRandBool(): boolean; + +let a: "foo" = ("foo"); +let b: "foo" | "bar" = ("foo"); +let c: "foo" = (myRandBool ? "foo" : ("foo")); +let d: "foo" | "bar" = (myRandBool ? "foo" : ("bar")); + + +//// [stringLiteralTypesAndParenthesizedExpressions01.js] +var a = ("foo"); +var b = ("foo"); +var c = (myRandBool ? "foo" : ("foo")); +var d = (myRandBool ? "foo" : ("bar")); + + +//// [stringLiteralTypesAndParenthesizedExpressions01.d.ts] +declare function myRandBool(): boolean; +declare let a: "foo"; +declare let b: "foo" | "bar"; +declare let c: "foo"; +declare let d: "foo" | "bar"; diff --git a/tests/baselines/reference/stringLiteralTypesAndParenthesizedExpressions01.symbols b/tests/baselines/reference/stringLiteralTypesAndParenthesizedExpressions01.symbols new file mode 100644 index 0000000000000..2206a5185c1af --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAndParenthesizedExpressions01.symbols @@ -0,0 +1,19 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndParenthesizedExpressions01.ts === + +declare function myRandBool(): boolean; +>myRandBool : Symbol(myRandBool, Decl(stringLiteralTypesAndParenthesizedExpressions01.ts, 0, 0)) + +let a: "foo" = ("foo"); +>a : Symbol(a, Decl(stringLiteralTypesAndParenthesizedExpressions01.ts, 3, 3)) + +let b: "foo" | "bar" = ("foo"); +>b : Symbol(b, Decl(stringLiteralTypesAndParenthesizedExpressions01.ts, 4, 3)) + +let c: "foo" = (myRandBool ? "foo" : ("foo")); +>c : Symbol(c, Decl(stringLiteralTypesAndParenthesizedExpressions01.ts, 5, 3)) +>myRandBool : Symbol(myRandBool, Decl(stringLiteralTypesAndParenthesizedExpressions01.ts, 0, 0)) + +let d: "foo" | "bar" = (myRandBool ? "foo" : ("bar")); +>d : Symbol(d, Decl(stringLiteralTypesAndParenthesizedExpressions01.ts, 6, 3)) +>myRandBool : Symbol(myRandBool, Decl(stringLiteralTypesAndParenthesizedExpressions01.ts, 0, 0)) + diff --git a/tests/baselines/reference/stringLiteralTypesAndParenthesizedExpressions01.types b/tests/baselines/reference/stringLiteralTypesAndParenthesizedExpressions01.types new file mode 100644 index 0000000000000..0bb2e1dd3c7b8 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAndParenthesizedExpressions01.types @@ -0,0 +1,33 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndParenthesizedExpressions01.ts === + +declare function myRandBool(): boolean; +>myRandBool : () => boolean + +let a: "foo" = ("foo"); +>a : "foo" +>("foo") : "foo" +>"foo" : "foo" + +let b: "foo" | "bar" = ("foo"); +>b : "foo" | "bar" +>("foo") : "foo" +>"foo" : "foo" + +let c: "foo" = (myRandBool ? "foo" : ("foo")); +>c : "foo" +>(myRandBool ? "foo" : ("foo")) : "foo" +>myRandBool ? "foo" : ("foo") : "foo" +>myRandBool : () => boolean +>"foo" : "foo" +>("foo") : "foo" +>"foo" : "foo" + +let d: "foo" | "bar" = (myRandBool ? "foo" : ("bar")); +>d : "foo" | "bar" +>(myRandBool ? "foo" : ("bar")) : "foo" | "bar" +>myRandBool ? "foo" : ("bar") : "foo" | "bar" +>myRandBool : () => boolean +>"foo" : "foo" +>("bar") : "bar" +>"bar" : "bar" + diff --git a/tests/baselines/reference/stringLiteralTypesAndTuples01.js b/tests/baselines/reference/stringLiteralTypesAndTuples01.js new file mode 100644 index 0000000000000..ae02d12429a39 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAndTuples01.js @@ -0,0 +1,42 @@ +//// [stringLiteralTypesAndTuples01.ts] + +// Should all be strings. +let [hello, brave, newish, world] = ["Hello", "Brave", "New", "World"]; + +type RexOrRaptor = "t-rex" | "raptor" +let [im, a, dinosaur]: ["I'm", "a", RexOrRaptor] = ['I\'m', 'a', 't-rex']; + +rawr(dinosaur); + +function rawr(dino: RexOrRaptor) { + if (dino === "t-rex") { + return "ROAAAAR!"; + } + if (dino === "raptor") { + return "yip yip!"; + } + + throw "Unexpected " + dino; +} + +//// [stringLiteralTypesAndTuples01.js] +// Should all be strings. +var _a = ["Hello", "Brave", "New", "World"], hello = _a[0], brave = _a[1], newish = _a[2], world = _a[3]; +var _b = ['I\'m', 'a', 't-rex'], im = _b[0], a = _b[1], dinosaur = _b[2]; +rawr(dinosaur); +function rawr(dino) { + if (dino === "t-rex") { + return "ROAAAAR!"; + } + if (dino === "raptor") { + return "yip yip!"; + } + throw "Unexpected " + dino; +} + + +//// [stringLiteralTypesAndTuples01.d.ts] +declare let hello: string, brave: string, newish: string, world: string; +declare type RexOrRaptor = "t-rex" | "raptor"; +declare let im: "I'm", a: "a", dinosaur: "t-rex" | "raptor"; +declare function rawr(dino: RexOrRaptor): string; diff --git a/tests/baselines/reference/stringLiteralTypesAndTuples01.symbols b/tests/baselines/reference/stringLiteralTypesAndTuples01.symbols new file mode 100644 index 0000000000000..b7ca53517ca15 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAndTuples01.symbols @@ -0,0 +1,41 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndTuples01.ts === + +// Should all be strings. +let [hello, brave, newish, world] = ["Hello", "Brave", "New", "World"]; +>hello : Symbol(hello, Decl(stringLiteralTypesAndTuples01.ts, 2, 5)) +>brave : Symbol(brave, Decl(stringLiteralTypesAndTuples01.ts, 2, 11)) +>newish : Symbol(newish, Decl(stringLiteralTypesAndTuples01.ts, 2, 18)) +>world : Symbol(world, Decl(stringLiteralTypesAndTuples01.ts, 2, 26)) + +type RexOrRaptor = "t-rex" | "raptor" +>RexOrRaptor : Symbol(RexOrRaptor, Decl(stringLiteralTypesAndTuples01.ts, 2, 71)) + +let [im, a, dinosaur]: ["I'm", "a", RexOrRaptor] = ['I\'m', 'a', 't-rex']; +>im : Symbol(im, Decl(stringLiteralTypesAndTuples01.ts, 5, 5)) +>a : Symbol(a, Decl(stringLiteralTypesAndTuples01.ts, 5, 8)) +>dinosaur : Symbol(dinosaur, Decl(stringLiteralTypesAndTuples01.ts, 5, 11)) +>RexOrRaptor : Symbol(RexOrRaptor, Decl(stringLiteralTypesAndTuples01.ts, 2, 71)) + +rawr(dinosaur); +>rawr : Symbol(rawr, Decl(stringLiteralTypesAndTuples01.ts, 7, 15)) +>dinosaur : Symbol(dinosaur, Decl(stringLiteralTypesAndTuples01.ts, 5, 11)) + +function rawr(dino: RexOrRaptor) { +>rawr : Symbol(rawr, Decl(stringLiteralTypesAndTuples01.ts, 7, 15)) +>dino : Symbol(dino, Decl(stringLiteralTypesAndTuples01.ts, 9, 14)) +>RexOrRaptor : Symbol(RexOrRaptor, Decl(stringLiteralTypesAndTuples01.ts, 2, 71)) + + if (dino === "t-rex") { +>dino : Symbol(dino, Decl(stringLiteralTypesAndTuples01.ts, 9, 14)) + + return "ROAAAAR!"; + } + if (dino === "raptor") { +>dino : Symbol(dino, Decl(stringLiteralTypesAndTuples01.ts, 9, 14)) + + return "yip yip!"; + } + + throw "Unexpected " + dino; +>dino : Symbol(dino, Decl(stringLiteralTypesAndTuples01.ts, 9, 14)) +} diff --git a/tests/baselines/reference/stringLiteralTypesAndTuples01.types b/tests/baselines/reference/stringLiteralTypesAndTuples01.types new file mode 100644 index 0000000000000..c874973e3e590 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAndTuples01.types @@ -0,0 +1,59 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndTuples01.ts === + +// Should all be strings. +let [hello, brave, newish, world] = ["Hello", "Brave", "New", "World"]; +>hello : string +>brave : string +>newish : string +>world : string +>["Hello", "Brave", "New", "World"] : [string, string, string, string] +>"Hello" : string +>"Brave" : string +>"New" : string +>"World" : string + +type RexOrRaptor = "t-rex" | "raptor" +>RexOrRaptor : "t-rex" | "raptor" + +let [im, a, dinosaur]: ["I'm", "a", RexOrRaptor] = ['I\'m', 'a', 't-rex']; +>im : "I'm" +>a : "a" +>dinosaur : "t-rex" | "raptor" +>RexOrRaptor : "t-rex" | "raptor" +>['I\'m', 'a', 't-rex'] : ["I'm", "a", "t-rex"] +>'I\'m' : "I'm" +>'a' : "a" +>'t-rex' : "t-rex" + +rawr(dinosaur); +>rawr(dinosaur) : string +>rawr : (dino: "t-rex" | "raptor") => string +>dinosaur : "t-rex" | "raptor" + +function rawr(dino: RexOrRaptor) { +>rawr : (dino: "t-rex" | "raptor") => string +>dino : "t-rex" | "raptor" +>RexOrRaptor : "t-rex" | "raptor" + + if (dino === "t-rex") { +>dino === "t-rex" : boolean +>dino : "t-rex" | "raptor" +>"t-rex" : string + + return "ROAAAAR!"; +>"ROAAAAR!" : string + } + if (dino === "raptor") { +>dino === "raptor" : boolean +>dino : "t-rex" | "raptor" +>"raptor" : string + + return "yip yip!"; +>"yip yip!" : string + } + + throw "Unexpected " + dino; +>"Unexpected " + dino : string +>"Unexpected " : string +>dino : "t-rex" | "raptor" +} diff --git a/tests/baselines/reference/stringLiteralTypesAsTags01.errors.txt b/tests/baselines/reference/stringLiteralTypesAsTags01.errors.txt new file mode 100644 index 0000000000000..6e4f8943fb6af --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAsTags01.errors.txt @@ -0,0 +1,57 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags01.ts(18,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags01.ts(19,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags01.ts(20,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags01.ts(22,21): error TS2304: Cannot find name 'is'. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags01.ts (4 errors) ==== + + type Kind = "A" | "B" + + interface Entity { + kind: Kind; + } + + interface A extends Entity { + kind: "A"; + a: number; + } + + interface B extends Entity { + kind: "B"; + b: string; + } + + function hasKind(entity: Entity, kind: "A"): entity is A; + ~~~~~~~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function hasKind(entity: Entity, kind: "B"): entity is B; + ~~~~~~~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function hasKind(entity: Entity, kind: Kind): entity is Entity; + ~~~~~~~ +!!! error TS2394: Overload signature is not compatible with function implementation. + function hasKind(entity: Entity, kind: Kind): boolean { + return kind === is; + ~~ +!!! error TS2304: Cannot find name 'is'. + } + + let x: A = { + kind: "A", + a: 100, + } + + if (hasKind(x, "A")) { + let a = x; + } + else { + let b = x; + } + + if (!hasKind(x, "B")) { + let c = x; + } + else { + let d = x; + } \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesAsTags01.js b/tests/baselines/reference/stringLiteralTypesAsTags01.js new file mode 100644 index 0000000000000..3fe33ace4870a --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAsTags01.js @@ -0,0 +1,83 @@ +//// [stringLiteralTypesAsTags01.ts] + +type Kind = "A" | "B" + +interface Entity { + kind: Kind; +} + +interface A extends Entity { + kind: "A"; + a: number; +} + +interface B extends Entity { + kind: "B"; + b: string; +} + +function hasKind(entity: Entity, kind: "A"): entity is A; +function hasKind(entity: Entity, kind: "B"): entity is B; +function hasKind(entity: Entity, kind: Kind): entity is Entity; +function hasKind(entity: Entity, kind: Kind): boolean { + return kind === is; +} + +let x: A = { + kind: "A", + a: 100, +} + +if (hasKind(x, "A")) { + let a = x; +} +else { + let b = x; +} + +if (!hasKind(x, "B")) { + let c = x; +} +else { + let d = x; +} + +//// [stringLiteralTypesAsTags01.js] +function hasKind(entity, kind) { + return kind === is; +} +var x = { + kind: "A", + a: 100 +}; +if (hasKind(x, "A")) { + var a = x; +} +else { + var b = x; +} +if (!hasKind(x, "B")) { + var c = x; +} +else { + var d = x; +} + + +//// [stringLiteralTypesAsTags01.d.ts] +declare type Kind = "A" | "B"; +interface Entity { + kind: Kind; +} +interface A extends Entity { + kind: "A"; + a: number; +} +interface B extends Entity { + kind: "B"; + b: string; +} +declare function hasKind(entity: Entity, kind: "A"): entity is A; +declare function hasKind(entity: Entity, kind: "B"): entity is B; +declare function hasKind(entity: Entity, kind: Kind): entity is Entity; +declare let x: A; diff --git a/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.js b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.js new file mode 100644 index 0000000000000..558f6bdf4c2fd --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.js @@ -0,0 +1,68 @@ +//// [stringLiteralTypesAsTypeParameterConstraint01.ts] + +function foo(f: (x: T) => T) { + return f; +} + +function bar(f: (x: T) => T) { + return f; +} + +let f = foo(x => x); +let fResult = f("foo"); + +let g = foo((x => x)); +let gResult = g("foo"); + +let h = bar(x => x); +let hResult = h("foo"); +hResult = h("bar"); + +//// [stringLiteralTypesAsTypeParameterConstraint01.js] +function foo(f) { + return f; +} +function bar(f) { + return f; +} +var f = foo(function (x) { return x; }); +var fResult = f("foo"); +var g = foo((function (x) { return x; })); +var gResult = g("foo"); +var h = bar(function (x) { return x; }); +var hResult = h("foo"); +hResult = h("bar"); + + +//// [stringLiteralTypesAsTypeParameterConstraint01.d.ts] +declare function foo(f: (x: T) => T): (x: T) => T; +declare function bar(f: (x: T) => T): (x: T) => T; +declare let f: (x: "foo") => "foo"; +declare let fResult: "foo"; +declare let g: (x: "foo") => "foo"; +declare let gResult: "foo"; +declare let h: (x: "foo" | "bar") => "foo" | "bar"; +declare let hResult: "foo" | "bar"; + + +//// [DtsFileErrors] + + +tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.d.ts(3,16): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.d.ts(5,16): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.d.ts (2 errors) ==== + declare function foo(f: (x: T) => T): (x: T) => T; + declare function bar(f: (x: T) => T): (x: T) => T; + declare let f: (x: "foo") => "foo"; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + declare let fResult: "foo"; + declare let g: (x: "foo") => "foo"; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + declare let gResult: "foo"; + declare let h: (x: "foo" | "bar") => "foo" | "bar"; + declare let hResult: "foo" | "bar"; + \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.symbols b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.symbols new file mode 100644 index 0000000000000..fd633b6e4d912 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.symbols @@ -0,0 +1,60 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.ts === + +function foo(f: (x: T) => T) { +>foo : Symbol(foo, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 0, 0)) +>T : Symbol(T, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 1, 13)) +>f : Symbol(f, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 1, 30)) +>x : Symbol(x, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 1, 34)) +>T : Symbol(T, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 1, 13)) +>T : Symbol(T, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 1, 13)) + + return f; +>f : Symbol(f, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 1, 30)) +} + +function bar(f: (x: T) => T) { +>bar : Symbol(bar, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 3, 1)) +>T : Symbol(T, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 5, 13)) +>f : Symbol(f, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 5, 38)) +>x : Symbol(x, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 5, 42)) +>T : Symbol(T, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 5, 13)) +>T : Symbol(T, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 5, 13)) + + return f; +>f : Symbol(f, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 5, 38)) +} + +let f = foo(x => x); +>f : Symbol(f, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 9, 3)) +>foo : Symbol(foo, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 0, 0)) +>x : Symbol(x, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 9, 12)) +>x : Symbol(x, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 9, 12)) + +let fResult = f("foo"); +>fResult : Symbol(fResult, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 10, 3)) +>f : Symbol(f, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 9, 3)) + +let g = foo((x => x)); +>g : Symbol(g, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 12, 3)) +>foo : Symbol(foo, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 0, 0)) +>x : Symbol(x, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 12, 13)) +>x : Symbol(x, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 12, 13)) + +let gResult = g("foo"); +>gResult : Symbol(gResult, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 13, 3)) +>g : Symbol(g, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 12, 3)) + +let h = bar(x => x); +>h : Symbol(h, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 15, 3)) +>bar : Symbol(bar, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 3, 1)) +>x : Symbol(x, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 15, 12)) +>x : Symbol(x, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 15, 12)) + +let hResult = h("foo"); +>hResult : Symbol(hResult, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 16, 3)) +>h : Symbol(h, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 15, 3)) + +hResult = h("bar"); +>hResult : Symbol(hResult, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 16, 3)) +>h : Symbol(h, Decl(stringLiteralTypesAsTypeParameterConstraint01.ts, 15, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.types b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.types new file mode 100644 index 0000000000000..fe9163fc81911 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.types @@ -0,0 +1,76 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.ts === + +function foo(f: (x: T) => T) { +>foo : (f: (x: T) => T) => (x: T) => T +>T : T +>f : (x: T) => T +>x : T +>T : T +>T : T + + return f; +>f : (x: T) => T +} + +function bar(f: (x: T) => T) { +>bar : (f: (x: T) => T) => (x: T) => T +>T : T +>f : (x: T) => T +>x : T +>T : T +>T : T + + return f; +>f : (x: T) => T +} + +let f = foo(x => x); +>f : (x: "foo") => "foo" +>foo(x => x) : (x: "foo") => "foo" +>foo : (f: (x: T) => T) => (x: T) => T +>x => x : (x: "foo") => "foo" +>x : "foo" +>x : "foo" + +let fResult = f("foo"); +>fResult : "foo" +>f("foo") : "foo" +>f : (x: "foo") => "foo" +>"foo" : "foo" + +let g = foo((x => x)); +>g : (x: "foo") => "foo" +>foo((x => x)) : (x: "foo") => "foo" +>foo : (f: (x: T) => T) => (x: T) => T +>(x => x) : (x: "foo") => "foo" +>x => x : (x: "foo") => "foo" +>x : "foo" +>x : "foo" + +let gResult = g("foo"); +>gResult : "foo" +>g("foo") : "foo" +>g : (x: "foo") => "foo" +>"foo" : "foo" + +let h = bar(x => x); +>h : (x: "foo" | "bar") => "foo" | "bar" +>bar(x => x) : (x: "foo" | "bar") => "foo" | "bar" +>bar : (f: (x: T) => T) => (x: T) => T +>x => x : (x: "foo" | "bar") => "foo" | "bar" +>x : "foo" | "bar" +>x : "foo" | "bar" + +let hResult = h("foo"); +>hResult : "foo" | "bar" +>h("foo") : "foo" | "bar" +>h : (x: "foo" | "bar") => "foo" | "bar" +>"foo" : "foo" + +hResult = h("bar"); +>hResult = h("bar") : "foo" | "bar" +>hResult : "foo" | "bar" +>h("bar") : "foo" | "bar" +>h : (x: "foo" | "bar") => "foo" | "bar" +>"bar" : "bar" + diff --git a/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint02.errors.txt b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint02.errors.txt new file mode 100644 index 0000000000000..ed6450ad3293f --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint02.errors.txt @@ -0,0 +1,15 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint02.ts(6,13): error TS2345: Argument of type '(y: "foo" | "bar") => string' is not assignable to parameter of type '(x: "foo") => "foo"'. + Type 'string' is not assignable to type '"foo"'. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint02.ts (1 errors) ==== + + function foo(f: (x: T) => T) { + return f; + } + + let f = foo((y: "foo" | "bar") => y === "foo" ? y : "foo"); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '(y: "foo" | "bar") => string' is not assignable to parameter of type '(x: "foo") => "foo"'. +!!! error TS2345: Type 'string' is not assignable to type '"foo"'. + let fResult = f("foo"); \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint02.js b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint02.js new file mode 100644 index 0000000000000..c024ac6bc43b2 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint02.js @@ -0,0 +1,21 @@ +//// [stringLiteralTypesAsTypeParameterConstraint02.ts] + +function foo(f: (x: T) => T) { + return f; +} + +let f = foo((y: "foo" | "bar") => y === "foo" ? y : "foo"); +let fResult = f("foo"); + +//// [stringLiteralTypesAsTypeParameterConstraint02.js] +function foo(f) { + return f; +} +var f = foo(function (y) { return y === "foo" ? y : "foo"; }); +var fResult = f("foo"); + + +//// [stringLiteralTypesAsTypeParameterConstraint02.d.ts] +declare function foo(f: (x: T) => T): (x: T) => T; +declare let f: any; +declare let fResult: any; diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes01.js b/tests/baselines/reference/stringLiteralTypesInUnionTypes01.js new file mode 100644 index 0000000000000..d970310d68e32 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes01.js @@ -0,0 +1,44 @@ +//// [stringLiteralTypesInUnionTypes01.ts] + +type T = "foo" | "bar" | "baz"; + +var x: "foo" | "bar" | "baz" = "foo"; +var y: T = "bar"; + +if (x === "foo") { + let a = x; +} +else if (x !== "bar") { + let b = x || y; +} +else { + let c = x; + let d = y; + let e: (typeof x) | (typeof y) = c || d; +} + +x = y; +y = x; + +//// [stringLiteralTypesInUnionTypes01.js] +var x = "foo"; +var y = "bar"; +if (x === "foo") { + var a = x; +} +else if (x !== "bar") { + var b = x || y; +} +else { + var c = x; + var d = y; + var e = c || d; +} +x = y; +y = x; + + +//// [stringLiteralTypesInUnionTypes01.d.ts] +declare type T = "foo" | "bar" | "baz"; +declare var x: "foo" | "bar" | "baz"; +declare var y: T; diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes01.symbols b/tests/baselines/reference/stringLiteralTypesInUnionTypes01.symbols new file mode 100644 index 0000000000000..c608929383ed3 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes01.symbols @@ -0,0 +1,52 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes01.ts === + +type T = "foo" | "bar" | "baz"; +>T : Symbol(T, Decl(stringLiteralTypesInUnionTypes01.ts, 0, 0)) + +var x: "foo" | "bar" | "baz" = "foo"; +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes01.ts, 3, 3)) + +var y: T = "bar"; +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes01.ts, 4, 3)) +>T : Symbol(T, Decl(stringLiteralTypesInUnionTypes01.ts, 0, 0)) + +if (x === "foo") { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes01.ts, 3, 3)) + + let a = x; +>a : Symbol(a, Decl(stringLiteralTypesInUnionTypes01.ts, 7, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes01.ts, 3, 3)) +} +else if (x !== "bar") { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes01.ts, 3, 3)) + + let b = x || y; +>b : Symbol(b, Decl(stringLiteralTypesInUnionTypes01.ts, 10, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes01.ts, 3, 3)) +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes01.ts, 4, 3)) +} +else { + let c = x; +>c : Symbol(c, Decl(stringLiteralTypesInUnionTypes01.ts, 13, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes01.ts, 3, 3)) + + let d = y; +>d : Symbol(d, Decl(stringLiteralTypesInUnionTypes01.ts, 14, 7)) +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes01.ts, 4, 3)) + + let e: (typeof x) | (typeof y) = c || d; +>e : Symbol(e, Decl(stringLiteralTypesInUnionTypes01.ts, 15, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes01.ts, 3, 3)) +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes01.ts, 4, 3)) +>c : Symbol(c, Decl(stringLiteralTypesInUnionTypes01.ts, 13, 7)) +>d : Symbol(d, Decl(stringLiteralTypesInUnionTypes01.ts, 14, 7)) +} + +x = y; +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes01.ts, 3, 3)) +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes01.ts, 4, 3)) + +y = x; +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes01.ts, 4, 3)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes01.ts, 3, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes01.types b/tests/baselines/reference/stringLiteralTypesInUnionTypes01.types new file mode 100644 index 0000000000000..e5ff509822b99 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes01.types @@ -0,0 +1,62 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes01.ts === + +type T = "foo" | "bar" | "baz"; +>T : "foo" | "bar" | "baz" + +var x: "foo" | "bar" | "baz" = "foo"; +>x : "foo" | "bar" | "baz" +>"foo" : "foo" + +var y: T = "bar"; +>y : "foo" | "bar" | "baz" +>T : "foo" | "bar" | "baz" +>"bar" : "bar" + +if (x === "foo") { +>x === "foo" : boolean +>x : "foo" | "bar" | "baz" +>"foo" : string + + let a = x; +>a : "foo" | "bar" | "baz" +>x : "foo" | "bar" | "baz" +} +else if (x !== "bar") { +>x !== "bar" : boolean +>x : "foo" | "bar" | "baz" +>"bar" : string + + let b = x || y; +>b : "foo" | "bar" | "baz" +>x || y : "foo" | "bar" | "baz" +>x : "foo" | "bar" | "baz" +>y : "foo" | "bar" | "baz" +} +else { + let c = x; +>c : "foo" | "bar" | "baz" +>x : "foo" | "bar" | "baz" + + let d = y; +>d : "foo" | "bar" | "baz" +>y : "foo" | "bar" | "baz" + + let e: (typeof x) | (typeof y) = c || d; +>e : "foo" | "bar" | "baz" +>x : "foo" | "bar" | "baz" +>y : "foo" | "bar" | "baz" +>c || d : "foo" | "bar" | "baz" +>c : "foo" | "bar" | "baz" +>d : "foo" | "bar" | "baz" +} + +x = y; +>x = y : "foo" | "bar" | "baz" +>x : "foo" | "bar" | "baz" +>y : "foo" | "bar" | "baz" + +y = x; +>y = x : "foo" | "bar" | "baz" +>y : "foo" | "bar" | "baz" +>x : "foo" | "bar" | "baz" + diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes02.js b/tests/baselines/reference/stringLiteralTypesInUnionTypes02.js new file mode 100644 index 0000000000000..19b9c837c9da8 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes02.js @@ -0,0 +1,44 @@ +//// [stringLiteralTypesInUnionTypes02.ts] + +type T = string | "foo" | "bar" | "baz"; + +var x: "foo" | "bar" | "baz" | string = "foo"; +var y: T = "bar"; + +if (x === "foo") { + let a = x; +} +else if (x !== "bar") { + let b = x || y; +} +else { + let c = x; + let d = y; + let e: (typeof x) | (typeof y) = c || d; +} + +x = y; +y = x; + +//// [stringLiteralTypesInUnionTypes02.js] +var x = "foo"; +var y = "bar"; +if (x === "foo") { + var a = x; +} +else if (x !== "bar") { + var b = x || y; +} +else { + var c = x; + var d = y; + var e = c || d; +} +x = y; +y = x; + + +//// [stringLiteralTypesInUnionTypes02.d.ts] +declare type T = string | "foo" | "bar" | "baz"; +declare var x: "foo" | "bar" | "baz" | string; +declare var y: T; diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes02.symbols b/tests/baselines/reference/stringLiteralTypesInUnionTypes02.symbols new file mode 100644 index 0000000000000..c9b31dc710a02 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes02.symbols @@ -0,0 +1,52 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes02.ts === + +type T = string | "foo" | "bar" | "baz"; +>T : Symbol(T, Decl(stringLiteralTypesInUnionTypes02.ts, 0, 0)) + +var x: "foo" | "bar" | "baz" | string = "foo"; +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes02.ts, 3, 3)) + +var y: T = "bar"; +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes02.ts, 4, 3)) +>T : Symbol(T, Decl(stringLiteralTypesInUnionTypes02.ts, 0, 0)) + +if (x === "foo") { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes02.ts, 3, 3)) + + let a = x; +>a : Symbol(a, Decl(stringLiteralTypesInUnionTypes02.ts, 7, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes02.ts, 3, 3)) +} +else if (x !== "bar") { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes02.ts, 3, 3)) + + let b = x || y; +>b : Symbol(b, Decl(stringLiteralTypesInUnionTypes02.ts, 10, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes02.ts, 3, 3)) +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes02.ts, 4, 3)) +} +else { + let c = x; +>c : Symbol(c, Decl(stringLiteralTypesInUnionTypes02.ts, 13, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes02.ts, 3, 3)) + + let d = y; +>d : Symbol(d, Decl(stringLiteralTypesInUnionTypes02.ts, 14, 7)) +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes02.ts, 4, 3)) + + let e: (typeof x) | (typeof y) = c || d; +>e : Symbol(e, Decl(stringLiteralTypesInUnionTypes02.ts, 15, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes02.ts, 3, 3)) +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes02.ts, 4, 3)) +>c : Symbol(c, Decl(stringLiteralTypesInUnionTypes02.ts, 13, 7)) +>d : Symbol(d, Decl(stringLiteralTypesInUnionTypes02.ts, 14, 7)) +} + +x = y; +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes02.ts, 3, 3)) +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes02.ts, 4, 3)) + +y = x; +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes02.ts, 4, 3)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes02.ts, 3, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes02.types b/tests/baselines/reference/stringLiteralTypesInUnionTypes02.types new file mode 100644 index 0000000000000..b468c620376ba --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes02.types @@ -0,0 +1,62 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes02.ts === + +type T = string | "foo" | "bar" | "baz"; +>T : string | "foo" | "bar" | "baz" + +var x: "foo" | "bar" | "baz" | string = "foo"; +>x : "foo" | "bar" | "baz" | string +>"foo" : "foo" + +var y: T = "bar"; +>y : string | "foo" | "bar" | "baz" +>T : string | "foo" | "bar" | "baz" +>"bar" : "bar" + +if (x === "foo") { +>x === "foo" : boolean +>x : "foo" | "bar" | "baz" | string +>"foo" : string + + let a = x; +>a : "foo" | "bar" | "baz" | string +>x : "foo" | "bar" | "baz" | string +} +else if (x !== "bar") { +>x !== "bar" : boolean +>x : "foo" | "bar" | "baz" | string +>"bar" : string + + let b = x || y; +>b : string +>x || y : string +>x : "foo" | "bar" | "baz" | string +>y : string | "foo" | "bar" | "baz" +} +else { + let c = x; +>c : "foo" | "bar" | "baz" | string +>x : "foo" | "bar" | "baz" | string + + let d = y; +>d : string | "foo" | "bar" | "baz" +>y : string | "foo" | "bar" | "baz" + + let e: (typeof x) | (typeof y) = c || d; +>e : "foo" | "bar" | "baz" | string +>x : "foo" | "bar" | "baz" | string +>y : string | "foo" | "bar" | "baz" +>c || d : string +>c : "foo" | "bar" | "baz" | string +>d : string | "foo" | "bar" | "baz" +} + +x = y; +>x = y : string | "foo" | "bar" | "baz" +>x : "foo" | "bar" | "baz" | string +>y : string | "foo" | "bar" | "baz" + +y = x; +>y = x : "foo" | "bar" | "baz" | string +>y : string | "foo" | "bar" | "baz" +>x : "foo" | "bar" | "baz" | string + diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes03.js b/tests/baselines/reference/stringLiteralTypesInUnionTypes03.js new file mode 100644 index 0000000000000..f6728e0b2fb2f --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes03.js @@ -0,0 +1,44 @@ +//// [stringLiteralTypesInUnionTypes03.ts] + +type T = number | "foo" | "bar"; + +var x: "foo" | "bar" | number; +var y: T = "bar"; + +if (x === "foo") { + let a = x; +} +else if (x !== "bar") { + let b = x || y; +} +else { + let c = x; + let d = y; + let e: (typeof x) | (typeof y) = c || d; +} + +x = y; +y = x; + +//// [stringLiteralTypesInUnionTypes03.js] +var x; +var y = "bar"; +if (x === "foo") { + var a = x; +} +else if (x !== "bar") { + var b = x || y; +} +else { + var c = x; + var d = y; + var e = c || d; +} +x = y; +y = x; + + +//// [stringLiteralTypesInUnionTypes03.d.ts] +declare type T = number | "foo" | "bar"; +declare var x: "foo" | "bar" | number; +declare var y: T; diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes03.symbols b/tests/baselines/reference/stringLiteralTypesInUnionTypes03.symbols new file mode 100644 index 0000000000000..df5498d9a5943 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes03.symbols @@ -0,0 +1,52 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes03.ts === + +type T = number | "foo" | "bar"; +>T : Symbol(T, Decl(stringLiteralTypesInUnionTypes03.ts, 0, 0)) + +var x: "foo" | "bar" | number; +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes03.ts, 3, 3)) + +var y: T = "bar"; +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes03.ts, 4, 3)) +>T : Symbol(T, Decl(stringLiteralTypesInUnionTypes03.ts, 0, 0)) + +if (x === "foo") { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes03.ts, 3, 3)) + + let a = x; +>a : Symbol(a, Decl(stringLiteralTypesInUnionTypes03.ts, 7, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes03.ts, 3, 3)) +} +else if (x !== "bar") { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes03.ts, 3, 3)) + + let b = x || y; +>b : Symbol(b, Decl(stringLiteralTypesInUnionTypes03.ts, 10, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes03.ts, 3, 3)) +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes03.ts, 4, 3)) +} +else { + let c = x; +>c : Symbol(c, Decl(stringLiteralTypesInUnionTypes03.ts, 13, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes03.ts, 3, 3)) + + let d = y; +>d : Symbol(d, Decl(stringLiteralTypesInUnionTypes03.ts, 14, 7)) +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes03.ts, 4, 3)) + + let e: (typeof x) | (typeof y) = c || d; +>e : Symbol(e, Decl(stringLiteralTypesInUnionTypes03.ts, 15, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes03.ts, 3, 3)) +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes03.ts, 4, 3)) +>c : Symbol(c, Decl(stringLiteralTypesInUnionTypes03.ts, 13, 7)) +>d : Symbol(d, Decl(stringLiteralTypesInUnionTypes03.ts, 14, 7)) +} + +x = y; +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes03.ts, 3, 3)) +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes03.ts, 4, 3)) + +y = x; +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes03.ts, 4, 3)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes03.ts, 3, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes03.types b/tests/baselines/reference/stringLiteralTypesInUnionTypes03.types new file mode 100644 index 0000000000000..5fca6e69be996 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes03.types @@ -0,0 +1,61 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes03.ts === + +type T = number | "foo" | "bar"; +>T : number | "foo" | "bar" + +var x: "foo" | "bar" | number; +>x : "foo" | "bar" | number + +var y: T = "bar"; +>y : number | "foo" | "bar" +>T : number | "foo" | "bar" +>"bar" : "bar" + +if (x === "foo") { +>x === "foo" : boolean +>x : "foo" | "bar" | number +>"foo" : string + + let a = x; +>a : "foo" | "bar" | number +>x : "foo" | "bar" | number +} +else if (x !== "bar") { +>x !== "bar" : boolean +>x : "foo" | "bar" | number +>"bar" : string + + let b = x || y; +>b : "foo" | "bar" | number +>x || y : "foo" | "bar" | number +>x : "foo" | "bar" | number +>y : number | "foo" | "bar" +} +else { + let c = x; +>c : "foo" | "bar" | number +>x : "foo" | "bar" | number + + let d = y; +>d : number | "foo" | "bar" +>y : number | "foo" | "bar" + + let e: (typeof x) | (typeof y) = c || d; +>e : "foo" | "bar" | number +>x : "foo" | "bar" | number +>y : number | "foo" | "bar" +>c || d : "foo" | "bar" | number +>c : "foo" | "bar" | number +>d : number | "foo" | "bar" +} + +x = y; +>x = y : number | "foo" | "bar" +>x : "foo" | "bar" | number +>y : number | "foo" | "bar" + +y = x; +>y = x : "foo" | "bar" | number +>y : number | "foo" | "bar" +>x : "foo" | "bar" | number + diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes04.js b/tests/baselines/reference/stringLiteralTypesInUnionTypes04.js new file mode 100644 index 0000000000000..dc6cf51ad1e1c --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes04.js @@ -0,0 +1,72 @@ +//// [stringLiteralTypesInUnionTypes04.ts] + +type T = "" | "foo"; + +let x: T = ""; +let y: T = "foo"; + +if (x === "") { + let a = x; +} + +if (x !== "") { + let b = x; +} + +if (x == "") { + let c = x; +} + +if (x != "") { + let d = x; +} + +if (x) { + let e = x; +} + +if (!x) { + let f = x; +} + +if (!!x) { + let g = x; +} + +if (!!!x) { + let h = x; +} + +//// [stringLiteralTypesInUnionTypes04.js] +var x = ""; +var y = "foo"; +if (x === "") { + var a = x; +} +if (x !== "") { + var b = x; +} +if (x == "") { + var c = x; +} +if (x != "") { + var d = x; +} +if (x) { + var e = x; +} +if (!x) { + var f = x; +} +if (!!x) { + var g = x; +} +if (!!!x) { + var h = x; +} + + +//// [stringLiteralTypesInUnionTypes04.d.ts] +declare type T = "" | "foo"; +declare let x: T; +declare let y: T; diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes04.symbols b/tests/baselines/reference/stringLiteralTypesInUnionTypes04.symbols new file mode 100644 index 0000000000000..ced93fcefc98f --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes04.symbols @@ -0,0 +1,76 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes04.ts === + +type T = "" | "foo"; +>T : Symbol(T, Decl(stringLiteralTypesInUnionTypes04.ts, 0, 0)) + +let x: T = ""; +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) +>T : Symbol(T, Decl(stringLiteralTypesInUnionTypes04.ts, 0, 0)) + +let y: T = "foo"; +>y : Symbol(y, Decl(stringLiteralTypesInUnionTypes04.ts, 4, 3)) +>T : Symbol(T, Decl(stringLiteralTypesInUnionTypes04.ts, 0, 0)) + +if (x === "") { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) + + let a = x; +>a : Symbol(a, Decl(stringLiteralTypesInUnionTypes04.ts, 7, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) +} + +if (x !== "") { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) + + let b = x; +>b : Symbol(b, Decl(stringLiteralTypesInUnionTypes04.ts, 11, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) +} + +if (x == "") { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) + + let c = x; +>c : Symbol(c, Decl(stringLiteralTypesInUnionTypes04.ts, 15, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) +} + +if (x != "") { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) + + let d = x; +>d : Symbol(d, Decl(stringLiteralTypesInUnionTypes04.ts, 19, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) +} + +if (x) { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) + + let e = x; +>e : Symbol(e, Decl(stringLiteralTypesInUnionTypes04.ts, 23, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) +} + +if (!x) { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) + + let f = x; +>f : Symbol(f, Decl(stringLiteralTypesInUnionTypes04.ts, 27, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) +} + +if (!!x) { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) + + let g = x; +>g : Symbol(g, Decl(stringLiteralTypesInUnionTypes04.ts, 31, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) +} + +if (!!!x) { +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) + + let h = x; +>h : Symbol(h, Decl(stringLiteralTypesInUnionTypes04.ts, 35, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInUnionTypes04.ts, 3, 3)) +} diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes04.types b/tests/baselines/reference/stringLiteralTypesInUnionTypes04.types new file mode 100644 index 0000000000000..ad92dc360d0a9 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes04.types @@ -0,0 +1,92 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes04.ts === + +type T = "" | "foo"; +>T : "" | "foo" + +let x: T = ""; +>x : "" | "foo" +>T : "" | "foo" +>"" : "" + +let y: T = "foo"; +>y : "" | "foo" +>T : "" | "foo" +>"foo" : "foo" + +if (x === "") { +>x === "" : boolean +>x : "" | "foo" +>"" : string + + let a = x; +>a : "" | "foo" +>x : "" | "foo" +} + +if (x !== "") { +>x !== "" : boolean +>x : "" | "foo" +>"" : string + + let b = x; +>b : "" | "foo" +>x : "" | "foo" +} + +if (x == "") { +>x == "" : boolean +>x : "" | "foo" +>"" : string + + let c = x; +>c : "" | "foo" +>x : "" | "foo" +} + +if (x != "") { +>x != "" : boolean +>x : "" | "foo" +>"" : string + + let d = x; +>d : "" | "foo" +>x : "" | "foo" +} + +if (x) { +>x : "" | "foo" + + let e = x; +>e : "" | "foo" +>x : "" | "foo" +} + +if (!x) { +>!x : boolean +>x : "" | "foo" + + let f = x; +>f : "" | "foo" +>x : "" | "foo" +} + +if (!!x) { +>!!x : boolean +>!x : boolean +>x : "" | "foo" + + let g = x; +>g : "" | "foo" +>x : "" | "foo" +} + +if (!!!x) { +>!!!x : boolean +>!!x : boolean +>!x : boolean +>x : "" | "foo" + + let h = x; +>h : "" | "foo" +>x : "" | "foo" +} diff --git a/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.errors.txt b/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.errors.txt new file mode 100644 index 0000000000000..1a639a1c22284 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.errors.txt @@ -0,0 +1,24 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesInVariableDeclarations01.ts(5,7): error TS1155: 'const' declarations must be initialized + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesInVariableDeclarations01.ts (1 errors) ==== + + let a: ""; + var b: "foo"; + let c: "bar"; + const d: "baz"; + ~ +!!! error TS1155: 'const' declarations must be initialized + + a = ""; + b = "foo"; + c = "bar"; + + let e: "" = ""; + var f: "foo" = "foo"; + let g: "bar" = "bar"; + const h: "baz" = "baz"; + + e = ""; + f = "foo"; + g = "bar"; \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.js b/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.js new file mode 100644 index 0000000000000..15a4ca5d580db --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.js @@ -0,0 +1,46 @@ +//// [stringLiteralTypesInVariableDeclarations01.ts] + +let a: ""; +var b: "foo"; +let c: "bar"; +const d: "baz"; + +a = ""; +b = "foo"; +c = "bar"; + +let e: "" = ""; +var f: "foo" = "foo"; +let g: "bar" = "bar"; +const h: "baz" = "baz"; + +e = ""; +f = "foo"; +g = "bar"; + +//// [stringLiteralTypesInVariableDeclarations01.js] +var a; +var b; +var c; +var d; +a = ""; +b = "foo"; +c = "bar"; +var e = ""; +var f = "foo"; +var g = "bar"; +var h = "baz"; +e = ""; +f = "foo"; +g = "bar"; + + +//// [stringLiteralTypesInVariableDeclarations01.d.ts] +declare let a: ""; +declare var b: "foo"; +declare let c: "bar"; +declare const d: "baz"; +declare let e: ""; +declare var f: "foo"; +declare let g: "bar"; +declare const h: "baz"; diff --git a/tests/baselines/reference/stringLiteralTypesOverloads01.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloads01.errors.txt new file mode 100644 index 0000000000000..1592427208b3d --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloads01.errors.txt @@ -0,0 +1,59 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads01.ts(11,10): error TS2354: No best common type exists among return expressions. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads01.ts (1 errors) ==== + + type PrimitiveName = 'string' | 'number' | 'boolean'; + + function getFalsyPrimitive(x: "string"): string; + function getFalsyPrimitive(x: "number"): number; + function getFalsyPrimitive(x: "boolean"): boolean; + function getFalsyPrimitive(x: "boolean" | "string"): boolean | string; + function getFalsyPrimitive(x: "boolean" | "number"): boolean | number; + function getFalsyPrimitive(x: "number" | "string"): number | string; + function getFalsyPrimitive(x: "number" | "string" | "boolean"): number | string | boolean; + function getFalsyPrimitive(x: PrimitiveName) { + ~~~~~~~~~~~~~~~~~ +!!! error TS2354: No best common type exists among return expressions. + if (x === "string") { + return ""; + } + if (x === "number") { + return 0; + } + if (x === "boolean") { + return false; + } + + // Should be unreachable. + throw "Invalid value"; + } + + namespace Consts1 { + const EMPTY_STRING = getFalsyPrimitive("string"); + const ZERO = getFalsyPrimitive('number'); + const FALSE = getFalsyPrimitive("boolean"); + } + + const string: "string" = "string" + const number: "number" = "number" + const boolean: "boolean" = "boolean" + + const stringOrNumber = string || number; + const stringOrBoolean = string || boolean; + const booleanOrNumber = number || boolean; + const stringOrBooleanOrNumber = stringOrBoolean || number; + + namespace Consts2 { + const EMPTY_STRING = getFalsyPrimitive(string); + const ZERO = getFalsyPrimitive(number); + const FALSE = getFalsyPrimitive(boolean); + + const a = getFalsyPrimitive(stringOrNumber); + const b = getFalsyPrimitive(stringOrBoolean); + const c = getFalsyPrimitive(booleanOrNumber); + const d = getFalsyPrimitive(stringOrBooleanOrNumber); + } + + + \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloads01.js b/tests/baselines/reference/stringLiteralTypesOverloads01.js new file mode 100644 index 0000000000000..73dabd26fab18 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloads01.js @@ -0,0 +1,114 @@ +//// [stringLiteralTypesOverloads01.ts] + +type PrimitiveName = 'string' | 'number' | 'boolean'; + +function getFalsyPrimitive(x: "string"): string; +function getFalsyPrimitive(x: "number"): number; +function getFalsyPrimitive(x: "boolean"): boolean; +function getFalsyPrimitive(x: "boolean" | "string"): boolean | string; +function getFalsyPrimitive(x: "boolean" | "number"): boolean | number; +function getFalsyPrimitive(x: "number" | "string"): number | string; +function getFalsyPrimitive(x: "number" | "string" | "boolean"): number | string | boolean; +function getFalsyPrimitive(x: PrimitiveName) { + if (x === "string") { + return ""; + } + if (x === "number") { + return 0; + } + if (x === "boolean") { + return false; + } + + // Should be unreachable. + throw "Invalid value"; +} + +namespace Consts1 { + const EMPTY_STRING = getFalsyPrimitive("string"); + const ZERO = getFalsyPrimitive('number'); + const FALSE = getFalsyPrimitive("boolean"); +} + +const string: "string" = "string" +const number: "number" = "number" +const boolean: "boolean" = "boolean" + +const stringOrNumber = string || number; +const stringOrBoolean = string || boolean; +const booleanOrNumber = number || boolean; +const stringOrBooleanOrNumber = stringOrBoolean || number; + +namespace Consts2 { + const EMPTY_STRING = getFalsyPrimitive(string); + const ZERO = getFalsyPrimitive(number); + const FALSE = getFalsyPrimitive(boolean); + + const a = getFalsyPrimitive(stringOrNumber); + const b = getFalsyPrimitive(stringOrBoolean); + const c = getFalsyPrimitive(booleanOrNumber); + const d = getFalsyPrimitive(stringOrBooleanOrNumber); +} + + + + +//// [stringLiteralTypesOverloads01.js] +function getFalsyPrimitive(x) { + if (x === "string") { + return ""; + } + if (x === "number") { + return 0; + } + if (x === "boolean") { + return false; + } + // Should be unreachable. + throw "Invalid value"; +} +var Consts1; +(function (Consts1) { + var EMPTY_STRING = getFalsyPrimitive("string"); + var ZERO = getFalsyPrimitive('number'); + var FALSE = getFalsyPrimitive("boolean"); +})(Consts1 || (Consts1 = {})); +var string = "string"; +var number = "number"; +var boolean = "boolean"; +var stringOrNumber = string || number; +var stringOrBoolean = string || boolean; +var booleanOrNumber = number || boolean; +var stringOrBooleanOrNumber = stringOrBoolean || number; +var Consts2; +(function (Consts2) { + var EMPTY_STRING = getFalsyPrimitive(string); + var ZERO = getFalsyPrimitive(number); + var FALSE = getFalsyPrimitive(boolean); + var a = getFalsyPrimitive(stringOrNumber); + var b = getFalsyPrimitive(stringOrBoolean); + var c = getFalsyPrimitive(booleanOrNumber); + var d = getFalsyPrimitive(stringOrBooleanOrNumber); +})(Consts2 || (Consts2 = {})); + + +//// [stringLiteralTypesOverloads01.d.ts] +declare type PrimitiveName = 'string' | 'number' | 'boolean'; +declare function getFalsyPrimitive(x: "string"): string; +declare function getFalsyPrimitive(x: "number"): number; +declare function getFalsyPrimitive(x: "boolean"): boolean; +declare function getFalsyPrimitive(x: "boolean" | "string"): boolean | string; +declare function getFalsyPrimitive(x: "boolean" | "number"): boolean | number; +declare function getFalsyPrimitive(x: "number" | "string"): number | string; +declare function getFalsyPrimitive(x: "number" | "string" | "boolean"): number | string | boolean; +declare namespace Consts1 { +} +declare const string: "string"; +declare const number: "number"; +declare const boolean: "boolean"; +declare const stringOrNumber: "string" | "number"; +declare const stringOrBoolean: "string" | "boolean"; +declare const booleanOrNumber: "number" | "boolean"; +declare const stringOrBooleanOrNumber: "string" | "boolean" | "number"; +declare namespace Consts2 { +} diff --git a/tests/baselines/reference/stringLiteralTypesOverloads02.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloads02.errors.txt new file mode 100644 index 0000000000000..995cf687b702c --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloads02.errors.txt @@ -0,0 +1,57 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads02.ts(9,10): error TS2354: No best common type exists among return expressions. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads02.ts (1 errors) ==== + + function getFalsyPrimitive(x: "string"): string; + function getFalsyPrimitive(x: "number"): number; + function getFalsyPrimitive(x: "boolean"): boolean; + function getFalsyPrimitive(x: "boolean" | "string"): boolean | string; + function getFalsyPrimitive(x: "boolean" | "number"): boolean | number; + function getFalsyPrimitive(x: "number" | "string"): number | string; + function getFalsyPrimitive(x: "number" | "string" | "boolean"): number | string | boolean; + function getFalsyPrimitive(x: string) { + ~~~~~~~~~~~~~~~~~ +!!! error TS2354: No best common type exists among return expressions. + if (x === "string") { + return ""; + } + if (x === "number") { + return 0; + } + if (x === "boolean") { + return false; + } + + // Should be unreachable. + throw "Invalid value"; + } + + namespace Consts1 { + const EMPTY_STRING = getFalsyPrimitive("string"); + const ZERO = getFalsyPrimitive('number'); + const FALSE = getFalsyPrimitive("boolean"); + } + + const string: "string" = "string" + const number: "number" = "number" + const boolean: "boolean" = "boolean" + + const stringOrNumber = string || number; + const stringOrBoolean = string || boolean; + const booleanOrNumber = number || boolean; + const stringOrBooleanOrNumber = stringOrBoolean || number; + + namespace Consts2 { + const EMPTY_STRING = getFalsyPrimitive(string); + const ZERO = getFalsyPrimitive(number); + const FALSE = getFalsyPrimitive(boolean); + + const a = getFalsyPrimitive(stringOrNumber); + const b = getFalsyPrimitive(stringOrBoolean); + const c = getFalsyPrimitive(booleanOrNumber); + const d = getFalsyPrimitive(stringOrBooleanOrNumber); + } + + + \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloads02.js b/tests/baselines/reference/stringLiteralTypesOverloads02.js new file mode 100644 index 0000000000000..3c53f9380a88b --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloads02.js @@ -0,0 +1,111 @@ +//// [stringLiteralTypesOverloads02.ts] + +function getFalsyPrimitive(x: "string"): string; +function getFalsyPrimitive(x: "number"): number; +function getFalsyPrimitive(x: "boolean"): boolean; +function getFalsyPrimitive(x: "boolean" | "string"): boolean | string; +function getFalsyPrimitive(x: "boolean" | "number"): boolean | number; +function getFalsyPrimitive(x: "number" | "string"): number | string; +function getFalsyPrimitive(x: "number" | "string" | "boolean"): number | string | boolean; +function getFalsyPrimitive(x: string) { + if (x === "string") { + return ""; + } + if (x === "number") { + return 0; + } + if (x === "boolean") { + return false; + } + + // Should be unreachable. + throw "Invalid value"; +} + +namespace Consts1 { + const EMPTY_STRING = getFalsyPrimitive("string"); + const ZERO = getFalsyPrimitive('number'); + const FALSE = getFalsyPrimitive("boolean"); +} + +const string: "string" = "string" +const number: "number" = "number" +const boolean: "boolean" = "boolean" + +const stringOrNumber = string || number; +const stringOrBoolean = string || boolean; +const booleanOrNumber = number || boolean; +const stringOrBooleanOrNumber = stringOrBoolean || number; + +namespace Consts2 { + const EMPTY_STRING = getFalsyPrimitive(string); + const ZERO = getFalsyPrimitive(number); + const FALSE = getFalsyPrimitive(boolean); + + const a = getFalsyPrimitive(stringOrNumber); + const b = getFalsyPrimitive(stringOrBoolean); + const c = getFalsyPrimitive(booleanOrNumber); + const d = getFalsyPrimitive(stringOrBooleanOrNumber); +} + + + + +//// [stringLiteralTypesOverloads02.js] +function getFalsyPrimitive(x) { + if (x === "string") { + return ""; + } + if (x === "number") { + return 0; + } + if (x === "boolean") { + return false; + } + // Should be unreachable. + throw "Invalid value"; +} +var Consts1; +(function (Consts1) { + var EMPTY_STRING = getFalsyPrimitive("string"); + var ZERO = getFalsyPrimitive('number'); + var FALSE = getFalsyPrimitive("boolean"); +})(Consts1 || (Consts1 = {})); +var string = "string"; +var number = "number"; +var boolean = "boolean"; +var stringOrNumber = string || number; +var stringOrBoolean = string || boolean; +var booleanOrNumber = number || boolean; +var stringOrBooleanOrNumber = stringOrBoolean || number; +var Consts2; +(function (Consts2) { + var EMPTY_STRING = getFalsyPrimitive(string); + var ZERO = getFalsyPrimitive(number); + var FALSE = getFalsyPrimitive(boolean); + var a = getFalsyPrimitive(stringOrNumber); + var b = getFalsyPrimitive(stringOrBoolean); + var c = getFalsyPrimitive(booleanOrNumber); + var d = getFalsyPrimitive(stringOrBooleanOrNumber); +})(Consts2 || (Consts2 = {})); + + +//// [stringLiteralTypesOverloads02.d.ts] +declare function getFalsyPrimitive(x: "string"): string; +declare function getFalsyPrimitive(x: "number"): number; +declare function getFalsyPrimitive(x: "boolean"): boolean; +declare function getFalsyPrimitive(x: "boolean" | "string"): boolean | string; +declare function getFalsyPrimitive(x: "boolean" | "number"): boolean | number; +declare function getFalsyPrimitive(x: "number" | "string"): number | string; +declare function getFalsyPrimitive(x: "number" | "string" | "boolean"): number | string | boolean; +declare namespace Consts1 { +} +declare const string: "string"; +declare const number: "number"; +declare const boolean: "boolean"; +declare const stringOrNumber: "string" | "number"; +declare const stringOrBoolean: "string" | "boolean"; +declare const booleanOrNumber: "number" | "boolean"; +declare const stringOrBooleanOrNumber: "string" | "boolean" | "number"; +declare namespace Consts2 { +} diff --git a/tests/baselines/reference/stringLiteralTypesOverloads03.js b/tests/baselines/reference/stringLiteralTypesOverloads03.js new file mode 100644 index 0000000000000..c1e7916088095 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloads03.js @@ -0,0 +1,104 @@ +//// [stringLiteralTypesOverloads03.ts] + +interface Base { + x: string; + y: number; +} + +interface HelloOrWorld extends Base { + p1: boolean; +} + +interface JustHello extends Base { + p2: boolean; +} + +interface JustWorld extends Base { + p3: boolean; +} + +let hello: "hello"; +let world: "world"; +let helloOrWorld: "hello" | "world"; + +function f(p: "hello"): JustHello; +function f(p: "hello" | "world"): HelloOrWorld; +function f(p: "world"): JustWorld; +function f(p: string): Base; +function f(...args: any[]): any { + return undefined; +} + +let fResult1 = f(hello); +let fResult2 = f(world); +let fResult3 = f(helloOrWorld); + +function g(p: string): Base; +function g(p: "hello"): JustHello; +function g(p: "hello" | "world"): HelloOrWorld; +function g(p: "world"): JustWorld; +function g(...args: any[]): any { + return undefined; +} + +let gResult1 = g(hello); +let gResult2 = g(world); +let gResult3 = g(helloOrWorld); + +//// [stringLiteralTypesOverloads03.js] +var hello; +var world; +var helloOrWorld; +function f() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i - 0] = arguments[_i]; + } + return undefined; +} +var fResult1 = f(hello); +var fResult2 = f(world); +var fResult3 = f(helloOrWorld); +function g() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i - 0] = arguments[_i]; + } + return undefined; +} +var gResult1 = g(hello); +var gResult2 = g(world); +var gResult3 = g(helloOrWorld); + + +//// [stringLiteralTypesOverloads03.d.ts] +interface Base { + x: string; + y: number; +} +interface HelloOrWorld extends Base { + p1: boolean; +} +interface JustHello extends Base { + p2: boolean; +} +interface JustWorld extends Base { + p3: boolean; +} +declare let hello: "hello"; +declare let world: "world"; +declare let helloOrWorld: "hello" | "world"; +declare function f(p: "hello"): JustHello; +declare function f(p: "hello" | "world"): HelloOrWorld; +declare function f(p: "world"): JustWorld; +declare function f(p: string): Base; +declare let fResult1: JustHello; +declare let fResult2: JustWorld; +declare let fResult3: HelloOrWorld; +declare function g(p: string): Base; +declare function g(p: "hello"): JustHello; +declare function g(p: "hello" | "world"): HelloOrWorld; +declare function g(p: "world"): JustWorld; +declare let gResult1: JustHello; +declare let gResult2: JustWorld; +declare let gResult3: Base; diff --git a/tests/baselines/reference/stringLiteralTypesOverloads03.symbols b/tests/baselines/reference/stringLiteralTypesOverloads03.symbols new file mode 100644 index 0000000000000..a0a48de790f93 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloads03.symbols @@ -0,0 +1,131 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads03.ts === + +interface Base { +>Base : Symbol(Base, Decl(stringLiteralTypesOverloads03.ts, 0, 0)) + + x: string; +>x : Symbol(x, Decl(stringLiteralTypesOverloads03.ts, 1, 16)) + + y: number; +>y : Symbol(y, Decl(stringLiteralTypesOverloads03.ts, 2, 14)) +} + +interface HelloOrWorld extends Base { +>HelloOrWorld : Symbol(HelloOrWorld, Decl(stringLiteralTypesOverloads03.ts, 4, 1)) +>Base : Symbol(Base, Decl(stringLiteralTypesOverloads03.ts, 0, 0)) + + p1: boolean; +>p1 : Symbol(p1, Decl(stringLiteralTypesOverloads03.ts, 6, 37)) +} + +interface JustHello extends Base { +>JustHello : Symbol(JustHello, Decl(stringLiteralTypesOverloads03.ts, 8, 1)) +>Base : Symbol(Base, Decl(stringLiteralTypesOverloads03.ts, 0, 0)) + + p2: boolean; +>p2 : Symbol(p2, Decl(stringLiteralTypesOverloads03.ts, 10, 34)) +} + +interface JustWorld extends Base { +>JustWorld : Symbol(JustWorld, Decl(stringLiteralTypesOverloads03.ts, 12, 1)) +>Base : Symbol(Base, Decl(stringLiteralTypesOverloads03.ts, 0, 0)) + + p3: boolean; +>p3 : Symbol(p3, Decl(stringLiteralTypesOverloads03.ts, 14, 34)) +} + +let hello: "hello"; +>hello : Symbol(hello, Decl(stringLiteralTypesOverloads03.ts, 18, 3)) + +let world: "world"; +>world : Symbol(world, Decl(stringLiteralTypesOverloads03.ts, 19, 3)) + +let helloOrWorld: "hello" | "world"; +>helloOrWorld : Symbol(helloOrWorld, Decl(stringLiteralTypesOverloads03.ts, 20, 3)) + +function f(p: "hello"): JustHello; +>f : Symbol(f, Decl(stringLiteralTypesOverloads03.ts, 20, 36), Decl(stringLiteralTypesOverloads03.ts, 22, 34), Decl(stringLiteralTypesOverloads03.ts, 23, 47), Decl(stringLiteralTypesOverloads03.ts, 24, 34), Decl(stringLiteralTypesOverloads03.ts, 25, 28)) +>p : Symbol(p, Decl(stringLiteralTypesOverloads03.ts, 22, 11)) +>JustHello : Symbol(JustHello, Decl(stringLiteralTypesOverloads03.ts, 8, 1)) + +function f(p: "hello" | "world"): HelloOrWorld; +>f : Symbol(f, Decl(stringLiteralTypesOverloads03.ts, 20, 36), Decl(stringLiteralTypesOverloads03.ts, 22, 34), Decl(stringLiteralTypesOverloads03.ts, 23, 47), Decl(stringLiteralTypesOverloads03.ts, 24, 34), Decl(stringLiteralTypesOverloads03.ts, 25, 28)) +>p : Symbol(p, Decl(stringLiteralTypesOverloads03.ts, 23, 11)) +>HelloOrWorld : Symbol(HelloOrWorld, Decl(stringLiteralTypesOverloads03.ts, 4, 1)) + +function f(p: "world"): JustWorld; +>f : Symbol(f, Decl(stringLiteralTypesOverloads03.ts, 20, 36), Decl(stringLiteralTypesOverloads03.ts, 22, 34), Decl(stringLiteralTypesOverloads03.ts, 23, 47), Decl(stringLiteralTypesOverloads03.ts, 24, 34), Decl(stringLiteralTypesOverloads03.ts, 25, 28)) +>p : Symbol(p, Decl(stringLiteralTypesOverloads03.ts, 24, 11)) +>JustWorld : Symbol(JustWorld, Decl(stringLiteralTypesOverloads03.ts, 12, 1)) + +function f(p: string): Base; +>f : Symbol(f, Decl(stringLiteralTypesOverloads03.ts, 20, 36), Decl(stringLiteralTypesOverloads03.ts, 22, 34), Decl(stringLiteralTypesOverloads03.ts, 23, 47), Decl(stringLiteralTypesOverloads03.ts, 24, 34), Decl(stringLiteralTypesOverloads03.ts, 25, 28)) +>p : Symbol(p, Decl(stringLiteralTypesOverloads03.ts, 25, 11)) +>Base : Symbol(Base, Decl(stringLiteralTypesOverloads03.ts, 0, 0)) + +function f(...args: any[]): any { +>f : Symbol(f, Decl(stringLiteralTypesOverloads03.ts, 20, 36), Decl(stringLiteralTypesOverloads03.ts, 22, 34), Decl(stringLiteralTypesOverloads03.ts, 23, 47), Decl(stringLiteralTypesOverloads03.ts, 24, 34), Decl(stringLiteralTypesOverloads03.ts, 25, 28)) +>args : Symbol(args, Decl(stringLiteralTypesOverloads03.ts, 26, 11)) + + return undefined; +>undefined : Symbol(undefined) +} + +let fResult1 = f(hello); +>fResult1 : Symbol(fResult1, Decl(stringLiteralTypesOverloads03.ts, 30, 3)) +>f : Symbol(f, Decl(stringLiteralTypesOverloads03.ts, 20, 36), Decl(stringLiteralTypesOverloads03.ts, 22, 34), Decl(stringLiteralTypesOverloads03.ts, 23, 47), Decl(stringLiteralTypesOverloads03.ts, 24, 34), Decl(stringLiteralTypesOverloads03.ts, 25, 28)) +>hello : Symbol(hello, Decl(stringLiteralTypesOverloads03.ts, 18, 3)) + +let fResult2 = f(world); +>fResult2 : Symbol(fResult2, Decl(stringLiteralTypesOverloads03.ts, 31, 3)) +>f : Symbol(f, Decl(stringLiteralTypesOverloads03.ts, 20, 36), Decl(stringLiteralTypesOverloads03.ts, 22, 34), Decl(stringLiteralTypesOverloads03.ts, 23, 47), Decl(stringLiteralTypesOverloads03.ts, 24, 34), Decl(stringLiteralTypesOverloads03.ts, 25, 28)) +>world : Symbol(world, Decl(stringLiteralTypesOverloads03.ts, 19, 3)) + +let fResult3 = f(helloOrWorld); +>fResult3 : Symbol(fResult3, Decl(stringLiteralTypesOverloads03.ts, 32, 3)) +>f : Symbol(f, Decl(stringLiteralTypesOverloads03.ts, 20, 36), Decl(stringLiteralTypesOverloads03.ts, 22, 34), Decl(stringLiteralTypesOverloads03.ts, 23, 47), Decl(stringLiteralTypesOverloads03.ts, 24, 34), Decl(stringLiteralTypesOverloads03.ts, 25, 28)) +>helloOrWorld : Symbol(helloOrWorld, Decl(stringLiteralTypesOverloads03.ts, 20, 3)) + +function g(p: string): Base; +>g : Symbol(g, Decl(stringLiteralTypesOverloads03.ts, 32, 31), Decl(stringLiteralTypesOverloads03.ts, 34, 28), Decl(stringLiteralTypesOverloads03.ts, 35, 34), Decl(stringLiteralTypesOverloads03.ts, 36, 47), Decl(stringLiteralTypesOverloads03.ts, 37, 34)) +>p : Symbol(p, Decl(stringLiteralTypesOverloads03.ts, 34, 11)) +>Base : Symbol(Base, Decl(stringLiteralTypesOverloads03.ts, 0, 0)) + +function g(p: "hello"): JustHello; +>g : Symbol(g, Decl(stringLiteralTypesOverloads03.ts, 32, 31), Decl(stringLiteralTypesOverloads03.ts, 34, 28), Decl(stringLiteralTypesOverloads03.ts, 35, 34), Decl(stringLiteralTypesOverloads03.ts, 36, 47), Decl(stringLiteralTypesOverloads03.ts, 37, 34)) +>p : Symbol(p, Decl(stringLiteralTypesOverloads03.ts, 35, 11)) +>JustHello : Symbol(JustHello, Decl(stringLiteralTypesOverloads03.ts, 8, 1)) + +function g(p: "hello" | "world"): HelloOrWorld; +>g : Symbol(g, Decl(stringLiteralTypesOverloads03.ts, 32, 31), Decl(stringLiteralTypesOverloads03.ts, 34, 28), Decl(stringLiteralTypesOverloads03.ts, 35, 34), Decl(stringLiteralTypesOverloads03.ts, 36, 47), Decl(stringLiteralTypesOverloads03.ts, 37, 34)) +>p : Symbol(p, Decl(stringLiteralTypesOverloads03.ts, 36, 11)) +>HelloOrWorld : Symbol(HelloOrWorld, Decl(stringLiteralTypesOverloads03.ts, 4, 1)) + +function g(p: "world"): JustWorld; +>g : Symbol(g, Decl(stringLiteralTypesOverloads03.ts, 32, 31), Decl(stringLiteralTypesOverloads03.ts, 34, 28), Decl(stringLiteralTypesOverloads03.ts, 35, 34), Decl(stringLiteralTypesOverloads03.ts, 36, 47), Decl(stringLiteralTypesOverloads03.ts, 37, 34)) +>p : Symbol(p, Decl(stringLiteralTypesOverloads03.ts, 37, 11)) +>JustWorld : Symbol(JustWorld, Decl(stringLiteralTypesOverloads03.ts, 12, 1)) + +function g(...args: any[]): any { +>g : Symbol(g, Decl(stringLiteralTypesOverloads03.ts, 32, 31), Decl(stringLiteralTypesOverloads03.ts, 34, 28), Decl(stringLiteralTypesOverloads03.ts, 35, 34), Decl(stringLiteralTypesOverloads03.ts, 36, 47), Decl(stringLiteralTypesOverloads03.ts, 37, 34)) +>args : Symbol(args, Decl(stringLiteralTypesOverloads03.ts, 38, 11)) + + return undefined; +>undefined : Symbol(undefined) +} + +let gResult1 = g(hello); +>gResult1 : Symbol(gResult1, Decl(stringLiteralTypesOverloads03.ts, 42, 3)) +>g : Symbol(g, Decl(stringLiteralTypesOverloads03.ts, 32, 31), Decl(stringLiteralTypesOverloads03.ts, 34, 28), Decl(stringLiteralTypesOverloads03.ts, 35, 34), Decl(stringLiteralTypesOverloads03.ts, 36, 47), Decl(stringLiteralTypesOverloads03.ts, 37, 34)) +>hello : Symbol(hello, Decl(stringLiteralTypesOverloads03.ts, 18, 3)) + +let gResult2 = g(world); +>gResult2 : Symbol(gResult2, Decl(stringLiteralTypesOverloads03.ts, 43, 3)) +>g : Symbol(g, Decl(stringLiteralTypesOverloads03.ts, 32, 31), Decl(stringLiteralTypesOverloads03.ts, 34, 28), Decl(stringLiteralTypesOverloads03.ts, 35, 34), Decl(stringLiteralTypesOverloads03.ts, 36, 47), Decl(stringLiteralTypesOverloads03.ts, 37, 34)) +>world : Symbol(world, Decl(stringLiteralTypesOverloads03.ts, 19, 3)) + +let gResult3 = g(helloOrWorld); +>gResult3 : Symbol(gResult3, Decl(stringLiteralTypesOverloads03.ts, 44, 3)) +>g : Symbol(g, Decl(stringLiteralTypesOverloads03.ts, 32, 31), Decl(stringLiteralTypesOverloads03.ts, 34, 28), Decl(stringLiteralTypesOverloads03.ts, 35, 34), Decl(stringLiteralTypesOverloads03.ts, 36, 47), Decl(stringLiteralTypesOverloads03.ts, 37, 34)) +>helloOrWorld : Symbol(helloOrWorld, Decl(stringLiteralTypesOverloads03.ts, 20, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypesOverloads03.types b/tests/baselines/reference/stringLiteralTypesOverloads03.types new file mode 100644 index 0000000000000..643979ee987ca --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloads03.types @@ -0,0 +1,137 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads03.ts === + +interface Base { +>Base : Base + + x: string; +>x : string + + y: number; +>y : number +} + +interface HelloOrWorld extends Base { +>HelloOrWorld : HelloOrWorld +>Base : Base + + p1: boolean; +>p1 : boolean +} + +interface JustHello extends Base { +>JustHello : JustHello +>Base : Base + + p2: boolean; +>p2 : boolean +} + +interface JustWorld extends Base { +>JustWorld : JustWorld +>Base : Base + + p3: boolean; +>p3 : boolean +} + +let hello: "hello"; +>hello : "hello" + +let world: "world"; +>world : "world" + +let helloOrWorld: "hello" | "world"; +>helloOrWorld : "hello" | "world" + +function f(p: "hello"): JustHello; +>f : { (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; (p: string): Base; } +>p : "hello" +>JustHello : JustHello + +function f(p: "hello" | "world"): HelloOrWorld; +>f : { (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; (p: string): Base; } +>p : "hello" | "world" +>HelloOrWorld : HelloOrWorld + +function f(p: "world"): JustWorld; +>f : { (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; (p: string): Base; } +>p : "world" +>JustWorld : JustWorld + +function f(p: string): Base; +>f : { (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; (p: string): Base; } +>p : string +>Base : Base + +function f(...args: any[]): any { +>f : { (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; (p: string): Base; } +>args : any[] + + return undefined; +>undefined : undefined +} + +let fResult1 = f(hello); +>fResult1 : JustHello +>f(hello) : JustHello +>f : { (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; (p: string): Base; } +>hello : "hello" + +let fResult2 = f(world); +>fResult2 : JustWorld +>f(world) : JustWorld +>f : { (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; (p: string): Base; } +>world : "world" + +let fResult3 = f(helloOrWorld); +>fResult3 : HelloOrWorld +>f(helloOrWorld) : HelloOrWorld +>f : { (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; (p: string): Base; } +>helloOrWorld : "hello" | "world" + +function g(p: string): Base; +>g : { (p: string): Base; (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; } +>p : string +>Base : Base + +function g(p: "hello"): JustHello; +>g : { (p: string): Base; (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; } +>p : "hello" +>JustHello : JustHello + +function g(p: "hello" | "world"): HelloOrWorld; +>g : { (p: string): Base; (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; } +>p : "hello" | "world" +>HelloOrWorld : HelloOrWorld + +function g(p: "world"): JustWorld; +>g : { (p: string): Base; (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; } +>p : "world" +>JustWorld : JustWorld + +function g(...args: any[]): any { +>g : { (p: string): Base; (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; } +>args : any[] + + return undefined; +>undefined : undefined +} + +let gResult1 = g(hello); +>gResult1 : JustHello +>g(hello) : JustHello +>g : { (p: string): Base; (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; } +>hello : "hello" + +let gResult2 = g(world); +>gResult2 : JustWorld +>g(world) : JustWorld +>g : { (p: string): Base; (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; } +>world : "world" + +let gResult3 = g(helloOrWorld); +>gResult3 : Base +>g(helloOrWorld) : Base +>g : { (p: string): Base; (p: "hello"): JustHello; (p: "hello" | "world"): HelloOrWorld; (p: "world"): JustWorld; } +>helloOrWorld : "hello" | "world" + diff --git a/tests/baselines/reference/stringLiteralTypesOverloads04.js b/tests/baselines/reference/stringLiteralTypesOverloads04.js new file mode 100644 index 0000000000000..fd10ac986a9d5 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloads04.js @@ -0,0 +1,18 @@ +//// [stringLiteralTypesOverloads04.ts] + +declare function f(x: (p: "foo" | "bar") => "foo"); + +f(y => { + let z = y = "foo"; + return z; +}) + +//// [stringLiteralTypesOverloads04.js] +f(function (y) { + var z = y = "foo"; + return z; +}); + + +//// [stringLiteralTypesOverloads04.d.ts] +declare function f(x: (p: "foo" | "bar") => "foo"): any; diff --git a/tests/baselines/reference/stringLiteralTypesOverloads04.symbols b/tests/baselines/reference/stringLiteralTypesOverloads04.symbols new file mode 100644 index 0000000000000..9f468b8bd9502 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloads04.symbols @@ -0,0 +1,19 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts === + +declare function f(x: (p: "foo" | "bar") => "foo"); +>f : Symbol(f, Decl(stringLiteralTypesOverloads04.ts, 0, 0)) +>x : Symbol(x, Decl(stringLiteralTypesOverloads04.ts, 1, 19)) +>p : Symbol(p, Decl(stringLiteralTypesOverloads04.ts, 1, 23)) + +f(y => { +>f : Symbol(f, Decl(stringLiteralTypesOverloads04.ts, 0, 0)) +>y : Symbol(y, Decl(stringLiteralTypesOverloads04.ts, 3, 2)) + + let z = y = "foo"; +>z : Symbol(z, Decl(stringLiteralTypesOverloads04.ts, 4, 7)) +>y : Symbol(y, Decl(stringLiteralTypesOverloads04.ts, 3, 2)) + + return z; +>z : Symbol(z, Decl(stringLiteralTypesOverloads04.ts, 4, 7)) + +}) diff --git a/tests/baselines/reference/stringLiteralTypesOverloads04.types b/tests/baselines/reference/stringLiteralTypesOverloads04.types new file mode 100644 index 0000000000000..32d316494ca5e --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloads04.types @@ -0,0 +1,23 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts === + +declare function f(x: (p: "foo" | "bar") => "foo"); +>f : (x: (p: "foo" | "bar") => "foo") => any +>x : (p: "foo" | "bar") => "foo" +>p : "foo" | "bar" + +f(y => { +>f(y => { let z = y = "foo"; return z;}) : any +>f : (x: (p: "foo" | "bar") => "foo") => any +>y => { let z = y = "foo"; return z;} : (y: "foo" | "bar") => "foo" +>y : "foo" | "bar" + + let z = y = "foo"; +>z : "foo" +>y = "foo" : "foo" +>y : "foo" | "bar" +>"foo" : "foo" + + return z; +>z : "foo" + +}) diff --git a/tests/baselines/reference/stringLiteralTypesTypePredicates01.errors.txt b/tests/baselines/reference/stringLiteralTypesTypePredicates01.errors.txt new file mode 100644 index 0000000000000..b888c3ca77e40 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesTypePredicates01.errors.txt @@ -0,0 +1,33 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesTypePredicates01.ts(4,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesTypePredicates01.ts(5,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesTypePredicates01.ts (2 errors) ==== + + type Kind = "A" | "B" + + function kindIs(kind: Kind, is: "A"): kind is "A"; + ~~~~~~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function kindIs(kind: Kind, is: "B"): kind is "B"; + ~~~~~~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function kindIs(kind: Kind, is: Kind): boolean { + return kind === is; + } + + var x: Kind = "A"; + + if (kindIs(x, "A")) { + let a = x; + } + else { + let b = x; + } + + if (!kindIs(x, "B")) { + let c = x; + } + else { + let d = x; + } \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesTypePredicates01.js b/tests/baselines/reference/stringLiteralTypesTypePredicates01.js new file mode 100644 index 0000000000000..fd4129d272d05 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesTypePredicates01.js @@ -0,0 +1,50 @@ +//// [stringLiteralTypesTypePredicates01.ts] + +type Kind = "A" | "B" + +function kindIs(kind: Kind, is: "A"): kind is "A"; +function kindIs(kind: Kind, is: "B"): kind is "B"; +function kindIs(kind: Kind, is: Kind): boolean { + return kind === is; +} + +var x: Kind = "A"; + +if (kindIs(x, "A")) { + let a = x; +} +else { + let b = x; +} + +if (!kindIs(x, "B")) { + let c = x; +} +else { + let d = x; +} + +//// [stringLiteralTypesTypePredicates01.js] +function kindIs(kind, is) { + return kind === is; +} +var x = "A"; +if (kindIs(x, "A")) { + var a = x; +} +else { + var b = x; +} +if (!kindIs(x, "B")) { + var c = x; +} +else { + var d = x; +} + + +//// [stringLiteralTypesTypePredicates01.d.ts] +declare type Kind = "A" | "B"; +declare function kindIs(kind: Kind, is: "A"): kind is "A"; +declare function kindIs(kind: Kind, is: "B"): kind is "B"; +declare var x: Kind; diff --git a/tests/baselines/reference/stringLiteralTypesWithTemplateStrings01.errors.txt b/tests/baselines/reference/stringLiteralTypesWithTemplateStrings01.errors.txt new file mode 100644 index 0000000000000..3851a0b10efaa --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesWithTemplateStrings01.errors.txt @@ -0,0 +1,18 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings01.ts(2,5): error TS2322: Type 'string' is not assignable to type '"ABC"'. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings01.ts(3,5): error TS2322: Type 'string' is not assignable to type '"DE\nF"'. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings01.ts(6,5): error TS2322: Type 'string' is not assignable to type '"JK`L"'. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings01.ts (3 errors) ==== + + let ABC: "ABC" = `ABC`; + ~~~ +!!! error TS2322: Type 'string' is not assignable to type '"ABC"'. + let DE_NEWLINE_F: "DE\nF" = `DE + ~~~~~~~~~~~~ +!!! error TS2322: Type 'string' is not assignable to type '"DE\nF"'. + F`; + let G_QUOTE_HI: 'G"HI'; + let JK_BACKTICK_L: "JK`L" = `JK\`L`; + ~~~~~~~~~~~~~ +!!! error TS2322: Type 'string' is not assignable to type '"JK`L"'. \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesWithTemplateStrings01.js b/tests/baselines/reference/stringLiteralTypesWithTemplateStrings01.js new file mode 100644 index 0000000000000..8f548afc7bf19 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesWithTemplateStrings01.js @@ -0,0 +1,20 @@ +//// [stringLiteralTypesWithTemplateStrings01.ts] + +let ABC: "ABC" = `ABC`; +let DE_NEWLINE_F: "DE\nF" = `DE +F`; +let G_QUOTE_HI: 'G"HI'; +let JK_BACKTICK_L: "JK`L" = `JK\`L`; + +//// [stringLiteralTypesWithTemplateStrings01.js] +var ABC = "ABC"; +var DE_NEWLINE_F = "DE\nF"; +var G_QUOTE_HI; +var JK_BACKTICK_L = "JK`L"; + + +//// [stringLiteralTypesWithTemplateStrings01.d.ts] +declare let ABC: "ABC"; +declare let DE_NEWLINE_F: "DE\nF"; +declare let G_QUOTE_HI: 'G"HI'; +declare let JK_BACKTICK_L: "JK`L"; diff --git a/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.errors.txt b/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.errors.txt new file mode 100644 index 0000000000000..803e4f5cb24e7 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings02.ts(2,5): error TS2322: Type 'string' is not assignable to type '"AB\r\nC"'. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings02.ts(4,5): error TS2322: Type 'string' is not assignable to type '"DE\nF"'. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings02.ts (2 errors) ==== + + let abc: "AB\r\nC" = `AB + ~~~ +!!! error TS2322: Type 'string' is not assignable to type '"AB\r\nC"'. + C`; + let de_NEWLINE_f: "DE\nF" = `DE${"\n"}F`; + ~~~~~~~~~~~~ +!!! error TS2322: Type 'string' is not assignable to type '"DE\nF"'. \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.js b/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.js new file mode 100644 index 0000000000000..f5d9045921a8e --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesWithTemplateStrings02.js @@ -0,0 +1,14 @@ +//// [stringLiteralTypesWithTemplateStrings02.ts] + +let abc: "AB\r\nC" = `AB +C`; +let de_NEWLINE_f: "DE\nF" = `DE${"\n"}F`; + +//// [stringLiteralTypesWithTemplateStrings02.js] +var abc = "AB\nC"; +var de_NEWLINE_f = "DE" + "\n" + "F"; + + +//// [stringLiteralTypesWithTemplateStrings02.d.ts] +declare let abc: "AB\r\nC"; +declare let de_NEWLINE_f: "DE\nF"; diff --git a/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.js b/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.js new file mode 100644 index 0000000000000..1576540e24446 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.js @@ -0,0 +1,86 @@ +//// [stringLiteralTypesWithVariousOperators01.ts] + +let abc: "ABC" = "ABC"; +let xyz: "XYZ" = "XYZ"; +let abcOrXyz: "ABC" | "XYZ" = abc || xyz; +let abcOrXyzOrNumber: "ABC" | "XYZ" | number = abcOrXyz || 100; + +let a = "" + abc; +let b = abc + ""; +let c = 10 + abc; +let d = abc + 10; +let e = xyz + abc; +let f = abc + xyz; +let g = true + abc; +let h = abc + true; +let i = abc + abcOrXyz + xyz; +let j = abcOrXyz + abcOrXyz; +let k = +abcOrXyz; +let l = -abcOrXyz; +let m = abcOrXyzOrNumber + ""; +let n = "" + abcOrXyzOrNumber; +let o = abcOrXyzOrNumber + abcOrXyz; +let p = abcOrXyz + abcOrXyzOrNumber; +let q = !abcOrXyzOrNumber; +let r = ~abcOrXyzOrNumber; +let s = abcOrXyzOrNumber < abcOrXyzOrNumber; +let t = abcOrXyzOrNumber >= abcOrXyz; +let u = abc === abcOrXyz; +let v = abcOrXyz === abcOrXyzOrNumber; + +//// [stringLiteralTypesWithVariousOperators01.js] +var abc = "ABC"; +var xyz = "XYZ"; +var abcOrXyz = abc || xyz; +var abcOrXyzOrNumber = abcOrXyz || 100; +var a = "" + abc; +var b = abc + ""; +var c = 10 + abc; +var d = abc + 10; +var e = xyz + abc; +var f = abc + xyz; +var g = true + abc; +var h = abc + true; +var i = abc + abcOrXyz + xyz; +var j = abcOrXyz + abcOrXyz; +var k = +abcOrXyz; +var l = -abcOrXyz; +var m = abcOrXyzOrNumber + ""; +var n = "" + abcOrXyzOrNumber; +var o = abcOrXyzOrNumber + abcOrXyz; +var p = abcOrXyz + abcOrXyzOrNumber; +var q = !abcOrXyzOrNumber; +var r = ~abcOrXyzOrNumber; +var s = abcOrXyzOrNumber < abcOrXyzOrNumber; +var t = abcOrXyzOrNumber >= abcOrXyz; +var u = abc === abcOrXyz; +var v = abcOrXyz === abcOrXyzOrNumber; + + +//// [stringLiteralTypesWithVariousOperators01.d.ts] +declare let abc: "ABC"; +declare let xyz: "XYZ"; +declare let abcOrXyz: "ABC" | "XYZ"; +declare let abcOrXyzOrNumber: "ABC" | "XYZ" | number; +declare let a: string; +declare let b: string; +declare let c: string; +declare let d: string; +declare let e: string; +declare let f: string; +declare let g: string; +declare let h: string; +declare let i: string; +declare let j: string; +declare let k: number; +declare let l: number; +declare let m: string; +declare let n: string; +declare let o: string; +declare let p: string; +declare let q: boolean; +declare let r: number; +declare let s: boolean; +declare let t: boolean; +declare let u: boolean; +declare let v: boolean; diff --git a/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.symbols b/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.symbols new file mode 100644 index 0000000000000..cc9c3aa842bd3 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.symbols @@ -0,0 +1,116 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators01.ts === + +let abc: "ABC" = "ABC"; +>abc : Symbol(abc, Decl(stringLiteralTypesWithVariousOperators01.ts, 1, 3)) + +let xyz: "XYZ" = "XYZ"; +>xyz : Symbol(xyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 2, 3)) + +let abcOrXyz: "ABC" | "XYZ" = abc || xyz; +>abcOrXyz : Symbol(abcOrXyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 3, 3)) +>abc : Symbol(abc, Decl(stringLiteralTypesWithVariousOperators01.ts, 1, 3)) +>xyz : Symbol(xyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 2, 3)) + +let abcOrXyzOrNumber: "ABC" | "XYZ" | number = abcOrXyz || 100; +>abcOrXyzOrNumber : Symbol(abcOrXyzOrNumber, Decl(stringLiteralTypesWithVariousOperators01.ts, 4, 3)) +>abcOrXyz : Symbol(abcOrXyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 3, 3)) + +let a = "" + abc; +>a : Symbol(a, Decl(stringLiteralTypesWithVariousOperators01.ts, 6, 3)) +>abc : Symbol(abc, Decl(stringLiteralTypesWithVariousOperators01.ts, 1, 3)) + +let b = abc + ""; +>b : Symbol(b, Decl(stringLiteralTypesWithVariousOperators01.ts, 7, 3)) +>abc : Symbol(abc, Decl(stringLiteralTypesWithVariousOperators01.ts, 1, 3)) + +let c = 10 + abc; +>c : Symbol(c, Decl(stringLiteralTypesWithVariousOperators01.ts, 8, 3)) +>abc : Symbol(abc, Decl(stringLiteralTypesWithVariousOperators01.ts, 1, 3)) + +let d = abc + 10; +>d : Symbol(d, Decl(stringLiteralTypesWithVariousOperators01.ts, 9, 3)) +>abc : Symbol(abc, Decl(stringLiteralTypesWithVariousOperators01.ts, 1, 3)) + +let e = xyz + abc; +>e : Symbol(e, Decl(stringLiteralTypesWithVariousOperators01.ts, 10, 3)) +>xyz : Symbol(xyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 2, 3)) +>abc : Symbol(abc, Decl(stringLiteralTypesWithVariousOperators01.ts, 1, 3)) + +let f = abc + xyz; +>f : Symbol(f, Decl(stringLiteralTypesWithVariousOperators01.ts, 11, 3)) +>abc : Symbol(abc, Decl(stringLiteralTypesWithVariousOperators01.ts, 1, 3)) +>xyz : Symbol(xyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 2, 3)) + +let g = true + abc; +>g : Symbol(g, Decl(stringLiteralTypesWithVariousOperators01.ts, 12, 3)) +>abc : Symbol(abc, Decl(stringLiteralTypesWithVariousOperators01.ts, 1, 3)) + +let h = abc + true; +>h : Symbol(h, Decl(stringLiteralTypesWithVariousOperators01.ts, 13, 3)) +>abc : Symbol(abc, Decl(stringLiteralTypesWithVariousOperators01.ts, 1, 3)) + +let i = abc + abcOrXyz + xyz; +>i : Symbol(i, Decl(stringLiteralTypesWithVariousOperators01.ts, 14, 3)) +>abc : Symbol(abc, Decl(stringLiteralTypesWithVariousOperators01.ts, 1, 3)) +>abcOrXyz : Symbol(abcOrXyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 3, 3)) +>xyz : Symbol(xyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 2, 3)) + +let j = abcOrXyz + abcOrXyz; +>j : Symbol(j, Decl(stringLiteralTypesWithVariousOperators01.ts, 15, 3)) +>abcOrXyz : Symbol(abcOrXyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 3, 3)) +>abcOrXyz : Symbol(abcOrXyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 3, 3)) + +let k = +abcOrXyz; +>k : Symbol(k, Decl(stringLiteralTypesWithVariousOperators01.ts, 16, 3)) +>abcOrXyz : Symbol(abcOrXyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 3, 3)) + +let l = -abcOrXyz; +>l : Symbol(l, Decl(stringLiteralTypesWithVariousOperators01.ts, 17, 3)) +>abcOrXyz : Symbol(abcOrXyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 3, 3)) + +let m = abcOrXyzOrNumber + ""; +>m : Symbol(m, Decl(stringLiteralTypesWithVariousOperators01.ts, 18, 3)) +>abcOrXyzOrNumber : Symbol(abcOrXyzOrNumber, Decl(stringLiteralTypesWithVariousOperators01.ts, 4, 3)) + +let n = "" + abcOrXyzOrNumber; +>n : Symbol(n, Decl(stringLiteralTypesWithVariousOperators01.ts, 19, 3)) +>abcOrXyzOrNumber : Symbol(abcOrXyzOrNumber, Decl(stringLiteralTypesWithVariousOperators01.ts, 4, 3)) + +let o = abcOrXyzOrNumber + abcOrXyz; +>o : Symbol(o, Decl(stringLiteralTypesWithVariousOperators01.ts, 20, 3)) +>abcOrXyzOrNumber : Symbol(abcOrXyzOrNumber, Decl(stringLiteralTypesWithVariousOperators01.ts, 4, 3)) +>abcOrXyz : Symbol(abcOrXyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 3, 3)) + +let p = abcOrXyz + abcOrXyzOrNumber; +>p : Symbol(p, Decl(stringLiteralTypesWithVariousOperators01.ts, 21, 3)) +>abcOrXyz : Symbol(abcOrXyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 3, 3)) +>abcOrXyzOrNumber : Symbol(abcOrXyzOrNumber, Decl(stringLiteralTypesWithVariousOperators01.ts, 4, 3)) + +let q = !abcOrXyzOrNumber; +>q : Symbol(q, Decl(stringLiteralTypesWithVariousOperators01.ts, 22, 3)) +>abcOrXyzOrNumber : Symbol(abcOrXyzOrNumber, Decl(stringLiteralTypesWithVariousOperators01.ts, 4, 3)) + +let r = ~abcOrXyzOrNumber; +>r : Symbol(r, Decl(stringLiteralTypesWithVariousOperators01.ts, 23, 3)) +>abcOrXyzOrNumber : Symbol(abcOrXyzOrNumber, Decl(stringLiteralTypesWithVariousOperators01.ts, 4, 3)) + +let s = abcOrXyzOrNumber < abcOrXyzOrNumber; +>s : Symbol(s, Decl(stringLiteralTypesWithVariousOperators01.ts, 24, 3)) +>abcOrXyzOrNumber : Symbol(abcOrXyzOrNumber, Decl(stringLiteralTypesWithVariousOperators01.ts, 4, 3)) +>abcOrXyzOrNumber : Symbol(abcOrXyzOrNumber, Decl(stringLiteralTypesWithVariousOperators01.ts, 4, 3)) + +let t = abcOrXyzOrNumber >= abcOrXyz; +>t : Symbol(t, Decl(stringLiteralTypesWithVariousOperators01.ts, 25, 3)) +>abcOrXyzOrNumber : Symbol(abcOrXyzOrNumber, Decl(stringLiteralTypesWithVariousOperators01.ts, 4, 3)) +>abcOrXyz : Symbol(abcOrXyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 3, 3)) + +let u = abc === abcOrXyz; +>u : Symbol(u, Decl(stringLiteralTypesWithVariousOperators01.ts, 26, 3)) +>abc : Symbol(abc, Decl(stringLiteralTypesWithVariousOperators01.ts, 1, 3)) +>abcOrXyz : Symbol(abcOrXyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 3, 3)) + +let v = abcOrXyz === abcOrXyzOrNumber; +>v : Symbol(v, Decl(stringLiteralTypesWithVariousOperators01.ts, 27, 3)) +>abcOrXyz : Symbol(abcOrXyz, Decl(stringLiteralTypesWithVariousOperators01.ts, 3, 3)) +>abcOrXyzOrNumber : Symbol(abcOrXyzOrNumber, Decl(stringLiteralTypesWithVariousOperators01.ts, 4, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.types b/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.types new file mode 100644 index 0000000000000..90cb538b800d1 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.types @@ -0,0 +1,152 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators01.ts === + +let abc: "ABC" = "ABC"; +>abc : "ABC" +>"ABC" : "ABC" + +let xyz: "XYZ" = "XYZ"; +>xyz : "XYZ" +>"XYZ" : "XYZ" + +let abcOrXyz: "ABC" | "XYZ" = abc || xyz; +>abcOrXyz : "ABC" | "XYZ" +>abc || xyz : "ABC" | "XYZ" +>abc : "ABC" +>xyz : "XYZ" + +let abcOrXyzOrNumber: "ABC" | "XYZ" | number = abcOrXyz || 100; +>abcOrXyzOrNumber : "ABC" | "XYZ" | number +>abcOrXyz || 100 : "ABC" | "XYZ" | number +>abcOrXyz : "ABC" | "XYZ" +>100 : number + +let a = "" + abc; +>a : string +>"" + abc : string +>"" : string +>abc : "ABC" + +let b = abc + ""; +>b : string +>abc + "" : string +>abc : "ABC" +>"" : string + +let c = 10 + abc; +>c : string +>10 + abc : string +>10 : number +>abc : "ABC" + +let d = abc + 10; +>d : string +>abc + 10 : string +>abc : "ABC" +>10 : number + +let e = xyz + abc; +>e : string +>xyz + abc : string +>xyz : "XYZ" +>abc : "ABC" + +let f = abc + xyz; +>f : string +>abc + xyz : string +>abc : "ABC" +>xyz : "XYZ" + +let g = true + abc; +>g : string +>true + abc : string +>true : boolean +>abc : "ABC" + +let h = abc + true; +>h : string +>abc + true : string +>abc : "ABC" +>true : boolean + +let i = abc + abcOrXyz + xyz; +>i : string +>abc + abcOrXyz + xyz : string +>abc + abcOrXyz : string +>abc : "ABC" +>abcOrXyz : "ABC" | "XYZ" +>xyz : "XYZ" + +let j = abcOrXyz + abcOrXyz; +>j : string +>abcOrXyz + abcOrXyz : string +>abcOrXyz : "ABC" | "XYZ" +>abcOrXyz : "ABC" | "XYZ" + +let k = +abcOrXyz; +>k : number +>+abcOrXyz : number +>abcOrXyz : "ABC" | "XYZ" + +let l = -abcOrXyz; +>l : number +>-abcOrXyz : number +>abcOrXyz : "ABC" | "XYZ" + +let m = abcOrXyzOrNumber + ""; +>m : string +>abcOrXyzOrNumber + "" : string +>abcOrXyzOrNumber : "ABC" | "XYZ" | number +>"" : string + +let n = "" + abcOrXyzOrNumber; +>n : string +>"" + abcOrXyzOrNumber : string +>"" : string +>abcOrXyzOrNumber : "ABC" | "XYZ" | number + +let o = abcOrXyzOrNumber + abcOrXyz; +>o : string +>abcOrXyzOrNumber + abcOrXyz : string +>abcOrXyzOrNumber : "ABC" | "XYZ" | number +>abcOrXyz : "ABC" | "XYZ" + +let p = abcOrXyz + abcOrXyzOrNumber; +>p : string +>abcOrXyz + abcOrXyzOrNumber : string +>abcOrXyz : "ABC" | "XYZ" +>abcOrXyzOrNumber : "ABC" | "XYZ" | number + +let q = !abcOrXyzOrNumber; +>q : boolean +>!abcOrXyzOrNumber : boolean +>abcOrXyzOrNumber : "ABC" | "XYZ" | number + +let r = ~abcOrXyzOrNumber; +>r : number +>~abcOrXyzOrNumber : number +>abcOrXyzOrNumber : "ABC" | "XYZ" | number + +let s = abcOrXyzOrNumber < abcOrXyzOrNumber; +>s : boolean +>abcOrXyzOrNumber < abcOrXyzOrNumber : boolean +>abcOrXyzOrNumber : "ABC" | "XYZ" | number +>abcOrXyzOrNumber : "ABC" | "XYZ" | number + +let t = abcOrXyzOrNumber >= abcOrXyz; +>t : boolean +>abcOrXyzOrNumber >= abcOrXyz : boolean +>abcOrXyzOrNumber : "ABC" | "XYZ" | number +>abcOrXyz : "ABC" | "XYZ" + +let u = abc === abcOrXyz; +>u : boolean +>abc === abcOrXyz : boolean +>abc : "ABC" +>abcOrXyz : "ABC" | "XYZ" + +let v = abcOrXyz === abcOrXyzOrNumber; +>v : boolean +>abcOrXyz === abcOrXyzOrNumber : boolean +>abcOrXyz : "ABC" | "XYZ" +>abcOrXyzOrNumber : "ABC" | "XYZ" | number + diff --git a/tests/baselines/reference/stringLiteralTypesWithVariousOperators02.errors.txt b/tests/baselines/reference/stringLiteralTypesWithVariousOperators02.errors.txt new file mode 100644 index 0000000000000..69dd6c2f6a955 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesWithVariousOperators02.errors.txt @@ -0,0 +1,48 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(7,9): error TS2365: Operator '+' cannot be applied to types '"ABC" | "XYZ" | number' and 'number'. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(8,9): error TS2365: Operator '+' cannot be applied to types 'number' and '"ABC" | "XYZ" | number'. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(9,9): error TS2365: Operator '+' cannot be applied to types '"ABC" | "XYZ" | number' and '"ABC" | "XYZ" | number'. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(10,9): error TS2365: Operator '+' cannot be applied to types '"ABC" | "XYZ" | number' and 'boolean'. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(11,9): error TS2365: Operator '+' cannot be applied to types 'boolean' and '"ABC" | "XYZ" | number'. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(12,9): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(13,11): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(14,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(15,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts (9 errors) ==== + + let abc: "ABC" = "ABC"; + let xyz: "XYZ" = "XYZ"; + let abcOrXyz: "ABC" | "XYZ" = abc || xyz; + let abcOrXyzOrNumber: "ABC" | "XYZ" | number = abcOrXyz || 100; + + let a = abcOrXyzOrNumber + 100; + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types '"ABC" | "XYZ" | number' and 'number'. + let b = 100 + abcOrXyzOrNumber; + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types 'number' and '"ABC" | "XYZ" | number'. + let c = abcOrXyzOrNumber + abcOrXyzOrNumber; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types '"ABC" | "XYZ" | number' and '"ABC" | "XYZ" | number'. + let d = abcOrXyzOrNumber + true; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types '"ABC" | "XYZ" | number' and 'boolean'. + let e = false + abcOrXyzOrNumber; + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and '"ABC" | "XYZ" | number'. + let f = abcOrXyzOrNumber++; + ~~~~~~~~~~~~~~~~ +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. + let g = --abcOrXyzOrNumber; + ~~~~~~~~~~~~~~~~ +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. + let h = abcOrXyzOrNumber ^ 10; + ~~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + let i = abcOrXyzOrNumber | 10; + ~~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + let j = abc < xyz; + let k = abc === xyz; + let l = abc != xyz; \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesWithVariousOperators02.js b/tests/baselines/reference/stringLiteralTypesWithVariousOperators02.js new file mode 100644 index 0000000000000..4914ecf3d178a --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesWithVariousOperators02.js @@ -0,0 +1,56 @@ +//// [stringLiteralTypesWithVariousOperators02.ts] + +let abc: "ABC" = "ABC"; +let xyz: "XYZ" = "XYZ"; +let abcOrXyz: "ABC" | "XYZ" = abc || xyz; +let abcOrXyzOrNumber: "ABC" | "XYZ" | number = abcOrXyz || 100; + +let a = abcOrXyzOrNumber + 100; +let b = 100 + abcOrXyzOrNumber; +let c = abcOrXyzOrNumber + abcOrXyzOrNumber; +let d = abcOrXyzOrNumber + true; +let e = false + abcOrXyzOrNumber; +let f = abcOrXyzOrNumber++; +let g = --abcOrXyzOrNumber; +let h = abcOrXyzOrNumber ^ 10; +let i = abcOrXyzOrNumber | 10; +let j = abc < xyz; +let k = abc === xyz; +let l = abc != xyz; + +//// [stringLiteralTypesWithVariousOperators02.js] +var abc = "ABC"; +var xyz = "XYZ"; +var abcOrXyz = abc || xyz; +var abcOrXyzOrNumber = abcOrXyz || 100; +var a = abcOrXyzOrNumber + 100; +var b = 100 + abcOrXyzOrNumber; +var c = abcOrXyzOrNumber + abcOrXyzOrNumber; +var d = abcOrXyzOrNumber + true; +var e = false + abcOrXyzOrNumber; +var f = abcOrXyzOrNumber++; +var g = --abcOrXyzOrNumber; +var h = abcOrXyzOrNumber ^ 10; +var i = abcOrXyzOrNumber | 10; +var j = abc < xyz; +var k = abc === xyz; +var l = abc != xyz; + + +//// [stringLiteralTypesWithVariousOperators02.d.ts] +declare let abc: "ABC"; +declare let xyz: "XYZ"; +declare let abcOrXyz: "ABC" | "XYZ"; +declare let abcOrXyzOrNumber: "ABC" | "XYZ" | number; +declare let a: any; +declare let b: any; +declare let c: any; +declare let d: any; +declare let e: any; +declare let f: number; +declare let g: number; +declare let h: number; +declare let i: number; +declare let j: boolean; +declare let k: boolean; +declare let l: boolean; diff --git a/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.errors.txt b/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.errors.txt index d3c399477d66c..da742fcd69cbd 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.errors.txt +++ b/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts(70,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. Types of property 'a' are incompatible. - Type '(x: string) => string' is not assignable to type '{ (x: 'a'): number; (x: string): number; }'. + Type '(x: string) => string' is not assignable to type '{ (x: "a"): number; (x: string): number; }'. Type 'string' is not assignable to type 'number'. @@ -78,7 +78,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW ~~ !!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type '(x: string) => string' is not assignable to type '{ (x: 'a'): number; (x: string): number; }'. +!!! error TS2430: Type '(x: string) => string' is not assignable to type '{ (x: "a"): number; (x: string): number; }'. !!! error TS2430: Type 'string' is not assignable to type 'number'. // N's a: (x: string) => string; // error because base returns non-void; diff --git a/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.errors.txt b/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.errors.txt index 03cc6de0ca4b4..8a885a2455fb2 100644 --- a/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.errors.txt +++ b/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts(70,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. Types of property 'a' are incompatible. - Type 'new (x: string) => string' is not assignable to type '{ new (x: 'a'): number; new (x: string): number; }'. + Type 'new (x: string) => string' is not assignable to type '{ new (x: "a"): number; new (x: string): number; }'. Type 'string' is not assignable to type 'number'. @@ -78,7 +78,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW ~~ !!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'new (x: string) => string' is not assignable to type '{ new (x: 'a'): number; new (x: string): number; }'. +!!! error TS2430: Type 'new (x: string) => string' is not assignable to type '{ new (x: "a"): number; new (x: string): number; }'. !!! error TS2430: Type 'string' is not assignable to type 'number'. // N's a: new (x: string) => string; // error because base returns non-void; diff --git a/tests/baselines/reference/symbolProperty41.types b/tests/baselines/reference/symbolProperty41.types index 61b71dfe24689..f312481ac0403 100644 --- a/tests/baselines/reference/symbolProperty41.types +++ b/tests/baselines/reference/symbolProperty41.types @@ -49,5 +49,5 @@ c[Symbol.iterator]("hello"); >Symbol.iterator : symbol >Symbol : SymbolConstructor >iterator : symbol ->"hello" : string +>"hello" : "hello" diff --git a/tests/baselines/reference/symbolType18.types b/tests/baselines/reference/symbolType18.types index db4fb30378fca..68c43215136fa 100644 --- a/tests/baselines/reference/symbolType18.types +++ b/tests/baselines/reference/symbolType18.types @@ -21,5 +21,5 @@ if (typeof x === "object") { } else { x; ->x : symbol | Foo +>x : symbol } diff --git a/tests/baselines/reference/systemExportAssignment.js b/tests/baselines/reference/systemExportAssignment.js index bae5f6129ea60..72962cf835cd1 100644 --- a/tests/baselines/reference/systemExportAssignment.js +++ b/tests/baselines/reference/systemExportAssignment.js @@ -11,6 +11,7 @@ import * as a from "a"; //// [b.js] System.register([], function(exports_1) { + "use strict"; return { setters:[], execute: function() { diff --git a/tests/baselines/reference/systemExportAssignment2.js b/tests/baselines/reference/systemExportAssignment2.js index 1ee0f4ff9b872..0f4dd71249336 100644 --- a/tests/baselines/reference/systemExportAssignment2.js +++ b/tests/baselines/reference/systemExportAssignment2.js @@ -11,6 +11,7 @@ import * as a from "a"; //// [a.js] System.register([], function(exports_1) { + "use strict"; var a; return { setters:[], @@ -21,6 +22,7 @@ System.register([], function(exports_1) { }); //// [b.js] System.register([], function(exports_1) { + "use strict"; return { setters:[], execute: function() { diff --git a/tests/baselines/reference/systemExportAssignment3.js b/tests/baselines/reference/systemExportAssignment3.js index 46fcfd1b0ee02..ca2492a54e106 100644 --- a/tests/baselines/reference/systemExportAssignment3.js +++ b/tests/baselines/reference/systemExportAssignment3.js @@ -13,6 +13,7 @@ import * as a from "a"; //// [b.js] System.register([], function(exports_1) { + "use strict"; return { setters:[], execute: function() { diff --git a/tests/baselines/reference/systemModule1.js b/tests/baselines/reference/systemModule1.js index 8d99e84ae9f43..52f3b48206913 100644 --- a/tests/baselines/reference/systemModule1.js +++ b/tests/baselines/reference/systemModule1.js @@ -4,6 +4,7 @@ export var x = 1; //// [systemModule1.js] System.register([], function(exports_1) { + "use strict"; var x; return { setters:[], diff --git a/tests/baselines/reference/systemModule10.js b/tests/baselines/reference/systemModule10.js index fcecfc9b0f87d..ac32c4948e7b9 100644 --- a/tests/baselines/reference/systemModule10.js +++ b/tests/baselines/reference/systemModule10.js @@ -11,6 +11,7 @@ export {n2 as n3} //// [systemModule10.js] System.register(['file1', 'file2'], function(exports_1) { + "use strict"; var file1_1, n2; return { setters:[ diff --git a/tests/baselines/reference/systemModule10_ES5.js b/tests/baselines/reference/systemModule10_ES5.js index a86088a3463fb..0c98df6ba99bf 100644 --- a/tests/baselines/reference/systemModule10_ES5.js +++ b/tests/baselines/reference/systemModule10_ES5.js @@ -11,6 +11,7 @@ export {n2 as n3} //// [systemModule10_ES5.js] System.register(['file1', 'file2'], function(exports_1) { + "use strict"; var file1_1, n2; return { setters:[ diff --git a/tests/baselines/reference/systemModule11.js b/tests/baselines/reference/systemModule11.js index bf9b57c511cc2..92b0576b91907 100644 --- a/tests/baselines/reference/systemModule11.js +++ b/tests/baselines/reference/systemModule11.js @@ -43,6 +43,7 @@ export * from 'a'; //// [file1.js] // set of tests cases that checks generation of local storage for exported names System.register(['bar'], function(exports_1) { + "use strict"; var x; function foo() { } exports_1("foo", foo); @@ -68,6 +69,7 @@ System.register(['bar'], function(exports_1) { }); //// [file2.js] System.register(['bar'], function(exports_1) { + "use strict"; var x, y; var exportedNames_1 = { 'x': true, @@ -93,6 +95,7 @@ System.register(['bar'], function(exports_1) { }); //// [file3.js] System.register(['a', 'bar'], function(exports_1) { + "use strict"; function foo() { } exports_1("default", foo); var exportedNames_1 = { @@ -123,6 +126,7 @@ System.register(['a', 'bar'], function(exports_1) { }); //// [file4.js] System.register(['a'], function(exports_1) { + "use strict"; var x, z, z1; function foo() { } exports_1("foo", foo); @@ -144,6 +148,7 @@ System.register(['a'], function(exports_1) { }); //// [file5.js] System.register(['a'], function(exports_1) { + "use strict"; function foo() { } function exportStar_1(m) { var exports = {}; diff --git a/tests/baselines/reference/systemModule12.js b/tests/baselines/reference/systemModule12.js index 0b5f5a3e8500f..d8961c3b0017c 100644 --- a/tests/baselines/reference/systemModule12.js +++ b/tests/baselines/reference/systemModule12.js @@ -6,6 +6,7 @@ import n from 'file1' //// [systemModule12.js] System.register("NamedModule", [], function(exports_1) { + "use strict"; return { setters:[], execute: function() { diff --git a/tests/baselines/reference/systemModule13.js b/tests/baselines/reference/systemModule13.js index c66e123c738f2..0b81a946de4cb 100644 --- a/tests/baselines/reference/systemModule13.js +++ b/tests/baselines/reference/systemModule13.js @@ -6,6 +6,7 @@ for ([x] of [[1]]) {} //// [systemModule13.js] System.register([], function(exports_1) { + "use strict"; var x, y, z, z0, z1; return { setters:[], diff --git a/tests/baselines/reference/systemModule14.js b/tests/baselines/reference/systemModule14.js index 76906db5980fc..2ec8fc600f42c 100644 --- a/tests/baselines/reference/systemModule14.js +++ b/tests/baselines/reference/systemModule14.js @@ -12,6 +12,7 @@ export {foo as b} //// [systemModule14.js] System.register(["foo"], function(exports_1) { + "use strict"; var foo_1; var x; function foo() { diff --git a/tests/baselines/reference/systemModule15.js b/tests/baselines/reference/systemModule15.js index 4d5536cbaa101..f8dc11b0ac7c7 100644 --- a/tests/baselines/reference/systemModule15.js +++ b/tests/baselines/reference/systemModule15.js @@ -35,6 +35,7 @@ export var value2 = "v"; //// [file3.js] System.register([], function(exports_1) { + "use strict"; var value; return { setters:[], @@ -46,6 +47,7 @@ System.register([], function(exports_1) { }); //// [file4.js] System.register([], function(exports_1) { + "use strict"; var value2; return { setters:[], @@ -56,6 +58,7 @@ System.register([], function(exports_1) { }); //// [file2.js] System.register(["./file3"], function(exports_1) { + "use strict"; var moduleCStar, file3_1, file3_2; return { setters:[ @@ -73,6 +76,7 @@ System.register(["./file3"], function(exports_1) { }); //// [file1.js] System.register(["./file2"], function(exports_1) { + "use strict"; var moduleB; return { setters:[ diff --git a/tests/baselines/reference/systemModule16.js b/tests/baselines/reference/systemModule16.js index 851b941492a4e..76fb85cd3aead 100644 --- a/tests/baselines/reference/systemModule16.js +++ b/tests/baselines/reference/systemModule16.js @@ -14,6 +14,7 @@ x,y,a1,b1,d1; //// [systemModule16.js] System.register(["foo", "bar"], function(exports_1) { + "use strict"; var x, y, foo_1; var exportedNames_1 = { 'x': true, diff --git a/tests/baselines/reference/systemModule17.js b/tests/baselines/reference/systemModule17.js index 90efdc8872a32..7ef4d441823c0 100644 --- a/tests/baselines/reference/systemModule17.js +++ b/tests/baselines/reference/systemModule17.js @@ -43,6 +43,7 @@ export {II as II1}; //// [f1.js] System.register([], function(exports_1) { + "use strict"; var A; return { setters:[], @@ -58,6 +59,7 @@ System.register([], function(exports_1) { }); //// [f2.js] System.register(["f1"], function(exports_1) { + "use strict"; var f1_1; var x, N, IX; return { diff --git a/tests/baselines/reference/systemModule2.js b/tests/baselines/reference/systemModule2.js index cc0a3cc291685..ee3dfd327ec71 100644 --- a/tests/baselines/reference/systemModule2.js +++ b/tests/baselines/reference/systemModule2.js @@ -5,6 +5,7 @@ export = x; //// [systemModule2.js] System.register([], function(exports_1) { + "use strict"; var x; return { setters:[], diff --git a/tests/baselines/reference/systemModule3.js b/tests/baselines/reference/systemModule3.js index 885e86e442a22..c7aeb7f508c31 100644 --- a/tests/baselines/reference/systemModule3.js +++ b/tests/baselines/reference/systemModule3.js @@ -19,6 +19,7 @@ export default class {} //// [file1.js] System.register([], function(exports_1) { + "use strict"; function default_1() { } exports_1("default", default_1); return { @@ -29,6 +30,7 @@ System.register([], function(exports_1) { }); //// [file2.js] System.register([], function(exports_1) { + "use strict"; function f() { } exports_1("default", f); return { @@ -39,6 +41,7 @@ System.register([], function(exports_1) { }); //// [file3.js] System.register([], function(exports_1) { + "use strict"; var C; return { setters:[], @@ -54,6 +57,7 @@ System.register([], function(exports_1) { }); //// [file4.js] System.register([], function(exports_1) { + "use strict"; var default_1; return { setters:[], diff --git a/tests/baselines/reference/systemModule4.js b/tests/baselines/reference/systemModule4.js index 2b06d04e06f56..192c87d49eab8 100644 --- a/tests/baselines/reference/systemModule4.js +++ b/tests/baselines/reference/systemModule4.js @@ -5,6 +5,7 @@ export var y; //// [systemModule4.js] System.register([], function(exports_1) { + "use strict"; var x, y; return { setters:[], diff --git a/tests/baselines/reference/systemModule5.js b/tests/baselines/reference/systemModule5.js index 4d9aadb3566c9..4a455f25b1395 100644 --- a/tests/baselines/reference/systemModule5.js +++ b/tests/baselines/reference/systemModule5.js @@ -5,6 +5,7 @@ export function foo() {} //// [systemModule5.js] System.register([], function(exports_1) { + "use strict"; function foo() { } exports_1("foo", foo); return { diff --git a/tests/baselines/reference/systemModule6.js b/tests/baselines/reference/systemModule6.js index d36535f676131..7d93ee1df032a 100644 --- a/tests/baselines/reference/systemModule6.js +++ b/tests/baselines/reference/systemModule6.js @@ -8,6 +8,7 @@ function foo() { //// [systemModule6.js] System.register([], function(exports_1) { + "use strict"; var C; function foo() { new C(); diff --git a/tests/baselines/reference/systemModule7.js b/tests/baselines/reference/systemModule7.js index 0c396ddbe55f0..d76d86a3b0f51 100644 --- a/tests/baselines/reference/systemModule7.js +++ b/tests/baselines/reference/systemModule7.js @@ -12,6 +12,7 @@ export module M { //// [systemModule7.js] System.register([], function(exports_1) { + "use strict"; var M; return { setters:[], diff --git a/tests/baselines/reference/systemModule8.js b/tests/baselines/reference/systemModule8.js index be4f8c05374f5..b6cdd677f007c 100644 --- a/tests/baselines/reference/systemModule8.js +++ b/tests/baselines/reference/systemModule8.js @@ -32,6 +32,7 @@ for ([x] of [[1]]) {} //// [systemModule8.js] System.register([], function(exports_1) { + "use strict"; var x, y, z0, z1; function foo() { exports_1("x", x = 100); diff --git a/tests/baselines/reference/systemModule9.js b/tests/baselines/reference/systemModule9.js index d7913f2f8b73e..137dd019a023a 100644 --- a/tests/baselines/reference/systemModule9.js +++ b/tests/baselines/reference/systemModule9.js @@ -23,6 +23,7 @@ export {y as z}; //// [systemModule9.js] System.register(['file1', 'file2', 'file3', 'file4', 'file5', 'file6', 'file7'], function(exports_1) { + "use strict"; var ns, file2_1, file3_1, file5_1, ns3; var x, y; var exportedNames_1 = { diff --git a/tests/baselines/reference/systemModuleAmbientDeclarations.js b/tests/baselines/reference/systemModuleAmbientDeclarations.js index 82c18cd798165..9bdde23a8427a 100644 --- a/tests/baselines/reference/systemModuleAmbientDeclarations.js +++ b/tests/baselines/reference/systemModuleAmbientDeclarations.js @@ -30,6 +30,7 @@ export declare module M { var v: number; } //// [file1.js] System.register([], function(exports_1) { + "use strict"; var promise, foo, c, e; return { setters:[], @@ -44,6 +45,7 @@ System.register([], function(exports_1) { }); //// [file2.js] System.register([], function(exports_1) { + "use strict"; return { setters:[], execute: function() { @@ -52,6 +54,7 @@ System.register([], function(exports_1) { }); //// [file3.js] System.register([], function(exports_1) { + "use strict"; return { setters:[], execute: function() { @@ -60,6 +63,7 @@ System.register([], function(exports_1) { }); //// [file4.js] System.register([], function(exports_1) { + "use strict"; return { setters:[], execute: function() { @@ -68,6 +72,7 @@ System.register([], function(exports_1) { }); //// [file5.js] System.register([], function(exports_1) { + "use strict"; return { setters:[], execute: function() { @@ -76,6 +81,7 @@ System.register([], function(exports_1) { }); //// [file6.js] System.register([], function(exports_1) { + "use strict"; return { setters:[], execute: function() { diff --git a/tests/baselines/reference/systemModuleConstEnums.js b/tests/baselines/reference/systemModuleConstEnums.js index 126e6266b2c70..8b8707768d9cd 100644 --- a/tests/baselines/reference/systemModuleConstEnums.js +++ b/tests/baselines/reference/systemModuleConstEnums.js @@ -14,6 +14,7 @@ module M { //// [systemModuleConstEnums.js] System.register([], function(exports_1) { + "use strict"; function foo() { use(0 /* X */); use(0 /* X */); diff --git a/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js b/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js index 381331a84dbde..8466d399ac976 100644 --- a/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js +++ b/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js @@ -14,6 +14,7 @@ module M { //// [systemModuleConstEnumsSeparateCompilation.js] System.register([], function(exports_1) { + "use strict"; var TopLevelConstEnum, M; function foo() { use(TopLevelConstEnum.X); diff --git a/tests/baselines/reference/systemModuleDeclarationMerging.js b/tests/baselines/reference/systemModuleDeclarationMerging.js index 06577c401a091..f11c5d9a360cd 100644 --- a/tests/baselines/reference/systemModuleDeclarationMerging.js +++ b/tests/baselines/reference/systemModuleDeclarationMerging.js @@ -11,6 +11,7 @@ export module E { var x; } //// [systemModuleDeclarationMerging.js] System.register([], function(exports_1) { + "use strict"; var F, C, E; function F() { } exports_1("F", F); diff --git a/tests/baselines/reference/systemModuleExportDefault.js b/tests/baselines/reference/systemModuleExportDefault.js index 4df3ec828c148..6befe63b26766 100644 --- a/tests/baselines/reference/systemModuleExportDefault.js +++ b/tests/baselines/reference/systemModuleExportDefault.js @@ -17,6 +17,7 @@ export default class C {} //// [file1.js] System.register([], function(exports_1) { + "use strict"; function default_1() { } exports_1("default", default_1); return { @@ -27,6 +28,7 @@ System.register([], function(exports_1) { }); //// [file2.js] System.register([], function(exports_1) { + "use strict"; function foo() { } exports_1("default", foo); return { @@ -37,6 +39,7 @@ System.register([], function(exports_1) { }); //// [file3.js] System.register([], function(exports_1) { + "use strict"; var default_1; return { setters:[], @@ -52,6 +55,7 @@ System.register([], function(exports_1) { }); //// [file4.js] System.register([], function(exports_1) { + "use strict"; var C; return { setters:[], diff --git a/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js b/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js index 39a957ed698a1..b7ec776e483bf 100644 --- a/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js +++ b/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js @@ -14,6 +14,7 @@ export module TopLevelModule2 { //// [systemModuleNonTopLevelModuleMembers.js] System.register([], function(exports_1) { + "use strict"; var TopLevelClass, TopLevelModule, TopLevelEnum, TopLevelModule2; function TopLevelFunction() { } exports_1("TopLevelFunction", TopLevelFunction); diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index 9d1e87fbc662d..8b528f281ed10 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -14,6 +14,7 @@ export class Bar extends Foo { //// [foo.js] System.register([], function(exports_1) { + "use strict"; var Foo; return { setters:[], @@ -29,6 +30,7 @@ System.register([], function(exports_1) { }); //// [bar.js] System.register(['./foo'], function(exports_1) { + "use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index 7c19596494798..31a2e995a18b4 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -49,6 +49,7 @@ enum SomeEnum { export = this; // Should be an error //// [thisInInvalidContextsExternalModule.js] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/thisTypeInClasses.symbols b/tests/baselines/reference/thisTypeInClasses.symbols index 0915d6e5e6ba9..5ae45b923afdb 100644 --- a/tests/baselines/reference/thisTypeInClasses.symbols +++ b/tests/baselines/reference/thisTypeInClasses.symbols @@ -92,7 +92,6 @@ class C5 { let f1 = (x: this): this => this; >f1 : Symbol(f1, Decl(thisTypeInClasses.ts, 34, 11)) >x : Symbol(x, Decl(thisTypeInClasses.ts, 34, 18)) ->this : Symbol(C5, Decl(thisTypeInClasses.ts, 30, 1)) >this : Symbol(C5, Decl(thisTypeInClasses.ts, 30, 1)) let f2 = (x: this) => this; diff --git a/tests/baselines/reference/thisTypeInClasses.types b/tests/baselines/reference/thisTypeInClasses.types index 512359decd9d5..69d0f0b1f8f69 100644 --- a/tests/baselines/reference/thisTypeInClasses.types +++ b/tests/baselines/reference/thisTypeInClasses.types @@ -93,7 +93,6 @@ class C5 { >f1 : (x: this) => this >(x: this): this => this : (x: this) => this >x : this ->this : this >this : this let f2 = (x: this) => this; diff --git a/tests/baselines/reference/topLevelAmbientModule.js b/tests/baselines/reference/topLevelAmbientModule.js index 086f46cf7ce49..da5885fafabaa 100644 --- a/tests/baselines/reference/topLevelAmbientModule.js +++ b/tests/baselines/reference/topLevelAmbientModule.js @@ -13,6 +13,7 @@ var z = foo.x + 10; //// [foo_0.js] //// [foo_1.js] +"use strict"; /// var foo = require("foo"); var z = foo.x + 10; diff --git a/tests/baselines/reference/topLevelExports.js b/tests/baselines/reference/topLevelExports.js index 91e28b6a97674..bf274fcf5584d 100644 --- a/tests/baselines/reference/topLevelExports.js +++ b/tests/baselines/reference/topLevelExports.js @@ -7,6 +7,7 @@ void log(foo).toString(); //// [topLevelExports.js] define(["require", "exports"], function (require, exports) { + "use strict"; exports.foo = 3; function log(n) { return n; } void log(exports.foo).toString(); diff --git a/tests/baselines/reference/topLevelFileModule.js b/tests/baselines/reference/topLevelFileModule.js index a6e7a151eb98a..c893a9b467593 100644 --- a/tests/baselines/reference/topLevelFileModule.js +++ b/tests/baselines/reference/topLevelFileModule.js @@ -13,7 +13,9 @@ var z = foo.x + fum.y; //// [foo_0.js] +"use strict"; //// [foo_1.js] +"use strict"; var foo = require("./vs/foo_0"); var fum = require("./vs/fum"); var z = foo.x + fum.y; diff --git a/tests/baselines/reference/topLevelFileModuleMissing.js b/tests/baselines/reference/topLevelFileModuleMissing.js index f6b9e3d68344a..edd090d49ccd1 100644 --- a/tests/baselines/reference/topLevelFileModuleMissing.js +++ b/tests/baselines/reference/topLevelFileModuleMissing.js @@ -9,5 +9,6 @@ var z = foo.x + 10; //// [foo_1.js] +"use strict"; var foo = require("vs/foo"); var z = foo.x + 10; diff --git a/tests/baselines/reference/topLevelLambda4.js b/tests/baselines/reference/topLevelLambda4.js index 863a0e9a103ae..81d3c4a1e4f05 100644 --- a/tests/baselines/reference/topLevelLambda4.js +++ b/tests/baselines/reference/topLevelLambda4.js @@ -3,6 +3,7 @@ export var x = () => this.window; //// [topLevelLambda4.js] define(["require", "exports"], function (require, exports) { + "use strict"; var _this = this; exports.x = function () { return _this.window; }; }); diff --git a/tests/baselines/reference/topLevelModuleDeclarationAndFile.js b/tests/baselines/reference/topLevelModuleDeclarationAndFile.js index e223a293d7c61..cb32901441272 100644 --- a/tests/baselines/reference/topLevelModuleDeclarationAndFile.js +++ b/tests/baselines/reference/topLevelModuleDeclarationAndFile.js @@ -18,6 +18,7 @@ var z2 = foo.y() + 10; // Should resolve //// [foo_1.js] //// [foo_2.js] +"use strict"; /// var foo = require("vs/foo_0"); var z1 = foo.x + 10; // Should error, as declaration should win diff --git a/tests/baselines/reference/tsxAttributeInvalidNames.errors.txt b/tests/baselines/reference/tsxAttributeInvalidNames.errors.txt index 90d0d003c28d6..0607a01a11c34 100644 --- a/tests/baselines/reference/tsxAttributeInvalidNames.errors.txt +++ b/tests/baselines/reference/tsxAttributeInvalidNames.errors.txt @@ -1,18 +1,18 @@ -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,8): error TS1003: Identifier expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,10): error TS1005: ';' expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,10): error TS2304: Cannot find name 'data'. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,15): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,18): error TS1005: ':' expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,21): error TS1109: Expression expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,22): error TS1109: Expression expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,8): error TS1003: Identifier expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,9): error TS2304: Cannot find name 'data'. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,13): error TS1005: ';' expected. -tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,20): error TS1161: Unterminated regular expression literal. +tests/cases/conformance/jsx/file.tsx(10,8): error TS1003: Identifier expected. +tests/cases/conformance/jsx/file.tsx(10,10): error TS1005: ';' expected. +tests/cases/conformance/jsx/file.tsx(10,10): error TS2304: Cannot find name 'data'. +tests/cases/conformance/jsx/file.tsx(10,15): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/jsx/file.tsx(10,18): error TS1005: ':' expected. +tests/cases/conformance/jsx/file.tsx(10,21): error TS1109: Expression expected. +tests/cases/conformance/jsx/file.tsx(10,22): error TS1109: Expression expected. +tests/cases/conformance/jsx/file.tsx(11,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/jsx/file.tsx(11,8): error TS1003: Identifier expected. +tests/cases/conformance/jsx/file.tsx(11,9): error TS2304: Cannot find name 'data'. +tests/cases/conformance/jsx/file.tsx(11,13): error TS1005: ';' expected. +tests/cases/conformance/jsx/file.tsx(11,20): error TS1161: Unterminated regular expression literal. -==== tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx (12 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (12 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeInvalidNames.js b/tests/baselines/reference/tsxAttributeInvalidNames.js index af1de76995c00..f734eb92ed572 100644 --- a/tests/baselines/reference/tsxAttributeInvalidNames.js +++ b/tests/baselines/reference/tsxAttributeInvalidNames.js @@ -1,4 +1,4 @@ -//// [tsxAttributeInvalidNames.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -11,7 +11,7 @@ declare module JSX { ; ; -//// [tsxAttributeInvalidNames.jsx] +//// [file.jsx] // Invalid names ; 32; diff --git a/tests/baselines/reference/tsxAttributeResolution1.errors.txt b/tests/baselines/reference/tsxAttributeResolution1.errors.txt index 7503c5f5969ad..49bb504604e04 100644 --- a/tests/baselines/reference/tsxAttributeResolution1.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution1.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(23,8): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(24,8): error TS2339: Property 'y' does not exist on type 'Attribs1'. -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(25,8): error TS2339: Property 'y' does not exist on type 'Attribs1'. -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(26,8): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(27,8): error TS2339: Property 'var' does not exist on type 'Attribs1'. -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(29,1): error TS2324: Property 'reqd' is missing in type '{ reqd: string; }'. -tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(30,8): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/jsx/file.tsx(23,8): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/jsx/file.tsx(24,8): error TS2339: Property 'y' does not exist on type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(25,8): error TS2339: Property 'y' does not exist on type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(26,8): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/jsx/file.tsx(27,8): error TS2339: Property 'var' does not exist on type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(29,1): error TS2324: Property 'reqd' is missing in type '{ reqd: string; }'. +tests/cases/conformance/jsx/file.tsx(30,8): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/jsx/tsxAttributeResolution1.tsx (7 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (7 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution1.js b/tests/baselines/reference/tsxAttributeResolution1.js index 1e1efb7ea22e3..3bf94909c70db 100644 --- a/tests/baselines/reference/tsxAttributeResolution1.js +++ b/tests/baselines/reference/tsxAttributeResolution1.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution1.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -34,7 +34,7 @@ interface Attribs1 { ; -//// [tsxAttributeResolution1.jsx] +//// [file.jsx] // OK ; // OK ; // OK diff --git a/tests/baselines/reference/tsxAttributeResolution10.js b/tests/baselines/reference/tsxAttributeResolution10.js index 35e5b3074b07b..e0bb6d8efc18b 100644 --- a/tests/baselines/reference/tsxAttributeResolution10.js +++ b/tests/baselines/reference/tsxAttributeResolution10.js @@ -33,6 +33,7 @@ export class MyComponent { //// [file.jsx] define(["require", "exports"], function (require, exports) { + "use strict"; var MyComponent = (function () { function MyComponent() { } diff --git a/tests/baselines/reference/tsxAttributeResolution2.errors.txt b/tests/baselines/reference/tsxAttributeResolution2.errors.txt index d213ccaf54eb5..84fe8fb20f259 100644 --- a/tests/baselines/reference/tsxAttributeResolution2.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxAttributeResolution2.tsx(17,21): error TS2339: Property 'leng' does not exist on type 'string'. +tests/cases/conformance/jsx/file.tsx(17,21): error TS2339: Property 'leng' does not exist on type 'string'. -==== tests/cases/conformance/jsx/tsxAttributeResolution2.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution2.js b/tests/baselines/reference/tsxAttributeResolution2.js index 564767e6169b5..f91f268f385ca 100644 --- a/tests/baselines/reference/tsxAttributeResolution2.js +++ b/tests/baselines/reference/tsxAttributeResolution2.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution2.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -18,7 +18,7 @@ interface Attribs1 { x.leng} />; // Error, no leng on 'string' -//// [tsxAttributeResolution2.jsx] +//// [file.jsx] // OK ; // OK ; // OK diff --git a/tests/baselines/reference/tsxAttributeResolution3.errors.txt b/tests/baselines/reference/tsxAttributeResolution3.errors.txt index c797362e8d770..6513b9879dcaf 100644 --- a/tests/baselines/reference/tsxAttributeResolution3.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution3.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/jsx/tsxAttributeResolution3.tsx(19,8): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property. +tests/cases/conformance/jsx/file.tsx(19,8): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsx/tsxAttributeResolution3.tsx(23,1): error TS2324: Property 'x' is missing in type 'Attribs1'. -tests/cases/conformance/jsx/tsxAttributeResolution3.tsx(31,15): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property. +tests/cases/conformance/jsx/file.tsx(23,1): error TS2324: Property 'x' is missing in type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(31,15): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsx/tsxAttributeResolution3.tsx(39,8): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/jsx/file.tsx(39,8): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/jsx/tsxAttributeResolution3.tsx (4 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (4 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution3.js b/tests/baselines/reference/tsxAttributeResolution3.js index 8cf853820e19a..2898a6bc25144 100644 --- a/tests/baselines/reference/tsxAttributeResolution3.js +++ b/tests/baselines/reference/tsxAttributeResolution3.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution3.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -40,7 +40,7 @@ var obj7 = { x: 'foo' }; -//// [tsxAttributeResolution3.jsx] +//// [file.jsx] // OK var obj1 = { x: 'foo' }; ; diff --git a/tests/baselines/reference/tsxAttributeResolution4.errors.txt b/tests/baselines/reference/tsxAttributeResolution4.errors.txt index 211a349b30456..0a54dc32c46c6 100644 --- a/tests/baselines/reference/tsxAttributeResolution4.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxAttributeResolution4.tsx(15,26): error TS2339: Property 'len' does not exist on type 'string'. +tests/cases/conformance/jsx/file.tsx(15,26): error TS2339: Property 'len' does not exist on type 'string'. -==== tests/cases/conformance/jsx/tsxAttributeResolution4.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution4.js b/tests/baselines/reference/tsxAttributeResolution4.js index d56cb4cc2e808..ccd1ba8157c73 100644 --- a/tests/baselines/reference/tsxAttributeResolution4.js +++ b/tests/baselines/reference/tsxAttributeResolution4.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution4.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -16,7 +16,7 @@ interface Attribs1 { n.len} } />; -//// [tsxAttributeResolution4.jsx] +//// [file.jsx] // OK ; // Error, no member 'len' on 'string' diff --git a/tests/baselines/reference/tsxAttributeResolution5.errors.txt b/tests/baselines/reference/tsxAttributeResolution5.errors.txt index 1b42dd014655d..d7aa46bc05ace 100644 --- a/tests/baselines/reference/tsxAttributeResolution5.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution5.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/jsx/tsxAttributeResolution5.tsx(21,16): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property. +tests/cases/conformance/jsx/file.tsx(21,16): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsx/tsxAttributeResolution5.tsx(25,9): error TS2324: Property 'x' is missing in type 'Attribs1'. -tests/cases/conformance/jsx/tsxAttributeResolution5.tsx(29,1): error TS2324: Property 'x' is missing in type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(25,9): error TS2324: Property 'x' is missing in type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(29,1): error TS2324: Property 'x' is missing in type 'Attribs1'. -==== tests/cases/conformance/jsx/tsxAttributeResolution5.tsx (3 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution5.js b/tests/baselines/reference/tsxAttributeResolution5.js index 34fe9a3bfb6c7..abfb54e000c7e 100644 --- a/tests/baselines/reference/tsxAttributeResolution5.js +++ b/tests/baselines/reference/tsxAttributeResolution5.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution5.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -31,7 +31,7 @@ function make3 (obj: T) { ; // OK -//// [tsxAttributeResolution5.jsx] +//// [file.jsx] function make1(obj) { return ; // OK } diff --git a/tests/baselines/reference/tsxAttributeResolution6.errors.txt b/tests/baselines/reference/tsxAttributeResolution6.errors.txt index 4f1960358a560..732ac9500a9a2 100644 --- a/tests/baselines/reference/tsxAttributeResolution6.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/jsx/tsxAttributeResolution6.tsx(10,8): error TS2322: Type 'boolean' is not assignable to type 'string'. -tests/cases/conformance/jsx/tsxAttributeResolution6.tsx(11,8): error TS2322: Type 'string' is not assignable to type 'boolean'. -tests/cases/conformance/jsx/tsxAttributeResolution6.tsx(12,1): error TS2324: Property 'n' is missing in type '{ n: boolean; }'. +tests/cases/conformance/jsx/file.tsx(10,8): error TS2322: Type 'boolean' is not assignable to type 'string'. +tests/cases/conformance/jsx/file.tsx(11,8): error TS2322: Type 'string' is not assignable to type 'boolean'. +tests/cases/conformance/jsx/file.tsx(12,1): error TS2324: Property 'n' is missing in type '{ n: boolean; }'. -==== tests/cases/conformance/jsx/tsxAttributeResolution6.tsx (3 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution6.js b/tests/baselines/reference/tsxAttributeResolution6.js index 5d6ad1e20c64c..946b46da95bbf 100644 --- a/tests/baselines/reference/tsxAttributeResolution6.js +++ b/tests/baselines/reference/tsxAttributeResolution6.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution6.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -18,7 +18,7 @@ declare module JSX { ; -//// [tsxAttributeResolution6.jsx] +//// [file.jsx] // Error ; ; diff --git a/tests/baselines/reference/tsxAttributeResolution7.errors.txt b/tests/baselines/reference/tsxAttributeResolution7.errors.txt index 4d05254ace8d5..acbd7f407de8b 100644 --- a/tests/baselines/reference/tsxAttributeResolution7.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution7.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxAttributeResolution7.tsx(9,8): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/jsx/file.tsx(9,8): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/jsx/tsxAttributeResolution7.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxAttributeResolution7.js b/tests/baselines/reference/tsxAttributeResolution7.js index 7ebd2e8f4db8a..d474e48b21bcd 100644 --- a/tests/baselines/reference/tsxAttributeResolution7.js +++ b/tests/baselines/reference/tsxAttributeResolution7.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution7.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -15,7 +15,7 @@ declare module JSX { ; -//// [tsxAttributeResolution7.jsx] +//// [file.jsx] // Error ; // OK diff --git a/tests/baselines/reference/tsxAttributeResolution8.js b/tests/baselines/reference/tsxAttributeResolution8.js index 50fff6c80fddc..e1b00c6b573e9 100644 --- a/tests/baselines/reference/tsxAttributeResolution8.js +++ b/tests/baselines/reference/tsxAttributeResolution8.js @@ -1,4 +1,4 @@ -//// [tsxAttributeResolution8.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -10,7 +10,7 @@ var x: any; // Should be OK -//// [tsxAttributeResolution8.jsx] +//// [file.jsx] var x; // Should be OK ; diff --git a/tests/baselines/reference/tsxAttributeResolution8.symbols b/tests/baselines/reference/tsxAttributeResolution8.symbols index 85db1985cc29e..58629c15b6f36 100644 --- a/tests/baselines/reference/tsxAttributeResolution8.symbols +++ b/tests/baselines/reference/tsxAttributeResolution8.symbols @@ -1,24 +1,24 @@ -=== tests/cases/conformance/jsx/tsxAttributeResolution8.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxAttributeResolution8.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxAttributeResolution8.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxAttributeResolution8.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) test1: {x: string}; ->test1 : Symbol(test1, Decl(tsxAttributeResolution8.tsx, 2, 30)) ->x : Symbol(x, Decl(tsxAttributeResolution8.tsx, 3, 10)) +>test1 : Symbol(test1, Decl(file.tsx, 2, 30)) +>x : Symbol(x, Decl(file.tsx, 3, 10)) } } var x: any; ->x : Symbol(x, Decl(tsxAttributeResolution8.tsx, 7, 3)) +>x : Symbol(x, Decl(file.tsx, 7, 3)) // Should be OK ->test1 : Symbol(JSX.IntrinsicElements.test1, Decl(tsxAttributeResolution8.tsx, 2, 30)) ->x : Symbol(x, Decl(tsxAttributeResolution8.tsx, 7, 3)) +>test1 : Symbol(JSX.IntrinsicElements.test1, Decl(file.tsx, 2, 30)) +>x : Symbol(x, Decl(file.tsx, 7, 3)) diff --git a/tests/baselines/reference/tsxAttributeResolution8.types b/tests/baselines/reference/tsxAttributeResolution8.types index db89d6678b669..99a60c24ce215 100644 --- a/tests/baselines/reference/tsxAttributeResolution8.types +++ b/tests/baselines/reference/tsxAttributeResolution8.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxAttributeResolution8.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxAttributeResolution9.js b/tests/baselines/reference/tsxAttributeResolution9.js index bfc19a7ba4f4c..3879372a6728d 100644 --- a/tests/baselines/reference/tsxAttributeResolution9.js +++ b/tests/baselines/reference/tsxAttributeResolution9.js @@ -29,6 +29,7 @@ export class MyComponent { //// [file.jsx] define(["require", "exports"], function (require, exports) { + "use strict"; var MyComponent = (function () { function MyComponent() { } diff --git a/tests/baselines/reference/tsxElementResolution1.errors.txt b/tests/baselines/reference/tsxElementResolution1.errors.txt index b54430bd106c8..0042c5b052c24 100644 --- a/tests/baselines/reference/tsxElementResolution1.errors.txt +++ b/tests/baselines/reference/tsxElementResolution1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxElementResolution1.tsx(12,1): error TS2339: Property 'span' does not exist on type 'JSX.IntrinsicElements'. +tests/cases/conformance/jsx/file.tsx(12,1): error TS2339: Property 'span' does not exist on type 'JSX.IntrinsicElements'. -==== tests/cases/conformance/jsx/tsxElementResolution1.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxElementResolution1.js b/tests/baselines/reference/tsxElementResolution1.js index c7e0536bde28e..47c60fba1b38a 100644 --- a/tests/baselines/reference/tsxElementResolution1.js +++ b/tests/baselines/reference/tsxElementResolution1.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution1.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -12,7 +12,7 @@ declare module JSX { // Fail ; -//// [tsxElementResolution1.jsx] +//// [file.jsx] // OK
; // Fail diff --git a/tests/baselines/reference/tsxElementResolution10.errors.txt b/tests/baselines/reference/tsxElementResolution10.errors.txt index 6dcee7d18fa8d..9214ffe7dbb3f 100644 --- a/tests/baselines/reference/tsxElementResolution10.errors.txt +++ b/tests/baselines/reference/tsxElementResolution10.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsx/tsxElementResolution10.tsx(13,1): error TS2605: JSX element type '{ x: number; }' is not a constructor function for JSX elements. +tests/cases/conformance/jsx/file.tsx(13,1): error TS2605: JSX element type '{ x: number; }' is not a constructor function for JSX elements. Property 'render' is missing in type '{ x: number; }'. -==== tests/cases/conformance/jsx/tsxElementResolution10.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface ElementClass { diff --git a/tests/baselines/reference/tsxElementResolution10.js b/tests/baselines/reference/tsxElementResolution10.js index 84c8619ab9635..72cd1cb9f0030 100644 --- a/tests/baselines/reference/tsxElementResolution10.js +++ b/tests/baselines/reference/tsxElementResolution10.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution10.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface ElementClass { @@ -20,7 +20,7 @@ var Obj2: Obj2type; ; // OK -//// [tsxElementResolution10.jsx] +//// [file.jsx] var Obj1; ; // Error, no render member var Obj2; diff --git a/tests/baselines/reference/tsxElementResolution11.errors.txt b/tests/baselines/reference/tsxElementResolution11.errors.txt index 4f3ee00d82f00..f6a4913e558e6 100644 --- a/tests/baselines/reference/tsxElementResolution11.errors.txt +++ b/tests/baselines/reference/tsxElementResolution11.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxElementResolution11.tsx(17,7): error TS2339: Property 'x' does not exist on type '{ q?: number; }'. +tests/cases/conformance/jsx/file.tsx(17,7): error TS2339: Property 'x' does not exist on type '{ q?: number; }'. -==== tests/cases/conformance/jsx/tsxElementResolution11.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface ElementAttributesProperty { } diff --git a/tests/baselines/reference/tsxElementResolution11.js b/tests/baselines/reference/tsxElementResolution11.js index fb8572116b16f..dfed67210ed14 100644 --- a/tests/baselines/reference/tsxElementResolution11.js +++ b/tests/baselines/reference/tsxElementResolution11.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution11.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface ElementAttributesProperty { } @@ -24,7 +24,7 @@ var Obj3: Obj3type; ; // OK -//// [tsxElementResolution11.jsx] +//// [file.jsx] var Obj1; ; // OK var Obj2; diff --git a/tests/baselines/reference/tsxElementResolution12.errors.txt b/tests/baselines/reference/tsxElementResolution12.errors.txt index 71a22b502aa34..4a15005f6fb72 100644 --- a/tests/baselines/reference/tsxElementResolution12.errors.txt +++ b/tests/baselines/reference/tsxElementResolution12.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/jsx/tsxElementResolution12.tsx(17,2): error TS2304: Cannot find name 'Obj2'. -tests/cases/conformance/jsx/tsxElementResolution12.tsx(23,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property -tests/cases/conformance/jsx/tsxElementResolution12.tsx(30,7): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/jsx/file.tsx(17,2): error TS2304: Cannot find name 'Obj2'. +tests/cases/conformance/jsx/file.tsx(23,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property +tests/cases/conformance/jsx/file.tsx(30,7): error TS2322: Type 'string' is not assignable to type 'number'. -==== tests/cases/conformance/jsx/tsxElementResolution12.tsx (3 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== declare module JSX { interface Element { } interface ElementAttributesProperty { pr: any; } diff --git a/tests/baselines/reference/tsxElementResolution12.js b/tests/baselines/reference/tsxElementResolution12.js index 12973efdda7a1..b4dd94ef0eb8b 100644 --- a/tests/baselines/reference/tsxElementResolution12.js +++ b/tests/baselines/reference/tsxElementResolution12.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution12.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface ElementAttributesProperty { pr: any; } @@ -31,7 +31,7 @@ var Obj4: Obj4type; ; // Error -//// [tsxElementResolution12.jsx] +//// [file.jsx] var Obj1; ; // OK var obj2; diff --git a/tests/baselines/reference/tsxElementResolution13.js b/tests/baselines/reference/tsxElementResolution13.js index f8631bdec0c2b..461c494bc5887 100644 --- a/tests/baselines/reference/tsxElementResolution13.js +++ b/tests/baselines/reference/tsxElementResolution13.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution13.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface ElementAttributesProperty { pr1: any; pr2: any; } @@ -11,6 +11,6 @@ var obj1: Obj1; ; // Error -//// [tsxElementResolution13.jsx] +//// [file.jsx] var obj1; ; // Error diff --git a/tests/baselines/reference/tsxElementResolution13.symbols b/tests/baselines/reference/tsxElementResolution13.symbols index 4022602e53a14..94758b291acaf 100644 --- a/tests/baselines/reference/tsxElementResolution13.symbols +++ b/tests/baselines/reference/tsxElementResolution13.symbols @@ -1,25 +1,25 @@ -=== tests/cases/conformance/jsx/tsxElementResolution13.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxElementResolution13.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxElementResolution13.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface ElementAttributesProperty { pr1: any; pr2: any; } ->ElementAttributesProperty : Symbol(ElementAttributesProperty, Decl(tsxElementResolution13.tsx, 1, 22)) ->pr1 : Symbol(pr1, Decl(tsxElementResolution13.tsx, 2, 38)) ->pr2 : Symbol(pr2, Decl(tsxElementResolution13.tsx, 2, 48)) +>ElementAttributesProperty : Symbol(ElementAttributesProperty, Decl(file.tsx, 1, 22)) +>pr1 : Symbol(pr1, Decl(file.tsx, 2, 38)) +>pr2 : Symbol(pr2, Decl(file.tsx, 2, 48)) } interface Obj1 { ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution13.tsx, 3, 1)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1)) new(n: string): any; ->n : Symbol(n, Decl(tsxElementResolution13.tsx, 6, 5)) +>n : Symbol(n, Decl(file.tsx, 6, 5)) } var obj1: Obj1; ->obj1 : Symbol(obj1, Decl(tsxElementResolution13.tsx, 8, 3)) ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution13.tsx, 3, 1)) +>obj1 : Symbol(obj1, Decl(file.tsx, 8, 3)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1)) ; // Error >x : Symbol(unknown) diff --git a/tests/baselines/reference/tsxElementResolution13.types b/tests/baselines/reference/tsxElementResolution13.types index 613835f32113e..57884f86b56db 100644 --- a/tests/baselines/reference/tsxElementResolution13.types +++ b/tests/baselines/reference/tsxElementResolution13.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxElementResolution13.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxElementResolution14.js b/tests/baselines/reference/tsxElementResolution14.js index e1e440db5f3bc..d594aba237bc9 100644 --- a/tests/baselines/reference/tsxElementResolution14.js +++ b/tests/baselines/reference/tsxElementResolution14.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution14.tsx] +//// [file.tsx] declare module JSX { interface Element { } } @@ -10,6 +10,6 @@ var obj1: Obj1; ; // OK -//// [tsxElementResolution14.jsx] +//// [file.jsx] var obj1; ; // OK diff --git a/tests/baselines/reference/tsxElementResolution14.symbols b/tests/baselines/reference/tsxElementResolution14.symbols index 58236a4e462f6..2400ef620ebc4 100644 --- a/tests/baselines/reference/tsxElementResolution14.symbols +++ b/tests/baselines/reference/tsxElementResolution14.symbols @@ -1,20 +1,20 @@ -=== tests/cases/conformance/jsx/tsxElementResolution14.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxElementResolution14.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxElementResolution14.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) } interface Obj1 { ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution14.tsx, 2, 1)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 2, 1)) new(n: string): {}; ->n : Symbol(n, Decl(tsxElementResolution14.tsx, 5, 5)) +>n : Symbol(n, Decl(file.tsx, 5, 5)) } var obj1: Obj1; ->obj1 : Symbol(obj1, Decl(tsxElementResolution14.tsx, 7, 3)) ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution14.tsx, 2, 1)) +>obj1 : Symbol(obj1, Decl(file.tsx, 7, 3)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 2, 1)) ; // OK >x : Symbol(unknown) diff --git a/tests/baselines/reference/tsxElementResolution14.types b/tests/baselines/reference/tsxElementResolution14.types index 80f9555030fc2..2768a6c531d0b 100644 --- a/tests/baselines/reference/tsxElementResolution14.types +++ b/tests/baselines/reference/tsxElementResolution14.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxElementResolution14.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxElementResolution15.errors.txt b/tests/baselines/reference/tsxElementResolution15.errors.txt index 24480ab7f2b41..79cbd1a37af11 100644 --- a/tests/baselines/reference/tsxElementResolution15.errors.txt +++ b/tests/baselines/reference/tsxElementResolution15.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxElementResolution15.tsx(3,12): error TS2608: The global type 'JSX.ElementAttributesProperty' may not have more than one property +tests/cases/conformance/jsx/file.tsx(3,12): error TS2608: The global type 'JSX.ElementAttributesProperty' may not have more than one property -==== tests/cases/conformance/jsx/tsxElementResolution15.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface ElementAttributesProperty { pr1: any; pr2: any; } diff --git a/tests/baselines/reference/tsxElementResolution15.js b/tests/baselines/reference/tsxElementResolution15.js index 831b3a54b413a..6c8560f225d9b 100644 --- a/tests/baselines/reference/tsxElementResolution15.js +++ b/tests/baselines/reference/tsxElementResolution15.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution15.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface ElementAttributesProperty { pr1: any; pr2: any; } @@ -12,6 +12,6 @@ var Obj1: Obj1type; ; // Error -//// [tsxElementResolution15.jsx] +//// [file.jsx] var Obj1; ; // Error diff --git a/tests/baselines/reference/tsxElementResolution16.errors.txt b/tests/baselines/reference/tsxElementResolution16.errors.txt index 0e30cad9673a0..1a887c3999577 100644 --- a/tests/baselines/reference/tsxElementResolution16.errors.txt +++ b/tests/baselines/reference/tsxElementResolution16.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsx/tsxElementResolution16.tsx(8,1): error TS2602: JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist. -tests/cases/conformance/jsx/tsxElementResolution16.tsx(8,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists +tests/cases/conformance/jsx/file.tsx(8,1): error TS2602: JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist. +tests/cases/conformance/jsx/file.tsx(8,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists -==== tests/cases/conformance/jsx/tsxElementResolution16.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== declare module JSX { } diff --git a/tests/baselines/reference/tsxElementResolution16.js b/tests/baselines/reference/tsxElementResolution16.js index 1961215fa05e2..a5abea6717fbb 100644 --- a/tests/baselines/reference/tsxElementResolution16.js +++ b/tests/baselines/reference/tsxElementResolution16.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution16.tsx] +//// [file.tsx] declare module JSX { } @@ -9,6 +9,6 @@ var obj1: Obj1; ; // Error (JSX.Element is implicit any) -//// [tsxElementResolution16.jsx] +//// [file.jsx] var obj1; ; // Error (JSX.Element is implicit any) diff --git a/tests/baselines/reference/tsxElementResolution17.js b/tests/baselines/reference/tsxElementResolution17.js index cd8d7e13beb2f..270c9254cbbbe 100644 --- a/tests/baselines/reference/tsxElementResolution17.js +++ b/tests/baselines/reference/tsxElementResolution17.js @@ -30,5 +30,6 @@ import s2 = require('elements2'); //// [file.jsx] //// [consumer.jsx] define(["require", "exports", 'elements1'], function (require, exports, s1) { + "use strict"; ; }); diff --git a/tests/baselines/reference/tsxElementResolution18.errors.txt b/tests/baselines/reference/tsxElementResolution18.errors.txt index a4728b2f749e5..5b8468696c019 100644 --- a/tests/baselines/reference/tsxElementResolution18.errors.txt +++ b/tests/baselines/reference/tsxElementResolution18.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxElementResolution18.tsx(6,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists +tests/cases/conformance/jsx/file1.tsx(6,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists -==== tests/cases/conformance/jsx/tsxElementResolution18.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file1.tsx (1 errors) ==== declare module JSX { interface Element { } } diff --git a/tests/baselines/reference/tsxElementResolution18.js b/tests/baselines/reference/tsxElementResolution18.js index 0b5138b7b4927..4481b9033f4c5 100644 --- a/tests/baselines/reference/tsxElementResolution18.js +++ b/tests/baselines/reference/tsxElementResolution18.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution18.tsx] +//// [file1.tsx] declare module JSX { interface Element { } } @@ -7,6 +7,6 @@ declare module JSX {
; -//// [tsxElementResolution18.jsx] +//// [file1.jsx] // Error under implicit any
; diff --git a/tests/baselines/reference/tsxElementResolution19.js b/tests/baselines/reference/tsxElementResolution19.js index 72612e8ce54fd..cb1a61dd59ffa 100644 --- a/tests/baselines/reference/tsxElementResolution19.js +++ b/tests/baselines/reference/tsxElementResolution19.js @@ -23,6 +23,7 @@ import {MyClass} from './file1'; //// [file1.js] define(["require", "exports"], function (require, exports) { + "use strict"; var MyClass = (function () { function MyClass() { } @@ -32,5 +33,6 @@ define(["require", "exports"], function (require, exports) { }); //// [file2.js] define(["require", "exports", 'react', './file1'], function (require, exports, React, file1_1) { + "use strict"; React.createElement(file1_1.MyClass, null); }); diff --git a/tests/baselines/reference/tsxElementResolution2.js b/tests/baselines/reference/tsxElementResolution2.js index 1d06656d529a5..c6934e9df899b 100644 --- a/tests/baselines/reference/tsxElementResolution2.js +++ b/tests/baselines/reference/tsxElementResolution2.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution2.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -12,7 +12,7 @@ declare module JSX { // OK ; -//// [tsxElementResolution2.jsx] +//// [file.jsx] // OK
; // OK diff --git a/tests/baselines/reference/tsxElementResolution2.symbols b/tests/baselines/reference/tsxElementResolution2.symbols index 2935bcd4f63d5..efb1d9ae5dcd7 100644 --- a/tests/baselines/reference/tsxElementResolution2.symbols +++ b/tests/baselines/reference/tsxElementResolution2.symbols @@ -1,23 +1,23 @@ -=== tests/cases/conformance/jsx/tsxElementResolution2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxElementResolution2.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxElementResolution2.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxElementResolution2.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [x: string]: any; ->x : Symbol(x, Decl(tsxElementResolution2.tsx, 3, 6)) +>x : Symbol(x, Decl(file.tsx, 3, 6)) } } // OK
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxElementResolution2.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // OK ; ->span : Symbol(JSX.IntrinsicElements, Decl(tsxElementResolution2.tsx, 1, 22)) +>span : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxElementResolution2.types b/tests/baselines/reference/tsxElementResolution2.types index 56ea51582539b..4fd87304a72d4 100644 --- a/tests/baselines/reference/tsxElementResolution2.types +++ b/tests/baselines/reference/tsxElementResolution2.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxElementResolution2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxElementResolution3.errors.txt b/tests/baselines/reference/tsxElementResolution3.errors.txt index bc3c7c5ebfc55..1b8b6c5834c15 100644 --- a/tests/baselines/reference/tsxElementResolution3.errors.txt +++ b/tests/baselines/reference/tsxElementResolution3.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsx/tsxElementResolution3.tsx(12,1): error TS2324: Property 'n' is missing in type '{ n: string; }'. -tests/cases/conformance/jsx/tsxElementResolution3.tsx(12,7): error TS2339: Property 'w' does not exist on type '{ n: string; }'. +tests/cases/conformance/jsx/file.tsx(12,1): error TS2324: Property 'n' is missing in type '{ n: string; }'. +tests/cases/conformance/jsx/file.tsx(12,7): error TS2339: Property 'w' does not exist on type '{ n: string; }'. -==== tests/cases/conformance/jsx/tsxElementResolution3.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxElementResolution3.js b/tests/baselines/reference/tsxElementResolution3.js index 607d1c5ec66fc..75b23db761e19 100644 --- a/tests/baselines/reference/tsxElementResolution3.js +++ b/tests/baselines/reference/tsxElementResolution3.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution3.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -12,7 +12,7 @@ declare module JSX { // Error ; -//// [tsxElementResolution3.jsx] +//// [file.jsx] // OK
; // Error diff --git a/tests/baselines/reference/tsxElementResolution4.errors.txt b/tests/baselines/reference/tsxElementResolution4.errors.txt index 0e383af5e7b13..e6dd599defc8d 100644 --- a/tests/baselines/reference/tsxElementResolution4.errors.txt +++ b/tests/baselines/reference/tsxElementResolution4.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsx/tsxElementResolution4.tsx(16,1): error TS2324: Property 'm' is missing in type '{ m: string; }'. -tests/cases/conformance/jsx/tsxElementResolution4.tsx(16,7): error TS2339: Property 'q' does not exist on type '{ m: string; }'. +tests/cases/conformance/jsx/file.tsx(16,1): error TS2324: Property 'm' is missing in type '{ m: string; }'. +tests/cases/conformance/jsx/file.tsx(16,7): error TS2339: Property 'q' does not exist on type '{ m: string; }'. -==== tests/cases/conformance/jsx/tsxElementResolution4.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxElementResolution4.js b/tests/baselines/reference/tsxElementResolution4.js index ea395cb507762..40d86816f7667 100644 --- a/tests/baselines/reference/tsxElementResolution4.js +++ b/tests/baselines/reference/tsxElementResolution4.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution4.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -17,7 +17,7 @@ declare module JSX { ; -//// [tsxElementResolution4.jsx] +//// [file.jsx] // OK
; // OK diff --git a/tests/baselines/reference/tsxElementResolution5.js b/tests/baselines/reference/tsxElementResolution5.js index 8aadfec0f782e..4dcd644e47164 100644 --- a/tests/baselines/reference/tsxElementResolution5.js +++ b/tests/baselines/reference/tsxElementResolution5.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution5.tsx] +//// [file1.tsx] declare module JSX { interface Element { } } @@ -7,6 +7,6 @@ declare module JSX {
; -//// [tsxElementResolution5.jsx] +//// [file1.jsx] // OK, but implicit any
; diff --git a/tests/baselines/reference/tsxElementResolution5.symbols b/tests/baselines/reference/tsxElementResolution5.symbols index 8bbbfaaeb689d..461ffd78aaa5c 100644 --- a/tests/baselines/reference/tsxElementResolution5.symbols +++ b/tests/baselines/reference/tsxElementResolution5.symbols @@ -1,9 +1,9 @@ -=== tests/cases/conformance/jsx/tsxElementResolution5.tsx === +=== tests/cases/conformance/jsx/file1.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxElementResolution5.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file1.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxElementResolution5.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file1.tsx, 0, 20)) } // OK, but implicit any diff --git a/tests/baselines/reference/tsxElementResolution5.types b/tests/baselines/reference/tsxElementResolution5.types index ba3509f4fa135..cdfb91c706728 100644 --- a/tests/baselines/reference/tsxElementResolution5.types +++ b/tests/baselines/reference/tsxElementResolution5.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxElementResolution5.tsx === +=== tests/cases/conformance/jsx/file1.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxElementResolution6.errors.txt b/tests/baselines/reference/tsxElementResolution6.errors.txt index 1336cc6df0c06..66269efee9f2d 100644 --- a/tests/baselines/reference/tsxElementResolution6.errors.txt +++ b/tests/baselines/reference/tsxElementResolution6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxElementResolution6.tsx(8,1): error TS2339: Property 'div' does not exist on type 'JSX.IntrinsicElements'. +tests/cases/conformance/jsx/file.tsx(8,1): error TS2339: Property 'div' does not exist on type 'JSX.IntrinsicElements'. -==== tests/cases/conformance/jsx/tsxElementResolution6.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { } diff --git a/tests/baselines/reference/tsxElementResolution6.js b/tests/baselines/reference/tsxElementResolution6.js index 1b6d174fea8b0..43d0512c893e1 100644 --- a/tests/baselines/reference/tsxElementResolution6.js +++ b/tests/baselines/reference/tsxElementResolution6.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution6.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { } @@ -9,7 +9,7 @@ var div: any;
; -//// [tsxElementResolution6.jsx] +//// [file.jsx] var div; // Still an error
; diff --git a/tests/baselines/reference/tsxElementResolution7.errors.txt b/tests/baselines/reference/tsxElementResolution7.errors.txt index b8549e19535ff..20b5b730d4cd6 100644 --- a/tests/baselines/reference/tsxElementResolution7.errors.txt +++ b/tests/baselines/reference/tsxElementResolution7.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsx/tsxElementResolution7.tsx(12,5): error TS2339: Property 'other' does not exist on type 'typeof my'. -tests/cases/conformance/jsx/tsxElementResolution7.tsx(19,11): error TS2339: Property 'non' does not exist on type 'typeof my'. +tests/cases/conformance/jsx/file.tsx(12,5): error TS2339: Property 'other' does not exist on type 'typeof my'. +tests/cases/conformance/jsx/file.tsx(19,11): error TS2339: Property 'non' does not exist on type 'typeof my'. -==== tests/cases/conformance/jsx/tsxElementResolution7.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { } diff --git a/tests/baselines/reference/tsxElementResolution7.js b/tests/baselines/reference/tsxElementResolution7.js index 7df44b052a214..06daf11ceac21 100644 --- a/tests/baselines/reference/tsxElementResolution7.js +++ b/tests/baselines/reference/tsxElementResolution7.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution7.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { } @@ -21,7 +21,7 @@ module q { } -//// [tsxElementResolution7.jsx] +//// [file.jsx] var my; (function (my) { })(my || (my = {})); diff --git a/tests/baselines/reference/tsxElementResolution8.errors.txt b/tests/baselines/reference/tsxElementResolution8.errors.txt index 92ff05d1aedb7..5f54bc23cd055 100644 --- a/tests/baselines/reference/tsxElementResolution8.errors.txt +++ b/tests/baselines/reference/tsxElementResolution8.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsx/tsxElementResolution8.tsx(8,2): error TS2604: JSX element type 'Div' does not have any construct or call signatures. -tests/cases/conformance/jsx/tsxElementResolution8.tsx(34,2): error TS2604: JSX element type 'Obj3' does not have any construct or call signatures. +tests/cases/conformance/jsx/file.tsx(8,2): error TS2604: JSX element type 'Div' does not have any construct or call signatures. +tests/cases/conformance/jsx/file.tsx(34,2): error TS2604: JSX element type 'Obj3' does not have any construct or call signatures. -==== tests/cases/conformance/jsx/tsxElementResolution8.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { } diff --git a/tests/baselines/reference/tsxElementResolution8.js b/tests/baselines/reference/tsxElementResolution8.js index 4217761c4025c..d82f26ee8b51a 100644 --- a/tests/baselines/reference/tsxElementResolution8.js +++ b/tests/baselines/reference/tsxElementResolution8.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution8.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { } @@ -35,7 +35,7 @@ var Obj3: Obj3; ; // Error -//// [tsxElementResolution8.jsx] +//// [file.jsx] // Error var Div = 3;
; diff --git a/tests/baselines/reference/tsxElementResolution9.js b/tests/baselines/reference/tsxElementResolution9.js index c897a51eaeb56..bc65bb0bb02d2 100644 --- a/tests/baselines/reference/tsxElementResolution9.js +++ b/tests/baselines/reference/tsxElementResolution9.js @@ -1,4 +1,4 @@ -//// [tsxElementResolution9.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { } @@ -26,7 +26,7 @@ var Obj3: Obj3; ; // OK -//// [tsxElementResolution9.jsx] +//// [file.jsx] var Obj1; ; // Error, return type is not an object type var Obj2; diff --git a/tests/baselines/reference/tsxElementResolution9.symbols b/tests/baselines/reference/tsxElementResolution9.symbols index bfa04219ef990..e38c64d084753 100644 --- a/tests/baselines/reference/tsxElementResolution9.symbols +++ b/tests/baselines/reference/tsxElementResolution9.symbols @@ -1,67 +1,67 @@ -=== tests/cases/conformance/jsx/tsxElementResolution9.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxElementResolution9.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxElementResolution9.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { } ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxElementResolution9.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) } interface Obj1 { ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution9.tsx, 3, 1), Decl(tsxElementResolution9.tsx, 9, 3)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1), Decl(file.tsx, 9, 3)) new(n: string): { x: number }; ->n : Symbol(n, Decl(tsxElementResolution9.tsx, 6, 5)) ->x : Symbol(x, Decl(tsxElementResolution9.tsx, 6, 18)) +>n : Symbol(n, Decl(file.tsx, 6, 5)) +>x : Symbol(x, Decl(file.tsx, 6, 18)) new(n: number): { y: string }; ->n : Symbol(n, Decl(tsxElementResolution9.tsx, 7, 5)) ->y : Symbol(y, Decl(tsxElementResolution9.tsx, 7, 18)) +>n : Symbol(n, Decl(file.tsx, 7, 5)) +>y : Symbol(y, Decl(file.tsx, 7, 18)) } var Obj1: Obj1; ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution9.tsx, 3, 1), Decl(tsxElementResolution9.tsx, 9, 3)) ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution9.tsx, 3, 1), Decl(tsxElementResolution9.tsx, 9, 3)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1), Decl(file.tsx, 9, 3)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1), Decl(file.tsx, 9, 3)) ; // Error, return type is not an object type ->Obj1 : Symbol(Obj1, Decl(tsxElementResolution9.tsx, 3, 1), Decl(tsxElementResolution9.tsx, 9, 3)) +>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1), Decl(file.tsx, 9, 3)) interface Obj2 { ->Obj2 : Symbol(Obj2, Decl(tsxElementResolution9.tsx, 10, 9), Decl(tsxElementResolution9.tsx, 16, 3)) +>Obj2 : Symbol(Obj2, Decl(file.tsx, 10, 9), Decl(file.tsx, 16, 3)) (n: string): { x: number }; ->n : Symbol(n, Decl(tsxElementResolution9.tsx, 13, 2)) ->x : Symbol(x, Decl(tsxElementResolution9.tsx, 13, 15)) +>n : Symbol(n, Decl(file.tsx, 13, 2)) +>x : Symbol(x, Decl(file.tsx, 13, 15)) (n: number): { y: string }; ->n : Symbol(n, Decl(tsxElementResolution9.tsx, 14, 2)) ->y : Symbol(y, Decl(tsxElementResolution9.tsx, 14, 15)) +>n : Symbol(n, Decl(file.tsx, 14, 2)) +>y : Symbol(y, Decl(file.tsx, 14, 15)) } var Obj2: Obj2; ->Obj2 : Symbol(Obj2, Decl(tsxElementResolution9.tsx, 10, 9), Decl(tsxElementResolution9.tsx, 16, 3)) ->Obj2 : Symbol(Obj2, Decl(tsxElementResolution9.tsx, 10, 9), Decl(tsxElementResolution9.tsx, 16, 3)) +>Obj2 : Symbol(Obj2, Decl(file.tsx, 10, 9), Decl(file.tsx, 16, 3)) +>Obj2 : Symbol(Obj2, Decl(file.tsx, 10, 9), Decl(file.tsx, 16, 3)) ; // Error, return type is not an object type ->Obj2 : Symbol(Obj2, Decl(tsxElementResolution9.tsx, 10, 9), Decl(tsxElementResolution9.tsx, 16, 3)) +>Obj2 : Symbol(Obj2, Decl(file.tsx, 10, 9), Decl(file.tsx, 16, 3)) interface Obj3 { ->Obj3 : Symbol(Obj3, Decl(tsxElementResolution9.tsx, 17, 9), Decl(tsxElementResolution9.tsx, 23, 3)) +>Obj3 : Symbol(Obj3, Decl(file.tsx, 17, 9), Decl(file.tsx, 23, 3)) (n: string): { x: number }; ->n : Symbol(n, Decl(tsxElementResolution9.tsx, 20, 2)) ->x : Symbol(x, Decl(tsxElementResolution9.tsx, 20, 15)) +>n : Symbol(n, Decl(file.tsx, 20, 2)) +>x : Symbol(x, Decl(file.tsx, 20, 15)) (n: number): { x: number; y: string }; ->n : Symbol(n, Decl(tsxElementResolution9.tsx, 21, 2)) ->x : Symbol(x, Decl(tsxElementResolution9.tsx, 21, 15)) ->y : Symbol(y, Decl(tsxElementResolution9.tsx, 21, 26)) +>n : Symbol(n, Decl(file.tsx, 21, 2)) +>x : Symbol(x, Decl(file.tsx, 21, 15)) +>y : Symbol(y, Decl(file.tsx, 21, 26)) } var Obj3: Obj3; ->Obj3 : Symbol(Obj3, Decl(tsxElementResolution9.tsx, 17, 9), Decl(tsxElementResolution9.tsx, 23, 3)) ->Obj3 : Symbol(Obj3, Decl(tsxElementResolution9.tsx, 17, 9), Decl(tsxElementResolution9.tsx, 23, 3)) +>Obj3 : Symbol(Obj3, Decl(file.tsx, 17, 9), Decl(file.tsx, 23, 3)) +>Obj3 : Symbol(Obj3, Decl(file.tsx, 17, 9), Decl(file.tsx, 23, 3)) ; // OK ->Obj3 : Symbol(Obj3, Decl(tsxElementResolution9.tsx, 17, 9), Decl(tsxElementResolution9.tsx, 23, 3)) +>Obj3 : Symbol(Obj3, Decl(file.tsx, 17, 9), Decl(file.tsx, 23, 3)) >x : Symbol(unknown) diff --git a/tests/baselines/reference/tsxElementResolution9.types b/tests/baselines/reference/tsxElementResolution9.types index 6725bd216bd33..dd84e6f07b5ff 100644 --- a/tests/baselines/reference/tsxElementResolution9.types +++ b/tests/baselines/reference/tsxElementResolution9.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxElementResolution9.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxEmit1.js b/tests/baselines/reference/tsxEmit1.js index baa75526dd775..bfa78a3e96c5e 100644 --- a/tests/baselines/reference/tsxEmit1.js +++ b/tests/baselines/reference/tsxEmit1.js @@ -1,4 +1,4 @@ -//// [tsxEmit1.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -40,7 +40,7 @@ var whitespace3 =
; -//// [tsxEmit1.jsx] +//// [file.jsx] var p; var selfClosed1 =
; var selfClosed2 =
; diff --git a/tests/baselines/reference/tsxEmit1.symbols b/tests/baselines/reference/tsxEmit1.symbols index aaca98ae9dbf3..9d373bc62bec2 100644 --- a/tests/baselines/reference/tsxEmit1.symbols +++ b/tests/baselines/reference/tsxEmit1.symbols @@ -1,163 +1,163 @@ -=== tests/cases/conformance/jsx/tsxEmit1.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxEmit1.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxEmit1.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxEmit1.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } var p; ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) var selfClosed1 =
; ->selfClosed1 : Symbol(selfClosed1, Decl(tsxEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed1 : Symbol(selfClosed1, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var selfClosed2 =
; ->selfClosed2 : Symbol(selfClosed2, Decl(tsxEmit1.tsx, 9, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed2 : Symbol(selfClosed2, Decl(file.tsx, 9, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) var selfClosed3 =
; ->selfClosed3 : Symbol(selfClosed3, Decl(tsxEmit1.tsx, 10, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed3 : Symbol(selfClosed3, Decl(file.tsx, 10, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) var selfClosed4 =
; ->selfClosed4 : Symbol(selfClosed4, Decl(tsxEmit1.tsx, 11, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed4 : Symbol(selfClosed4, Decl(file.tsx, 11, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) >y : Symbol(unknown) var selfClosed5 =
; ->selfClosed5 : Symbol(selfClosed5, Decl(tsxEmit1.tsx, 12, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed5 : Symbol(selfClosed5, Decl(file.tsx, 12, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) >y : Symbol(unknown) var selfClosed6 =
; ->selfClosed6 : Symbol(selfClosed6, Decl(tsxEmit1.tsx, 13, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed6 : Symbol(selfClosed6, Decl(file.tsx, 13, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) >y : Symbol(unknown) var selfClosed7 =
; ->selfClosed7 : Symbol(selfClosed7, Decl(tsxEmit1.tsx, 14, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>selfClosed7 : Symbol(selfClosed7, Decl(file.tsx, 14, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) >y : Symbol(unknown) var openClosed1 =
; ->openClosed1 : Symbol(openClosed1, Decl(tsxEmit1.tsx, 16, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>openClosed1 : Symbol(openClosed1, Decl(file.tsx, 16, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed2 =
foo
; ->openClosed2 : Symbol(openClosed2, Decl(tsxEmit1.tsx, 17, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>openClosed2 : Symbol(openClosed2, Decl(file.tsx, 17, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed3 =
{p}
; ->openClosed3 : Symbol(openClosed3, Decl(tsxEmit1.tsx, 18, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>openClosed3 : Symbol(openClosed3, Decl(file.tsx, 18, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed4 =
{p < p}
; ->openClosed4 : Symbol(openClosed4, Decl(tsxEmit1.tsx, 19, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>openClosed4 : Symbol(openClosed4, Decl(file.tsx, 19, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed5 =
{p > p}
; ->openClosed5 : Symbol(openClosed5, Decl(tsxEmit1.tsx, 20, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>openClosed5 : Symbol(openClosed5, Decl(file.tsx, 20, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) class SomeClass { ->SomeClass : Symbol(SomeClass, Decl(tsxEmit1.tsx, 20, 43)) +>SomeClass : Symbol(SomeClass, Decl(file.tsx, 20, 43)) f() { ->f : Symbol(f, Decl(tsxEmit1.tsx, 22, 17)) +>f : Symbol(f, Decl(file.tsx, 22, 17)) var rewrites1 =
{() => this}
; ->rewrites1 : Symbol(rewrites1, Decl(tsxEmit1.tsx, 24, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) ->this : Symbol(SomeClass, Decl(tsxEmit1.tsx, 20, 43)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>rewrites1 : Symbol(rewrites1, Decl(file.tsx, 24, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>this : Symbol(SomeClass, Decl(file.tsx, 20, 43)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites2 =
{[p, ...p, p]}
; ->rewrites2 : Symbol(rewrites2, Decl(tsxEmit1.tsx, 25, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>rewrites2 : Symbol(rewrites2, Decl(file.tsx, 25, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites3 =
{{p}}
; ->rewrites3 : Symbol(rewrites3, Decl(tsxEmit1.tsx, 26, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 26, 25)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>rewrites3 : Symbol(rewrites3, Decl(file.tsx, 26, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 26, 25)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites4 =
this}>
; ->rewrites4 : Symbol(rewrites4, Decl(tsxEmit1.tsx, 28, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>rewrites4 : Symbol(rewrites4, Decl(file.tsx, 28, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >a : Symbol(unknown) ->this : Symbol(SomeClass, Decl(tsxEmit1.tsx, 20, 43)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>this : Symbol(SomeClass, Decl(file.tsx, 20, 43)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites5 =
; ->rewrites5 : Symbol(rewrites5, Decl(tsxEmit1.tsx, 29, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>rewrites5 : Symbol(rewrites5, Decl(file.tsx, 29, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >a : Symbol(unknown) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites6 =
; ->rewrites6 : Symbol(rewrites6, Decl(tsxEmit1.tsx, 30, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>rewrites6 : Symbol(rewrites6, Decl(file.tsx, 30, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >a : Symbol(unknown) ->p : Symbol(p, Decl(tsxEmit1.tsx, 30, 27)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 30, 27)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) } } var whitespace1 =
; ->whitespace1 : Symbol(whitespace1, Decl(tsxEmit1.tsx, 34, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>whitespace1 : Symbol(whitespace1, Decl(file.tsx, 34, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var whitespace2 =
{p}
; ->whitespace2 : Symbol(whitespace2, Decl(tsxEmit1.tsx, 35, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>whitespace2 : Symbol(whitespace2, Decl(file.tsx, 35, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 7, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var whitespace3 =
->whitespace3 : Symbol(whitespace3, Decl(tsxEmit1.tsx, 36, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>whitespace3 : Symbol(whitespace3, Decl(file.tsx, 36, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) {p} ->p : Symbol(p, Decl(tsxEmit1.tsx, 7, 3)) +>p : Symbol(p, Decl(file.tsx, 7, 3))
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit1.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxEmit1.types b/tests/baselines/reference/tsxEmit1.types index c34896b08ade4..e6f92bebd1edf 100644 --- a/tests/baselines/reference/tsxEmit1.types +++ b/tests/baselines/reference/tsxEmit1.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxEmit1.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxEmit2.js b/tests/baselines/reference/tsxEmit2.js index 1101df49a1c43..66b1494e8256b 100644 --- a/tests/baselines/reference/tsxEmit2.js +++ b/tests/baselines/reference/tsxEmit2.js @@ -1,4 +1,4 @@ -//// [tsxEmit2.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -14,7 +14,7 @@ var spreads4 =
{p2}
; var spreads5 =
{p2}
; -//// [tsxEmit2.jsx] +//// [file.jsx] var p1, p2, p3; var spreads1 =
{p2}
; var spreads2 =
{p2}
; diff --git a/tests/baselines/reference/tsxEmit2.symbols b/tests/baselines/reference/tsxEmit2.symbols index 5da1b16ae44e6..13e45e454f176 100644 --- a/tests/baselines/reference/tsxEmit2.symbols +++ b/tests/baselines/reference/tsxEmit2.symbols @@ -1,63 +1,63 @@ -=== tests/cases/conformance/jsx/tsxEmit2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxEmit2.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxEmit2.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxEmit2.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } var p1, p2, p3; ->p1 : Symbol(p1, Decl(tsxEmit2.tsx, 7, 3)) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->p3 : Symbol(p3, Decl(tsxEmit2.tsx, 7, 11)) +>p1 : Symbol(p1, Decl(file.tsx, 7, 3)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>p3 : Symbol(p3, Decl(file.tsx, 7, 11)) var spreads1 =
{p2}
; ->spreads1 : Symbol(spreads1, Decl(tsxEmit2.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) ->p1 : Symbol(p1, Decl(tsxEmit2.tsx, 7, 3)) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>spreads1 : Symbol(spreads1, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p1 : Symbol(p1, Decl(file.tsx, 7, 3)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads2 =
{p2}
; ->spreads2 : Symbol(spreads2, Decl(tsxEmit2.tsx, 9, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) ->p1 : Symbol(p1, Decl(tsxEmit2.tsx, 7, 3)) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>spreads2 : Symbol(spreads2, Decl(file.tsx, 9, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p1 : Symbol(p1, Decl(file.tsx, 7, 3)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads3 =
{p2}
; ->spreads3 : Symbol(spreads3, Decl(tsxEmit2.tsx, 10, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>spreads3 : Symbol(spreads3, Decl(file.tsx, 10, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p3 : Symbol(p3, Decl(tsxEmit2.tsx, 7, 11)) ->p1 : Symbol(p1, Decl(tsxEmit2.tsx, 7, 3)) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>p3 : Symbol(p3, Decl(file.tsx, 7, 11)) +>p1 : Symbol(p1, Decl(file.tsx, 7, 3)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads4 =
{p2}
; ->spreads4 : Symbol(spreads4, Decl(tsxEmit2.tsx, 11, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) ->p1 : Symbol(p1, Decl(tsxEmit2.tsx, 7, 3)) +>spreads4 : Symbol(spreads4, Decl(file.tsx, 11, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p1 : Symbol(p1, Decl(file.tsx, 7, 3)) >x : Symbol(unknown) ->p3 : Symbol(p3, Decl(tsxEmit2.tsx, 7, 11)) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>p3 : Symbol(p3, Decl(file.tsx, 7, 11)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads5 =
{p2}
; ->spreads5 : Symbol(spreads5, Decl(tsxEmit2.tsx, 12, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>spreads5 : Symbol(spreads5, Decl(file.tsx, 12, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->p1 : Symbol(p1, Decl(tsxEmit2.tsx, 7, 3)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>p1 : Symbol(p1, Decl(file.tsx, 7, 3)) >y : Symbol(unknown) ->p3 : Symbol(p3, Decl(tsxEmit2.tsx, 7, 11)) ->p2 : Symbol(p2, Decl(tsxEmit2.tsx, 7, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxEmit2.tsx, 1, 22)) +>p3 : Symbol(p3, Decl(file.tsx, 7, 11)) +>p2 : Symbol(p2, Decl(file.tsx, 7, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxEmit2.types b/tests/baselines/reference/tsxEmit2.types index f5633b739e3b1..5b267d8b80262 100644 --- a/tests/baselines/reference/tsxEmit2.types +++ b/tests/baselines/reference/tsxEmit2.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxEmit2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxEmit3.js b/tests/baselines/reference/tsxEmit3.js index aa958a0c79b8d..ccb9041e9314a 100644 --- a/tests/baselines/reference/tsxEmit3.js +++ b/tests/baselines/reference/tsxEmit3.js @@ -1,4 +1,4 @@ -//// [tsxEmit3.tsx] +//// [file.tsx] declare module JSX { interface Element { } @@ -41,7 +41,7 @@ module M { } -//// [tsxEmit3.jsx] +//// [file.jsx] var M; (function (M) { var Foo = (function () { @@ -83,4 +83,4 @@ var M; // Emit M_1.Foo M_1.Foo, ; })(M || (M = {})); -//# sourceMappingURL=tsxEmit3.jsx.map \ No newline at end of file +//# sourceMappingURL=file.jsx.map \ No newline at end of file diff --git a/tests/baselines/reference/tsxEmit3.js.map b/tests/baselines/reference/tsxEmit3.js.map index 1f1ba0926a063..1a19c6b6bf39d 100644 --- a/tests/baselines/reference/tsxEmit3.js.map +++ b/tests/baselines/reference/tsxEmit3.js.map @@ -1,2 +1,2 @@ -//// [tsxEmit3.jsx.map] -{"version":3,"file":"tsxEmit3.jsx","sourceRoot":"","sources":["tsxEmit3.tsx"],"names":["M","M.Foo","M.Foo.constructor","M.S","M.S.Bar","M.S.Bar.constructor"],"mappings":"AAMA,IAAO,CAAC,CAQP;AARD,WAAO,CAAC,EAAC,CAAC;IACTA;QAAmBC;QAAgBC,CAACA;QAACD,UAACA;IAADA,CAACA,AAAtCD,IAAsCA;IAAzBA,KAAGA,MAAsBA,CAAAA;IACtCA,IAAcA,CAACA,CAKdA;IALDA,WAAcA,CAACA,EAACA,CAACA;QAChBG;YAAAC;YAAmBC,CAACA;YAADD,UAACA;QAADA,CAACA,AAApBD,IAAoBA;QAAPA,KAAGA,MAAIA,CAAAA;IAIrBA,CAACA,EALaH,CAACA,GAADA,GAACA,KAADA,GAACA,QAKdA;AACFA,CAACA,EARM,CAAC,KAAD,CAAC,QAQP;AAED,IAAO,CAAC,CAYP;AAZD,WAAO,CAAC,EAAC,CAAC;IACTA,aAAaA;IACbA,KAAGA,EAAEA,CAACA,KAAGA,GAAGA,CAACA;IAEbA,IAAcA,CAACA,CAMdA;IANDA,WAAcA,CAACA,EAACA,CAACA;QAChBG,aAAaA;QACbA,KAAGA,EAAEA,CAACA,KAAGA,GAAGA,CAACA;QAEbA,aAAaA;QACbA,KAAGA,EAAEA,CAACA,KAAGA,GAAGA,CAACA;IACdA,CAACA,EANaH,CAACA,GAADA,GAACA,KAADA,GAACA,QAMdA;AAEFA,CAACA,EAZM,CAAC,KAAD,CAAC,QAYP;AAED,IAAO,CAAC,CAGP;AAHD,WAAO,CAAC,EAAC,CAAC;IACTA,eAAeA;IACfA,GAACA,CAACA,GAAGA,EAAEA,CAACA,GAACA,CAACA,GAAGA,GAAGA,CAACA;AAClBA,CAACA,EAHM,CAAC,KAAD,CAAC,QAGP;AAED,IAAO,CAAC,CAIP;AAJD,WAAO,GAAC,EAAC,CAAC;IACTA,IAAIA,CAACA,GAAGA,GAAGA,CAACA;IACZA,eAAeA;IACfA,OAAGA,EAAEA,CAACA,OAAGA,GAAGA,CAACA;AACdA,CAACA,EAJM,CAAC,KAAD,CAAC,QAIP"} \ No newline at end of file +//// [file.jsx.map] +{"version":3,"file":"file.jsx","sourceRoot":"","sources":["file.tsx"],"names":[],"mappings":"AAMA,IAAO,CAAC,CAQP;AARD,WAAO,CAAC,EAAC,CAAC;IACT;QAAmB;QAAgB,CAAC;QAAC,UAAC;IAAD,CAAC,AAAtC,IAAsC;IAAzB,KAAG,MAAsB,CAAA;IACtC,IAAc,CAAC,CAKd;IALD,WAAc,CAAC,EAAC,CAAC;QAChB;YAAA;YAAmB,CAAC;YAAD,UAAC;QAAD,CAAC,AAApB,IAAoB;QAAP,KAAG,MAAI,CAAA;IAIrB,CAAC,EALa,CAAC,GAAD,GAAC,KAAD,GAAC,QAKd;AACF,CAAC,EARM,CAAC,KAAD,CAAC,QAQP;AAED,IAAO,CAAC,CAYP;AAZD,WAAO,CAAC,EAAC,CAAC;IACT,aAAa;IACb,KAAG,EAAE,CAAC,KAAG,GAAG,CAAC;IAEb,IAAc,CAAC,CAMd;IAND,WAAc,CAAC,EAAC,CAAC;QAChB,aAAa;QACb,KAAG,EAAE,CAAC,KAAG,GAAG,CAAC;QAEb,aAAa;QACb,KAAG,EAAE,CAAC,KAAG,GAAG,CAAC;IACd,CAAC,EANa,CAAC,GAAD,GAAC,KAAD,GAAC,QAMd;AAEF,CAAC,EAZM,CAAC,KAAD,CAAC,QAYP;AAED,IAAO,CAAC,CAGP;AAHD,WAAO,CAAC,EAAC,CAAC;IACT,eAAe;IACf,GAAC,CAAC,GAAG,EAAE,CAAC,GAAC,CAAC,GAAG,GAAG,CAAC;AAClB,CAAC,EAHM,CAAC,KAAD,CAAC,QAGP;AAED,IAAO,CAAC,CAIP;AAJD,WAAO,GAAC,EAAC,CAAC;IACT,IAAI,CAAC,GAAG,GAAG,CAAC;IACZ,eAAe;IACf,OAAG,EAAE,CAAC,OAAG,GAAG,CAAC;AACd,CAAC,EAJM,CAAC,KAAD,CAAC,QAIP"} \ No newline at end of file diff --git a/tests/baselines/reference/tsxEmit3.sourcemap.txt b/tests/baselines/reference/tsxEmit3.sourcemap.txt index 514be1e532d18..bf03147b689be 100644 --- a/tests/baselines/reference/tsxEmit3.sourcemap.txt +++ b/tests/baselines/reference/tsxEmit3.sourcemap.txt @@ -1,12 +1,12 @@ =================================================================== -JsFile: tsxEmit3.jsx -mapUrl: tsxEmit3.jsx.map +JsFile: file.jsx +mapUrl: file.jsx.map sourceRoot: -sources: tsxEmit3.tsx +sources: file.tsx =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/conformance/jsx/tsxEmit3.jsx -sourceFile:tsxEmit3.tsx +emittedFile:tests/cases/conformance/jsx/file.jsx +sourceFile:file.tsx ------------------------------------------------------------------- >>>var M; 1 > @@ -60,13 +60,13 @@ sourceFile:tsxEmit3.tsx 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(3, 5) Source(8, 2) + SourceIndex(0) name (M) +1->Emitted(3, 5) Source(8, 2) + SourceIndex(0) --- >>> function Foo() { 1->^^^^^^^^ 2 > ^^-> 1->export class Foo { -1->Emitted(4, 9) Source(8, 21) + SourceIndex(0) name (M.Foo) +1->Emitted(4, 9) Source(8, 21) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -74,16 +74,16 @@ sourceFile:tsxEmit3.tsx 3 > ^^^^^^^^^^^-> 1->constructor() { 2 > } -1->Emitted(5, 9) Source(8, 37) + SourceIndex(0) name (M.Foo.constructor) -2 >Emitted(5, 10) Source(8, 38) + SourceIndex(0) name (M.Foo.constructor) +1->Emitted(5, 9) Source(8, 37) + SourceIndex(0) +2 >Emitted(5, 10) Source(8, 38) + SourceIndex(0) --- >>> return Foo; 1->^^^^^^^^ 2 > ^^^^^^^^^^ 1-> 2 > } -1->Emitted(6, 9) Source(8, 39) + SourceIndex(0) name (M.Foo) -2 >Emitted(6, 19) Source(8, 40) + SourceIndex(0) name (M.Foo) +1->Emitted(6, 9) Source(8, 39) + SourceIndex(0) +2 >Emitted(6, 19) Source(8, 40) + SourceIndex(0) --- >>> })(); 1 >^^^^ @@ -95,10 +95,10 @@ sourceFile:tsxEmit3.tsx 2 > } 3 > 4 > export class Foo { constructor() { } } -1 >Emitted(7, 5) Source(8, 39) + SourceIndex(0) name (M.Foo) -2 >Emitted(7, 6) Source(8, 40) + SourceIndex(0) name (M.Foo) -3 >Emitted(7, 6) Source(8, 2) + SourceIndex(0) name (M) -4 >Emitted(7, 10) Source(8, 40) + SourceIndex(0) name (M) +1 >Emitted(7, 5) Source(8, 39) + SourceIndex(0) +2 >Emitted(7, 6) Source(8, 40) + SourceIndex(0) +3 >Emitted(7, 6) Source(8, 2) + SourceIndex(0) +4 >Emitted(7, 10) Source(8, 40) + SourceIndex(0) --- >>> M.Foo = Foo; 1->^^^^ @@ -109,10 +109,10 @@ sourceFile:tsxEmit3.tsx 2 > Foo 3 > { constructor() { } } 4 > -1->Emitted(8, 5) Source(8, 15) + SourceIndex(0) name (M) -2 >Emitted(8, 10) Source(8, 18) + SourceIndex(0) name (M) -3 >Emitted(8, 16) Source(8, 40) + SourceIndex(0) name (M) -4 >Emitted(8, 17) Source(8, 40) + SourceIndex(0) name (M) +1->Emitted(8, 5) Source(8, 15) + SourceIndex(0) +2 >Emitted(8, 10) Source(8, 18) + SourceIndex(0) +3 >Emitted(8, 16) Source(8, 40) + SourceIndex(0) +4 >Emitted(8, 17) Source(8, 40) + SourceIndex(0) --- >>> var S; 1 >^^^^ @@ -130,10 +130,10 @@ sourceFile:tsxEmit3.tsx > // Emit Foo > // Foo, ; > } -1 >Emitted(9, 5) Source(9, 2) + SourceIndex(0) name (M) -2 >Emitted(9, 9) Source(9, 16) + SourceIndex(0) name (M) -3 >Emitted(9, 10) Source(9, 17) + SourceIndex(0) name (M) -4 >Emitted(9, 11) Source(14, 3) + SourceIndex(0) name (M) +1 >Emitted(9, 5) Source(9, 2) + SourceIndex(0) +2 >Emitted(9, 9) Source(9, 16) + SourceIndex(0) +3 >Emitted(9, 10) Source(9, 17) + SourceIndex(0) +4 >Emitted(9, 11) Source(14, 3) + SourceIndex(0) --- >>> (function (S) { 1->^^^^ @@ -147,24 +147,24 @@ sourceFile:tsxEmit3.tsx 3 > S 4 > 5 > { -1->Emitted(10, 5) Source(9, 2) + SourceIndex(0) name (M) -2 >Emitted(10, 16) Source(9, 16) + SourceIndex(0) name (M) -3 >Emitted(10, 17) Source(9, 17) + SourceIndex(0) name (M) -4 >Emitted(10, 19) Source(9, 18) + SourceIndex(0) name (M) -5 >Emitted(10, 20) Source(9, 19) + SourceIndex(0) name (M) +1->Emitted(10, 5) Source(9, 2) + SourceIndex(0) +2 >Emitted(10, 16) Source(9, 16) + SourceIndex(0) +3 >Emitted(10, 17) Source(9, 17) + SourceIndex(0) +4 >Emitted(10, 19) Source(9, 18) + SourceIndex(0) +5 >Emitted(10, 20) Source(9, 19) + SourceIndex(0) --- >>> var Bar = (function () { 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(11, 9) Source(10, 3) + SourceIndex(0) name (M.S) +1->Emitted(11, 9) Source(10, 3) + SourceIndex(0) --- >>> function Bar() { 1->^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(12, 13) Source(10, 3) + SourceIndex(0) name (M.S.Bar) +1->Emitted(12, 13) Source(10, 3) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^ @@ -172,16 +172,16 @@ sourceFile:tsxEmit3.tsx 3 > ^^^^^^^^^^^-> 1->export class Bar { 2 > } -1->Emitted(13, 13) Source(10, 22) + SourceIndex(0) name (M.S.Bar.constructor) -2 >Emitted(13, 14) Source(10, 23) + SourceIndex(0) name (M.S.Bar.constructor) +1->Emitted(13, 13) Source(10, 22) + SourceIndex(0) +2 >Emitted(13, 14) Source(10, 23) + SourceIndex(0) --- >>> return Bar; 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^ 1-> 2 > } -1->Emitted(14, 13) Source(10, 22) + SourceIndex(0) name (M.S.Bar) -2 >Emitted(14, 23) Source(10, 23) + SourceIndex(0) name (M.S.Bar) +1->Emitted(14, 13) Source(10, 22) + SourceIndex(0) +2 >Emitted(14, 23) Source(10, 23) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^ @@ -193,10 +193,10 @@ sourceFile:tsxEmit3.tsx 2 > } 3 > 4 > export class Bar { } -1 >Emitted(15, 9) Source(10, 22) + SourceIndex(0) name (M.S.Bar) -2 >Emitted(15, 10) Source(10, 23) + SourceIndex(0) name (M.S.Bar) -3 >Emitted(15, 10) Source(10, 3) + SourceIndex(0) name (M.S) -4 >Emitted(15, 14) Source(10, 23) + SourceIndex(0) name (M.S) +1 >Emitted(15, 9) Source(10, 22) + SourceIndex(0) +2 >Emitted(15, 10) Source(10, 23) + SourceIndex(0) +3 >Emitted(15, 10) Source(10, 3) + SourceIndex(0) +4 >Emitted(15, 14) Source(10, 23) + SourceIndex(0) --- >>> S.Bar = Bar; 1->^^^^^^^^ @@ -208,10 +208,10 @@ sourceFile:tsxEmit3.tsx 2 > Bar 3 > { } 4 > -1->Emitted(16, 9) Source(10, 16) + SourceIndex(0) name (M.S) -2 >Emitted(16, 14) Source(10, 19) + SourceIndex(0) name (M.S) -3 >Emitted(16, 20) Source(10, 23) + SourceIndex(0) name (M.S) -4 >Emitted(16, 21) Source(10, 23) + SourceIndex(0) name (M.S) +1->Emitted(16, 9) Source(10, 16) + SourceIndex(0) +2 >Emitted(16, 14) Source(10, 19) + SourceIndex(0) +3 >Emitted(16, 20) Source(10, 23) + SourceIndex(0) +4 >Emitted(16, 21) Source(10, 23) + SourceIndex(0) --- >>> })(S = M.S || (M.S = {})); 1->^^^^ @@ -241,15 +241,15 @@ sourceFile:tsxEmit3.tsx > // Emit Foo > // Foo, ; > } -1->Emitted(17, 5) Source(14, 2) + SourceIndex(0) name (M.S) -2 >Emitted(17, 6) Source(14, 3) + SourceIndex(0) name (M.S) -3 >Emitted(17, 8) Source(9, 16) + SourceIndex(0) name (M) -4 >Emitted(17, 9) Source(9, 17) + SourceIndex(0) name (M) -5 >Emitted(17, 12) Source(9, 16) + SourceIndex(0) name (M) -6 >Emitted(17, 15) Source(9, 17) + SourceIndex(0) name (M) -7 >Emitted(17, 20) Source(9, 16) + SourceIndex(0) name (M) -8 >Emitted(17, 23) Source(9, 17) + SourceIndex(0) name (M) -9 >Emitted(17, 31) Source(14, 3) + SourceIndex(0) name (M) +1->Emitted(17, 5) Source(14, 2) + SourceIndex(0) +2 >Emitted(17, 6) Source(14, 3) + SourceIndex(0) +3 >Emitted(17, 8) Source(9, 16) + SourceIndex(0) +4 >Emitted(17, 9) Source(9, 17) + SourceIndex(0) +5 >Emitted(17, 12) Source(9, 16) + SourceIndex(0) +6 >Emitted(17, 15) Source(9, 17) + SourceIndex(0) +7 >Emitted(17, 20) Source(9, 16) + SourceIndex(0) +8 >Emitted(17, 23) Source(9, 17) + SourceIndex(0) +9 >Emitted(17, 31) Source(14, 3) + SourceIndex(0) --- >>>})(M || (M = {})); 1 > @@ -275,8 +275,8 @@ sourceFile:tsxEmit3.tsx > // Foo, ; > } > } -1 >Emitted(18, 1) Source(15, 1) + SourceIndex(0) name (M) -2 >Emitted(18, 2) Source(15, 2) + SourceIndex(0) name (M) +1 >Emitted(18, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(18, 2) Source(15, 2) + SourceIndex(0) 3 >Emitted(18, 4) Source(7, 8) + SourceIndex(0) 4 >Emitted(18, 5) Source(7, 9) + SourceIndex(0) 5 >Emitted(18, 10) Source(7, 8) + SourceIndex(0) @@ -337,8 +337,8 @@ sourceFile:tsxEmit3.tsx 1-> > 2 > // Emit M.Foo -1->Emitted(21, 5) Source(18, 2) + SourceIndex(0) name (M) -2 >Emitted(21, 18) Source(18, 15) + SourceIndex(0) name (M) +1->Emitted(21, 5) Source(18, 2) + SourceIndex(0) +2 >Emitted(21, 18) Source(18, 15) + SourceIndex(0) --- >>> M.Foo, ; 1->^^^^ @@ -356,13 +356,13 @@ sourceFile:tsxEmit3.tsx 5 > Foo 6 > /> 7 > ; -1->Emitted(22, 5) Source(19, 2) + SourceIndex(0) name (M) -2 >Emitted(22, 10) Source(19, 5) + SourceIndex(0) name (M) -3 >Emitted(22, 12) Source(19, 7) + SourceIndex(0) name (M) -4 >Emitted(22, 13) Source(19, 8) + SourceIndex(0) name (M) -5 >Emitted(22, 18) Source(19, 11) + SourceIndex(0) name (M) -6 >Emitted(22, 21) Source(19, 14) + SourceIndex(0) name (M) -7 >Emitted(22, 22) Source(19, 15) + SourceIndex(0) name (M) +1->Emitted(22, 5) Source(19, 2) + SourceIndex(0) +2 >Emitted(22, 10) Source(19, 5) + SourceIndex(0) +3 >Emitted(22, 12) Source(19, 7) + SourceIndex(0) +4 >Emitted(22, 13) Source(19, 8) + SourceIndex(0) +5 >Emitted(22, 18) Source(19, 11) + SourceIndex(0) +6 >Emitted(22, 21) Source(19, 14) + SourceIndex(0) +7 >Emitted(22, 22) Source(19, 15) + SourceIndex(0) --- >>> var S; 1 >^^^^ @@ -382,10 +382,10 @@ sourceFile:tsxEmit3.tsx > // Emit S.Bar > Bar, ; > } -1 >Emitted(23, 5) Source(21, 2) + SourceIndex(0) name (M) -2 >Emitted(23, 9) Source(21, 16) + SourceIndex(0) name (M) -3 >Emitted(23, 10) Source(21, 17) + SourceIndex(0) name (M) -4 >Emitted(23, 11) Source(27, 3) + SourceIndex(0) name (M) +1 >Emitted(23, 5) Source(21, 2) + SourceIndex(0) +2 >Emitted(23, 9) Source(21, 16) + SourceIndex(0) +3 >Emitted(23, 10) Source(21, 17) + SourceIndex(0) +4 >Emitted(23, 11) Source(27, 3) + SourceIndex(0) --- >>> (function (S) { 1->^^^^ @@ -399,11 +399,11 @@ sourceFile:tsxEmit3.tsx 3 > S 4 > 5 > { -1->Emitted(24, 5) Source(21, 2) + SourceIndex(0) name (M) -2 >Emitted(24, 16) Source(21, 16) + SourceIndex(0) name (M) -3 >Emitted(24, 17) Source(21, 17) + SourceIndex(0) name (M) -4 >Emitted(24, 19) Source(21, 18) + SourceIndex(0) name (M) -5 >Emitted(24, 20) Source(21, 19) + SourceIndex(0) name (M) +1->Emitted(24, 5) Source(21, 2) + SourceIndex(0) +2 >Emitted(24, 16) Source(21, 16) + SourceIndex(0) +3 >Emitted(24, 17) Source(21, 17) + SourceIndex(0) +4 >Emitted(24, 19) Source(21, 18) + SourceIndex(0) +5 >Emitted(24, 20) Source(21, 19) + SourceIndex(0) --- >>> // Emit M.Foo 1->^^^^^^^^ @@ -412,8 +412,8 @@ sourceFile:tsxEmit3.tsx 1-> > 2 > // Emit M.Foo -1->Emitted(25, 9) Source(22, 3) + SourceIndex(0) name (M.S) -2 >Emitted(25, 22) Source(22, 16) + SourceIndex(0) name (M.S) +1->Emitted(25, 9) Source(22, 3) + SourceIndex(0) +2 >Emitted(25, 22) Source(22, 16) + SourceIndex(0) --- >>> M.Foo, ; 1->^^^^^^^^ @@ -431,13 +431,13 @@ sourceFile:tsxEmit3.tsx 5 > Foo 6 > /> 7 > ; -1->Emitted(26, 9) Source(23, 3) + SourceIndex(0) name (M.S) -2 >Emitted(26, 14) Source(23, 6) + SourceIndex(0) name (M.S) -3 >Emitted(26, 16) Source(23, 8) + SourceIndex(0) name (M.S) -4 >Emitted(26, 17) Source(23, 9) + SourceIndex(0) name (M.S) -5 >Emitted(26, 22) Source(23, 12) + SourceIndex(0) name (M.S) -6 >Emitted(26, 25) Source(23, 15) + SourceIndex(0) name (M.S) -7 >Emitted(26, 26) Source(23, 16) + SourceIndex(0) name (M.S) +1->Emitted(26, 9) Source(23, 3) + SourceIndex(0) +2 >Emitted(26, 14) Source(23, 6) + SourceIndex(0) +3 >Emitted(26, 16) Source(23, 8) + SourceIndex(0) +4 >Emitted(26, 17) Source(23, 9) + SourceIndex(0) +5 >Emitted(26, 22) Source(23, 12) + SourceIndex(0) +6 >Emitted(26, 25) Source(23, 15) + SourceIndex(0) +7 >Emitted(26, 26) Source(23, 16) + SourceIndex(0) --- >>> // Emit S.Bar 1 >^^^^^^^^ @@ -447,8 +447,8 @@ sourceFile:tsxEmit3.tsx > > 2 > // Emit S.Bar -1 >Emitted(27, 9) Source(25, 3) + SourceIndex(0) name (M.S) -2 >Emitted(27, 22) Source(25, 16) + SourceIndex(0) name (M.S) +1 >Emitted(27, 9) Source(25, 3) + SourceIndex(0) +2 >Emitted(27, 22) Source(25, 16) + SourceIndex(0) --- >>> S.Bar, ; 1->^^^^^^^^ @@ -467,13 +467,13 @@ sourceFile:tsxEmit3.tsx 5 > Bar 6 > /> 7 > ; -1->Emitted(28, 9) Source(26, 3) + SourceIndex(0) name (M.S) -2 >Emitted(28, 14) Source(26, 6) + SourceIndex(0) name (M.S) -3 >Emitted(28, 16) Source(26, 8) + SourceIndex(0) name (M.S) -4 >Emitted(28, 17) Source(26, 9) + SourceIndex(0) name (M.S) -5 >Emitted(28, 22) Source(26, 12) + SourceIndex(0) name (M.S) -6 >Emitted(28, 25) Source(26, 15) + SourceIndex(0) name (M.S) -7 >Emitted(28, 26) Source(26, 16) + SourceIndex(0) name (M.S) +1->Emitted(28, 9) Source(26, 3) + SourceIndex(0) +2 >Emitted(28, 14) Source(26, 6) + SourceIndex(0) +3 >Emitted(28, 16) Source(26, 8) + SourceIndex(0) +4 >Emitted(28, 17) Source(26, 9) + SourceIndex(0) +5 >Emitted(28, 22) Source(26, 12) + SourceIndex(0) +6 >Emitted(28, 25) Source(26, 15) + SourceIndex(0) +7 >Emitted(28, 26) Source(26, 16) + SourceIndex(0) --- >>> })(S = M.S || (M.S = {})); 1->^^^^ @@ -501,15 +501,15 @@ sourceFile:tsxEmit3.tsx > // Emit S.Bar > Bar, ; > } -1->Emitted(29, 5) Source(27, 2) + SourceIndex(0) name (M.S) -2 >Emitted(29, 6) Source(27, 3) + SourceIndex(0) name (M.S) -3 >Emitted(29, 8) Source(21, 16) + SourceIndex(0) name (M) -4 >Emitted(29, 9) Source(21, 17) + SourceIndex(0) name (M) -5 >Emitted(29, 12) Source(21, 16) + SourceIndex(0) name (M) -6 >Emitted(29, 15) Source(21, 17) + SourceIndex(0) name (M) -7 >Emitted(29, 20) Source(21, 16) + SourceIndex(0) name (M) -8 >Emitted(29, 23) Source(21, 17) + SourceIndex(0) name (M) -9 >Emitted(29, 31) Source(27, 3) + SourceIndex(0) name (M) +1->Emitted(29, 5) Source(27, 2) + SourceIndex(0) +2 >Emitted(29, 6) Source(27, 3) + SourceIndex(0) +3 >Emitted(29, 8) Source(21, 16) + SourceIndex(0) +4 >Emitted(29, 9) Source(21, 17) + SourceIndex(0) +5 >Emitted(29, 12) Source(21, 16) + SourceIndex(0) +6 >Emitted(29, 15) Source(21, 17) + SourceIndex(0) +7 >Emitted(29, 20) Source(21, 16) + SourceIndex(0) +8 >Emitted(29, 23) Source(21, 17) + SourceIndex(0) +9 >Emitted(29, 31) Source(27, 3) + SourceIndex(0) --- >>>})(M || (M = {})); 1 > @@ -540,8 +540,8 @@ sourceFile:tsxEmit3.tsx > } > > } -1 >Emitted(30, 1) Source(29, 1) + SourceIndex(0) name (M) -2 >Emitted(30, 2) Source(29, 2) + SourceIndex(0) name (M) +1 >Emitted(30, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(30, 2) Source(29, 2) + SourceIndex(0) 3 >Emitted(30, 4) Source(17, 8) + SourceIndex(0) 4 >Emitted(30, 5) Source(17, 9) + SourceIndex(0) 5 >Emitted(30, 10) Source(17, 8) + SourceIndex(0) @@ -593,8 +593,8 @@ sourceFile:tsxEmit3.tsx 1-> > 2 > // Emit M.S.Bar -1->Emitted(33, 5) Source(32, 2) + SourceIndex(0) name (M) -2 >Emitted(33, 20) Source(32, 17) + SourceIndex(0) name (M) +1->Emitted(33, 5) Source(32, 2) + SourceIndex(0) +2 >Emitted(33, 20) Source(32, 17) + SourceIndex(0) --- >>> M.S.Bar, ; 1->^^^^ @@ -620,17 +620,17 @@ sourceFile:tsxEmit3.tsx 9 > Bar 10> /> 11> ; -1->Emitted(34, 5) Source(33, 2) + SourceIndex(0) name (M) -2 >Emitted(34, 8) Source(33, 3) + SourceIndex(0) name (M) -3 >Emitted(34, 9) Source(33, 4) + SourceIndex(0) name (M) -4 >Emitted(34, 12) Source(33, 7) + SourceIndex(0) name (M) -5 >Emitted(34, 14) Source(33, 9) + SourceIndex(0) name (M) -6 >Emitted(34, 15) Source(33, 10) + SourceIndex(0) name (M) -7 >Emitted(34, 18) Source(33, 11) + SourceIndex(0) name (M) -8 >Emitted(34, 19) Source(33, 12) + SourceIndex(0) name (M) -9 >Emitted(34, 22) Source(33, 15) + SourceIndex(0) name (M) -10>Emitted(34, 25) Source(33, 18) + SourceIndex(0) name (M) -11>Emitted(34, 26) Source(33, 19) + SourceIndex(0) name (M) +1->Emitted(34, 5) Source(33, 2) + SourceIndex(0) +2 >Emitted(34, 8) Source(33, 3) + SourceIndex(0) +3 >Emitted(34, 9) Source(33, 4) + SourceIndex(0) +4 >Emitted(34, 12) Source(33, 7) + SourceIndex(0) +5 >Emitted(34, 14) Source(33, 9) + SourceIndex(0) +6 >Emitted(34, 15) Source(33, 10) + SourceIndex(0) +7 >Emitted(34, 18) Source(33, 11) + SourceIndex(0) +8 >Emitted(34, 19) Source(33, 12) + SourceIndex(0) +9 >Emitted(34, 22) Source(33, 15) + SourceIndex(0) +10>Emitted(34, 25) Source(33, 18) + SourceIndex(0) +11>Emitted(34, 26) Source(33, 19) + SourceIndex(0) --- >>>})(M || (M = {})); 1 > @@ -651,8 +651,8 @@ sourceFile:tsxEmit3.tsx > // Emit M.S.Bar > S.Bar, ; > } -1 >Emitted(35, 1) Source(34, 1) + SourceIndex(0) name (M) -2 >Emitted(35, 2) Source(34, 2) + SourceIndex(0) name (M) +1 >Emitted(35, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(35, 2) Source(34, 2) + SourceIndex(0) 3 >Emitted(35, 4) Source(31, 8) + SourceIndex(0) 4 >Emitted(35, 5) Source(31, 9) + SourceIndex(0) 5 >Emitted(35, 10) Source(31, 8) + SourceIndex(0) @@ -712,12 +712,12 @@ sourceFile:tsxEmit3.tsx 4 > = 5 > 100 6 > ; -1 >Emitted(38, 5) Source(37, 2) + SourceIndex(0) name (M) -2 >Emitted(38, 9) Source(37, 6) + SourceIndex(0) name (M) -3 >Emitted(38, 10) Source(37, 7) + SourceIndex(0) name (M) -4 >Emitted(38, 13) Source(37, 10) + SourceIndex(0) name (M) -5 >Emitted(38, 16) Source(37, 13) + SourceIndex(0) name (M) -6 >Emitted(38, 17) Source(37, 14) + SourceIndex(0) name (M) +1 >Emitted(38, 5) Source(37, 2) + SourceIndex(0) +2 >Emitted(38, 9) Source(37, 6) + SourceIndex(0) +3 >Emitted(38, 10) Source(37, 7) + SourceIndex(0) +4 >Emitted(38, 13) Source(37, 10) + SourceIndex(0) +5 >Emitted(38, 16) Source(37, 13) + SourceIndex(0) +6 >Emitted(38, 17) Source(37, 14) + SourceIndex(0) --- >>> // Emit M_1.Foo 1->^^^^ @@ -726,8 +726,8 @@ sourceFile:tsxEmit3.tsx 1-> > 2 > // Emit M_1.Foo -1->Emitted(39, 5) Source(38, 2) + SourceIndex(0) name (M) -2 >Emitted(39, 20) Source(38, 17) + SourceIndex(0) name (M) +1->Emitted(39, 5) Source(38, 2) + SourceIndex(0) +2 >Emitted(39, 20) Source(38, 17) + SourceIndex(0) --- >>> M_1.Foo, ; 1->^^^^ @@ -745,13 +745,13 @@ sourceFile:tsxEmit3.tsx 5 > Foo 6 > /> 7 > ; -1->Emitted(40, 5) Source(39, 2) + SourceIndex(0) name (M) -2 >Emitted(40, 12) Source(39, 5) + SourceIndex(0) name (M) -3 >Emitted(40, 14) Source(39, 7) + SourceIndex(0) name (M) -4 >Emitted(40, 15) Source(39, 8) + SourceIndex(0) name (M) -5 >Emitted(40, 22) Source(39, 11) + SourceIndex(0) name (M) -6 >Emitted(40, 25) Source(39, 14) + SourceIndex(0) name (M) -7 >Emitted(40, 26) Source(39, 15) + SourceIndex(0) name (M) +1->Emitted(40, 5) Source(39, 2) + SourceIndex(0) +2 >Emitted(40, 12) Source(39, 5) + SourceIndex(0) +3 >Emitted(40, 14) Source(39, 7) + SourceIndex(0) +4 >Emitted(40, 15) Source(39, 8) + SourceIndex(0) +5 >Emitted(40, 22) Source(39, 11) + SourceIndex(0) +6 >Emitted(40, 25) Source(39, 14) + SourceIndex(0) +7 >Emitted(40, 26) Source(39, 15) + SourceIndex(0) --- >>>})(M || (M = {})); 1 > @@ -761,7 +761,7 @@ sourceFile:tsxEmit3.tsx 5 > ^^^^^ 6 > ^ 7 > ^^^^^^^^ -8 > ^^^^^^^^^^^^^^^^^^-> +8 > ^^^^^^^^^^^^^^-> 1 > > 2 >} @@ -774,12 +774,12 @@ sourceFile:tsxEmit3.tsx > // Emit M_1.Foo > Foo, ; > } -1 >Emitted(41, 1) Source(40, 1) + SourceIndex(0) name (M) -2 >Emitted(41, 2) Source(40, 2) + SourceIndex(0) name (M) +1 >Emitted(41, 1) Source(40, 1) + SourceIndex(0) +2 >Emitted(41, 2) Source(40, 2) + SourceIndex(0) 3 >Emitted(41, 4) Source(36, 8) + SourceIndex(0) 4 >Emitted(41, 5) Source(36, 9) + SourceIndex(0) 5 >Emitted(41, 10) Source(36, 8) + SourceIndex(0) 6 >Emitted(41, 11) Source(36, 9) + SourceIndex(0) 7 >Emitted(41, 19) Source(40, 2) + SourceIndex(0) --- ->>>//# sourceMappingURL=tsxEmit3.jsx.map \ No newline at end of file +>>>//# sourceMappingURL=file.jsx.map \ No newline at end of file diff --git a/tests/baselines/reference/tsxEmit3.symbols b/tests/baselines/reference/tsxEmit3.symbols index 64542d125b924..3b88d4e03719f 100644 --- a/tests/baselines/reference/tsxEmit3.symbols +++ b/tests/baselines/reference/tsxEmit3.symbols @@ -1,26 +1,26 @@ -=== tests/cases/conformance/jsx/tsxEmit3.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxEmit3.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxEmit3.tsx, 1, 20)) +>Element : Symbol(Element, Decl(file.tsx, 1, 20)) interface IntrinsicElements { } ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxEmit3.tsx, 2, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 2, 22)) } module M { ->M : Symbol(M, Decl(tsxEmit3.tsx, 4, 1), Decl(tsxEmit3.tsx, 14, 1), Decl(tsxEmit3.tsx, 28, 1), Decl(tsxEmit3.tsx, 33, 1)) +>M : Symbol(M, Decl(file.tsx, 4, 1), Decl(file.tsx, 14, 1), Decl(file.tsx, 28, 1), Decl(file.tsx, 33, 1)) export class Foo { constructor() { } } ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) export module S { ->S : Symbol(S, Decl(tsxEmit3.tsx, 7, 39), Decl(tsxEmit3.tsx, 18, 14)) +>S : Symbol(S, Decl(file.tsx, 7, 39), Decl(file.tsx, 18, 14)) export class Bar { } ->Bar : Symbol(Bar, Decl(tsxEmit3.tsx, 8, 18)) +>Bar : Symbol(Bar, Decl(file.tsx, 8, 18)) // Emit Foo // Foo, ; @@ -28,49 +28,49 @@ module M { } module M { ->M : Symbol(M, Decl(tsxEmit3.tsx, 4, 1), Decl(tsxEmit3.tsx, 14, 1), Decl(tsxEmit3.tsx, 28, 1), Decl(tsxEmit3.tsx, 33, 1)) +>M : Symbol(M, Decl(file.tsx, 4, 1), Decl(file.tsx, 14, 1), Decl(file.tsx, 28, 1), Decl(file.tsx, 33, 1)) // Emit M.Foo Foo, ; ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) export module S { ->S : Symbol(S, Decl(tsxEmit3.tsx, 7, 39), Decl(tsxEmit3.tsx, 18, 14)) +>S : Symbol(S, Decl(file.tsx, 7, 39), Decl(file.tsx, 18, 14)) // Emit M.Foo Foo, ; ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) // Emit S.Bar Bar, ; ->Bar : Symbol(Bar, Decl(tsxEmit3.tsx, 8, 18)) ->Bar : Symbol(Bar, Decl(tsxEmit3.tsx, 8, 18)) +>Bar : Symbol(Bar, Decl(file.tsx, 8, 18)) +>Bar : Symbol(Bar, Decl(file.tsx, 8, 18)) } } module M { ->M : Symbol(M, Decl(tsxEmit3.tsx, 4, 1), Decl(tsxEmit3.tsx, 14, 1), Decl(tsxEmit3.tsx, 28, 1), Decl(tsxEmit3.tsx, 33, 1)) +>M : Symbol(M, Decl(file.tsx, 4, 1), Decl(file.tsx, 14, 1), Decl(file.tsx, 28, 1), Decl(file.tsx, 33, 1)) // Emit M.S.Bar S.Bar, ; ->S.Bar : Symbol(S.Bar, Decl(tsxEmit3.tsx, 8, 18)) ->S : Symbol(S, Decl(tsxEmit3.tsx, 7, 39), Decl(tsxEmit3.tsx, 18, 14)) ->Bar : Symbol(S.Bar, Decl(tsxEmit3.tsx, 8, 18)) ->Bar : Symbol(S.Bar, Decl(tsxEmit3.tsx, 8, 18)) +>S.Bar : Symbol(S.Bar, Decl(file.tsx, 8, 18)) +>S : Symbol(S, Decl(file.tsx, 7, 39), Decl(file.tsx, 18, 14)) +>Bar : Symbol(S.Bar, Decl(file.tsx, 8, 18)) +>Bar : Symbol(S.Bar, Decl(file.tsx, 8, 18)) } module M { ->M : Symbol(M, Decl(tsxEmit3.tsx, 4, 1), Decl(tsxEmit3.tsx, 14, 1), Decl(tsxEmit3.tsx, 28, 1), Decl(tsxEmit3.tsx, 33, 1)) +>M : Symbol(M, Decl(file.tsx, 4, 1), Decl(file.tsx, 14, 1), Decl(file.tsx, 28, 1), Decl(file.tsx, 33, 1)) var M = 100; ->M : Symbol(M, Decl(tsxEmit3.tsx, 36, 4)) +>M : Symbol(M, Decl(file.tsx, 36, 4)) // Emit M_1.Foo Foo, ; ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) ->Foo : Symbol(Foo, Decl(tsxEmit3.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) +>Foo : Symbol(Foo, Decl(file.tsx, 6, 10)) } diff --git a/tests/baselines/reference/tsxEmit3.types b/tests/baselines/reference/tsxEmit3.types index f4db9a3f36fd6..49a5cf8a51b3f 100644 --- a/tests/baselines/reference/tsxEmit3.types +++ b/tests/baselines/reference/tsxEmit3.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxEmit3.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxErrorRecovery1.errors.txt b/tests/baselines/reference/tsxErrorRecovery1.errors.txt index 7aea986526b99..0937b0d37ac78 100644 --- a/tests/baselines/reference/tsxErrorRecovery1.errors.txt +++ b/tests/baselines/reference/tsxErrorRecovery1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/jsx/tsxErrorRecovery1.tsx(5,19): error TS1109: Expression expected. -tests/cases/conformance/jsx/tsxErrorRecovery1.tsx(8,11): error TS2304: Cannot find name 'a'. -tests/cases/conformance/jsx/tsxErrorRecovery1.tsx(8,12): error TS1005: '}' expected. -tests/cases/conformance/jsx/tsxErrorRecovery1.tsx(9,1): error TS17002: Expected corresponding JSX closing tag for 'div'. +tests/cases/conformance/jsx/file.tsx(5,19): error TS1109: Expression expected. +tests/cases/conformance/jsx/file.tsx(8,11): error TS2304: Cannot find name 'a'. +tests/cases/conformance/jsx/file.tsx(8,12): error TS1005: '}' expected. +tests/cases/conformance/jsx/file.tsx(9,1): error TS17002: Expected corresponding JSX closing tag for 'div'. -==== tests/cases/conformance/jsx/tsxErrorRecovery1.tsx (4 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (4 errors) ==== declare namespace JSX { interface Element { } } diff --git a/tests/baselines/reference/tsxErrorRecovery1.js b/tests/baselines/reference/tsxErrorRecovery1.js index 62db6b0f01242..6b9d2d5de47c0 100644 --- a/tests/baselines/reference/tsxErrorRecovery1.js +++ b/tests/baselines/reference/tsxErrorRecovery1.js @@ -1,4 +1,4 @@ -//// [tsxErrorRecovery1.tsx] +//// [file.tsx] declare namespace JSX { interface Element { } } @@ -9,7 +9,7 @@ function foo() { var y = { a: 1 }; -//// [tsxErrorRecovery1.jsx] +//// [file.jsx] function foo() { var x =
{}div> } diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 3e486eacef866..2830137f3b07b 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -32,6 +32,7 @@ export class Button extends React.Component { } //// [button.jsx] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } @@ -50,6 +51,7 @@ var Button = (function (_super) { })(React.Component); exports.Button = Button; //// [app.jsx] +"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/tsxExternalModuleEmit2.js b/tests/baselines/reference/tsxExternalModuleEmit2.js index f8fe609609092..2233c5181cbff 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit2.js +++ b/tests/baselines/reference/tsxExternalModuleEmit2.js @@ -18,8 +18,9 @@ declare var Foo, React; //// [app.js] +"use strict"; var mod_1 = require('mod'); // Should see mod_1['default'] in emit here -React.createElement(Foo, {"handler": mod_1["default"]}); +React.createElement(Foo, {handler: mod_1["default"]}); // Should see mod_1['default'] in emit here React.createElement(Foo, React.__spread({}, mod_1["default"])); diff --git a/tests/baselines/reference/tsxGenericArrowFunctionParsing.js b/tests/baselines/reference/tsxGenericArrowFunctionParsing.js index ece48831f8e7a..e77e832cb0af5 100644 --- a/tests/baselines/reference/tsxGenericArrowFunctionParsing.js +++ b/tests/baselines/reference/tsxGenericArrowFunctionParsing.js @@ -1,4 +1,4 @@ -//// [tsxGenericArrowFunctionParsing.tsx] +//// [file.tsx] declare module JSX { interface Element { isElement; } } @@ -27,7 +27,7 @@ x5.isElement; -//// [tsxGenericArrowFunctionParsing.jsx] +//// [file.jsx] var T, T1, T2; // This is an element var x1 = () => ; diff --git a/tests/baselines/reference/tsxGenericArrowFunctionParsing.symbols b/tests/baselines/reference/tsxGenericArrowFunctionParsing.symbols index 3bfd5505e766c..85dec56b2f832 100644 --- a/tests/baselines/reference/tsxGenericArrowFunctionParsing.symbols +++ b/tests/baselines/reference/tsxGenericArrowFunctionParsing.symbols @@ -1,67 +1,67 @@ -=== tests/cases/conformance/jsx/tsxGenericArrowFunctionParsing.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxGenericArrowFunctionParsing.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { isElement; } ->Element : Symbol(Element, Decl(tsxGenericArrowFunctionParsing.tsx, 0, 20)) ->isElement : Symbol(isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) +>isElement : Symbol(isElement, Decl(file.tsx, 1, 20)) } var T, T1, T2; ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) ->T1 : Symbol(T1, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 6)) ->T2 : Symbol(T2, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 10)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) +>T1 : Symbol(T1, Decl(file.tsx, 4, 6)) +>T2 : Symbol(T2, Decl(file.tsx, 4, 10)) // This is an element var x1 = () => {}; ->x1 : Symbol(x1, Decl(tsxGenericArrowFunctionParsing.tsx, 7, 3)) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) +>x1 : Symbol(x1, Decl(file.tsx, 7, 3)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) x1.isElement; ->x1.isElement : Symbol(JSX.Element.isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) ->x1 : Symbol(x1, Decl(tsxGenericArrowFunctionParsing.tsx, 7, 3)) ->isElement : Symbol(JSX.Element.isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) +>x1.isElement : Symbol(JSX.Element.isElement, Decl(file.tsx, 1, 20)) +>x1 : Symbol(x1, Decl(file.tsx, 7, 3)) +>isElement : Symbol(JSX.Element.isElement, Decl(file.tsx, 1, 20)) // This is a generic function var x2 = () => {}; ->x2 : Symbol(x2, Decl(tsxGenericArrowFunctionParsing.tsx, 11, 3)) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 11, 10)) +>x2 : Symbol(x2, Decl(file.tsx, 11, 3)) +>T : Symbol(T, Decl(file.tsx, 11, 10)) x2(); ->x2 : Symbol(x2, Decl(tsxGenericArrowFunctionParsing.tsx, 11, 3)) +>x2 : Symbol(x2, Decl(file.tsx, 11, 3)) // This is a generic function var x3 = () => {}; ->x3 : Symbol(x3, Decl(tsxGenericArrowFunctionParsing.tsx, 15, 3)) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 15, 10)) ->T1 : Symbol(T1, Decl(tsxGenericArrowFunctionParsing.tsx, 15, 12)) +>x3 : Symbol(x3, Decl(file.tsx, 15, 3)) +>T : Symbol(T, Decl(file.tsx, 15, 10)) +>T1 : Symbol(T1, Decl(file.tsx, 15, 12)) x3(); ->x3 : Symbol(x3, Decl(tsxGenericArrowFunctionParsing.tsx, 15, 3)) +>x3 : Symbol(x3, Decl(file.tsx, 15, 3)) // This is an element var x4 = () => {}; ->x4 : Symbol(x4, Decl(tsxGenericArrowFunctionParsing.tsx, 19, 3)) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) +>x4 : Symbol(x4, Decl(file.tsx, 19, 3)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) >extends : Symbol(unknown) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) x4.isElement; ->x4.isElement : Symbol(JSX.Element.isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) ->x4 : Symbol(x4, Decl(tsxGenericArrowFunctionParsing.tsx, 19, 3)) ->isElement : Symbol(JSX.Element.isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) +>x4.isElement : Symbol(JSX.Element.isElement, Decl(file.tsx, 1, 20)) +>x4 : Symbol(x4, Decl(file.tsx, 19, 3)) +>isElement : Symbol(JSX.Element.isElement, Decl(file.tsx, 1, 20)) // This is an element var x5 = () => {}; ->x5 : Symbol(x5, Decl(tsxGenericArrowFunctionParsing.tsx, 23, 3)) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) +>x5 : Symbol(x5, Decl(file.tsx, 23, 3)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) >extends : Symbol(unknown) ->T : Symbol(T, Decl(tsxGenericArrowFunctionParsing.tsx, 4, 3)) +>T : Symbol(T, Decl(file.tsx, 4, 3)) x5.isElement; ->x5.isElement : Symbol(JSX.Element.isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) ->x5 : Symbol(x5, Decl(tsxGenericArrowFunctionParsing.tsx, 23, 3)) ->isElement : Symbol(JSX.Element.isElement, Decl(tsxGenericArrowFunctionParsing.tsx, 1, 20)) +>x5.isElement : Symbol(JSX.Element.isElement, Decl(file.tsx, 1, 20)) +>x5 : Symbol(x5, Decl(file.tsx, 23, 3)) +>isElement : Symbol(JSX.Element.isElement, Decl(file.tsx, 1, 20)) diff --git a/tests/baselines/reference/tsxGenericArrowFunctionParsing.types b/tests/baselines/reference/tsxGenericArrowFunctionParsing.types index a7d98d35b640a..d5a9436872a83 100644 --- a/tests/baselines/reference/tsxGenericArrowFunctionParsing.types +++ b/tests/baselines/reference/tsxGenericArrowFunctionParsing.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxGenericArrowFunctionParsing.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxOpeningClosingNames.js b/tests/baselines/reference/tsxOpeningClosingNames.js index 80adad0f406dc..d704d43b5bab0 100644 --- a/tests/baselines/reference/tsxOpeningClosingNames.js +++ b/tests/baselines/reference/tsxOpeningClosingNames.js @@ -1,4 +1,4 @@ -//// [tsxOpeningClosingNames.tsx] +//// [file.tsx] declare module JSX { interface Element { } } @@ -10,5 +10,5 @@ declare module A.B.C { foo -//// [tsxOpeningClosingNames.jsx] +//// [file.jsx] foo; diff --git a/tests/baselines/reference/tsxOpeningClosingNames.symbols b/tests/baselines/reference/tsxOpeningClosingNames.symbols index e9734fb5ee1d9..08da0bf05fbd7 100644 --- a/tests/baselines/reference/tsxOpeningClosingNames.symbols +++ b/tests/baselines/reference/tsxOpeningClosingNames.symbols @@ -1,18 +1,18 @@ -=== tests/cases/conformance/jsx/tsxOpeningClosingNames.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxOpeningClosingNames.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxOpeningClosingNames.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) } declare module A.B.C { ->A : Symbol(A, Decl(tsxOpeningClosingNames.tsx, 2, 1)) ->B : Symbol(B, Decl(tsxOpeningClosingNames.tsx, 4, 17)) ->C : Symbol(C, Decl(tsxOpeningClosingNames.tsx, 4, 19)) +>A : Symbol(A, Decl(file.tsx, 2, 1)) +>B : Symbol(B, Decl(file.tsx, 4, 17)) +>C : Symbol(C, Decl(file.tsx, 4, 19)) var D: any; ->D : Symbol(D, Decl(tsxOpeningClosingNames.tsx, 5, 5)) +>D : Symbol(D, Decl(file.tsx, 5, 5)) } foo diff --git a/tests/baselines/reference/tsxOpeningClosingNames.types b/tests/baselines/reference/tsxOpeningClosingNames.types index b02564ae104a7..ac36205029e46 100644 --- a/tests/baselines/reference/tsxOpeningClosingNames.types +++ b/tests/baselines/reference/tsxOpeningClosingNames.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxOpeningClosingNames.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxParseTests1.js b/tests/baselines/reference/tsxParseTests1.js index 7ab98cab31441..c427a49cb0c31 100644 --- a/tests/baselines/reference/tsxParseTests1.js +++ b/tests/baselines/reference/tsxParseTests1.js @@ -1,4 +1,4 @@ -//// [tsxParseTests1.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { div; span; } @@ -7,5 +7,5 @@ declare module JSX { var x =
; -//// [tsxParseTests1.jsx] +//// [file.jsx] var x =
; diff --git a/tests/baselines/reference/tsxParseTests1.symbols b/tests/baselines/reference/tsxParseTests1.symbols index f7b179f254ffe..0ee595a9a3ddc 100644 --- a/tests/baselines/reference/tsxParseTests1.symbols +++ b/tests/baselines/reference/tsxParseTests1.symbols @@ -1,24 +1,24 @@ -=== tests/cases/conformance/jsx/tsxParseTests1.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxParseTests1.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxParseTests1.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { div; span; } ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxParseTests1.tsx, 1, 22)) ->div : Symbol(div, Decl(tsxParseTests1.tsx, 2, 30)) ->span : Symbol(span, Decl(tsxParseTests1.tsx, 2, 35)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(div, Decl(file.tsx, 2, 30)) +>span : Symbol(span, Decl(file.tsx, 2, 35)) } var x =
; ->x : Symbol(x, Decl(tsxParseTests1.tsx, 5, 3)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests1.tsx, 2, 30)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests1.tsx, 2, 30)) ->span : Symbol(JSX.IntrinsicElements.span, Decl(tsxParseTests1.tsx, 2, 35)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests1.tsx, 2, 30)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests1.tsx, 2, 30)) ->span : Symbol(JSX.IntrinsicElements.span, Decl(tsxParseTests1.tsx, 2, 35)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests1.tsx, 2, 30)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests1.tsx, 2, 30)) +>x : Symbol(x, Decl(file.tsx, 5, 3)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) +>span : Symbol(JSX.IntrinsicElements.span, Decl(file.tsx, 2, 35)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) +>span : Symbol(JSX.IntrinsicElements.span, Decl(file.tsx, 2, 35)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) diff --git a/tests/baselines/reference/tsxParseTests1.types b/tests/baselines/reference/tsxParseTests1.types index 78e49a227e224..375791fe4bbdb 100644 --- a/tests/baselines/reference/tsxParseTests1.types +++ b/tests/baselines/reference/tsxParseTests1.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxParseTests1.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxParseTests2.js b/tests/baselines/reference/tsxParseTests2.js index c179d75776a0a..b0cf54f8d1f02 100644 --- a/tests/baselines/reference/tsxParseTests2.js +++ b/tests/baselines/reference/tsxParseTests2.js @@ -1,4 +1,4 @@ -//// [tsxParseTests2.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { div; span; } @@ -7,5 +7,5 @@ declare module JSX { var x =
; -//// [tsxParseTests2.jsx] +//// [file.jsx] var x =
; diff --git a/tests/baselines/reference/tsxParseTests2.symbols b/tests/baselines/reference/tsxParseTests2.symbols index 17b612df78655..690bc183ddd9a 100644 --- a/tests/baselines/reference/tsxParseTests2.symbols +++ b/tests/baselines/reference/tsxParseTests2.symbols @@ -1,18 +1,18 @@ -=== tests/cases/conformance/jsx/tsxParseTests2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxParseTests2.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxParseTests2.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { div; span; } ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxParseTests2.tsx, 1, 22)) ->div : Symbol(div, Decl(tsxParseTests2.tsx, 2, 30)) ->span : Symbol(span, Decl(tsxParseTests2.tsx, 2, 35)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(div, Decl(file.tsx, 2, 30)) +>span : Symbol(span, Decl(file.tsx, 2, 35)) } var x =
; ->x : Symbol(x, Decl(tsxParseTests2.tsx, 5, 3)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests2.tsx, 2, 30)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(tsxParseTests2.tsx, 2, 30)) +>x : Symbol(x, Decl(file.tsx, 5, 3)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 2, 30)) diff --git a/tests/baselines/reference/tsxParseTests2.types b/tests/baselines/reference/tsxParseTests2.types index 5714a4d34834d..16a70a55f6a88 100644 --- a/tests/baselines/reference/tsxParseTests2.types +++ b/tests/baselines/reference/tsxParseTests2.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxParseTests2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxPreserveEmit1.js b/tests/baselines/reference/tsxPreserveEmit1.js index 80aeef6b29794..894d0c3d6981d 100644 --- a/tests/baselines/reference/tsxPreserveEmit1.js +++ b/tests/baselines/reference/tsxPreserveEmit1.js @@ -27,6 +27,7 @@ var routes = ; //// [test.jsx] define(["require", "exports", 'react-router'], function (require, exports, ReactRouter) { + "use strict"; var Route = ReactRouter.Route; var routes = ; }); diff --git a/tests/baselines/reference/tsxReactEmit1.js b/tests/baselines/reference/tsxReactEmit1.js index 260bd9cd22804..5b13c463bd6e2 100644 --- a/tests/baselines/reference/tsxReactEmit1.js +++ b/tests/baselines/reference/tsxReactEmit1.js @@ -1,4 +1,4 @@ -//// [tsxReactEmit1.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -41,7 +41,7 @@ var whitespace3 =
; -//// [tsxReactEmit1.js] +//// [file.js] var p; var selfClosed1 = React.createElement("div", null); var selfClosed2 = React.createElement("div", {x: "1"}); diff --git a/tests/baselines/reference/tsxReactEmit1.symbols b/tests/baselines/reference/tsxReactEmit1.symbols index 4149142dd8205..640f666c0d880 100644 --- a/tests/baselines/reference/tsxReactEmit1.symbols +++ b/tests/baselines/reference/tsxReactEmit1.symbols @@ -1,167 +1,167 @@ -=== tests/cases/conformance/jsx/tsxReactEmit1.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxReactEmit1.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxReactEmit1.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxReactEmit1.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } declare var React: any; ->React : Symbol(React, Decl(tsxReactEmit1.tsx, 6, 11)) +>React : Symbol(React, Decl(file.tsx, 6, 11)) var p; ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) var selfClosed1 =
; ->selfClosed1 : Symbol(selfClosed1, Decl(tsxReactEmit1.tsx, 9, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed1 : Symbol(selfClosed1, Decl(file.tsx, 9, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var selfClosed2 =
; ->selfClosed2 : Symbol(selfClosed2, Decl(tsxReactEmit1.tsx, 10, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed2 : Symbol(selfClosed2, Decl(file.tsx, 10, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) var selfClosed3 =
; ->selfClosed3 : Symbol(selfClosed3, Decl(tsxReactEmit1.tsx, 11, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed3 : Symbol(selfClosed3, Decl(file.tsx, 11, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) var selfClosed4 =
; ->selfClosed4 : Symbol(selfClosed4, Decl(tsxReactEmit1.tsx, 12, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed4 : Symbol(selfClosed4, Decl(file.tsx, 12, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) >y : Symbol(unknown) var selfClosed5 =
; ->selfClosed5 : Symbol(selfClosed5, Decl(tsxReactEmit1.tsx, 13, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed5 : Symbol(selfClosed5, Decl(file.tsx, 13, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) >y : Symbol(unknown) var selfClosed6 =
; ->selfClosed6 : Symbol(selfClosed6, Decl(tsxReactEmit1.tsx, 14, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed6 : Symbol(selfClosed6, Decl(file.tsx, 14, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) >y : Symbol(unknown) var selfClosed7 =
; ->selfClosed7 : Symbol(selfClosed7, Decl(tsxReactEmit1.tsx, 15, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>selfClosed7 : Symbol(selfClosed7, Decl(file.tsx, 15, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) >y : Symbol(unknown) >b : Symbol(unknown) var openClosed1 =
; ->openClosed1 : Symbol(openClosed1, Decl(tsxReactEmit1.tsx, 17, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>openClosed1 : Symbol(openClosed1, Decl(file.tsx, 17, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed2 =
foo
; ->openClosed2 : Symbol(openClosed2, Decl(tsxReactEmit1.tsx, 18, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>openClosed2 : Symbol(openClosed2, Decl(file.tsx, 18, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed3 =
{p}
; ->openClosed3 : Symbol(openClosed3, Decl(tsxReactEmit1.tsx, 19, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>openClosed3 : Symbol(openClosed3, Decl(file.tsx, 19, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed4 =
{p < p}
; ->openClosed4 : Symbol(openClosed4, Decl(tsxReactEmit1.tsx, 20, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>openClosed4 : Symbol(openClosed4, Decl(file.tsx, 20, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var openClosed5 =
{p > p}
; ->openClosed5 : Symbol(openClosed5, Decl(tsxReactEmit1.tsx, 21, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>openClosed5 : Symbol(openClosed5, Decl(file.tsx, 21, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >n : Symbol(unknown) >b : Symbol(unknown) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) class SomeClass { ->SomeClass : Symbol(SomeClass, Decl(tsxReactEmit1.tsx, 21, 45)) +>SomeClass : Symbol(SomeClass, Decl(file.tsx, 21, 45)) f() { ->f : Symbol(f, Decl(tsxReactEmit1.tsx, 23, 17)) +>f : Symbol(f, Decl(file.tsx, 23, 17)) var rewrites1 =
{() => this}
; ->rewrites1 : Symbol(rewrites1, Decl(tsxReactEmit1.tsx, 25, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) ->this : Symbol(SomeClass, Decl(tsxReactEmit1.tsx, 21, 45)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>rewrites1 : Symbol(rewrites1, Decl(file.tsx, 25, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>this : Symbol(SomeClass, Decl(file.tsx, 21, 45)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites2 =
{[p, ...p, p]}
; ->rewrites2 : Symbol(rewrites2, Decl(tsxReactEmit1.tsx, 26, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>rewrites2 : Symbol(rewrites2, Decl(file.tsx, 26, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites3 =
{{p}}
; ->rewrites3 : Symbol(rewrites3, Decl(tsxReactEmit1.tsx, 27, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 27, 25)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>rewrites3 : Symbol(rewrites3, Decl(file.tsx, 27, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 27, 25)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites4 =
this}>
; ->rewrites4 : Symbol(rewrites4, Decl(tsxReactEmit1.tsx, 29, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>rewrites4 : Symbol(rewrites4, Decl(file.tsx, 29, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >a : Symbol(unknown) ->this : Symbol(SomeClass, Decl(tsxReactEmit1.tsx, 21, 45)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>this : Symbol(SomeClass, Decl(file.tsx, 21, 45)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites5 =
; ->rewrites5 : Symbol(rewrites5, Decl(tsxReactEmit1.tsx, 30, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>rewrites5 : Symbol(rewrites5, Decl(file.tsx, 30, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >a : Symbol(unknown) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var rewrites6 =
; ->rewrites6 : Symbol(rewrites6, Decl(tsxReactEmit1.tsx, 31, 5)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>rewrites6 : Symbol(rewrites6, Decl(file.tsx, 31, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >a : Symbol(unknown) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 31, 27)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 31, 27)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) } } var whitespace1 =
; ->whitespace1 : Symbol(whitespace1, Decl(tsxReactEmit1.tsx, 35, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>whitespace1 : Symbol(whitespace1, Decl(file.tsx, 35, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var whitespace2 =
{p}
; ->whitespace2 : Symbol(whitespace2, Decl(tsxReactEmit1.tsx, 36, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>whitespace2 : Symbol(whitespace2, Decl(file.tsx, 36, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 8, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var whitespace3 =
->whitespace3 : Symbol(whitespace3, Decl(tsxReactEmit1.tsx, 37, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>whitespace3 : Symbol(whitespace3, Decl(file.tsx, 37, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) {p} ->p : Symbol(p, Decl(tsxReactEmit1.tsx, 8, 3)) +>p : Symbol(p, Decl(file.tsx, 8, 3))
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit1.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxReactEmit1.types b/tests/baselines/reference/tsxReactEmit1.types index 4afe4be01dcc1..d837eb007bfa7 100644 --- a/tests/baselines/reference/tsxReactEmit1.types +++ b/tests/baselines/reference/tsxReactEmit1.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxReactEmit1.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxReactEmit2.js b/tests/baselines/reference/tsxReactEmit2.js index 4b2b46955617d..fd7fff1697628 100644 --- a/tests/baselines/reference/tsxReactEmit2.js +++ b/tests/baselines/reference/tsxReactEmit2.js @@ -1,4 +1,4 @@ -//// [tsxReactEmit2.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -15,7 +15,7 @@ var spreads4 =
{p2}
; var spreads5 =
{p2}
; -//// [tsxReactEmit2.js] +//// [file.js] var p1, p2, p3; var spreads1 = React.createElement("div", React.__spread({}, p1), p2); var spreads2 = React.createElement("div", React.__spread({}, p1), p2); diff --git a/tests/baselines/reference/tsxReactEmit2.symbols b/tests/baselines/reference/tsxReactEmit2.symbols index 051f7588f25a8..68f33a11f091f 100644 --- a/tests/baselines/reference/tsxReactEmit2.symbols +++ b/tests/baselines/reference/tsxReactEmit2.symbols @@ -1,65 +1,65 @@ -=== tests/cases/conformance/jsx/tsxReactEmit2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxReactEmit2.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxReactEmit2.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxReactEmit2.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } declare var React: any; ->React : Symbol(React, Decl(tsxReactEmit2.tsx, 6, 11)) +>React : Symbol(React, Decl(file.tsx, 6, 11)) var p1, p2, p3; ->p1 : Symbol(p1, Decl(tsxReactEmit2.tsx, 8, 3)) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->p3 : Symbol(p3, Decl(tsxReactEmit2.tsx, 8, 11)) +>p1 : Symbol(p1, Decl(file.tsx, 8, 3)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>p3 : Symbol(p3, Decl(file.tsx, 8, 11)) var spreads1 =
{p2}
; ->spreads1 : Symbol(spreads1, Decl(tsxReactEmit2.tsx, 9, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) ->p1 : Symbol(p1, Decl(tsxReactEmit2.tsx, 8, 3)) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>spreads1 : Symbol(spreads1, Decl(file.tsx, 9, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p1 : Symbol(p1, Decl(file.tsx, 8, 3)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads2 =
{p2}
; ->spreads2 : Symbol(spreads2, Decl(tsxReactEmit2.tsx, 10, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) ->p1 : Symbol(p1, Decl(tsxReactEmit2.tsx, 8, 3)) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>spreads2 : Symbol(spreads2, Decl(file.tsx, 10, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p1 : Symbol(p1, Decl(file.tsx, 8, 3)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads3 =
{p2}
; ->spreads3 : Symbol(spreads3, Decl(tsxReactEmit2.tsx, 11, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>spreads3 : Symbol(spreads3, Decl(file.tsx, 11, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p3 : Symbol(p3, Decl(tsxReactEmit2.tsx, 8, 11)) ->p1 : Symbol(p1, Decl(tsxReactEmit2.tsx, 8, 3)) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>p3 : Symbol(p3, Decl(file.tsx, 8, 11)) +>p1 : Symbol(p1, Decl(file.tsx, 8, 3)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads4 =
{p2}
; ->spreads4 : Symbol(spreads4, Decl(tsxReactEmit2.tsx, 12, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) ->p1 : Symbol(p1, Decl(tsxReactEmit2.tsx, 8, 3)) +>spreads4 : Symbol(spreads4, Decl(file.tsx, 12, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p1 : Symbol(p1, Decl(file.tsx, 8, 3)) >x : Symbol(unknown) ->p3 : Symbol(p3, Decl(tsxReactEmit2.tsx, 8, 11)) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>p3 : Symbol(p3, Decl(file.tsx, 8, 11)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) var spreads5 =
{p2}
; ->spreads5 : Symbol(spreads5, Decl(tsxReactEmit2.tsx, 13, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>spreads5 : Symbol(spreads5, Decl(file.tsx, 13, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) >x : Symbol(unknown) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->p1 : Symbol(p1, Decl(tsxReactEmit2.tsx, 8, 3)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>p1 : Symbol(p1, Decl(file.tsx, 8, 3)) >y : Symbol(unknown) ->p3 : Symbol(p3, Decl(tsxReactEmit2.tsx, 8, 11)) ->p2 : Symbol(p2, Decl(tsxReactEmit2.tsx, 8, 7)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmit2.tsx, 1, 22)) +>p3 : Symbol(p3, Decl(file.tsx, 8, 11)) +>p2 : Symbol(p2, Decl(file.tsx, 8, 7)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxReactEmit2.types b/tests/baselines/reference/tsxReactEmit2.types index e28910b62c7b1..928eeecadfac9 100644 --- a/tests/baselines/reference/tsxReactEmit2.types +++ b/tests/baselines/reference/tsxReactEmit2.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxReactEmit2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxReactEmit3.js b/tests/baselines/reference/tsxReactEmit3.js index 239105485342e..bd42177e18728 100644 --- a/tests/baselines/reference/tsxReactEmit3.js +++ b/tests/baselines/reference/tsxReactEmit3.js @@ -1,4 +1,4 @@ -//// [tsxReactEmit3.tsx] +//// [test.tsx] declare module JSX { interface Element { } } declare var React: any; @@ -7,5 +7,5 @@ declare var Foo, Bar, baz; q s ; -//// [tsxReactEmit3.js] +//// [test.js] React.createElement(Foo, null, " ", React.createElement(Bar, null, " q "), " ", React.createElement(Bar, null), " s ", React.createElement(Bar, null), React.createElement(Bar, null)); diff --git a/tests/baselines/reference/tsxReactEmit3.symbols b/tests/baselines/reference/tsxReactEmit3.symbols index 042488cf04cf2..cec45805c1e70 100644 --- a/tests/baselines/reference/tsxReactEmit3.symbols +++ b/tests/baselines/reference/tsxReactEmit3.symbols @@ -1,23 +1,23 @@ -=== tests/cases/conformance/jsx/tsxReactEmit3.tsx === +=== tests/cases/conformance/jsx/test.tsx === declare module JSX { interface Element { } } ->JSX : Symbol(JSX, Decl(tsxReactEmit3.tsx, 0, 0)) ->Element : Symbol(Element, Decl(tsxReactEmit3.tsx, 1, 20)) +>JSX : Symbol(JSX, Decl(test.tsx, 0, 0)) +>Element : Symbol(Element, Decl(test.tsx, 1, 20)) declare var React: any; ->React : Symbol(React, Decl(tsxReactEmit3.tsx, 2, 11)) +>React : Symbol(React, Decl(test.tsx, 2, 11)) declare var Foo, Bar, baz; ->Foo : Symbol(Foo, Decl(tsxReactEmit3.tsx, 4, 11)) ->Bar : Symbol(Bar, Decl(tsxReactEmit3.tsx, 4, 16)) ->baz : Symbol(baz, Decl(tsxReactEmit3.tsx, 4, 21)) +>Foo : Symbol(Foo, Decl(test.tsx, 4, 11)) +>Bar : Symbol(Bar, Decl(test.tsx, 4, 16)) +>baz : Symbol(baz, Decl(test.tsx, 4, 21)) q s ; ->Foo : Symbol(Foo, Decl(tsxReactEmit3.tsx, 4, 11)) ->Bar : Symbol(Bar, Decl(tsxReactEmit3.tsx, 4, 16)) ->Bar : Symbol(Bar, Decl(tsxReactEmit3.tsx, 4, 16)) ->Bar : Symbol(Bar, Decl(tsxReactEmit3.tsx, 4, 16)) ->Bar : Symbol(Bar, Decl(tsxReactEmit3.tsx, 4, 16)) ->Bar : Symbol(Bar, Decl(tsxReactEmit3.tsx, 4, 16)) ->Foo : Symbol(Foo, Decl(tsxReactEmit3.tsx, 4, 11)) +>Foo : Symbol(Foo, Decl(test.tsx, 4, 11)) +>Bar : Symbol(Bar, Decl(test.tsx, 4, 16)) +>Bar : Symbol(Bar, Decl(test.tsx, 4, 16)) +>Bar : Symbol(Bar, Decl(test.tsx, 4, 16)) +>Bar : Symbol(Bar, Decl(test.tsx, 4, 16)) +>Bar : Symbol(Bar, Decl(test.tsx, 4, 16)) +>Foo : Symbol(Foo, Decl(test.tsx, 4, 11)) diff --git a/tests/baselines/reference/tsxReactEmit3.types b/tests/baselines/reference/tsxReactEmit3.types index 8babe724fa17a..8416ec015b273 100644 --- a/tests/baselines/reference/tsxReactEmit3.types +++ b/tests/baselines/reference/tsxReactEmit3.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxReactEmit3.tsx === +=== tests/cases/conformance/jsx/test.tsx === declare module JSX { interface Element { } } >JSX : any diff --git a/tests/baselines/reference/tsxReactEmit4.errors.txt b/tests/baselines/reference/tsxReactEmit4.errors.txt index fca2b02823746..23578d4ed91a4 100644 --- a/tests/baselines/reference/tsxReactEmit4.errors.txt +++ b/tests/baselines/reference/tsxReactEmit4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/tsxReactEmit4.tsx(12,5): error TS2304: Cannot find name 'blah'. +tests/cases/conformance/jsx/file.tsx(12,5): error TS2304: Cannot find name 'blah'. -==== tests/cases/conformance/jsx/tsxReactEmit4.tsx (1 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== declare module JSX { interface Element { } interface IntrinsicElements { diff --git a/tests/baselines/reference/tsxReactEmit4.js b/tests/baselines/reference/tsxReactEmit4.js index dcbfafcef2f2b..d61cea24d2cf0 100644 --- a/tests/baselines/reference/tsxReactEmit4.js +++ b/tests/baselines/reference/tsxReactEmit4.js @@ -1,4 +1,4 @@ -//// [tsxReactEmit4.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -17,7 +17,7 @@ var openClosed1 =
// Should emit React.__spread({}, p, {x: 0}) var spread1 =
; -//// [tsxReactEmit4.js] +//// [file.js] var p; var openClosed1 = React.createElement("div", null, blah); // Should emit React.__spread({}, p, {x: 0}) diff --git a/tests/baselines/reference/tsxReactEmit5.js b/tests/baselines/reference/tsxReactEmit5.js index f6a7eeb72a16b..06b05f67d636e 100644 --- a/tests/baselines/reference/tsxReactEmit5.js +++ b/tests/baselines/reference/tsxReactEmit5.js @@ -22,6 +22,7 @@ var spread1 =
; //// [file.js] //// [react-consumer.js] +"use strict"; var test_1 = require("./test"); // Should emit test_1.React.createElement // and React.__spread diff --git a/tests/baselines/reference/tsxReactEmit7.errors.txt b/tests/baselines/reference/tsxReactEmit7.errors.txt new file mode 100644 index 0000000000000..d151c2e349cde --- /dev/null +++ b/tests/baselines/reference/tsxReactEmit7.errors.txt @@ -0,0 +1,50 @@ +tests/cases/conformance/jsx/file.tsx(9,10): error TS2304: Cannot find name 'React'. +tests/cases/conformance/jsx/file.tsx(10,10): error TS2304: Cannot find name 'React'. +tests/cases/conformance/jsx/file.tsx(11,10): error TS2304: Cannot find name 'React'. +tests/cases/conformance/jsx/file.tsx(12,10): error TS2304: Cannot find name 'React'. +tests/cases/conformance/jsx/file.tsx(15,10): error TS2304: Cannot find name 'React'. +tests/cases/conformance/jsx/file.tsx(16,10): error TS2304: Cannot find name 'React'. +tests/cases/conformance/jsx/file.tsx(17,10): error TS2304: Cannot find name 'React'. +tests/cases/conformance/jsx/file.tsx(18,10): error TS2304: Cannot find name 'React'. +tests/cases/conformance/jsx/file.tsx(19,10): error TS2304: Cannot find name 'React'. + + +==== tests/cases/conformance/jsx/file.tsx (9 errors) ==== + + declare module JSX { + interface Element { } + interface IntrinsicElements { + [s: string]: any; + } + } + + var m =
; + ~~~ +!!! error TS2304: Cannot find name 'React'. + var n =
; + ~~~ +!!! error TS2304: Cannot find name 'React'. + var o =
; + ~~~ +!!! error TS2304: Cannot find name 'React'. + var p =
; + ~~~ +!!! error TS2304: Cannot find name 'React'. + + // Investigation + var a =
; + ~~~ +!!! error TS2304: Cannot find name 'React'. + var b =
; + ~~~ +!!! error TS2304: Cannot find name 'React'. + var c =
; + ~~~ +!!! error TS2304: Cannot find name 'React'. + var d =
; + ~~~ +!!! error TS2304: Cannot find name 'React'. + var e =
; + ~~~ +!!! error TS2304: Cannot find name 'React'. + \ No newline at end of file diff --git a/tests/baselines/reference/tsxReactEmit7.js b/tests/baselines/reference/tsxReactEmit7.js new file mode 100644 index 0000000000000..44d28c2dd9c1e --- /dev/null +++ b/tests/baselines/reference/tsxReactEmit7.js @@ -0,0 +1,33 @@ +//// [file.tsx] + +declare module JSX { + interface Element { } + interface IntrinsicElements { + [s: string]: any; + } +} + +var m =
; +var n =
; +var o =
; +var p =
; + +// Investigation +var a =
; +var b =
; +var c =
; +var d =
; +var e =
; + + +//// [file.js] +var m = React.createElement("div", {"x-y": "val"}); +var n = React.createElement("div", {"xx-y": "val"}); +var o = React.createElement("div", {"x-yy": "val"}); +var p = React.createElement("div", {"xx-yy": "val"}); +// Investigation +var a = React.createElement("div", {x: "val"}); +var b = React.createElement("div", {xx: "val"}); +var c = React.createElement("div", {xxx: "val"}); +var d = React.createElement("div", {xxxx: "val"}); +var e = React.createElement("div", {xxxxx: "val"}); diff --git a/tests/baselines/reference/tsxReactEmitEntities.js b/tests/baselines/reference/tsxReactEmitEntities.js index 7517c85fc7370..c1fba50fd8fee 100644 --- a/tests/baselines/reference/tsxReactEmitEntities.js +++ b/tests/baselines/reference/tsxReactEmitEntities.js @@ -1,4 +1,4 @@ -//// [tsxReactEmitEntities.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -10,5 +10,5 @@ declare var React: any;
Dot goes here: · ¬AnEntity;
; -//// [tsxReactEmitEntities.js] +//// [file.js] React.createElement("div", null, "Dot goes here: · ¬AnEntity; "); diff --git a/tests/baselines/reference/tsxReactEmitEntities.symbols b/tests/baselines/reference/tsxReactEmitEntities.symbols index 7de35241a3a13..b633f57ec1333 100644 --- a/tests/baselines/reference/tsxReactEmitEntities.symbols +++ b/tests/baselines/reference/tsxReactEmitEntities.symbols @@ -1,21 +1,21 @@ -=== tests/cases/conformance/jsx/tsxReactEmitEntities.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxReactEmitEntities.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxReactEmitEntities.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxReactEmitEntities.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxReactEmitEntities.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } declare var React: any; ->React : Symbol(React, Decl(tsxReactEmitEntities.tsx, 6, 11)) +>React : Symbol(React, Decl(file.tsx, 6, 11))
Dot goes here: · ¬AnEntity;
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitEntities.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitEntities.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxReactEmitEntities.types b/tests/baselines/reference/tsxReactEmitEntities.types index e1c9cb6e6bfbf..d6d6c285d7954 100644 --- a/tests/baselines/reference/tsxReactEmitEntities.types +++ b/tests/baselines/reference/tsxReactEmitEntities.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxReactEmitEntities.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxReactEmitWhitespace.js b/tests/baselines/reference/tsxReactEmitWhitespace.js index a1b5894106fc9..9614cbf2f2cf4 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace.js +++ b/tests/baselines/reference/tsxReactEmitWhitespace.js @@ -1,4 +1,4 @@ -//// [tsxReactEmitWhitespace.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -52,7 +52,7 @@ var p = 0; -//// [tsxReactEmitWhitespace.js] +//// [file.js] // THIS FILE HAS TEST-SIGNIFICANT LEADING/TRAILING // WHITESPACE, DO NOT RUN 'FORMAT DOCUMENT' ON IT var p = 0; diff --git a/tests/baselines/reference/tsxReactEmitWhitespace.symbols b/tests/baselines/reference/tsxReactEmitWhitespace.symbols index 3aa3f0d0f8adb..a0d8266faa0e1 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace.symbols +++ b/tests/baselines/reference/tsxReactEmitWhitespace.symbols @@ -1,93 +1,93 @@ -=== tests/cases/conformance/jsx/tsxReactEmitWhitespace.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxReactEmitWhitespace.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxReactEmitWhitespace.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxReactEmitWhitespace.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } declare var React: any; ->React : Symbol(React, Decl(tsxReactEmitWhitespace.tsx, 6, 11)) +>React : Symbol(React, Decl(file.tsx, 6, 11)) // THIS FILE HAS TEST-SIGNIFICANT LEADING/TRAILING // WHITESPACE, DO NOT RUN 'FORMAT DOCUMENT' ON IT var p = 0; ->p : Symbol(p, Decl(tsxReactEmitWhitespace.tsx, 11, 3)) +>p : Symbol(p, Decl(file.tsx, 11, 3)) // Emit " "
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit " ", p, " "
{p}
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) ->p : Symbol(p, Decl(tsxReactEmitWhitespace.tsx, 11, 3)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>p : Symbol(p, Decl(file.tsx, 11, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit only p
->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) {p} ->p : Symbol(p, Decl(tsxReactEmitWhitespace.tsx, 11, 3)) +>p : Symbol(p, Decl(file.tsx, 11, 3))
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit only p
->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) {p} ->p : Symbol(p, Decl(tsxReactEmitWhitespace.tsx, 11, 3)) +>p : Symbol(p, Decl(file.tsx, 11, 3))
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit " 3"
3 ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit " 3 "
3
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit "3"
->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) 3
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit no args
->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Emit "foo" + ' ' + "bar"
->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) foo bar
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxReactEmitWhitespace.types b/tests/baselines/reference/tsxReactEmitWhitespace.types index 4622aef19917e..824aa5cfdae99 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace.types +++ b/tests/baselines/reference/tsxReactEmitWhitespace.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxReactEmitWhitespace.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/tsxReactEmitWhitespace2.js b/tests/baselines/reference/tsxReactEmitWhitespace2.js index 091a193cdc5c1..f649ca43ebd4b 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace2.js +++ b/tests/baselines/reference/tsxReactEmitWhitespace2.js @@ -1,4 +1,4 @@ -//// [tsxReactEmitWhitespace2.tsx] +//// [file.tsx] declare module JSX { interface Element { } interface IntrinsicElements { @@ -16,7 +16,7 @@ declare var React: any; -//// [tsxReactEmitWhitespace2.js] +//// [file.js] // Emit ' word' in the last string React.createElement("div", null, "word ", React.createElement("code", null, "code"), " word"); // Same here diff --git a/tests/baselines/reference/tsxReactEmitWhitespace2.symbols b/tests/baselines/reference/tsxReactEmitWhitespace2.symbols index 44ff4cba292e5..a79445c28afa0 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace2.symbols +++ b/tests/baselines/reference/tsxReactEmitWhitespace2.symbols @@ -1,38 +1,38 @@ -=== tests/cases/conformance/jsx/tsxReactEmitWhitespace2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { ->JSX : Symbol(JSX, Decl(tsxReactEmitWhitespace2.tsx, 0, 0)) +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) interface Element { } ->Element : Symbol(Element, Decl(tsxReactEmitWhitespace2.tsx, 0, 20)) +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) [s: string]: any; ->s : Symbol(s, Decl(tsxReactEmitWhitespace2.tsx, 3, 3)) +>s : Symbol(s, Decl(file.tsx, 3, 3)) } } declare var React: any; ->React : Symbol(React, Decl(tsxReactEmitWhitespace2.tsx, 6, 11)) +>React : Symbol(React, Decl(file.tsx, 6, 11)) // Emit ' word' in the last string
word code word
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->code : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->code : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>code : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>code : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // Same here
code word
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->code : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->code : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>code : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>code : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) // And here
word
; ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->code : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) ->div : Symbol(JSX.IntrinsicElements, Decl(tsxReactEmitWhitespace2.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>code : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) diff --git a/tests/baselines/reference/tsxReactEmitWhitespace2.types b/tests/baselines/reference/tsxReactEmitWhitespace2.types index 7287e59b9b15f..73c65f50aca54 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace2.types +++ b/tests/baselines/reference/tsxReactEmitWhitespace2.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/jsx/tsxReactEmitWhitespace2.tsx === +=== tests/cases/conformance/jsx/file.tsx === declare module JSX { >JSX : any diff --git a/tests/baselines/reference/typeAliasDeclarationEmit.js b/tests/baselines/reference/typeAliasDeclarationEmit.js index 6e82fe4b07da3..1f72e1d1b008f 100644 --- a/tests/baselines/reference/typeAliasDeclarationEmit.js +++ b/tests/baselines/reference/typeAliasDeclarationEmit.js @@ -6,6 +6,7 @@ export type CallbackArray = () => T; //// [typeAliasDeclarationEmit.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/typeAliasDeclarationEmit2.js b/tests/baselines/reference/typeAliasDeclarationEmit2.js index 4bb1bd3efd9d7..b94eb56a2a288 100644 --- a/tests/baselines/reference/typeAliasDeclarationEmit2.js +++ b/tests/baselines/reference/typeAliasDeclarationEmit2.js @@ -4,6 +4,7 @@ export type A = { value: a }; //// [typeAliasDeclarationEmit2.js] define(["require", "exports"], function (require, exports) { + "use strict"; }); diff --git a/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.errors.txt b/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.errors.txt new file mode 100644 index 0000000000000..49f17e7891de1 --- /dev/null +++ b/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.errors.txt @@ -0,0 +1,212 @@ +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(4,18): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(37,25): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(38,25): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(39,25): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(40,25): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(41,25): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(44,30): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello" | "World"'. + Type 'string' is not assignable to type '"World"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(45,30): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello" | "World"'. + Type 'string' is not assignable to type '"World"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(46,30): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello" | "World"'. + Type 'string' is not assignable to type '"World"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(47,30): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello" | "World"'. + Type 'string' is not assignable to type '"World"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(48,30): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello" | "World"'. + Type 'string' is not assignable to type '"World"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(55,43): error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(57,52): error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(58,43): error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(61,5): error TS2322: Type 'string' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(63,5): error TS2322: Type 'string' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(75,5): error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. + Type '"World"' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(77,5): error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. + Type '"World"' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(87,43): error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(88,43): error TS2345: Argument of type '"Hello"' is not assignable to parameter of type '"World"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(89,52): error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(93,5): error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. + Type 'string' is not assignable to type '"World"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(97,5): error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. + Type 'string' is not assignable to type '"World"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(100,25): error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. + Type '"World"' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(104,25): error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. + Type '"World"' is not assignable to type '"Hello"'. + + +==== tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts (25 errors) ==== + + declare function randBool(): boolean; + declare function takeReturnString(str: string): string; + declare function takeReturnHello(str: "Hello"): "Hello"; + ~~~~~~~~~~~~~~~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + declare function takeReturnHelloWorld(str: "Hello" | "World"): "Hello" | "World"; + + function fun1(x: T, y: T) { + return randBool() ? x : y; + } + + function fun2(x: T, y: U) { + return randBool() ? x : y; + } + + function fun3(...args: T[]): T { + return args[+randBool()]; + } + + namespace n1 { + // The following should all come back as strings. + // They should be assignable to/from something of a type 'string'. + // They should not be assignable to either "Hello" or "World". + export let a = fun1("Hello", "World"); + export let b = fun1("Hello", "Hello"); + export let c = fun2("Hello", "World"); + export let d = fun2("Hello", "Hello"); + export let e = fun3("Hello", "Hello", "World", "Foo"); + + // Should be valid + a = takeReturnString(a); + b = takeReturnString(b); + c = takeReturnString(c); + d = takeReturnString(d); + e = takeReturnString(e); + + // Passing these as arguments should cause an error. + a = takeReturnHello(a); + ~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. + b = takeReturnHello(b); + ~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. + c = takeReturnHello(c); + ~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. + d = takeReturnHello(d); + ~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. + e = takeReturnHello(e); + ~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. + + // Passing these as arguments should cause an error. + a = takeReturnHelloWorld(a); + ~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello" | "World"'. +!!! error TS2345: Type 'string' is not assignable to type '"World"'. + b = takeReturnHelloWorld(b); + ~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello" | "World"'. +!!! error TS2345: Type 'string' is not assignable to type '"World"'. + c = takeReturnHelloWorld(c); + ~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello" | "World"'. +!!! error TS2345: Type 'string' is not assignable to type '"World"'. + d = takeReturnHelloWorld(d); + ~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello" | "World"'. +!!! error TS2345: Type 'string' is not assignable to type '"World"'. + e = takeReturnHelloWorld(e); + ~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello" | "World"'. +!!! error TS2345: Type 'string' is not assignable to type '"World"'. + } + + namespace n2 { + // The following (regardless of errors) should come back typed + // as "Hello" (or "Hello" | "Hello"). + export let a = fun1<"Hello">("Hello", "Hello"); + export let b = fun1<"Hello">("Hello", "World"); + ~~~~~~~ +!!! error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. + export let c = fun2<"Hello", "Hello">("Hello", "Hello"); + export let d = fun2<"Hello", "Hello">("Hello", "World"); + ~~~~~~~ +!!! error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. + export let e = fun3<"Hello">("Hello", "World"); + ~~~~~~~ +!!! error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. + + // Assignment from the returned value should cause an error. + a = takeReturnString(a); + ~ +!!! error TS2322: Type 'string' is not assignable to type '"Hello"'. + b = takeReturnString(b); + c = takeReturnString(c); + ~ +!!! error TS2322: Type 'string' is not assignable to type '"Hello"'. + d = takeReturnString(d); + e = takeReturnString(e); + + // Should be valid + a = takeReturnHello(a); + b = takeReturnHello(b); + c = takeReturnHello(c); + d = takeReturnHello(d); + e = takeReturnHello(e); + + // Assignment from the returned value should cause an error. + a = takeReturnHelloWorld(a); + ~ +!!! error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. +!!! error TS2322: Type '"World"' is not assignable to type '"Hello"'. + b = takeReturnHelloWorld(b); + c = takeReturnHelloWorld(c); + ~ +!!! error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. +!!! error TS2322: Type '"World"' is not assignable to type '"Hello"'. + d = takeReturnHelloWorld(d); + e = takeReturnHelloWorld(e); + } + + + namespace n3 { + // The following (regardless of errors) should come back typed + // as "Hello" | "World" (or "World" | "Hello"). + export let a = fun2<"Hello", "World">("Hello", "World"); + export let b = fun2<"Hello", "World">("World", "Hello"); + ~~~~~~~ +!!! error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. + export let c = fun2<"World", "Hello">("Hello", "Hello"); + ~~~~~~~ +!!! error TS2345: Argument of type '"Hello"' is not assignable to parameter of type '"World"'. + export let d = fun2<"World", "Hello">("World", "World"); + ~~~~~~~ +!!! error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. + export let e = fun3<"Hello" | "World">("Hello", "World"); + + // Assignment from the returned value should cause an error. + a = takeReturnString(a); + ~ +!!! error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. +!!! error TS2322: Type 'string' is not assignable to type '"World"'. + b = takeReturnString(b); + c = takeReturnString(c); + d = takeReturnString(d); + e = takeReturnString(e); + ~ +!!! error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. +!!! error TS2322: Type 'string' is not assignable to type '"World"'. + + // Passing these as arguments should cause an error. + a = takeReturnHello(a); + ~ +!!! error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. +!!! error TS2345: Type '"World"' is not assignable to type '"Hello"'. + b = takeReturnHello(b); + c = takeReturnHello(c); + d = takeReturnHello(d); + e = takeReturnHello(e); + ~ +!!! error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. +!!! error TS2345: Type '"World"' is not assignable to type '"Hello"'. + + // Both should be valid. + a = takeReturnHelloWorld(a); + b = takeReturnHelloWorld(b); + c = takeReturnHelloWorld(c); + d = takeReturnHelloWorld(d); + e = takeReturnHelloWorld(e); + } \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.js b/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.js new file mode 100644 index 0000000000000..c07dd22539648 --- /dev/null +++ b/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.js @@ -0,0 +1,244 @@ +//// [typeArgumentsWithStringLiteralTypes01.ts] + +declare function randBool(): boolean; +declare function takeReturnString(str: string): string; +declare function takeReturnHello(str: "Hello"): "Hello"; +declare function takeReturnHelloWorld(str: "Hello" | "World"): "Hello" | "World"; + +function fun1(x: T, y: T) { + return randBool() ? x : y; +} + +function fun2(x: T, y: U) { + return randBool() ? x : y; +} + +function fun3(...args: T[]): T { + return args[+randBool()]; +} + +namespace n1 { + // The following should all come back as strings. + // They should be assignable to/from something of a type 'string'. + // They should not be assignable to either "Hello" or "World". + export let a = fun1("Hello", "World"); + export let b = fun1("Hello", "Hello"); + export let c = fun2("Hello", "World"); + export let d = fun2("Hello", "Hello"); + export let e = fun3("Hello", "Hello", "World", "Foo"); + + // Should be valid + a = takeReturnString(a); + b = takeReturnString(b); + c = takeReturnString(c); + d = takeReturnString(d); + e = takeReturnString(e); + + // Passing these as arguments should cause an error. + a = takeReturnHello(a); + b = takeReturnHello(b); + c = takeReturnHello(c); + d = takeReturnHello(d); + e = takeReturnHello(e); + + // Passing these as arguments should cause an error. + a = takeReturnHelloWorld(a); + b = takeReturnHelloWorld(b); + c = takeReturnHelloWorld(c); + d = takeReturnHelloWorld(d); + e = takeReturnHelloWorld(e); +} + +namespace n2 { + // The following (regardless of errors) should come back typed + // as "Hello" (or "Hello" | "Hello"). + export let a = fun1<"Hello">("Hello", "Hello"); + export let b = fun1<"Hello">("Hello", "World"); + export let c = fun2<"Hello", "Hello">("Hello", "Hello"); + export let d = fun2<"Hello", "Hello">("Hello", "World"); + export let e = fun3<"Hello">("Hello", "World"); + + // Assignment from the returned value should cause an error. + a = takeReturnString(a); + b = takeReturnString(b); + c = takeReturnString(c); + d = takeReturnString(d); + e = takeReturnString(e); + + // Should be valid + a = takeReturnHello(a); + b = takeReturnHello(b); + c = takeReturnHello(c); + d = takeReturnHello(d); + e = takeReturnHello(e); + + // Assignment from the returned value should cause an error. + a = takeReturnHelloWorld(a); + b = takeReturnHelloWorld(b); + c = takeReturnHelloWorld(c); + d = takeReturnHelloWorld(d); + e = takeReturnHelloWorld(e); +} + + +namespace n3 { + // The following (regardless of errors) should come back typed + // as "Hello" | "World" (or "World" | "Hello"). + export let a = fun2<"Hello", "World">("Hello", "World"); + export let b = fun2<"Hello", "World">("World", "Hello"); + export let c = fun2<"World", "Hello">("Hello", "Hello"); + export let d = fun2<"World", "Hello">("World", "World"); + export let e = fun3<"Hello" | "World">("Hello", "World"); + + // Assignment from the returned value should cause an error. + a = takeReturnString(a); + b = takeReturnString(b); + c = takeReturnString(c); + d = takeReturnString(d); + e = takeReturnString(e); + + // Passing these as arguments should cause an error. + a = takeReturnHello(a); + b = takeReturnHello(b); + c = takeReturnHello(c); + d = takeReturnHello(d); + e = takeReturnHello(e); + + // Both should be valid. + a = takeReturnHelloWorld(a); + b = takeReturnHelloWorld(b); + c = takeReturnHelloWorld(c); + d = takeReturnHelloWorld(d); + e = takeReturnHelloWorld(e); +} + +//// [typeArgumentsWithStringLiteralTypes01.js] +function fun1(x, y) { + return randBool() ? x : y; +} +function fun2(x, y) { + return randBool() ? x : y; +} +function fun3() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i - 0] = arguments[_i]; + } + return args[+randBool()]; +} +var n1; +(function (n1) { + // The following should all come back as strings. + // They should be assignable to/from something of a type 'string'. + // They should not be assignable to either "Hello" or "World". + n1.a = fun1("Hello", "World"); + n1.b = fun1("Hello", "Hello"); + n1.c = fun2("Hello", "World"); + n1.d = fun2("Hello", "Hello"); + n1.e = fun3("Hello", "Hello", "World", "Foo"); + // Should be valid + n1.a = takeReturnString(n1.a); + n1.b = takeReturnString(n1.b); + n1.c = takeReturnString(n1.c); + n1.d = takeReturnString(n1.d); + n1.e = takeReturnString(n1.e); + // Passing these as arguments should cause an error. + n1.a = takeReturnHello(n1.a); + n1.b = takeReturnHello(n1.b); + n1.c = takeReturnHello(n1.c); + n1.d = takeReturnHello(n1.d); + n1.e = takeReturnHello(n1.e); + // Passing these as arguments should cause an error. + n1.a = takeReturnHelloWorld(n1.a); + n1.b = takeReturnHelloWorld(n1.b); + n1.c = takeReturnHelloWorld(n1.c); + n1.d = takeReturnHelloWorld(n1.d); + n1.e = takeReturnHelloWorld(n1.e); +})(n1 || (n1 = {})); +var n2; +(function (n2) { + // The following (regardless of errors) should come back typed + // as "Hello" (or "Hello" | "Hello"). + n2.a = fun1("Hello", "Hello"); + n2.b = fun1("Hello", "World"); + n2.c = fun2("Hello", "Hello"); + n2.d = fun2("Hello", "World"); + n2.e = fun3("Hello", "World"); + // Assignment from the returned value should cause an error. + n2.a = takeReturnString(n2.a); + n2.b = takeReturnString(n2.b); + n2.c = takeReturnString(n2.c); + n2.d = takeReturnString(n2.d); + n2.e = takeReturnString(n2.e); + // Should be valid + n2.a = takeReturnHello(n2.a); + n2.b = takeReturnHello(n2.b); + n2.c = takeReturnHello(n2.c); + n2.d = takeReturnHello(n2.d); + n2.e = takeReturnHello(n2.e); + // Assignment from the returned value should cause an error. + n2.a = takeReturnHelloWorld(n2.a); + n2.b = takeReturnHelloWorld(n2.b); + n2.c = takeReturnHelloWorld(n2.c); + n2.d = takeReturnHelloWorld(n2.d); + n2.e = takeReturnHelloWorld(n2.e); +})(n2 || (n2 = {})); +var n3; +(function (n3) { + // The following (regardless of errors) should come back typed + // as "Hello" | "World" (or "World" | "Hello"). + n3.a = fun2("Hello", "World"); + n3.b = fun2("World", "Hello"); + n3.c = fun2("Hello", "Hello"); + n3.d = fun2("World", "World"); + n3.e = fun3("Hello", "World"); + // Assignment from the returned value should cause an error. + n3.a = takeReturnString(n3.a); + n3.b = takeReturnString(n3.b); + n3.c = takeReturnString(n3.c); + n3.d = takeReturnString(n3.d); + n3.e = takeReturnString(n3.e); + // Passing these as arguments should cause an error. + n3.a = takeReturnHello(n3.a); + n3.b = takeReturnHello(n3.b); + n3.c = takeReturnHello(n3.c); + n3.d = takeReturnHello(n3.d); + n3.e = takeReturnHello(n3.e); + // Both should be valid. + n3.a = takeReturnHelloWorld(n3.a); + n3.b = takeReturnHelloWorld(n3.b); + n3.c = takeReturnHelloWorld(n3.c); + n3.d = takeReturnHelloWorld(n3.d); + n3.e = takeReturnHelloWorld(n3.e); +})(n3 || (n3 = {})); + + +//// [typeArgumentsWithStringLiteralTypes01.d.ts] +declare function randBool(): boolean; +declare function takeReturnString(str: string): string; +declare function takeReturnHello(str: "Hello"): "Hello"; +declare function takeReturnHelloWorld(str: "Hello" | "World"): "Hello" | "World"; +declare function fun1(x: T, y: T): T; +declare function fun2(x: T, y: U): T | U; +declare function fun3(...args: T[]): T; +declare namespace n1 { + let a: string; + let b: string; + let c: string; + let d: string; + let e: string; +} +declare namespace n2 { + let a: "Hello"; + let b: any; + let c: "Hello"; + let d: any; + let e: any; +} +declare namespace n3 { + let a: "Hello" | "World"; + let b: any; + let c: any; + let d: any; + let e: "Hello" | "World"; +} diff --git a/tests/baselines/reference/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.js b/tests/baselines/reference/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.js index e75fa63c4b7ec..90470f58124fc 100644 --- a/tests/baselines/reference/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.js +++ b/tests/baselines/reference/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.js @@ -12,12 +12,14 @@ f.foo(); //// [file1.js] +"use strict"; function foo() { var classes = undefined; return new classes(null); } exports.foo = foo; //// [file2.js] +"use strict"; var f = require('./file1'); f.foo(); diff --git a/tests/baselines/reference/typeCheckTypeArgument.errors.txt b/tests/baselines/reference/typeCheckTypeArgument.errors.txt index bf3e8bfdb9b2a..1452a2d4deba0 100644 --- a/tests/baselines/reference/typeCheckTypeArgument.errors.txt +++ b/tests/baselines/reference/typeCheckTypeArgument.errors.txt @@ -1,29 +1,12 @@ -error TS2318: Cannot find global type 'Array'. -error TS2318: Cannot find global type 'Boolean'. -error TS2318: Cannot find global type 'Function'. -error TS2318: Cannot find global type 'IArguments'. -error TS2318: Cannot find global type 'Number'. -error TS2318: Cannot find global type 'Object'. -error TS2318: Cannot find global type 'RegExp'. -error TS2318: Cannot find global type 'String'. -tests/cases/compiler/typeCheckTypeArgument.ts(3,19): error TS2304: Cannot find name 'UNKNOWN'. -tests/cases/compiler/typeCheckTypeArgument.ts(5,26): error TS2304: Cannot find name 'UNKNOWN'. -tests/cases/compiler/typeCheckTypeArgument.ts(7,21): error TS2304: Cannot find name 'UNKNOWN'. -tests/cases/compiler/typeCheckTypeArgument.ts(9,24): error TS2304: Cannot find name 'UNKNOWN'. -tests/cases/compiler/typeCheckTypeArgument.ts(12,22): error TS2304: Cannot find name 'UNKNOWN'. -tests/cases/compiler/typeCheckTypeArgument.ts(15,13): error TS2304: Cannot find name 'UNKNOWN'. +tests/cases/compiler/typeCheckTypeArgument.ts(2,19): error TS2304: Cannot find name 'UNKNOWN'. +tests/cases/compiler/typeCheckTypeArgument.ts(4,26): error TS2304: Cannot find name 'UNKNOWN'. +tests/cases/compiler/typeCheckTypeArgument.ts(6,21): error TS2304: Cannot find name 'UNKNOWN'. +tests/cases/compiler/typeCheckTypeArgument.ts(8,24): error TS2304: Cannot find name 'UNKNOWN'. +tests/cases/compiler/typeCheckTypeArgument.ts(11,22): error TS2304: Cannot find name 'UNKNOWN'. +tests/cases/compiler/typeCheckTypeArgument.ts(14,13): error TS2304: Cannot find name 'UNKNOWN'. -!!! error TS2318: Cannot find global type 'Array'. -!!! error TS2318: Cannot find global type 'Boolean'. -!!! error TS2318: Cannot find global type 'Function'. -!!! error TS2318: Cannot find global type 'IArguments'. -!!! error TS2318: Cannot find global type 'Number'. -!!! error TS2318: Cannot find global type 'Object'. -!!! error TS2318: Cannot find global type 'RegExp'. -!!! error TS2318: Cannot find global type 'String'. ==== tests/cases/compiler/typeCheckTypeArgument.ts (6 errors) ==== - /// var f: () => void; ~~~~~~~ diff --git a/tests/baselines/reference/typeCheckTypeArgument.js b/tests/baselines/reference/typeCheckTypeArgument.js index bec33393f9260..633eb75ed913b 100644 --- a/tests/baselines/reference/typeCheckTypeArgument.js +++ b/tests/baselines/reference/typeCheckTypeArgument.js @@ -1,5 +1,4 @@ //// [typeCheckTypeArgument.ts] -/// var f: () => void; @@ -16,7 +15,6 @@ class Foo2 { ((a) => { }); //// [typeCheckTypeArgument.js] -/// var f; var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/typeGuardEnums.js b/tests/baselines/reference/typeGuardEnums.js new file mode 100644 index 0000000000000..1eb4b7552c4c9 --- /dev/null +++ b/tests/baselines/reference/typeGuardEnums.js @@ -0,0 +1,41 @@ +//// [typeGuardEnums.ts] +enum E {} +enum V {} + +let x: number|string|E|V; + +if (typeof x === "number") { + x; // number|E|V +} +else { + x; // string +} + +if (typeof x !== "number") { + x; // string +} +else { + x; // number|E|V +} + + +//// [typeGuardEnums.js] +var E; +(function (E) { +})(E || (E = {})); +var V; +(function (V) { +})(V || (V = {})); +var x; +if (typeof x === "number") { + x; // number|E|V +} +else { + x; // string +} +if (typeof x !== "number") { + x; // string +} +else { + x; // number|E|V +} diff --git a/tests/baselines/reference/typeGuardEnums.symbols b/tests/baselines/reference/typeGuardEnums.symbols new file mode 100644 index 0000000000000..8f1a396c481a1 --- /dev/null +++ b/tests/baselines/reference/typeGuardEnums.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardEnums.ts === +enum E {} +>E : Symbol(E, Decl(typeGuardEnums.ts, 0, 0)) + +enum V {} +>V : Symbol(V, Decl(typeGuardEnums.ts, 0, 9)) + +let x: number|string|E|V; +>x : Symbol(x, Decl(typeGuardEnums.ts, 3, 3)) +>E : Symbol(E, Decl(typeGuardEnums.ts, 0, 0)) +>V : Symbol(V, Decl(typeGuardEnums.ts, 0, 9)) + +if (typeof x === "number") { +>x : Symbol(x, Decl(typeGuardEnums.ts, 3, 3)) + + x; // number|E|V +>x : Symbol(x, Decl(typeGuardEnums.ts, 3, 3)) +} +else { + x; // string +>x : Symbol(x, Decl(typeGuardEnums.ts, 3, 3)) +} + +if (typeof x !== "number") { +>x : Symbol(x, Decl(typeGuardEnums.ts, 3, 3)) + + x; // string +>x : Symbol(x, Decl(typeGuardEnums.ts, 3, 3)) +} +else { + x; // number|E|V +>x : Symbol(x, Decl(typeGuardEnums.ts, 3, 3)) +} + diff --git a/tests/baselines/reference/typeGuardEnums.types b/tests/baselines/reference/typeGuardEnums.types new file mode 100644 index 0000000000000..1d39a81d78acd --- /dev/null +++ b/tests/baselines/reference/typeGuardEnums.types @@ -0,0 +1,40 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardEnums.ts === +enum E {} +>E : E + +enum V {} +>V : V + +let x: number|string|E|V; +>x : number | string | E | V +>E : E +>V : V + +if (typeof x === "number") { +>typeof x === "number" : boolean +>typeof x : string +>x : number | string | E | V +>"number" : string + + x; // number|E|V +>x : number | E | V +} +else { + x; // string +>x : string +} + +if (typeof x !== "number") { +>typeof x !== "number" : boolean +>typeof x : string +>x : number | string | E | V +>"number" : string + + x; // string +>x : string +} +else { + x; // number|E|V +>x : number | E | V +} + diff --git a/tests/baselines/reference/typeGuardInClass.js b/tests/baselines/reference/typeGuardInClass.js new file mode 100644 index 0000000000000..0ce25a7c11c13 --- /dev/null +++ b/tests/baselines/reference/typeGuardInClass.js @@ -0,0 +1,37 @@ +//// [typeGuardInClass.ts] +let x: string | number; + +if (typeof x === "string") { + let n = class { + constructor() { + let y: string = x; + } + } +} +else { + let m = class { + constructor() { + let y: number = x; + } + } +} + + +//// [typeGuardInClass.js] +var x; +if (typeof x === "string") { + var n = (function () { + function class_1() { + var y = x; + } + return class_1; + })(); +} +else { + var m = (function () { + function class_2() { + var y = x; + } + return class_2; + })(); +} diff --git a/tests/baselines/reference/typeGuardInClass.symbols b/tests/baselines/reference/typeGuardInClass.symbols new file mode 100644 index 0000000000000..cc0e745e4de9e --- /dev/null +++ b/tests/baselines/reference/typeGuardInClass.symbols @@ -0,0 +1,29 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardInClass.ts === +let x: string | number; +>x : Symbol(x, Decl(typeGuardInClass.ts, 0, 3)) + +if (typeof x === "string") { +>x : Symbol(x, Decl(typeGuardInClass.ts, 0, 3)) + + let n = class { +>n : Symbol(n, Decl(typeGuardInClass.ts, 3, 7)) + + constructor() { + let y: string = x; +>y : Symbol(y, Decl(typeGuardInClass.ts, 5, 15)) +>x : Symbol(x, Decl(typeGuardInClass.ts, 0, 3)) + } + } +} +else { + let m = class { +>m : Symbol(m, Decl(typeGuardInClass.ts, 10, 7)) + + constructor() { + let y: number = x; +>y : Symbol(y, Decl(typeGuardInClass.ts, 12, 15)) +>x : Symbol(x, Decl(typeGuardInClass.ts, 0, 3)) + } + } +} + diff --git a/tests/baselines/reference/typeGuardInClass.types b/tests/baselines/reference/typeGuardInClass.types new file mode 100644 index 0000000000000..93fe9f28c5e9e --- /dev/null +++ b/tests/baselines/reference/typeGuardInClass.types @@ -0,0 +1,34 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardInClass.ts === +let x: string | number; +>x : string | number + +if (typeof x === "string") { +>typeof x === "string" : boolean +>typeof x : string +>x : string | number +>"string" : string + + let n = class { +>n : typeof (Anonymous class) +>class { constructor() { let y: string = x; } } : typeof (Anonymous class) + + constructor() { + let y: string = x; +>y : string +>x : string + } + } +} +else { + let m = class { +>m : typeof (Anonymous class) +>class { constructor() { let y: number = x; } } : typeof (Anonymous class) + + constructor() { + let y: number = x; +>y : number +>x : number + } + } +} + diff --git a/tests/baselines/reference/typeGuardNesting.js b/tests/baselines/reference/typeGuardNesting.js new file mode 100644 index 0000000000000..364653d02738c --- /dev/null +++ b/tests/baselines/reference/typeGuardNesting.js @@ -0,0 +1,31 @@ +//// [typeGuardNesting.ts] +let strOrBool: string|boolean; +if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'string') { + let label: string = (typeof strOrBool === 'string') ? strOrBool : "string"; + let bool: boolean = (typeof strOrBool === 'boolean') ? strOrBool : false; + let label2: string = (typeof strOrBool !== 'boolean') ? strOrBool : "string"; + let bool2: boolean = (typeof strOrBool !== 'string') ? strOrBool : false; +} + +if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boolean') { + let label: string = (typeof strOrBool === 'string') ? strOrBool : "string"; + let bool: boolean = (typeof strOrBool === 'boolean') ? strOrBool : false; + let label2: string = (typeof strOrBool !== 'boolean') ? strOrBool : "string"; + let bool2: boolean = (typeof strOrBool !== 'string') ? strOrBool : false; +} + + +//// [typeGuardNesting.js] +var strOrBool; +if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'string') { + var label = (typeof strOrBool === 'string') ? strOrBool : "string"; + var bool = (typeof strOrBool === 'boolean') ? strOrBool : false; + var label2 = (typeof strOrBool !== 'boolean') ? strOrBool : "string"; + var bool2 = (typeof strOrBool !== 'string') ? strOrBool : false; +} +if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boolean') { + var label = (typeof strOrBool === 'string') ? strOrBool : "string"; + var bool = (typeof strOrBool === 'boolean') ? strOrBool : false; + var label2 = (typeof strOrBool !== 'boolean') ? strOrBool : "string"; + var bool2 = (typeof strOrBool !== 'string') ? strOrBool : false; +} diff --git a/tests/baselines/reference/typeGuardNesting.symbols b/tests/baselines/reference/typeGuardNesting.symbols new file mode 100644 index 0000000000000..427db81f3ed56 --- /dev/null +++ b/tests/baselines/reference/typeGuardNesting.symbols @@ -0,0 +1,56 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardNesting.ts === +let strOrBool: string|boolean; +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) + +if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'string') { +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) + + let label: string = (typeof strOrBool === 'string') ? strOrBool : "string"; +>label : Symbol(label, Decl(typeGuardNesting.ts, 2, 4)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) + + let bool: boolean = (typeof strOrBool === 'boolean') ? strOrBool : false; +>bool : Symbol(bool, Decl(typeGuardNesting.ts, 3, 4)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) + + let label2: string = (typeof strOrBool !== 'boolean') ? strOrBool : "string"; +>label2 : Symbol(label2, Decl(typeGuardNesting.ts, 4, 4)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) + + let bool2: boolean = (typeof strOrBool !== 'string') ? strOrBool : false; +>bool2 : Symbol(bool2, Decl(typeGuardNesting.ts, 5, 4)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +} + +if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boolean') { +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) + + let label: string = (typeof strOrBool === 'string') ? strOrBool : "string"; +>label : Symbol(label, Decl(typeGuardNesting.ts, 9, 4)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) + + let bool: boolean = (typeof strOrBool === 'boolean') ? strOrBool : false; +>bool : Symbol(bool, Decl(typeGuardNesting.ts, 10, 4)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) + + let label2: string = (typeof strOrBool !== 'boolean') ? strOrBool : "string"; +>label2 : Symbol(label2, Decl(typeGuardNesting.ts, 11, 4)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) + + let bool2: boolean = (typeof strOrBool !== 'string') ? strOrBool : false; +>bool2 : Symbol(bool2, Decl(typeGuardNesting.ts, 12, 4)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardNesting.ts, 0, 3)) +} + diff --git a/tests/baselines/reference/typeGuardNesting.types b/tests/baselines/reference/typeGuardNesting.types new file mode 100644 index 0000000000000..255e96da89eb8 --- /dev/null +++ b/tests/baselines/reference/typeGuardNesting.types @@ -0,0 +1,124 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardNesting.ts === +let strOrBool: string|boolean; +>strOrBool : string | boolean + +if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'string') { +>(typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'string' : boolean +>(typeof strOrBool === 'boolean' && !strOrBool) : boolean +>typeof strOrBool === 'boolean' && !strOrBool : boolean +>typeof strOrBool === 'boolean' : boolean +>typeof strOrBool : string +>strOrBool : string | boolean +>'boolean' : string +>!strOrBool : boolean +>strOrBool : boolean +>typeof strOrBool === 'string' : boolean +>typeof strOrBool : string +>strOrBool : string | boolean +>'string' : string + + let label: string = (typeof strOrBool === 'string') ? strOrBool : "string"; +>label : string +>(typeof strOrBool === 'string') ? strOrBool : "string" : string +>(typeof strOrBool === 'string') : boolean +>typeof strOrBool === 'string' : boolean +>typeof strOrBool : string +>strOrBool : boolean | string +>'string' : string +>strOrBool : string +>"string" : string + + let bool: boolean = (typeof strOrBool === 'boolean') ? strOrBool : false; +>bool : boolean +>(typeof strOrBool === 'boolean') ? strOrBool : false : boolean +>(typeof strOrBool === 'boolean') : boolean +>typeof strOrBool === 'boolean' : boolean +>typeof strOrBool : string +>strOrBool : boolean | string +>'boolean' : string +>strOrBool : boolean +>false : boolean + + let label2: string = (typeof strOrBool !== 'boolean') ? strOrBool : "string"; +>label2 : string +>(typeof strOrBool !== 'boolean') ? strOrBool : "string" : string +>(typeof strOrBool !== 'boolean') : boolean +>typeof strOrBool !== 'boolean' : boolean +>typeof strOrBool : string +>strOrBool : boolean | string +>'boolean' : string +>strOrBool : string +>"string" : string + + let bool2: boolean = (typeof strOrBool !== 'string') ? strOrBool : false; +>bool2 : boolean +>(typeof strOrBool !== 'string') ? strOrBool : false : boolean +>(typeof strOrBool !== 'string') : boolean +>typeof strOrBool !== 'string' : boolean +>typeof strOrBool : string +>strOrBool : boolean | string +>'string' : string +>strOrBool : boolean +>false : boolean +} + +if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boolean') { +>(typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boolean' : boolean +>(typeof strOrBool !== 'string' && !strOrBool) : boolean +>typeof strOrBool !== 'string' && !strOrBool : boolean +>typeof strOrBool !== 'string' : boolean +>typeof strOrBool : string +>strOrBool : string | boolean +>'string' : string +>!strOrBool : boolean +>strOrBool : boolean +>typeof strOrBool !== 'boolean' : boolean +>typeof strOrBool : string +>strOrBool : string | boolean +>'boolean' : string + + let label: string = (typeof strOrBool === 'string') ? strOrBool : "string"; +>label : string +>(typeof strOrBool === 'string') ? strOrBool : "string" : string +>(typeof strOrBool === 'string') : boolean +>typeof strOrBool === 'string' : boolean +>typeof strOrBool : string +>strOrBool : boolean | string +>'string' : string +>strOrBool : string +>"string" : string + + let bool: boolean = (typeof strOrBool === 'boolean') ? strOrBool : false; +>bool : boolean +>(typeof strOrBool === 'boolean') ? strOrBool : false : boolean +>(typeof strOrBool === 'boolean') : boolean +>typeof strOrBool === 'boolean' : boolean +>typeof strOrBool : string +>strOrBool : boolean | string +>'boolean' : string +>strOrBool : boolean +>false : boolean + + let label2: string = (typeof strOrBool !== 'boolean') ? strOrBool : "string"; +>label2 : string +>(typeof strOrBool !== 'boolean') ? strOrBool : "string" : string +>(typeof strOrBool !== 'boolean') : boolean +>typeof strOrBool !== 'boolean' : boolean +>typeof strOrBool : string +>strOrBool : boolean | string +>'boolean' : string +>strOrBool : string +>"string" : string + + let bool2: boolean = (typeof strOrBool !== 'string') ? strOrBool : false; +>bool2 : boolean +>(typeof strOrBool !== 'string') ? strOrBool : false : boolean +>(typeof strOrBool !== 'string') : boolean +>typeof strOrBool !== 'string' : boolean +>typeof strOrBool : string +>strOrBool : boolean | string +>'string' : string +>strOrBool : boolean +>false : boolean +} + diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.js b/tests/baselines/reference/typeGuardOfFormTypeOfOther.js index 3bb1a2091f6cd..d1cb49941961f 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfOther.js +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.js @@ -23,19 +23,19 @@ if (typeof strOrC === "Object") { c = strOrC; // C } else { - var r2: string | C = strOrC; // string | C + var r2: string = strOrC; // string } if (typeof numOrC === "Object") { c = numOrC; // C } else { - var r3: number | C = numOrC; // number | C + var r3: number = numOrC; // number } if (typeof boolOrC === "Object") { c = boolOrC; // C } else { - var r4: boolean | C = boolOrC; // boolean | C + var r4: boolean = boolOrC; // boolean } // Narrowing occurs only if target type is a subtype of variable type @@ -50,19 +50,19 @@ else { // - when true, narrows the type of x by typeof x === s when false, or // - when false, narrows the type of x by typeof x === s when true. if (typeof strOrC !== "Object") { - var r2: string | C = strOrC; // string | C + var r2: string = strOrC; // string } else { c = strOrC; // C } if (typeof numOrC !== "Object") { - var r3: number | C = numOrC; // number | C + var r3: number = numOrC; // number } else { c = numOrC; // C } if (typeof boolOrC !== "Object") { - var r4: boolean | C = boolOrC; // boolean | C + var r4: boolean = boolOrC; // boolean } else { c = boolOrC; // C @@ -104,19 +104,19 @@ if (typeof strOrC === "Object") { c = strOrC; // C } else { - var r2 = strOrC; // string | C + var r2 = strOrC; // string } if (typeof numOrC === "Object") { c = numOrC; // C } else { - var r3 = numOrC; // number | C + var r3 = numOrC; // number } if (typeof boolOrC === "Object") { c = boolOrC; // C } else { - var r4 = boolOrC; // boolean | C + var r4 = boolOrC; // boolean } // Narrowing occurs only if target type is a subtype of variable type if (typeof strOrNumOrBool === "Object") { @@ -129,19 +129,19 @@ else { // - when true, narrows the type of x by typeof x === s when false, or // - when false, narrows the type of x by typeof x === s when true. if (typeof strOrC !== "Object") { - var r2 = strOrC; // string | C + var r2 = strOrC; // string } else { c = strOrC; // C } if (typeof numOrC !== "Object") { - var r3 = numOrC; // number | C + var r3 = numOrC; // number } else { c = numOrC; // C } if (typeof boolOrC !== "Object") { - var r4 = boolOrC; // boolean | C + var r4 = boolOrC; // boolean } else { c = boolOrC; // C diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.symbols b/tests/baselines/reference/typeGuardOfFormTypeOfOther.symbols index e3ecffdc2e9c2..eb120d468dcb4 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfOther.symbols +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.symbols @@ -56,9 +56,8 @@ if (typeof strOrC === "Object") { >strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) } else { - var r2: string | C = strOrC; // string | C + var r2: string = strOrC; // string >r2 : Symbol(r2, Decl(typeGuardOfFormTypeOfOther.ts, 24, 7), Decl(typeGuardOfFormTypeOfOther.ts, 51, 7)) ->C : Symbol(C, Decl(typeGuardOfFormTypeOfOther.ts, 0, 0)) >strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) } if (typeof numOrC === "Object") { @@ -69,9 +68,8 @@ if (typeof numOrC === "Object") { >numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 3)) } else { - var r3: number | C = numOrC; // number | C + var r3: number = numOrC; // number >r3 : Symbol(r3, Decl(typeGuardOfFormTypeOfOther.ts, 30, 7), Decl(typeGuardOfFormTypeOfOther.ts, 57, 7)) ->C : Symbol(C, Decl(typeGuardOfFormTypeOfOther.ts, 0, 0)) >numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 3)) } if (typeof boolOrC === "Object") { @@ -82,9 +80,8 @@ if (typeof boolOrC === "Object") { >boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 3)) } else { - var r4: boolean | C = boolOrC; // boolean | C + var r4: boolean = boolOrC; // boolean >r4 : Symbol(r4, Decl(typeGuardOfFormTypeOfOther.ts, 36, 7), Decl(typeGuardOfFormTypeOfOther.ts, 63, 7)) ->C : Symbol(C, Decl(typeGuardOfFormTypeOfOther.ts, 0, 0)) >boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 3)) } @@ -108,9 +105,8 @@ else { if (typeof strOrC !== "Object") { >strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) - var r2: string | C = strOrC; // string | C + var r2: string = strOrC; // string >r2 : Symbol(r2, Decl(typeGuardOfFormTypeOfOther.ts, 24, 7), Decl(typeGuardOfFormTypeOfOther.ts, 51, 7)) ->C : Symbol(C, Decl(typeGuardOfFormTypeOfOther.ts, 0, 0)) >strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) } else { @@ -121,9 +117,8 @@ else { if (typeof numOrC !== "Object") { >numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 3)) - var r3: number | C = numOrC; // number | C + var r3: number = numOrC; // number >r3 : Symbol(r3, Decl(typeGuardOfFormTypeOfOther.ts, 30, 7), Decl(typeGuardOfFormTypeOfOther.ts, 57, 7)) ->C : Symbol(C, Decl(typeGuardOfFormTypeOfOther.ts, 0, 0)) >numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 3)) } else { @@ -134,9 +129,8 @@ else { if (typeof boolOrC !== "Object") { >boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 3)) - var r4: boolean | C = boolOrC; // boolean | C + var r4: boolean = boolOrC; // boolean >r4 : Symbol(r4, Decl(typeGuardOfFormTypeOfOther.ts, 36, 7), Decl(typeGuardOfFormTypeOfOther.ts, 63, 7)) ->C : Symbol(C, Decl(typeGuardOfFormTypeOfOther.ts, 0, 0)) >boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 3)) } else { diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.types b/tests/baselines/reference/typeGuardOfFormTypeOfOther.types index e0fd443ef6391..5cec356719493 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfOther.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.types @@ -60,10 +60,9 @@ if (typeof strOrC === "Object") { >strOrC : C } else { - var r2: string | C = strOrC; // string | C ->r2 : string | C ->C : C ->strOrC : string | C + var r2: string = strOrC; // string +>r2 : string +>strOrC : string } if (typeof numOrC === "Object") { >typeof numOrC === "Object" : boolean @@ -77,10 +76,9 @@ if (typeof numOrC === "Object") { >numOrC : C } else { - var r3: number | C = numOrC; // number | C ->r3 : number | C ->C : C ->numOrC : number | C + var r3: number = numOrC; // number +>r3 : number +>numOrC : number } if (typeof boolOrC === "Object") { >typeof boolOrC === "Object" : boolean @@ -94,10 +92,9 @@ if (typeof boolOrC === "Object") { >boolOrC : C } else { - var r4: boolean | C = boolOrC; // boolean | C ->r4 : boolean | C ->C : C ->boolOrC : boolean | C + var r4: boolean = boolOrC; // boolean +>r4 : boolean +>boolOrC : boolean } // Narrowing occurs only if target type is a subtype of variable type @@ -126,10 +123,9 @@ if (typeof strOrC !== "Object") { >strOrC : string | C >"Object" : string - var r2: string | C = strOrC; // string | C ->r2 : string | C ->C : C ->strOrC : string | C + var r2: string = strOrC; // string +>r2 : string +>strOrC : string } else { c = strOrC; // C @@ -143,10 +139,9 @@ if (typeof numOrC !== "Object") { >numOrC : number | C >"Object" : string - var r3: number | C = numOrC; // number | C ->r3 : number | C ->C : C ->numOrC : number | C + var r3: number = numOrC; // number +>r3 : number +>numOrC : number } else { c = numOrC; // C @@ -160,10 +155,9 @@ if (typeof boolOrC !== "Object") { >boolOrC : boolean | C >"Object" : string - var r4: boolean | C = boolOrC; // boolean | C ->r4 : boolean | C ->C : C ->boolOrC : boolean | C + var r4: boolean = boolOrC; // boolean +>r4 : boolean +>boolOrC : boolean } else { c = boolOrC; // C diff --git a/tests/baselines/reference/typeGuardRedundancy.js b/tests/baselines/reference/typeGuardRedundancy.js new file mode 100644 index 0000000000000..1dfa964cbc981 --- /dev/null +++ b/tests/baselines/reference/typeGuardRedundancy.js @@ -0,0 +1,17 @@ +//// [typeGuardRedundancy.ts] +var x: string|number; + +var r1 = typeof x === "string" && typeof x === "string" ? x.substr : x.toFixed; + +var r2 = !(typeof x === "string" && typeof x === "string") ? x.toFixed : x.substr; + +var r3 = typeof x === "string" || typeof x === "string" ? x.substr : x.toFixed; + +var r4 = !(typeof x === "string" || typeof x === "string") ? x.toFixed : x.substr; + +//// [typeGuardRedundancy.js] +var x; +var r1 = typeof x === "string" && typeof x === "string" ? x.substr : x.toFixed; +var r2 = !(typeof x === "string" && typeof x === "string") ? x.toFixed : x.substr; +var r3 = typeof x === "string" || typeof x === "string" ? x.substr : x.toFixed; +var r4 = !(typeof x === "string" || typeof x === "string") ? x.toFixed : x.substr; diff --git a/tests/baselines/reference/typeGuardRedundancy.symbols b/tests/baselines/reference/typeGuardRedundancy.symbols new file mode 100644 index 0000000000000..356061407ad6c --- /dev/null +++ b/tests/baselines/reference/typeGuardRedundancy.symbols @@ -0,0 +1,48 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardRedundancy.ts === +var x: string|number; +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) + +var r1 = typeof x === "string" && typeof x === "string" ? x.substr : x.toFixed; +>r1 : Symbol(r1, Decl(typeGuardRedundancy.ts, 2, 3)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>x.substr : Symbol(String.substr, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>substr : Symbol(String.substr, Decl(lib.d.ts, --, --)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +var r2 = !(typeof x === "string" && typeof x === "string") ? x.toFixed : x.substr; +>r2 : Symbol(r2, Decl(typeGuardRedundancy.ts, 4, 3)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>x.substr : Symbol(String.substr, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>substr : Symbol(String.substr, Decl(lib.d.ts, --, --)) + +var r3 = typeof x === "string" || typeof x === "string" ? x.substr : x.toFixed; +>r3 : Symbol(r3, Decl(typeGuardRedundancy.ts, 6, 3)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>x.substr : Symbol(String.substr, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>substr : Symbol(String.substr, Decl(lib.d.ts, --, --)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +var r4 = !(typeof x === "string" || typeof x === "string") ? x.toFixed : x.substr; +>r4 : Symbol(r4, Decl(typeGuardRedundancy.ts, 8, 3)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>x.substr : Symbol(String.substr, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(typeGuardRedundancy.ts, 0, 3)) +>substr : Symbol(String.substr, Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/typeGuardRedundancy.types b/tests/baselines/reference/typeGuardRedundancy.types new file mode 100644 index 0000000000000..1507ceb850ef3 --- /dev/null +++ b/tests/baselines/reference/typeGuardRedundancy.types @@ -0,0 +1,84 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardRedundancy.ts === +var x: string|number; +>x : string | number + +var r1 = typeof x === "string" && typeof x === "string" ? x.substr : x.toFixed; +>r1 : (from: number, length?: number) => string +>typeof x === "string" && typeof x === "string" ? x.substr : x.toFixed : (from: number, length?: number) => string +>typeof x === "string" && typeof x === "string" : boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number +>"string" : string +>typeof x === "string" : boolean +>typeof x : string +>x : string +>"string" : string +>x.substr : (from: number, length?: number) => string +>x : string +>substr : (from: number, length?: number) => string +>x.toFixed : (fractionDigits?: number) => string +>x : number +>toFixed : (fractionDigits?: number) => string + +var r2 = !(typeof x === "string" && typeof x === "string") ? x.toFixed : x.substr; +>r2 : (fractionDigits?: number) => string +>!(typeof x === "string" && typeof x === "string") ? x.toFixed : x.substr : (fractionDigits?: number) => string +>!(typeof x === "string" && typeof x === "string") : boolean +>(typeof x === "string" && typeof x === "string") : boolean +>typeof x === "string" && typeof x === "string" : boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number +>"string" : string +>typeof x === "string" : boolean +>typeof x : string +>x : string +>"string" : string +>x.toFixed : (fractionDigits?: number) => string +>x : number +>toFixed : (fractionDigits?: number) => string +>x.substr : (from: number, length?: number) => string +>x : string +>substr : (from: number, length?: number) => string + +var r3 = typeof x === "string" || typeof x === "string" ? x.substr : x.toFixed; +>r3 : (from: number, length?: number) => string +>typeof x === "string" || typeof x === "string" ? x.substr : x.toFixed : (from: number, length?: number) => string +>typeof x === "string" || typeof x === "string" : boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number +>"string" : string +>typeof x === "string" : boolean +>typeof x : string +>x : number +>"string" : string +>x.substr : (from: number, length?: number) => string +>x : string +>substr : (from: number, length?: number) => string +>x.toFixed : (fractionDigits?: number) => string +>x : number +>toFixed : (fractionDigits?: number) => string + +var r4 = !(typeof x === "string" || typeof x === "string") ? x.toFixed : x.substr; +>r4 : (fractionDigits?: number) => string +>!(typeof x === "string" || typeof x === "string") ? x.toFixed : x.substr : (fractionDigits?: number) => string +>!(typeof x === "string" || typeof x === "string") : boolean +>(typeof x === "string" || typeof x === "string") : boolean +>typeof x === "string" || typeof x === "string" : boolean +>typeof x === "string" : boolean +>typeof x : string +>x : string | number +>"string" : string +>typeof x === "string" : boolean +>typeof x : string +>x : number +>"string" : string +>x.toFixed : (fractionDigits?: number) => string +>x : number +>toFixed : (fractionDigits?: number) => string +>x.substr : (from: number, length?: number) => string +>x : string +>substr : (from: number, length?: number) => string + diff --git a/tests/baselines/reference/typeGuardTautologicalConsistiency.js b/tests/baselines/reference/typeGuardTautologicalConsistiency.js new file mode 100644 index 0000000000000..1b7fa2021c534 --- /dev/null +++ b/tests/baselines/reference/typeGuardTautologicalConsistiency.js @@ -0,0 +1,24 @@ +//// [typeGuardTautologicalConsistiency.ts] +let stringOrNumber: string | number; + +if (typeof stringOrNumber === "number") { + if (typeof stringOrNumber !== "number") { + stringOrNumber; + } +} + +if (typeof stringOrNumber === "number" && typeof stringOrNumber !== "number") { + stringOrNumber; +} + + +//// [typeGuardTautologicalConsistiency.js] +var stringOrNumber; +if (typeof stringOrNumber === "number") { + if (typeof stringOrNumber !== "number") { + stringOrNumber; + } +} +if (typeof stringOrNumber === "number" && typeof stringOrNumber !== "number") { + stringOrNumber; +} diff --git a/tests/baselines/reference/typeGuardTautologicalConsistiency.symbols b/tests/baselines/reference/typeGuardTautologicalConsistiency.symbols new file mode 100644 index 0000000000000..9ee82a5413fe3 --- /dev/null +++ b/tests/baselines/reference/typeGuardTautologicalConsistiency.symbols @@ -0,0 +1,23 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardTautologicalConsistiency.ts === +let stringOrNumber: string | number; +>stringOrNumber : Symbol(stringOrNumber, Decl(typeGuardTautologicalConsistiency.ts, 0, 3)) + +if (typeof stringOrNumber === "number") { +>stringOrNumber : Symbol(stringOrNumber, Decl(typeGuardTautologicalConsistiency.ts, 0, 3)) + + if (typeof stringOrNumber !== "number") { +>stringOrNumber : Symbol(stringOrNumber, Decl(typeGuardTautologicalConsistiency.ts, 0, 3)) + + stringOrNumber; +>stringOrNumber : Symbol(stringOrNumber, Decl(typeGuardTautologicalConsistiency.ts, 0, 3)) + } +} + +if (typeof stringOrNumber === "number" && typeof stringOrNumber !== "number") { +>stringOrNumber : Symbol(stringOrNumber, Decl(typeGuardTautologicalConsistiency.ts, 0, 3)) +>stringOrNumber : Symbol(stringOrNumber, Decl(typeGuardTautologicalConsistiency.ts, 0, 3)) + + stringOrNumber; +>stringOrNumber : Symbol(stringOrNumber, Decl(typeGuardTautologicalConsistiency.ts, 0, 3)) +} + diff --git a/tests/baselines/reference/typeGuardTautologicalConsistiency.types b/tests/baselines/reference/typeGuardTautologicalConsistiency.types new file mode 100644 index 0000000000000..d758dcde22bc8 --- /dev/null +++ b/tests/baselines/reference/typeGuardTautologicalConsistiency.types @@ -0,0 +1,36 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardTautologicalConsistiency.ts === +let stringOrNumber: string | number; +>stringOrNumber : string | number + +if (typeof stringOrNumber === "number") { +>typeof stringOrNumber === "number" : boolean +>typeof stringOrNumber : string +>stringOrNumber : string | number +>"number" : string + + if (typeof stringOrNumber !== "number") { +>typeof stringOrNumber !== "number" : boolean +>typeof stringOrNumber : string +>stringOrNumber : number +>"number" : string + + stringOrNumber; +>stringOrNumber : string | number + } +} + +if (typeof stringOrNumber === "number" && typeof stringOrNumber !== "number") { +>typeof stringOrNumber === "number" && typeof stringOrNumber !== "number" : boolean +>typeof stringOrNumber === "number" : boolean +>typeof stringOrNumber : string +>stringOrNumber : string | number +>"number" : string +>typeof stringOrNumber !== "number" : boolean +>typeof stringOrNumber : string +>stringOrNumber : number +>"number" : string + + stringOrNumber; +>stringOrNumber : string | number +} + diff --git a/tests/baselines/reference/typeGuardTypeOfUndefined.js b/tests/baselines/reference/typeGuardTypeOfUndefined.js new file mode 100644 index 0000000000000..a24ff2ec0dc01 --- /dev/null +++ b/tests/baselines/reference/typeGuardTypeOfUndefined.js @@ -0,0 +1,357 @@ +//// [typeGuardTypeOfUndefined.ts] +// undefined type guard adds no new type information +function test1(a: any) { + if (typeof a !== "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test2(a: any) { + if (typeof a === "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test3(a: any) { + if (typeof a === "undefined" || typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test4(a: any) { + if (typeof a !== "undefined" && typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test5(a: boolean | void) { + if (typeof a !== "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test6(a: boolean | void) { + if (typeof a === "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test7(a: boolean | void) { + if (typeof a === "undefined" || typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test8(a: boolean | void) { + if (typeof a !== "undefined" && typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test9(a: boolean | number) { + if (typeof a !== "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test10(a: boolean | number) { + if (typeof a === "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test11(a: boolean | number) { + if (typeof a === "undefined" || typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test12(a: boolean | number) { + if (typeof a !== "undefined" && typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test13(a: boolean | number | void) { + if (typeof a !== "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test14(a: boolean | number | void) { + if (typeof a === "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test15(a: boolean | number | void) { + if (typeof a === "undefined" || typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test16(a: boolean | number | void) { + if (typeof a !== "undefined" && typeof a === "boolean") { + a; + } + else { + a; + } +} + + +//// [typeGuardTypeOfUndefined.js] +// undefined type guard adds no new type information +function test1(a) { + if (typeof a !== "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} +function test2(a) { + if (typeof a === "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} +function test3(a) { + if (typeof a === "undefined" || typeof a === "boolean") { + a; + } + else { + a; + } +} +function test4(a) { + if (typeof a !== "undefined" && typeof a === "boolean") { + a; + } + else { + a; + } +} +function test5(a) { + if (typeof a !== "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} +function test6(a) { + if (typeof a === "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} +function test7(a) { + if (typeof a === "undefined" || typeof a === "boolean") { + a; + } + else { + a; + } +} +function test8(a) { + if (typeof a !== "undefined" && typeof a === "boolean") { + a; + } + else { + a; + } +} +function test9(a) { + if (typeof a !== "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} +function test10(a) { + if (typeof a === "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} +function test11(a) { + if (typeof a === "undefined" || typeof a === "boolean") { + a; + } + else { + a; + } +} +function test12(a) { + if (typeof a !== "undefined" && typeof a === "boolean") { + a; + } + else { + a; + } +} +function test13(a) { + if (typeof a !== "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} +function test14(a) { + if (typeof a === "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} +function test15(a) { + if (typeof a === "undefined" || typeof a === "boolean") { + a; + } + else { + a; + } +} +function test16(a) { + if (typeof a !== "undefined" && typeof a === "boolean") { + a; + } + else { + a; + } +} diff --git a/tests/baselines/reference/typeGuardTypeOfUndefined.symbols b/tests/baselines/reference/typeGuardTypeOfUndefined.symbols new file mode 100644 index 0000000000000..d6d36223fe462 --- /dev/null +++ b/tests/baselines/reference/typeGuardTypeOfUndefined.symbols @@ -0,0 +1,330 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardTypeOfUndefined.ts === +// undefined type guard adds no new type information +function test1(a: any) { +>test1 : Symbol(test1, Decl(typeGuardTypeOfUndefined.ts, 0, 0)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 1, 15)) + + if (typeof a !== "undefined") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 1, 15)) + + if (typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 1, 15)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 1, 15)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 1, 15)) + } + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 1, 15)) + } +} + +function test2(a: any) { +>test2 : Symbol(test2, Decl(typeGuardTypeOfUndefined.ts, 13, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 15, 15)) + + if (typeof a === "undefined") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 15, 15)) + + if (typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 15, 15)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 15, 15)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 15, 15)) + } + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 15, 15)) + } +} + +function test3(a: any) { +>test3 : Symbol(test3, Decl(typeGuardTypeOfUndefined.ts, 27, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 29, 15)) + + if (typeof a === "undefined" || typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 29, 15)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 29, 15)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 29, 15)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 29, 15)) + } +} + +function test4(a: any) { +>test4 : Symbol(test4, Decl(typeGuardTypeOfUndefined.ts, 36, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 38, 15)) + + if (typeof a !== "undefined" && typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 38, 15)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 38, 15)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 38, 15)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 38, 15)) + } +} + +function test5(a: boolean | void) { +>test5 : Symbol(test5, Decl(typeGuardTypeOfUndefined.ts, 45, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 47, 15)) + + if (typeof a !== "undefined") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 47, 15)) + + if (typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 47, 15)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 47, 15)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 47, 15)) + } + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 47, 15)) + } +} + +function test6(a: boolean | void) { +>test6 : Symbol(test6, Decl(typeGuardTypeOfUndefined.ts, 59, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 61, 15)) + + if (typeof a === "undefined") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 61, 15)) + + if (typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 61, 15)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 61, 15)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 61, 15)) + } + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 61, 15)) + } +} + +function test7(a: boolean | void) { +>test7 : Symbol(test7, Decl(typeGuardTypeOfUndefined.ts, 73, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 75, 15)) + + if (typeof a === "undefined" || typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 75, 15)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 75, 15)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 75, 15)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 75, 15)) + } +} + +function test8(a: boolean | void) { +>test8 : Symbol(test8, Decl(typeGuardTypeOfUndefined.ts, 82, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 84, 15)) + + if (typeof a !== "undefined" && typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 84, 15)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 84, 15)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 84, 15)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 84, 15)) + } +} + +function test9(a: boolean | number) { +>test9 : Symbol(test9, Decl(typeGuardTypeOfUndefined.ts, 91, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 93, 15)) + + if (typeof a !== "undefined") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 93, 15)) + + if (typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 93, 15)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 93, 15)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 93, 15)) + } + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 93, 15)) + } +} + +function test10(a: boolean | number) { +>test10 : Symbol(test10, Decl(typeGuardTypeOfUndefined.ts, 105, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 107, 16)) + + if (typeof a === "undefined") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 107, 16)) + + if (typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 107, 16)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 107, 16)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 107, 16)) + } + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 107, 16)) + } +} + +function test11(a: boolean | number) { +>test11 : Symbol(test11, Decl(typeGuardTypeOfUndefined.ts, 119, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 121, 16)) + + if (typeof a === "undefined" || typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 121, 16)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 121, 16)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 121, 16)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 121, 16)) + } +} + +function test12(a: boolean | number) { +>test12 : Symbol(test12, Decl(typeGuardTypeOfUndefined.ts, 128, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 130, 16)) + + if (typeof a !== "undefined" && typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 130, 16)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 130, 16)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 130, 16)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 130, 16)) + } +} + +function test13(a: boolean | number | void) { +>test13 : Symbol(test13, Decl(typeGuardTypeOfUndefined.ts, 137, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 139, 16)) + + if (typeof a !== "undefined") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 139, 16)) + + if (typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 139, 16)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 139, 16)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 139, 16)) + } + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 139, 16)) + } +} + +function test14(a: boolean | number | void) { +>test14 : Symbol(test14, Decl(typeGuardTypeOfUndefined.ts, 151, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 153, 16)) + + if (typeof a === "undefined") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 153, 16)) + + if (typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 153, 16)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 153, 16)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 153, 16)) + } + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 153, 16)) + } +} + +function test15(a: boolean | number | void) { +>test15 : Symbol(test15, Decl(typeGuardTypeOfUndefined.ts, 165, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 167, 16)) + + if (typeof a === "undefined" || typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 167, 16)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 167, 16)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 167, 16)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 167, 16)) + } +} + +function test16(a: boolean | number | void) { +>test16 : Symbol(test16, Decl(typeGuardTypeOfUndefined.ts, 174, 1)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 176, 16)) + + if (typeof a !== "undefined" && typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 176, 16)) +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 176, 16)) + + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 176, 16)) + } + else { + a; +>a : Symbol(a, Decl(typeGuardTypeOfUndefined.ts, 176, 16)) + } +} + diff --git a/tests/baselines/reference/typeGuardTypeOfUndefined.types b/tests/baselines/reference/typeGuardTypeOfUndefined.types new file mode 100644 index 0000000000000..6cf57e1a1ddce --- /dev/null +++ b/tests/baselines/reference/typeGuardTypeOfUndefined.types @@ -0,0 +1,434 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardTypeOfUndefined.ts === +// undefined type guard adds no new type information +function test1(a: any) { +>test1 : (a: any) => void +>a : any + + if (typeof a !== "undefined") { +>typeof a !== "undefined" : boolean +>typeof a : string +>a : any +>"undefined" : string + + if (typeof a === "boolean") { +>typeof a === "boolean" : boolean +>typeof a : string +>a : any +>"boolean" : string + + a; +>a : boolean + } + else { + a; +>a : any + } + } + else { + a; +>a : any + } +} + +function test2(a: any) { +>test2 : (a: any) => void +>a : any + + if (typeof a === "undefined") { +>typeof a === "undefined" : boolean +>typeof a : string +>a : any +>"undefined" : string + + if (typeof a === "boolean") { +>typeof a === "boolean" : boolean +>typeof a : string +>a : any +>"boolean" : string + + a; +>a : boolean + } + else { + a; +>a : any + } + } + else { + a; +>a : any + } +} + +function test3(a: any) { +>test3 : (a: any) => void +>a : any + + if (typeof a === "undefined" || typeof a === "boolean") { +>typeof a === "undefined" || typeof a === "boolean" : boolean +>typeof a === "undefined" : boolean +>typeof a : string +>a : any +>"undefined" : string +>typeof a === "boolean" : boolean +>typeof a : string +>a : any +>"boolean" : string + + a; +>a : any + } + else { + a; +>a : any + } +} + +function test4(a: any) { +>test4 : (a: any) => void +>a : any + + if (typeof a !== "undefined" && typeof a === "boolean") { +>typeof a !== "undefined" && typeof a === "boolean" : boolean +>typeof a !== "undefined" : boolean +>typeof a : string +>a : any +>"undefined" : string +>typeof a === "boolean" : boolean +>typeof a : string +>a : any +>"boolean" : string + + a; +>a : boolean + } + else { + a; +>a : any + } +} + +function test5(a: boolean | void) { +>test5 : (a: boolean | void) => void +>a : boolean | void + + if (typeof a !== "undefined") { +>typeof a !== "undefined" : boolean +>typeof a : string +>a : boolean | void +>"undefined" : string + + if (typeof a === "boolean") { +>typeof a === "boolean" : boolean +>typeof a : string +>a : boolean | void +>"boolean" : string + + a; +>a : boolean + } + else { + a; +>a : void + } + } + else { + a; +>a : boolean | void + } +} + +function test6(a: boolean | void) { +>test6 : (a: boolean | void) => void +>a : boolean | void + + if (typeof a === "undefined") { +>typeof a === "undefined" : boolean +>typeof a : string +>a : boolean | void +>"undefined" : string + + if (typeof a === "boolean") { +>typeof a === "boolean" : boolean +>typeof a : string +>a : boolean | void +>"boolean" : string + + a; +>a : boolean + } + else { + a; +>a : void + } + } + else { + a; +>a : boolean | void + } +} + +function test7(a: boolean | void) { +>test7 : (a: boolean | void) => void +>a : boolean | void + + if (typeof a === "undefined" || typeof a === "boolean") { +>typeof a === "undefined" || typeof a === "boolean" : boolean +>typeof a === "undefined" : boolean +>typeof a : string +>a : boolean | void +>"undefined" : string +>typeof a === "boolean" : boolean +>typeof a : string +>a : boolean | void +>"boolean" : string + + a; +>a : boolean | void + } + else { + a; +>a : void + } +} + +function test8(a: boolean | void) { +>test8 : (a: boolean | void) => void +>a : boolean | void + + if (typeof a !== "undefined" && typeof a === "boolean") { +>typeof a !== "undefined" && typeof a === "boolean" : boolean +>typeof a !== "undefined" : boolean +>typeof a : string +>a : boolean | void +>"undefined" : string +>typeof a === "boolean" : boolean +>typeof a : string +>a : boolean | void +>"boolean" : string + + a; +>a : boolean + } + else { + a; +>a : boolean | void + } +} + +function test9(a: boolean | number) { +>test9 : (a: boolean | number) => void +>a : boolean | number + + if (typeof a !== "undefined") { +>typeof a !== "undefined" : boolean +>typeof a : string +>a : boolean | number +>"undefined" : string + + if (typeof a === "boolean") { +>typeof a === "boolean" : boolean +>typeof a : string +>a : boolean | number +>"boolean" : string + + a; +>a : boolean + } + else { + a; +>a : number + } + } + else { + a; +>a : boolean | number + } +} + +function test10(a: boolean | number) { +>test10 : (a: boolean | number) => void +>a : boolean | number + + if (typeof a === "undefined") { +>typeof a === "undefined" : boolean +>typeof a : string +>a : boolean | number +>"undefined" : string + + if (typeof a === "boolean") { +>typeof a === "boolean" : boolean +>typeof a : string +>a : boolean | number +>"boolean" : string + + a; +>a : boolean + } + else { + a; +>a : number + } + } + else { + a; +>a : boolean | number + } +} + +function test11(a: boolean | number) { +>test11 : (a: boolean | number) => void +>a : boolean | number + + if (typeof a === "undefined" || typeof a === "boolean") { +>typeof a === "undefined" || typeof a === "boolean" : boolean +>typeof a === "undefined" : boolean +>typeof a : string +>a : boolean | number +>"undefined" : string +>typeof a === "boolean" : boolean +>typeof a : string +>a : boolean | number +>"boolean" : string + + a; +>a : boolean | number + } + else { + a; +>a : number + } +} + +function test12(a: boolean | number) { +>test12 : (a: boolean | number) => void +>a : boolean | number + + if (typeof a !== "undefined" && typeof a === "boolean") { +>typeof a !== "undefined" && typeof a === "boolean" : boolean +>typeof a !== "undefined" : boolean +>typeof a : string +>a : boolean | number +>"undefined" : string +>typeof a === "boolean" : boolean +>typeof a : string +>a : boolean | number +>"boolean" : string + + a; +>a : boolean + } + else { + a; +>a : boolean | number + } +} + +function test13(a: boolean | number | void) { +>test13 : (a: boolean | number | void) => void +>a : boolean | number | void + + if (typeof a !== "undefined") { +>typeof a !== "undefined" : boolean +>typeof a : string +>a : boolean | number | void +>"undefined" : string + + if (typeof a === "boolean") { +>typeof a === "boolean" : boolean +>typeof a : string +>a : boolean | number | void +>"boolean" : string + + a; +>a : boolean + } + else { + a; +>a : number | void + } + } + else { + a; +>a : boolean | number | void + } +} + +function test14(a: boolean | number | void) { +>test14 : (a: boolean | number | void) => void +>a : boolean | number | void + + if (typeof a === "undefined") { +>typeof a === "undefined" : boolean +>typeof a : string +>a : boolean | number | void +>"undefined" : string + + if (typeof a === "boolean") { +>typeof a === "boolean" : boolean +>typeof a : string +>a : boolean | number | void +>"boolean" : string + + a; +>a : boolean + } + else { + a; +>a : number | void + } + } + else { + a; +>a : boolean | number | void + } +} + +function test15(a: boolean | number | void) { +>test15 : (a: boolean | number | void) => void +>a : boolean | number | void + + if (typeof a === "undefined" || typeof a === "boolean") { +>typeof a === "undefined" || typeof a === "boolean" : boolean +>typeof a === "undefined" : boolean +>typeof a : string +>a : boolean | number | void +>"undefined" : string +>typeof a === "boolean" : boolean +>typeof a : string +>a : boolean | number | void +>"boolean" : string + + a; +>a : boolean | number | void + } + else { + a; +>a : number | void + } +} + +function test16(a: boolean | number | void) { +>test16 : (a: boolean | number | void) => void +>a : boolean | number | void + + if (typeof a !== "undefined" && typeof a === "boolean") { +>typeof a !== "undefined" && typeof a === "boolean" : boolean +>typeof a !== "undefined" : boolean +>typeof a : string +>a : boolean | number | void +>"undefined" : string +>typeof a === "boolean" : boolean +>typeof a : string +>a : boolean | number | void +>"boolean" : string + + a; +>a : boolean + } + else { + a; +>a : boolean | number | void + } +} + diff --git a/tests/baselines/reference/typeGuardsInExternalModule.js b/tests/baselines/reference/typeGuardsInExternalModule.js index 88423e65ca1ee..76624440d248a 100644 --- a/tests/baselines/reference/typeGuardsInExternalModule.js +++ b/tests/baselines/reference/typeGuardsInExternalModule.js @@ -26,6 +26,7 @@ else { //// [typeGuardsInExternalModule.js] // Note that type guards affect types of variables and parameters only and // have no effect on members of objects such as properties. +"use strict"; // local variable in external module var num; var var1; diff --git a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.js b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.js index 7cf19dac0ad68..91443a9ae783e 100644 --- a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.js +++ b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.js @@ -41,12 +41,12 @@ function foo4(x: number | string | boolean) { : x.toString(); // number })(x); // x here is narrowed to number | boolean } -// Type guards affect nested function expressions, but not nested function declarations +// Type guards affect nested function expressions and nested function declarations function foo5(x: number | string | boolean) { if (typeof x === "string") { var y = x; // string; function foo() { - var z = x; // number | string | boolean, type guard has no effect + var z = x; // string } } } @@ -121,12 +121,12 @@ function foo4(x) { : x.toString(); // number })(x); // x here is narrowed to number | boolean } -// Type guards affect nested function expressions, but not nested function declarations +// Type guards affect nested function expressions and nested function declarations function foo5(x) { if (typeof x === "string") { var y = x; // string; function foo() { - var z = x; // number | string | boolean, type guard has no effect + var z = x; // string } } } diff --git a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.symbols b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.symbols index 2f3232b02255d..34810f303db3d 100644 --- a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.symbols +++ b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.symbols @@ -130,7 +130,7 @@ function foo4(x: number | string | boolean) { })(x); // x here is narrowed to number | boolean >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 32, 14)) } -// Type guards affect nested function expressions, but not nested function declarations +// Type guards affect nested function expressions and nested function declarations function foo5(x: number | string | boolean) { >foo5 : Symbol(foo5, Decl(typeGuardsInFunctionAndModuleBlock.ts, 41, 1)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 43, 14)) @@ -145,7 +145,7 @@ function foo5(x: number | string | boolean) { function foo() { >foo : Symbol(foo, Decl(typeGuardsInFunctionAndModuleBlock.ts, 45, 18)) - var z = x; // number | string | boolean, type guard has no effect + var z = x; // string >z : Symbol(z, Decl(typeGuardsInFunctionAndModuleBlock.ts, 47, 15)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 43, 14)) } diff --git a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types index 0a084d6eb541d..f7d56ed17d1a6 100644 --- a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types +++ b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types @@ -181,7 +181,7 @@ function foo4(x: number | string | boolean) { })(x); // x here is narrowed to number | boolean >x : number | boolean } -// Type guards affect nested function expressions, but not nested function declarations +// Type guards affect nested function expressions and nested function declarations function foo5(x: number | string | boolean) { >foo5 : (x: number | string | boolean) => void >x : number | string | boolean @@ -199,9 +199,9 @@ function foo5(x: number | string | boolean) { function foo() { >foo : () => void - var z = x; // number | string | boolean, type guard has no effect ->z : number | string | boolean ->x : number | string | boolean + var z = x; // string +>z : string +>x : string } } } diff --git a/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js b/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js index 7e92394138627..87e0075a9428e 100644 --- a/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js +++ b/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js @@ -24,6 +24,7 @@ i2 = a2; // no error //// [typeParameterCompatibilityAccrossDeclarations.js] define(["require", "exports"], function (require, exports) { + "use strict"; var a = { x: function (y) { return null; } }; diff --git a/tests/baselines/reference/typeParameterConstraints1.errors.txt b/tests/baselines/reference/typeParameterConstraints1.errors.txt index f30fd4f6700b4..e837e19317deb 100644 --- a/tests/baselines/reference/typeParameterConstraints1.errors.txt +++ b/tests/baselines/reference/typeParameterConstraints1.errors.txt @@ -1,12 +1,11 @@ tests/cases/compiler/typeParameterConstraints1.ts(6,25): error TS2304: Cannot find name 'hm'. -tests/cases/compiler/typeParameterConstraints1.ts(8,25): error TS1110: Type expected. tests/cases/compiler/typeParameterConstraints1.ts(9,25): error TS1110: Type expected. tests/cases/compiler/typeParameterConstraints1.ts(10,26): error TS1110: Type expected. tests/cases/compiler/typeParameterConstraints1.ts(11,26): error TS1110: Type expected. tests/cases/compiler/typeParameterConstraints1.ts(12,26): error TS2304: Cannot find name 'undefined'. -==== tests/cases/compiler/typeParameterConstraints1.ts (6 errors) ==== +==== tests/cases/compiler/typeParameterConstraints1.ts (5 errors) ==== function foo1(test: T) { } function foo2(test: T) { } function foo3(test: T) { } @@ -17,8 +16,6 @@ tests/cases/compiler/typeParameterConstraints1.ts(12,26): error TS2304: Cannot f !!! error TS2304: Cannot find name 'hm'. function foo7(test: T) { } // valid function foo8(test: T) { } - ~~ -!!! error TS1110: Type expected. function foo9 (test: T) { } ~ !!! error TS1110: Type expected. diff --git a/tests/baselines/reference/typeParametersAndParametersInComputedNames.errors.txt b/tests/baselines/reference/typeParametersAndParametersInComputedNames.errors.txt new file mode 100644 index 0000000000000..872a0a10923a2 --- /dev/null +++ b/tests/baselines/reference/typeParametersAndParametersInComputedNames.errors.txt @@ -0,0 +1,17 @@ +tests/cases/compiler/typeParametersAndParametersInComputedNames.ts(6,10): error TS2304: Cannot find name 'T'. +tests/cases/compiler/typeParametersAndParametersInComputedNames.ts(6,13): error TS2304: Cannot find name 'a'. + + +==== tests/cases/compiler/typeParametersAndParametersInComputedNames.ts (2 errors) ==== + function foo(a: T) : string { + return ""; + } + + class A { + [foo(a)](a: T) { + ~ +!!! error TS2304: Cannot find name 'T'. + ~ +!!! error TS2304: Cannot find name 'a'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/typeParametersAndParametersInComputedNames.js b/tests/baselines/reference/typeParametersAndParametersInComputedNames.js new file mode 100644 index 0000000000000..1cb53663fbde2 --- /dev/null +++ b/tests/baselines/reference/typeParametersAndParametersInComputedNames.js @@ -0,0 +1,21 @@ +//// [typeParametersAndParametersInComputedNames.ts] +function foo(a: T) : string { + return ""; +} + +class A { + [foo(a)](a: T) { + } +} + +//// [typeParametersAndParametersInComputedNames.js] +function foo(a) { + return ""; +} +var A = (function () { + function A() { + } + A.prototype[foo(a)] = function (a) { + }; + return A; +})(); diff --git a/tests/baselines/reference/typeResolution.js b/tests/baselines/reference/typeResolution.js index 55a6beeceba25..ed5ae95f23cde 100644 --- a/tests/baselines/reference/typeResolution.js +++ b/tests/baselines/reference/typeResolution.js @@ -112,6 +112,7 @@ module TopLevelModule2 { //// [typeResolution.js] define(["require", "exports"], function (require, exports) { + "use strict"; var TopLevelModule1; (function (TopLevelModule1) { var SubModule1; diff --git a/tests/baselines/reference/typeResolution.js.map b/tests/baselines/reference/typeResolution.js.map index e05b5d65d10bb..7ccf64daf068b 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,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;oBAAAC;oBAmBAC,CAACA;oBAlBUD,2BAAUA,GAAjBA;wBACIE,uCAAuCA;wBACvCA,IAAIA,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;wBAEzEA,yCAAyCA;wBACzCA,IAAIA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAEzEA,qCAAqCA;wBACrCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAEzEA,sBAAsBA;wBACtBA,IAAIA,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,SAmBlBA,CAAAA;gBACDA;oBAAAI;oBAsBAC,CAACA;oBArBUD,2BAAUA,GAAjBA;wBACIE,+CAA+CA;wBAE/CA,uCAAuCA;wBACvCA,IAAIA,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;wBAEzEA,yCAAyCA;wBACzCA,IAAIA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAEzEA,qCAAqCA;wBACrCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzEA,IAAIA,EAAqCA,CAACA;wBAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAEzDA,sBAAsBA;wBACtBA,IAAIA,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,SAsBlBA,CAAAA;gBAEDA;oBACIO;wBACIC;4BACIC,uCAAuCA;4BACvCA,IAAIA,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;YAEDA,0EAA0EA;YAC1EA;gBACIW;oBACIC;wBACIC,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;wBAEzEA,sBAAsBA;wBACtBA,IAAIA,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;gBACzBC,6DAA6DA;gBAC7DA;oBAAAC;oBAA8CC,CAACA;oBAAlBD,2BAAUA,GAAjBA,cAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CD,IAA+CA;gBAAlCA,oBAAMA,SAA4BA,CAAAA;gBAC/CA;oBAAAI;oBAA8CC,CAACA;oBAAlBD,2BAAUA,GAAjBA,cAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CJ,IAA+CA;gBAAlCA,oBAAMA,SAA4BA,CAAAA;gBAC/CA;oBAAAO;oBAA8CC,CAACA;oBAAlBD,2BAAUA,GAAjBA,cAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CP,IAA+CA;gBAAlCA,oBAAMA,SAA4BA,CAAAA;YAGnDA,CAACA,EAPaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAO1BA;QAGLA,CAACA,EAXaf,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAWvBA;QAEDA;YAAA0B;YAEAC,CAACA;YADUD,uBAAMA,GAAbA,cAAkBE,CAACA;YACvBF,aAACA;QAADA,CAACA,AAFD1B,IAECA;QAMDA,IAAOA,iBAAiBA,CAEvBA;QAFDA,WAAOA,iBAAiBA,EAACA,CAACA;YACtB6B;gBAAAC;gBAAsBC,CAACA;gBAADD,aAACA;YAADA,CAACA,AAAvBD,IAAuBA;YAAVA,wBAAMA,SAAIA,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;gBAAAC;gBAEAC,CAACA;gBADUD,yBAAQA,GAAfA,cAAoBE,CAACA;gBACzBF,aAACA;YAADA,CAACA,AAFDD,IAECA;YAFYA,iBAAMA,SAElBA,CAAAA;QACLA,CAACA,EAJaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAIvBA;IACLA,CAACA,EANM,eAAe,KAAf,eAAe,QAMrB"} \ No newline at end of file +{"version":3,"file":"typeResolution.js","sourceRoot":"","sources":["typeResolution.ts"],"names":[],"mappings":";;IAAA,IAAc,eAAe,CAmG5B;IAnGD,WAAc,eAAe,EAAC,CAAC;QAC3B,IAAc,UAAU,CAwEvB;QAxED,WAAc,UAAU,EAAC,CAAC;YACtB,IAAc,aAAa,CAwD1B;YAxDD,WAAc,aAAa,EAAC,CAAC;gBACzB;oBAAA;oBAmBA,CAAC;oBAlBU,2BAAU,GAAjB;wBACI,uCAAuC;wBACvC,IAAI,EAAU,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAChC,IAAI,EAAwB,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAC9C,IAAI,EAAmC,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBACzD,IAAI,EAAmD,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAEzE,yCAAyC;wBACzC,IAAI,EAAU,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAChC,IAAI,EAAmD,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAEzE,qCAAqC;wBACrC,IAAI,EAAmD,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAEzE,sBAAsB;wBACtB,IAAI,EAAc,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBACpC,IAAI,EAA4B,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;oBACtD,CAAC;oBACL,aAAC;gBAAD,CAAC,AAnBD,IAmBC;gBAnBY,oBAAM,SAmBlB,CAAA;gBACD;oBAAA;oBAsBA,CAAC;oBArBU,2BAAU,GAAjB;wBACI,+CAA+C;wBAE/C,uCAAuC;wBACvC,IAAI,EAAU,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAChC,IAAI,EAAwB,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAC9C,IAAI,EAAmC,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBACzD,IAAI,EAAmD,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAEzE,yCAAyC;wBACzC,IAAI,EAAU,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAChC,IAAI,EAAmD,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAEzE,qCAAqC;wBACrC,IAAI,EAAmD,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBACzE,IAAI,EAAqC,CAAC;wBAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;wBAEzD,sBAAsB;wBACtB,IAAI,EAAc,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBACpC,IAAI,EAA4B,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;oBACtD,CAAC;oBACL,aAAC;gBAAD,CAAC,AAtBD,IAsBC;gBAtBY,oBAAM,SAsBlB,CAAA;gBAED;oBACI;wBACI;4BACI,uCAAuC;4BACvC,IAAI,EAAmD,CAAC;4BAAC,EAAE,CAAC,UAAU,EAAE,CAAC;4BACzE,IAAI,EAAmD,CAAC;4BAAC,EAAE,CAAC,UAAU,EAAE,CAAC;4BACzE,IAAI,EAAc,CAAC;4BAAC,EAAE,CAAC,UAAU,EAAE,CAAC;4BACpC,IAAI,EAAqC,CAAC;4BAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;wBAC7D,CAAC;oBACL,CAAC;oBACL,wBAAC;gBAAD,CAAC,AAVD,IAUC;YACL,CAAC,EAxDa,aAAa,GAAb,wBAAa,KAAb,wBAAa,QAwD1B;YAED,0EAA0E;YAC1E;gBACI;oBACI;wBACI,IAAI,EAAwB,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAC9C,IAAI,EAAmC,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBACzD,IAAI,EAAmD,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;wBAEzE,sBAAsB;wBACtB,IAAI,EAA4B,CAAC;wBAAC,EAAE,CAAC,UAAU,EAAE,CAAC;oBACtD,CAAC;gBACL,CAAC;gBACL,aAAC;YAAD,CAAC,AAXD,IAWC;QACL,CAAC,EAxEa,UAAU,GAAV,0BAAU,KAAV,0BAAU,QAwEvB;QAED,IAAc,UAAU,CAWvB;QAXD,WAAc,UAAU,EAAC,CAAC;YACtB,IAAc,aAAa,CAO1B;YAPD,WAAc,aAAa,EAAC,CAAC;gBACzB,6DAA6D;gBAC7D;oBAAA;oBAA8C,CAAC;oBAAlB,2BAAU,GAAjB,cAAsB,CAAC;oBAAC,aAAC;gBAAD,CAAC,AAA/C,IAA+C;gBAAlC,oBAAM,SAA4B,CAAA;gBAC/C;oBAAA;oBAA8C,CAAC;oBAAlB,2BAAU,GAAjB,cAAsB,CAAC;oBAAC,aAAC;gBAAD,CAAC,AAA/C,IAA+C;gBAAlC,oBAAM,SAA4B,CAAA;gBAC/C;oBAAA;oBAA8C,CAAC;oBAAlB,2BAAU,GAAjB,cAAsB,CAAC;oBAAC,aAAC;gBAAD,CAAC,AAA/C,IAA+C;gBAAlC,oBAAM,SAA4B,CAAA;YAGnD,CAAC,EAPa,aAAa,GAAb,wBAAa,KAAb,wBAAa,QAO1B;QAGL,CAAC,EAXa,UAAU,GAAV,0BAAU,KAAV,0BAAU,QAWvB;QAED;YAAA;YAEA,CAAC;YADU,uBAAM,GAAb,cAAkB,CAAC;YACvB,aAAC;QAAD,CAAC,AAFD,IAEC;QAMD,IAAO,iBAAiB,CAEvB;QAFD,WAAO,iBAAiB,EAAC,CAAC;YACtB;gBAAA;gBAAsB,CAAC;gBAAD,aAAC;YAAD,CAAC,AAAvB,IAAuB;YAAV,wBAAM,SAAI,CAAA;QAC3B,CAAC,EAFM,iBAAiB,KAAjB,iBAAiB,QAEvB;IACL,CAAC,EAnGa,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAmG5B;IAED,IAAO,eAAe,CAMrB;IAND,WAAO,eAAe,EAAC,CAAC;QACpB,IAAc,UAAU,CAIvB;QAJD,WAAc,UAAU,EAAC,CAAC;YACtB;gBAAA;gBAEA,CAAC;gBADU,yBAAQ,GAAf,cAAoB,CAAC;gBACzB,aAAC;YAAD,CAAC,AAFD,IAEC;YAFY,iBAAM,SAElB,CAAA;QACL,CAAC,EAJa,UAAU,GAAV,0BAAU,KAAV,0BAAU,QAIvB;IACL,CAAC,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 244dbed0b9261..69023ac95063a 100644 --- a/tests/baselines/reference/typeResolution.sourcemap.txt +++ b/tests/baselines/reference/typeResolution.sourcemap.txt @@ -9,6 +9,7 @@ emittedFile:tests/cases/compiler/typeResolution.js sourceFile:typeResolution.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { +>>> "use strict"; >>> var TopLevelModule1; 1 >^^^^ 2 > ^^^^ @@ -118,10 +119,10 @@ sourceFile:typeResolution.ts > 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) +1 >Emitted(3, 5) Source(1, 1) + SourceIndex(0) +2 >Emitted(3, 9) Source(1, 15) + SourceIndex(0) +3 >Emitted(3, 24) Source(1, 30) + SourceIndex(0) +4 >Emitted(3, 25) Source(100, 2) + SourceIndex(0) --- >>> (function (TopLevelModule1) { 1->^^^^ @@ -134,11 +135,11 @@ sourceFile:typeResolution.ts 3 > TopLevelModule1 4 > 5 > { -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) +1->Emitted(4, 5) Source(1, 1) + SourceIndex(0) +2 >Emitted(4, 16) Source(1, 15) + SourceIndex(0) +3 >Emitted(4, 31) Source(1, 30) + SourceIndex(0) +4 >Emitted(4, 33) Source(1, 31) + SourceIndex(0) +5 >Emitted(4, 34) Source(1, 32) + SourceIndex(0) --- >>> var SubModule1; 1 >^^^^^^^^ @@ -223,10 +224,10 @@ sourceFile:typeResolution.ts > } > } > } -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) +1 >Emitted(5, 9) Source(2, 5) + SourceIndex(0) +2 >Emitted(5, 13) Source(2, 19) + SourceIndex(0) +3 >Emitted(5, 23) Source(2, 29) + SourceIndex(0) +4 >Emitted(5, 24) Source(74, 6) + SourceIndex(0) --- >>> (function (SubModule1) { 1->^^^^^^^^ @@ -239,11 +240,11 @@ sourceFile:typeResolution.ts 3 > SubModule1 4 > 5 > { -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) +1->Emitted(6, 9) Source(2, 5) + SourceIndex(0) +2 >Emitted(6, 20) Source(2, 19) + SourceIndex(0) +3 >Emitted(6, 30) Source(2, 29) + SourceIndex(0) +4 >Emitted(6, 32) Source(2, 30) + SourceIndex(0) +5 >Emitted(6, 33) Source(2, 31) + SourceIndex(0) --- >>> var SubSubModule1; 1 >^^^^^^^^^^^^ @@ -312,10 +313,10 @@ sourceFile:typeResolution.ts > } > } > } -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) +1 >Emitted(7, 13) Source(3, 9) + SourceIndex(0) +2 >Emitted(7, 17) Source(3, 23) + SourceIndex(0) +3 >Emitted(7, 30) Source(3, 36) + SourceIndex(0) +4 >Emitted(7, 31) Source(59, 10) + SourceIndex(0) --- >>> (function (SubSubModule1) { 1->^^^^^^^^^^^^ @@ -329,24 +330,24 @@ sourceFile:typeResolution.ts 3 > SubSubModule1 4 > 5 > { -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) +1->Emitted(8, 13) Source(3, 9) + SourceIndex(0) +2 >Emitted(8, 24) Source(3, 23) + SourceIndex(0) +3 >Emitted(8, 37) Source(3, 36) + SourceIndex(0) +4 >Emitted(8, 39) Source(3, 37) + SourceIndex(0) +5 >Emitted(8, 40) Source(3, 38) + SourceIndex(0) --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(8, 17) Source(4, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1->Emitted(9, 17) Source(4, 13) + SourceIndex(0) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(9, 21) Source(4, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) +1->Emitted(10, 21) Source(4, 13) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^^^^^ @@ -373,8 +374,8 @@ sourceFile:typeResolution.ts > } > 2 > } -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) +1->Emitted(11, 21) Source(23, 13) + SourceIndex(0) +2 >Emitted(11, 22) Source(23, 14) + SourceIndex(0) --- >>> ClassA.prototype.AisIn1_1_1 = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -384,9 +385,9 @@ sourceFile:typeResolution.ts 1-> 2 > AisIn1_1_1 3 > -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) +1->Emitted(12, 21) Source(5, 24) + SourceIndex(0) +2 >Emitted(12, 48) Source(5, 34) + SourceIndex(0) +3 >Emitted(12, 51) Source(5, 17) + SourceIndex(0) --- >>> // Try all qualified names of this type 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -394,8 +395,8 @@ sourceFile:typeResolution.ts 1->public AisIn1_1_1() { > 2 > // Try all qualified names of this type -1->Emitted(12, 25) Source(6, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(12, 64) Source(6, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(13, 25) Source(6, 21) + SourceIndex(0) +2 >Emitted(13, 64) Source(6, 60) + SourceIndex(0) --- >>> var a1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -408,10 +409,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a1: ClassA 4 > ; -1 >Emitted(13, 25) Source(7, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(13, 29) Source(7, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(13, 31) Source(7, 35) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(13, 32) Source(7, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(14, 25) Source(7, 21) + SourceIndex(0) +2 >Emitted(14, 29) Source(7, 25) + SourceIndex(0) +3 >Emitted(14, 31) Source(7, 35) + SourceIndex(0) +4 >Emitted(14, 32) Source(7, 36) + SourceIndex(0) --- >>> a1.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -426,12 +427,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(15, 25) Source(7, 37) + SourceIndex(0) +2 >Emitted(15, 27) Source(7, 39) + SourceIndex(0) +3 >Emitted(15, 28) Source(7, 40) + SourceIndex(0) +4 >Emitted(15, 38) Source(7, 50) + SourceIndex(0) +5 >Emitted(15, 40) Source(7, 52) + SourceIndex(0) +6 >Emitted(15, 41) Source(7, 53) + SourceIndex(0) --- >>> var a2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -444,10 +445,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a2: SubSubModule1.ClassA 4 > ; -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) +1 >Emitted(16, 25) Source(8, 21) + SourceIndex(0) +2 >Emitted(16, 29) Source(8, 25) + SourceIndex(0) +3 >Emitted(16, 31) Source(8, 49) + SourceIndex(0) +4 >Emitted(16, 32) Source(8, 50) + SourceIndex(0) --- >>> a2.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -462,12 +463,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(17, 25) Source(8, 51) + SourceIndex(0) +2 >Emitted(17, 27) Source(8, 53) + SourceIndex(0) +3 >Emitted(17, 28) Source(8, 54) + SourceIndex(0) +4 >Emitted(17, 38) Source(8, 64) + SourceIndex(0) +5 >Emitted(17, 40) Source(8, 66) + SourceIndex(0) +6 >Emitted(17, 41) Source(8, 67) + SourceIndex(0) --- >>> var a3; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -480,10 +481,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a3: SubModule1.SubSubModule1.ClassA 4 > ; -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) +1 >Emitted(18, 25) Source(9, 21) + SourceIndex(0) +2 >Emitted(18, 29) Source(9, 25) + SourceIndex(0) +3 >Emitted(18, 31) Source(9, 60) + SourceIndex(0) +4 >Emitted(18, 32) Source(9, 61) + SourceIndex(0) --- >>> a3.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -498,12 +499,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(19, 25) Source(9, 62) + SourceIndex(0) +2 >Emitted(19, 27) Source(9, 64) + SourceIndex(0) +3 >Emitted(19, 28) Source(9, 65) + SourceIndex(0) +4 >Emitted(19, 38) Source(9, 75) + SourceIndex(0) +5 >Emitted(19, 40) Source(9, 77) + SourceIndex(0) +6 >Emitted(19, 41) Source(9, 78) + SourceIndex(0) --- >>> var a4; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -516,10 +517,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA 4 > ; -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) +1 >Emitted(20, 25) Source(10, 21) + SourceIndex(0) +2 >Emitted(20, 29) Source(10, 25) + SourceIndex(0) +3 >Emitted(20, 31) Source(10, 76) + SourceIndex(0) +4 >Emitted(20, 32) Source(10, 77) + SourceIndex(0) --- >>> a4.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -535,12 +536,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(21, 25) Source(10, 78) + SourceIndex(0) +2 >Emitted(21, 27) Source(10, 80) + SourceIndex(0) +3 >Emitted(21, 28) Source(10, 81) + SourceIndex(0) +4 >Emitted(21, 38) Source(10, 91) + SourceIndex(0) +5 >Emitted(21, 40) Source(10, 93) + SourceIndex(0) +6 >Emitted(21, 41) Source(10, 94) + SourceIndex(0) --- >>> // Two variants of qualifying a peer type 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -549,8 +550,8 @@ sourceFile:typeResolution.ts > > 2 > // Two variants of qualifying a peer type -1->Emitted(21, 25) Source(12, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(21, 66) Source(12, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(22, 25) Source(12, 21) + SourceIndex(0) +2 >Emitted(22, 66) Source(12, 62) + SourceIndex(0) --- >>> var b1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -563,10 +564,10 @@ sourceFile:typeResolution.ts 2 > var 3 > b1: ClassB 4 > ; -1 >Emitted(22, 25) Source(13, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(22, 29) Source(13, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(22, 31) Source(13, 35) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(22, 32) Source(13, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(23, 25) Source(13, 21) + SourceIndex(0) +2 >Emitted(23, 29) Source(13, 25) + SourceIndex(0) +3 >Emitted(23, 31) Source(13, 35) + SourceIndex(0) +4 >Emitted(23, 32) Source(13, 36) + SourceIndex(0) --- >>> b1.BisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -581,12 +582,12 @@ sourceFile:typeResolution.ts 4 > BisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(24, 25) Source(13, 37) + SourceIndex(0) +2 >Emitted(24, 27) Source(13, 39) + SourceIndex(0) +3 >Emitted(24, 28) Source(13, 40) + SourceIndex(0) +4 >Emitted(24, 38) Source(13, 50) + SourceIndex(0) +5 >Emitted(24, 40) Source(13, 52) + SourceIndex(0) +6 >Emitted(24, 41) Source(13, 53) + SourceIndex(0) --- >>> var b2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -599,10 +600,10 @@ sourceFile:typeResolution.ts 2 > var 3 > b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB 4 > ; -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) +1 >Emitted(25, 25) Source(14, 21) + SourceIndex(0) +2 >Emitted(25, 29) Source(14, 25) + SourceIndex(0) +3 >Emitted(25, 31) Source(14, 76) + SourceIndex(0) +4 >Emitted(25, 32) Source(14, 77) + SourceIndex(0) --- >>> b2.BisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -618,12 +619,12 @@ sourceFile:typeResolution.ts 4 > BisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(26, 25) Source(14, 78) + SourceIndex(0) +2 >Emitted(26, 27) Source(14, 80) + SourceIndex(0) +3 >Emitted(26, 28) Source(14, 81) + SourceIndex(0) +4 >Emitted(26, 38) Source(14, 91) + SourceIndex(0) +5 >Emitted(26, 40) Source(14, 93) + SourceIndex(0) +6 >Emitted(26, 41) Source(14, 94) + SourceIndex(0) --- >>> // Type only accessible from the root 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -632,8 +633,8 @@ sourceFile:typeResolution.ts > > 2 > // Type only accessible from the root -1->Emitted(26, 25) Source(16, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(26, 62) Source(16, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(27, 25) Source(16, 21) + SourceIndex(0) +2 >Emitted(27, 62) Source(16, 58) + SourceIndex(0) --- >>> var c1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -646,10 +647,10 @@ sourceFile:typeResolution.ts 2 > var 3 > c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA 4 > ; -1 >Emitted(27, 25) Source(17, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(27, 29) Source(17, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(27, 31) Source(17, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(27, 32) Source(17, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(28, 25) Source(17, 21) + SourceIndex(0) +2 >Emitted(28, 29) Source(17, 25) + SourceIndex(0) +3 >Emitted(28, 31) Source(17, 76) + SourceIndex(0) +4 >Emitted(28, 32) Source(17, 77) + SourceIndex(0) --- >>> c1.AisIn1_2_2(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -665,12 +666,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_2_2 5 > () 6 > ; -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) +1->Emitted(29, 25) Source(17, 78) + SourceIndex(0) +2 >Emitted(29, 27) Source(17, 80) + SourceIndex(0) +3 >Emitted(29, 28) Source(17, 81) + SourceIndex(0) +4 >Emitted(29, 38) Source(17, 91) + SourceIndex(0) +5 >Emitted(29, 40) Source(17, 93) + SourceIndex(0) +6 >Emitted(29, 41) Source(17, 94) + SourceIndex(0) --- >>> // Interface reference 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -679,8 +680,8 @@ sourceFile:typeResolution.ts > > 2 > // Interface reference -1->Emitted(29, 25) Source(19, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(29, 47) Source(19, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(30, 25) Source(19, 21) + SourceIndex(0) +2 >Emitted(30, 47) Source(19, 43) + SourceIndex(0) --- >>> var d1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -693,10 +694,10 @@ sourceFile:typeResolution.ts 2 > var 3 > d1: InterfaceX 4 > ; -1 >Emitted(30, 25) Source(20, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(30, 29) Source(20, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(30, 31) Source(20, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(30, 32) Source(20, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(31, 25) Source(20, 21) + SourceIndex(0) +2 >Emitted(31, 29) Source(20, 25) + SourceIndex(0) +3 >Emitted(31, 31) Source(20, 39) + SourceIndex(0) +4 >Emitted(31, 32) Source(20, 40) + SourceIndex(0) --- >>> d1.XisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -711,12 +712,12 @@ sourceFile:typeResolution.ts 4 > XisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(32, 25) Source(20, 41) + SourceIndex(0) +2 >Emitted(32, 27) Source(20, 43) + SourceIndex(0) +3 >Emitted(32, 28) Source(20, 44) + SourceIndex(0) +4 >Emitted(32, 38) Source(20, 54) + SourceIndex(0) +5 >Emitted(32, 40) Source(20, 56) + SourceIndex(0) +6 >Emitted(32, 41) Source(20, 57) + SourceIndex(0) --- >>> var d2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -729,10 +730,10 @@ sourceFile:typeResolution.ts 2 > var 3 > d2: SubSubModule1.InterfaceX 4 > ; -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) +1 >Emitted(33, 25) Source(21, 21) + SourceIndex(0) +2 >Emitted(33, 29) Source(21, 25) + SourceIndex(0) +3 >Emitted(33, 31) Source(21, 53) + SourceIndex(0) +4 >Emitted(33, 32) Source(21, 54) + SourceIndex(0) --- >>> d2.XisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -747,12 +748,12 @@ sourceFile:typeResolution.ts 4 > XisIn1_1_1 5 > () 6 > ; -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->Emitted(34, 25) Source(21, 55) + SourceIndex(0) +2 >Emitted(34, 27) Source(21, 57) + SourceIndex(0) +3 >Emitted(34, 28) Source(21, 58) + SourceIndex(0) +4 >Emitted(34, 38) Source(21, 68) + SourceIndex(0) +5 >Emitted(34, 40) Source(21, 70) + SourceIndex(0) +6 >Emitted(34, 41) Source(21, 71) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -761,8 +762,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -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) +1 >Emitted(35, 21) Source(22, 17) + SourceIndex(0) +2 >Emitted(35, 22) Source(22, 18) + SourceIndex(0) --- >>> return ClassA; 1->^^^^^^^^^^^^^^^^^^^^ @@ -770,8 +771,8 @@ sourceFile:typeResolution.ts 1-> > 2 > } -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->Emitted(36, 21) Source(23, 13) + SourceIndex(0) +2 >Emitted(36, 34) Source(23, 14) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -802,10 +803,10 @@ sourceFile:typeResolution.ts > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); > } > } -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) +1 >Emitted(37, 17) Source(23, 13) + SourceIndex(0) +2 >Emitted(37, 18) Source(23, 14) + SourceIndex(0) +3 >Emitted(37, 18) Source(4, 13) + SourceIndex(0) +4 >Emitted(37, 22) Source(23, 14) + SourceIndex(0) --- >>> SubSubModule1.ClassA = ClassA; 1->^^^^^^^^^^^^^^^^ @@ -835,23 +836,23 @@ sourceFile:typeResolution.ts > } > } 4 > -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, 46) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -4 >Emitted(37, 47) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1->Emitted(38, 17) Source(4, 26) + SourceIndex(0) +2 >Emitted(38, 37) Source(4, 32) + SourceIndex(0) +3 >Emitted(38, 46) Source(23, 14) + SourceIndex(0) +4 >Emitted(38, 47) Source(23, 14) + SourceIndex(0) --- >>> var ClassB = (function () { 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(38, 17) Source(24, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1 >Emitted(39, 17) Source(24, 13) + SourceIndex(0) --- >>> function ClassB() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(39, 21) Source(24, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) +1->Emitted(40, 21) Source(24, 13) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^^^^^ @@ -881,8 +882,8 @@ sourceFile:typeResolution.ts > } > 2 > } -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) +1->Emitted(41, 21) Source(46, 13) + SourceIndex(0) +2 >Emitted(41, 22) Source(46, 14) + SourceIndex(0) --- >>> ClassB.prototype.BisIn1_1_1 = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -892,9 +893,9 @@ sourceFile:typeResolution.ts 1-> 2 > BisIn1_1_1 3 > -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) +1->Emitted(42, 21) Source(25, 24) + SourceIndex(0) +2 >Emitted(42, 48) Source(25, 34) + SourceIndex(0) +3 >Emitted(42, 51) Source(25, 17) + SourceIndex(0) --- >>> /** Exactly the same as above in AisIn1_1_1 **/ 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -902,8 +903,8 @@ sourceFile:typeResolution.ts 1->public BisIn1_1_1() { > 2 > /** Exactly the same as above in AisIn1_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) +1->Emitted(43, 25) Source(26, 21) + SourceIndex(0) +2 >Emitted(43, 72) Source(26, 68) + SourceIndex(0) --- >>> // Try all qualified names of this type 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -912,8 +913,8 @@ sourceFile:typeResolution.ts > > 2 > // Try all qualified names of this type -1 >Emitted(43, 25) Source(28, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(43, 64) Source(28, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(44, 25) Source(28, 21) + SourceIndex(0) +2 >Emitted(44, 64) Source(28, 60) + SourceIndex(0) --- >>> var a1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -926,10 +927,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a1: ClassA 4 > ; -1 >Emitted(44, 25) Source(29, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(44, 29) Source(29, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(44, 31) Source(29, 35) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(44, 32) Source(29, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(45, 25) Source(29, 21) + SourceIndex(0) +2 >Emitted(45, 29) Source(29, 25) + SourceIndex(0) +3 >Emitted(45, 31) Source(29, 35) + SourceIndex(0) +4 >Emitted(45, 32) Source(29, 36) + SourceIndex(0) --- >>> a1.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -944,12 +945,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(46, 25) Source(29, 37) + SourceIndex(0) +2 >Emitted(46, 27) Source(29, 39) + SourceIndex(0) +3 >Emitted(46, 28) Source(29, 40) + SourceIndex(0) +4 >Emitted(46, 38) Source(29, 50) + SourceIndex(0) +5 >Emitted(46, 40) Source(29, 52) + SourceIndex(0) +6 >Emitted(46, 41) Source(29, 53) + SourceIndex(0) --- >>> var a2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -962,10 +963,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a2: SubSubModule1.ClassA 4 > ; -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) +1 >Emitted(47, 25) Source(30, 21) + SourceIndex(0) +2 >Emitted(47, 29) Source(30, 25) + SourceIndex(0) +3 >Emitted(47, 31) Source(30, 49) + SourceIndex(0) +4 >Emitted(47, 32) Source(30, 50) + SourceIndex(0) --- >>> a2.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -980,12 +981,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(48, 25) Source(30, 51) + SourceIndex(0) +2 >Emitted(48, 27) Source(30, 53) + SourceIndex(0) +3 >Emitted(48, 28) Source(30, 54) + SourceIndex(0) +4 >Emitted(48, 38) Source(30, 64) + SourceIndex(0) +5 >Emitted(48, 40) Source(30, 66) + SourceIndex(0) +6 >Emitted(48, 41) Source(30, 67) + SourceIndex(0) --- >>> var a3; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -998,10 +999,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a3: SubModule1.SubSubModule1.ClassA 4 > ; -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) +1 >Emitted(49, 25) Source(31, 21) + SourceIndex(0) +2 >Emitted(49, 29) Source(31, 25) + SourceIndex(0) +3 >Emitted(49, 31) Source(31, 60) + SourceIndex(0) +4 >Emitted(49, 32) Source(31, 61) + SourceIndex(0) --- >>> a3.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1016,12 +1017,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(50, 25) Source(31, 62) + SourceIndex(0) +2 >Emitted(50, 27) Source(31, 64) + SourceIndex(0) +3 >Emitted(50, 28) Source(31, 65) + SourceIndex(0) +4 >Emitted(50, 38) Source(31, 75) + SourceIndex(0) +5 >Emitted(50, 40) Source(31, 77) + SourceIndex(0) +6 >Emitted(50, 41) Source(31, 78) + SourceIndex(0) --- >>> var a4; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1034,10 +1035,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA 4 > ; -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) +1 >Emitted(51, 25) Source(32, 21) + SourceIndex(0) +2 >Emitted(51, 29) Source(32, 25) + SourceIndex(0) +3 >Emitted(51, 31) Source(32, 76) + SourceIndex(0) +4 >Emitted(51, 32) Source(32, 77) + SourceIndex(0) --- >>> a4.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1053,12 +1054,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(52, 25) Source(32, 78) + SourceIndex(0) +2 >Emitted(52, 27) Source(32, 80) + SourceIndex(0) +3 >Emitted(52, 28) Source(32, 81) + SourceIndex(0) +4 >Emitted(52, 38) Source(32, 91) + SourceIndex(0) +5 >Emitted(52, 40) Source(32, 93) + SourceIndex(0) +6 >Emitted(52, 41) Source(32, 94) + SourceIndex(0) --- >>> // Two variants of qualifying a peer type 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1067,8 +1068,8 @@ sourceFile:typeResolution.ts > > 2 > // Two variants of qualifying a peer type -1->Emitted(52, 25) Source(34, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(52, 66) Source(34, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(53, 25) Source(34, 21) + SourceIndex(0) +2 >Emitted(53, 66) Source(34, 62) + SourceIndex(0) --- >>> var b1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1081,10 +1082,10 @@ sourceFile:typeResolution.ts 2 > var 3 > b1: ClassB 4 > ; -1 >Emitted(53, 25) Source(35, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(53, 29) Source(35, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(53, 31) Source(35, 35) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(53, 32) Source(35, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(54, 25) Source(35, 21) + SourceIndex(0) +2 >Emitted(54, 29) Source(35, 25) + SourceIndex(0) +3 >Emitted(54, 31) Source(35, 35) + SourceIndex(0) +4 >Emitted(54, 32) Source(35, 36) + SourceIndex(0) --- >>> b1.BisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1099,12 +1100,12 @@ sourceFile:typeResolution.ts 4 > BisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(55, 25) Source(35, 37) + SourceIndex(0) +2 >Emitted(55, 27) Source(35, 39) + SourceIndex(0) +3 >Emitted(55, 28) Source(35, 40) + SourceIndex(0) +4 >Emitted(55, 38) Source(35, 50) + SourceIndex(0) +5 >Emitted(55, 40) Source(35, 52) + SourceIndex(0) +6 >Emitted(55, 41) Source(35, 53) + SourceIndex(0) --- >>> var b2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1117,10 +1118,10 @@ sourceFile:typeResolution.ts 2 > var 3 > b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB 4 > ; -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) +1 >Emitted(56, 25) Source(36, 21) + SourceIndex(0) +2 >Emitted(56, 29) Source(36, 25) + SourceIndex(0) +3 >Emitted(56, 31) Source(36, 76) + SourceIndex(0) +4 >Emitted(56, 32) Source(36, 77) + SourceIndex(0) --- >>> b2.BisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1136,12 +1137,12 @@ sourceFile:typeResolution.ts 4 > BisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(57, 25) Source(36, 78) + SourceIndex(0) +2 >Emitted(57, 27) Source(36, 80) + SourceIndex(0) +3 >Emitted(57, 28) Source(36, 81) + SourceIndex(0) +4 >Emitted(57, 38) Source(36, 91) + SourceIndex(0) +5 >Emitted(57, 40) Source(36, 93) + SourceIndex(0) +6 >Emitted(57, 41) Source(36, 94) + SourceIndex(0) --- >>> // Type only accessible from the root 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1150,8 +1151,8 @@ sourceFile:typeResolution.ts > > 2 > // Type only accessible from the root -1->Emitted(57, 25) Source(38, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(57, 62) Source(38, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(58, 25) Source(38, 21) + SourceIndex(0) +2 >Emitted(58, 62) Source(38, 58) + SourceIndex(0) --- >>> var c1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1164,10 +1165,10 @@ sourceFile:typeResolution.ts 2 > var 3 > c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA 4 > ; -1 >Emitted(58, 25) Source(39, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(58, 29) Source(39, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(58, 31) Source(39, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(58, 32) Source(39, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(59, 25) Source(39, 21) + SourceIndex(0) +2 >Emitted(59, 29) Source(39, 25) + SourceIndex(0) +3 >Emitted(59, 31) Source(39, 76) + SourceIndex(0) +4 >Emitted(59, 32) Source(39, 77) + SourceIndex(0) --- >>> c1.AisIn1_2_2(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1182,12 +1183,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_2_2 5 > () 6 > ; -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) +1->Emitted(60, 25) Source(39, 78) + SourceIndex(0) +2 >Emitted(60, 27) Source(39, 80) + SourceIndex(0) +3 >Emitted(60, 28) Source(39, 81) + SourceIndex(0) +4 >Emitted(60, 38) Source(39, 91) + SourceIndex(0) +5 >Emitted(60, 40) Source(39, 93) + SourceIndex(0) +6 >Emitted(60, 41) Source(39, 94) + SourceIndex(0) --- >>> var c2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1200,10 +1201,10 @@ sourceFile:typeResolution.ts 2 > var 3 > c2: TopLevelModule2.SubModule3.ClassA 4 > ; -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) +1 >Emitted(61, 25) Source(40, 21) + SourceIndex(0) +2 >Emitted(61, 29) Source(40, 25) + SourceIndex(0) +3 >Emitted(61, 31) Source(40, 62) + SourceIndex(0) +4 >Emitted(61, 32) Source(40, 63) + SourceIndex(0) --- >>> c2.AisIn2_3(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1219,12 +1220,12 @@ sourceFile:typeResolution.ts 4 > AisIn2_3 5 > () 6 > ; -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) +1->Emitted(62, 25) Source(40, 64) + SourceIndex(0) +2 >Emitted(62, 27) Source(40, 66) + SourceIndex(0) +3 >Emitted(62, 28) Source(40, 67) + SourceIndex(0) +4 >Emitted(62, 36) Source(40, 75) + SourceIndex(0) +5 >Emitted(62, 38) Source(40, 77) + SourceIndex(0) +6 >Emitted(62, 39) Source(40, 78) + SourceIndex(0) --- >>> // Interface reference 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1233,8 +1234,8 @@ sourceFile:typeResolution.ts > > 2 > // Interface reference -1->Emitted(62, 25) Source(42, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(62, 47) Source(42, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(63, 25) Source(42, 21) + SourceIndex(0) +2 >Emitted(63, 47) Source(42, 43) + SourceIndex(0) --- >>> var d1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1247,10 +1248,10 @@ sourceFile:typeResolution.ts 2 > var 3 > d1: InterfaceX 4 > ; -1 >Emitted(63, 25) Source(43, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(63, 29) Source(43, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(63, 31) Source(43, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(63, 32) Source(43, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(64, 25) Source(43, 21) + SourceIndex(0) +2 >Emitted(64, 29) Source(43, 25) + SourceIndex(0) +3 >Emitted(64, 31) Source(43, 39) + SourceIndex(0) +4 >Emitted(64, 32) Source(43, 40) + SourceIndex(0) --- >>> d1.XisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1265,12 +1266,12 @@ sourceFile:typeResolution.ts 4 > XisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(65, 25) Source(43, 41) + SourceIndex(0) +2 >Emitted(65, 27) Source(43, 43) + SourceIndex(0) +3 >Emitted(65, 28) Source(43, 44) + SourceIndex(0) +4 >Emitted(65, 38) Source(43, 54) + SourceIndex(0) +5 >Emitted(65, 40) Source(43, 56) + SourceIndex(0) +6 >Emitted(65, 41) Source(43, 57) + SourceIndex(0) --- >>> var d2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1283,10 +1284,10 @@ sourceFile:typeResolution.ts 2 > var 3 > d2: SubSubModule1.InterfaceX 4 > ; -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) +1 >Emitted(66, 25) Source(44, 21) + SourceIndex(0) +2 >Emitted(66, 29) Source(44, 25) + SourceIndex(0) +3 >Emitted(66, 31) Source(44, 53) + SourceIndex(0) +4 >Emitted(66, 32) Source(44, 54) + SourceIndex(0) --- >>> d2.XisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1301,12 +1302,12 @@ sourceFile:typeResolution.ts 4 > XisIn1_1_1 5 > () 6 > ; -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->Emitted(67, 25) Source(44, 55) + SourceIndex(0) +2 >Emitted(67, 27) Source(44, 57) + SourceIndex(0) +3 >Emitted(67, 28) Source(44, 58) + SourceIndex(0) +4 >Emitted(67, 38) Source(44, 68) + SourceIndex(0) +5 >Emitted(67, 40) Source(44, 70) + SourceIndex(0) +6 >Emitted(67, 41) Source(44, 71) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1315,8 +1316,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -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) +1 >Emitted(68, 21) Source(45, 17) + SourceIndex(0) +2 >Emitted(68, 22) Source(45, 18) + SourceIndex(0) --- >>> return ClassB; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1324,8 +1325,8 @@ sourceFile:typeResolution.ts 1-> > 2 > } -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->Emitted(69, 21) Source(46, 13) + SourceIndex(0) +2 >Emitted(69, 34) Source(46, 14) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -1359,10 +1360,10 @@ sourceFile:typeResolution.ts > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); > } > } -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) +1 >Emitted(70, 17) Source(46, 13) + SourceIndex(0) +2 >Emitted(70, 18) Source(46, 14) + SourceIndex(0) +3 >Emitted(70, 18) Source(24, 13) + SourceIndex(0) +4 >Emitted(70, 22) Source(46, 14) + SourceIndex(0) --- >>> SubSubModule1.ClassB = ClassB; 1->^^^^^^^^^^^^^^^^ @@ -1396,10 +1397,10 @@ sourceFile:typeResolution.ts > } > } 4 > -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, 46) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -4 >Emitted(70, 47) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1->Emitted(71, 17) Source(24, 26) + SourceIndex(0) +2 >Emitted(71, 37) Source(24, 32) + SourceIndex(0) +3 >Emitted(71, 46) Source(46, 14) + SourceIndex(0) +4 >Emitted(71, 47) Source(46, 14) + SourceIndex(0) --- >>> var NonExportedClassQ = (function () { 1->^^^^^^^^^^^^^^^^ @@ -1407,21 +1408,21 @@ sourceFile:typeResolution.ts 1-> > export interface InterfaceX { XisIn1_1_1(); } > -1->Emitted(71, 17) Source(48, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1->Emitted(72, 17) Source(48, 13) + SourceIndex(0) --- >>> function NonExportedClassQ() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1->class NonExportedClassQ { > -1->Emitted(72, 21) Source(49, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) +1->Emitted(73, 21) Source(49, 17) + SourceIndex(0) --- >>> function QQ() { 1->^^^^^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->constructor() { > -1->Emitted(73, 25) Source(50, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) +1->Emitted(74, 25) Source(50, 21) + SourceIndex(0) --- >>> /* Sampling of stuff from AisIn1_1_1 */ 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1429,8 +1430,8 @@ sourceFile:typeResolution.ts 1->function QQ() { > 2 > /* Sampling of stuff from AisIn1_1_1 */ -1->Emitted(74, 29) Source(51, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -2 >Emitted(74, 68) Source(51, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +1->Emitted(75, 29) Source(51, 25) + SourceIndex(0) +2 >Emitted(75, 68) Source(51, 64) + SourceIndex(0) --- >>> var a4; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1443,10 +1444,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA 4 > ; -1 >Emitted(75, 29) Source(52, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -2 >Emitted(75, 33) Source(52, 29) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -3 >Emitted(75, 35) Source(52, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -4 >Emitted(75, 36) Source(52, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +1 >Emitted(76, 29) Source(52, 25) + SourceIndex(0) +2 >Emitted(76, 33) Source(52, 29) + SourceIndex(0) +3 >Emitted(76, 35) Source(52, 80) + SourceIndex(0) +4 >Emitted(76, 36) Source(52, 81) + SourceIndex(0) --- >>> a4.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1461,12 +1462,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(77, 29) Source(52, 82) + SourceIndex(0) +2 >Emitted(77, 31) Source(52, 84) + SourceIndex(0) +3 >Emitted(77, 32) Source(52, 85) + SourceIndex(0) +4 >Emitted(77, 42) Source(52, 95) + SourceIndex(0) +5 >Emitted(77, 44) Source(52, 97) + SourceIndex(0) +6 >Emitted(77, 45) Source(52, 98) + SourceIndex(0) --- >>> var c1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1479,10 +1480,10 @@ sourceFile:typeResolution.ts 2 > var 3 > c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA 4 > ; -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) +1 >Emitted(78, 29) Source(53, 25) + SourceIndex(0) +2 >Emitted(78, 33) Source(53, 29) + SourceIndex(0) +3 >Emitted(78, 35) Source(53, 80) + SourceIndex(0) +4 >Emitted(78, 36) Source(53, 81) + SourceIndex(0) --- >>> c1.AisIn1_2_2(); 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1497,12 +1498,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_2_2 5 > () 6 > ; -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) +1->Emitted(79, 29) Source(53, 82) + SourceIndex(0) +2 >Emitted(79, 31) Source(53, 84) + SourceIndex(0) +3 >Emitted(79, 32) Source(53, 85) + SourceIndex(0) +4 >Emitted(79, 42) Source(53, 95) + SourceIndex(0) +5 >Emitted(79, 44) Source(53, 97) + SourceIndex(0) +6 >Emitted(79, 45) Source(53, 98) + SourceIndex(0) --- >>> var d1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1515,10 +1516,10 @@ sourceFile:typeResolution.ts 2 > var 3 > d1: InterfaceX 4 > ; -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) +1 >Emitted(80, 29) Source(54, 25) + SourceIndex(0) +2 >Emitted(80, 33) Source(54, 29) + SourceIndex(0) +3 >Emitted(80, 35) Source(54, 43) + SourceIndex(0) +4 >Emitted(80, 36) Source(54, 44) + SourceIndex(0) --- >>> d1.XisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1533,12 +1534,12 @@ sourceFile:typeResolution.ts 4 > XisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(81, 29) Source(54, 45) + SourceIndex(0) +2 >Emitted(81, 31) Source(54, 47) + SourceIndex(0) +3 >Emitted(81, 32) Source(54, 48) + SourceIndex(0) +4 >Emitted(81, 42) Source(54, 58) + SourceIndex(0) +5 >Emitted(81, 44) Source(54, 60) + SourceIndex(0) +6 >Emitted(81, 45) Source(54, 61) + SourceIndex(0) --- >>> var c2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1551,10 +1552,10 @@ sourceFile:typeResolution.ts 2 > var 3 > c2: TopLevelModule2.SubModule3.ClassA 4 > ; -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) +1 >Emitted(82, 29) Source(55, 25) + SourceIndex(0) +2 >Emitted(82, 33) Source(55, 29) + SourceIndex(0) +3 >Emitted(82, 35) Source(55, 66) + SourceIndex(0) +4 >Emitted(82, 36) Source(55, 67) + SourceIndex(0) --- >>> c2.AisIn2_3(); 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1569,12 +1570,12 @@ sourceFile:typeResolution.ts 4 > AisIn2_3 5 > () 6 > ; -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->Emitted(83, 29) Source(55, 68) + SourceIndex(0) +2 >Emitted(83, 31) Source(55, 70) + SourceIndex(0) +3 >Emitted(83, 32) Source(55, 71) + SourceIndex(0) +4 >Emitted(83, 40) Source(55, 79) + SourceIndex(0) +5 >Emitted(83, 42) Source(55, 81) + SourceIndex(0) +6 >Emitted(83, 43) Source(55, 82) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1582,8 +1583,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -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 >Emitted(84, 25) Source(56, 21) + SourceIndex(0) +2 >Emitted(84, 26) Source(56, 22) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1592,8 +1593,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -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) +1 >Emitted(85, 21) Source(57, 17) + SourceIndex(0) +2 >Emitted(85, 22) Source(57, 18) + SourceIndex(0) --- >>> return NonExportedClassQ; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1601,8 +1602,8 @@ sourceFile:typeResolution.ts 1-> > 2 > } -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->Emitted(86, 21) Source(58, 13) + SourceIndex(0) +2 >Emitted(86, 45) Source(58, 14) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -1624,10 +1625,10 @@ sourceFile:typeResolution.ts > } > } > } -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) +1 >Emitted(87, 17) Source(58, 13) + SourceIndex(0) +2 >Emitted(87, 18) Source(58, 14) + SourceIndex(0) +3 >Emitted(87, 18) Source(48, 13) + SourceIndex(0) +4 >Emitted(87, 22) Source(58, 14) + SourceIndex(0) --- >>> })(SubSubModule1 = SubModule1.SubSubModule1 || (SubModule1.SubSubModule1 = {})); 1->^^^^^^^^^^^^ @@ -1705,15 +1706,15 @@ sourceFile:typeResolution.ts > } > } > } -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) +1->Emitted(88, 13) Source(59, 9) + SourceIndex(0) +2 >Emitted(88, 14) Source(59, 10) + SourceIndex(0) +3 >Emitted(88, 16) Source(3, 23) + SourceIndex(0) +4 >Emitted(88, 29) Source(3, 36) + SourceIndex(0) +5 >Emitted(88, 32) Source(3, 23) + SourceIndex(0) +6 >Emitted(88, 56) Source(3, 36) + SourceIndex(0) +7 >Emitted(88, 61) Source(3, 23) + SourceIndex(0) +8 >Emitted(88, 85) Source(3, 36) + SourceIndex(0) +9 >Emitted(88, 93) Source(59, 10) + SourceIndex(0) --- >>> // Should have no effect on S1.SS1.ClassA above because it is not exported 1 >^^^^^^^^^^^^ @@ -1722,29 +1723,29 @@ sourceFile:typeResolution.ts > > 2 > // Should have no effect on S1.SS1.ClassA above because it is not exported -1 >Emitted(88, 13) Source(61, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1) -2 >Emitted(88, 87) Source(61, 83) + SourceIndex(0) name (TopLevelModule1.SubModule1) +1 >Emitted(89, 13) Source(61, 9) + SourceIndex(0) +2 >Emitted(89, 87) Source(61, 83) + SourceIndex(0) --- >>> var ClassA = (function () { 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(89, 13) Source(62, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1) +1 >Emitted(90, 13) Source(62, 9) + SourceIndex(0) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1->class ClassA { > -1->Emitted(90, 17) Source(63, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) +1->Emitted(91, 17) Source(63, 13) + SourceIndex(0) --- >>> function AA() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^-> 1->constructor() { > -1->Emitted(91, 21) Source(64, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) +1->Emitted(92, 21) Source(64, 17) + SourceIndex(0) --- >>> var a2; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1757,10 +1758,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a2: SubSubModule1.ClassA 4 > ; -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) +1->Emitted(93, 25) Source(65, 21) + SourceIndex(0) +2 >Emitted(93, 29) Source(65, 25) + SourceIndex(0) +3 >Emitted(93, 31) Source(65, 49) + SourceIndex(0) +4 >Emitted(93, 32) Source(65, 50) + SourceIndex(0) --- >>> a2.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1775,12 +1776,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(94, 25) Source(65, 51) + SourceIndex(0) +2 >Emitted(94, 27) Source(65, 53) + SourceIndex(0) +3 >Emitted(94, 28) Source(65, 54) + SourceIndex(0) +4 >Emitted(94, 38) Source(65, 64) + SourceIndex(0) +5 >Emitted(94, 40) Source(65, 66) + SourceIndex(0) +6 >Emitted(94, 41) Source(65, 67) + SourceIndex(0) --- >>> var a3; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1793,10 +1794,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a3: SubModule1.SubSubModule1.ClassA 4 > ; -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) +1 >Emitted(95, 25) Source(66, 21) + SourceIndex(0) +2 >Emitted(95, 29) Source(66, 25) + SourceIndex(0) +3 >Emitted(95, 31) Source(66, 60) + SourceIndex(0) +4 >Emitted(95, 32) Source(66, 61) + SourceIndex(0) --- >>> a3.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1811,12 +1812,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(96, 25) Source(66, 62) + SourceIndex(0) +2 >Emitted(96, 27) Source(66, 64) + SourceIndex(0) +3 >Emitted(96, 28) Source(66, 65) + SourceIndex(0) +4 >Emitted(96, 38) Source(66, 75) + SourceIndex(0) +5 >Emitted(96, 40) Source(66, 77) + SourceIndex(0) +6 >Emitted(96, 41) Source(66, 78) + SourceIndex(0) --- >>> var a4; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1829,10 +1830,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA 4 > ; -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) +1 >Emitted(97, 25) Source(67, 21) + SourceIndex(0) +2 >Emitted(97, 29) Source(67, 25) + SourceIndex(0) +3 >Emitted(97, 31) Source(67, 76) + SourceIndex(0) +4 >Emitted(97, 32) Source(67, 77) + SourceIndex(0) --- >>> a4.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1848,12 +1849,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -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) +1->Emitted(98, 25) Source(67, 78) + SourceIndex(0) +2 >Emitted(98, 27) Source(67, 80) + SourceIndex(0) +3 >Emitted(98, 28) Source(67, 81) + SourceIndex(0) +4 >Emitted(98, 38) Source(67, 91) + SourceIndex(0) +5 >Emitted(98, 40) Source(67, 93) + SourceIndex(0) +6 >Emitted(98, 41) Source(67, 94) + SourceIndex(0) --- >>> // Interface reference 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1862,8 +1863,8 @@ sourceFile:typeResolution.ts > > 2 > // Interface reference -1->Emitted(98, 25) Source(69, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -2 >Emitted(98, 47) Source(69, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +1->Emitted(99, 25) Source(69, 21) + SourceIndex(0) +2 >Emitted(99, 47) Source(69, 43) + SourceIndex(0) --- >>> var d2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1876,10 +1877,10 @@ sourceFile:typeResolution.ts 2 > var 3 > d2: SubSubModule1.InterfaceX 4 > ; -1 >Emitted(99, 25) Source(70, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -2 >Emitted(99, 29) Source(70, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -3 >Emitted(99, 31) Source(70, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -4 >Emitted(99, 32) Source(70, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +1 >Emitted(100, 25) Source(70, 21) + SourceIndex(0) +2 >Emitted(100, 29) Source(70, 25) + SourceIndex(0) +3 >Emitted(100, 31) Source(70, 53) + SourceIndex(0) +4 >Emitted(100, 32) Source(70, 54) + SourceIndex(0) --- >>> d2.XisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1894,12 +1895,12 @@ sourceFile:typeResolution.ts 4 > XisIn1_1_1 5 > () 6 > ; -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->Emitted(101, 25) Source(70, 55) + SourceIndex(0) +2 >Emitted(101, 27) Source(70, 57) + SourceIndex(0) +3 >Emitted(101, 28) Source(70, 58) + SourceIndex(0) +4 >Emitted(101, 38) Source(70, 68) + SourceIndex(0) +5 >Emitted(101, 40) Source(70, 70) + SourceIndex(0) +6 >Emitted(101, 41) Source(70, 71) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1907,8 +1908,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -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 >Emitted(102, 21) Source(71, 17) + SourceIndex(0) +2 >Emitted(102, 22) Source(71, 18) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -1917,8 +1918,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -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) +1 >Emitted(103, 17) Source(72, 13) + SourceIndex(0) +2 >Emitted(103, 18) Source(72, 14) + SourceIndex(0) --- >>> return ClassA; 1->^^^^^^^^^^^^^^^^ @@ -1926,8 +1927,8 @@ sourceFile:typeResolution.ts 1-> > 2 > } -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->Emitted(104, 17) Source(73, 9) + SourceIndex(0) +2 >Emitted(104, 30) Source(73, 10) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -1950,10 +1951,10 @@ sourceFile:typeResolution.ts > } > } > } -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) +1 >Emitted(105, 13) Source(73, 9) + SourceIndex(0) +2 >Emitted(105, 14) Source(73, 10) + SourceIndex(0) +3 >Emitted(105, 14) Source(62, 9) + SourceIndex(0) +4 >Emitted(105, 18) Source(73, 10) + SourceIndex(0) --- >>> })(SubModule1 = TopLevelModule1.SubModule1 || (TopLevelModule1.SubModule1 = {})); 1->^^^^^^^^ @@ -2047,15 +2048,15 @@ sourceFile:typeResolution.ts > } > } > } -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) +1->Emitted(106, 9) Source(74, 5) + SourceIndex(0) +2 >Emitted(106, 10) Source(74, 6) + SourceIndex(0) +3 >Emitted(106, 12) Source(2, 19) + SourceIndex(0) +4 >Emitted(106, 22) Source(2, 29) + SourceIndex(0) +5 >Emitted(106, 25) Source(2, 19) + SourceIndex(0) +6 >Emitted(106, 51) Source(2, 29) + SourceIndex(0) +7 >Emitted(106, 56) Source(2, 19) + SourceIndex(0) +8 >Emitted(106, 82) Source(2, 29) + SourceIndex(0) +9 >Emitted(106, 90) Source(74, 6) + SourceIndex(0) --- >>> var SubModule2; 1 >^^^^^^^^ @@ -2080,10 +2081,10 @@ sourceFile:typeResolution.ts > > 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) +1 >Emitted(107, 9) Source(76, 5) + SourceIndex(0) +2 >Emitted(107, 13) Source(76, 19) + SourceIndex(0) +3 >Emitted(107, 23) Source(76, 29) + SourceIndex(0) +4 >Emitted(107, 24) Source(87, 6) + SourceIndex(0) --- >>> (function (SubModule2) { 1->^^^^^^^^ @@ -2096,11 +2097,11 @@ sourceFile:typeResolution.ts 3 > SubModule2 4 > 5 > { -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) +1->Emitted(108, 9) Source(76, 5) + SourceIndex(0) +2 >Emitted(108, 20) Source(76, 19) + SourceIndex(0) +3 >Emitted(108, 30) Source(76, 29) + SourceIndex(0) +4 >Emitted(108, 32) Source(76, 30) + SourceIndex(0) +5 >Emitted(108, 33) Source(76, 31) + SourceIndex(0) --- >>> var SubSubModule2; 1 >^^^^^^^^^^^^ @@ -2120,10 +2121,10 @@ sourceFile:typeResolution.ts > 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) +1 >Emitted(109, 13) Source(77, 9) + SourceIndex(0) +2 >Emitted(109, 17) Source(77, 23) + SourceIndex(0) +3 >Emitted(109, 30) Source(77, 36) + SourceIndex(0) +4 >Emitted(109, 31) Source(84, 10) + SourceIndex(0) --- >>> (function (SubSubModule2) { 1->^^^^^^^^^^^^ @@ -2137,11 +2138,11 @@ sourceFile:typeResolution.ts 3 > SubSubModule2 4 > 5 > { -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) +1->Emitted(110, 13) Source(77, 9) + SourceIndex(0) +2 >Emitted(110, 24) Source(77, 23) + SourceIndex(0) +3 >Emitted(110, 37) Source(77, 36) + SourceIndex(0) +4 >Emitted(110, 39) Source(77, 37) + SourceIndex(0) +5 >Emitted(110, 40) Source(77, 38) + SourceIndex(0) --- >>> // No code here since these are the mirror of the above calls 1->^^^^^^^^^^^^^^^^ @@ -2149,21 +2150,21 @@ sourceFile:typeResolution.ts 1-> > 2 > // No code here since these are the mirror of the above calls -1->Emitted(110, 17) Source(78, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(110, 78) Source(78, 74) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(111, 17) Source(78, 13) + SourceIndex(0) +2 >Emitted(111, 78) Source(78, 74) + SourceIndex(0) --- >>> var ClassA = (function () { 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(111, 17) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(112, 17) Source(79, 13) + SourceIndex(0) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(112, 21) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +1->Emitted(113, 21) Source(79, 13) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^^^^^ @@ -2171,8 +2172,8 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->export class ClassA { public AisIn1_2_2() { } 2 > } -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) +1->Emitted(114, 21) Source(79, 59) + SourceIndex(0) +2 >Emitted(114, 22) Source(79, 60) + SourceIndex(0) --- >>> ClassA.prototype.AisIn1_2_2 = function () { }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -2185,19 +2186,19 @@ sourceFile:typeResolution.ts 3 > 4 > public AisIn1_2_2() { 5 > } -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) -4 >Emitted(114, 65) Source(79, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) -5 >Emitted(114, 66) Source(79, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) +1->Emitted(115, 21) Source(79, 42) + SourceIndex(0) +2 >Emitted(115, 48) Source(79, 52) + SourceIndex(0) +3 >Emitted(115, 51) Source(79, 35) + SourceIndex(0) +4 >Emitted(115, 65) Source(79, 57) + SourceIndex(0) +5 >Emitted(115, 66) Source(79, 58) + SourceIndex(0) --- >>> return ClassA; 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ 1 > 2 > } -1 >Emitted(115, 21) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -2 >Emitted(115, 34) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +1 >Emitted(116, 21) Source(79, 59) + SourceIndex(0) +2 >Emitted(116, 34) Source(79, 60) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2209,10 +2210,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassA { public AisIn1_2_2() { } } -1 >Emitted(116, 17) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -2 >Emitted(116, 18) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -3 >Emitted(116, 18) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(116, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(117, 17) Source(79, 59) + SourceIndex(0) +2 >Emitted(117, 18) Source(79, 60) + SourceIndex(0) +3 >Emitted(117, 18) Source(79, 13) + SourceIndex(0) +4 >Emitted(117, 22) Source(79, 60) + SourceIndex(0) --- >>> SubSubModule2.ClassA = ClassA; 1->^^^^^^^^^^^^^^^^ @@ -2223,23 +2224,23 @@ sourceFile:typeResolution.ts 2 > ClassA 3 > { public AisIn1_2_2() { } } 4 > -1->Emitted(117, 17) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(117, 37) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(117, 46) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(117, 47) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(118, 17) Source(79, 26) + SourceIndex(0) +2 >Emitted(118, 37) Source(79, 32) + SourceIndex(0) +3 >Emitted(118, 46) Source(79, 60) + SourceIndex(0) +4 >Emitted(118, 47) Source(79, 60) + SourceIndex(0) --- >>> var ClassB = (function () { 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(118, 17) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(119, 17) Source(80, 13) + SourceIndex(0) --- >>> function ClassB() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(119, 21) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +1->Emitted(120, 21) Source(80, 13) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^^^^^ @@ -2247,8 +2248,8 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->export class ClassB { public BisIn1_2_2() { } 2 > } -1->Emitted(120, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) -2 >Emitted(120, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) +1->Emitted(121, 21) Source(80, 59) + SourceIndex(0) +2 >Emitted(121, 22) Source(80, 60) + SourceIndex(0) --- >>> ClassB.prototype.BisIn1_2_2 = function () { }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -2261,19 +2262,19 @@ sourceFile:typeResolution.ts 3 > 4 > public BisIn1_2_2() { 5 > } -1->Emitted(121, 21) Source(80, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(121, 48) Source(80, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -3 >Emitted(121, 51) Source(80, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -4 >Emitted(121, 65) Source(80, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) -5 >Emitted(121, 66) Source(80, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) +1->Emitted(122, 21) Source(80, 42) + SourceIndex(0) +2 >Emitted(122, 48) Source(80, 52) + SourceIndex(0) +3 >Emitted(122, 51) Source(80, 35) + SourceIndex(0) +4 >Emitted(122, 65) Source(80, 57) + SourceIndex(0) +5 >Emitted(122, 66) Source(80, 58) + SourceIndex(0) --- >>> return ClassB; 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ 1 > 2 > } -1 >Emitted(122, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(122, 34) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +1 >Emitted(123, 21) Source(80, 59) + SourceIndex(0) +2 >Emitted(123, 34) Source(80, 60) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2285,10 +2286,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassB { public BisIn1_2_2() { } } -1 >Emitted(123, 17) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(123, 18) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -3 >Emitted(123, 18) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(123, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(124, 17) Source(80, 59) + SourceIndex(0) +2 >Emitted(124, 18) Source(80, 60) + SourceIndex(0) +3 >Emitted(124, 18) Source(80, 13) + SourceIndex(0) +4 >Emitted(124, 22) Source(80, 60) + SourceIndex(0) --- >>> SubSubModule2.ClassB = ClassB; 1->^^^^^^^^^^^^^^^^ @@ -2299,23 +2300,23 @@ sourceFile:typeResolution.ts 2 > ClassB 3 > { public BisIn1_2_2() { } } 4 > -1->Emitted(124, 17) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(124, 37) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(124, 46) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(124, 47) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(125, 17) Source(80, 26) + SourceIndex(0) +2 >Emitted(125, 37) Source(80, 32) + SourceIndex(0) +3 >Emitted(125, 46) Source(80, 60) + SourceIndex(0) +4 >Emitted(125, 47) Source(80, 60) + SourceIndex(0) --- >>> var ClassC = (function () { 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(125, 17) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(126, 17) Source(81, 13) + SourceIndex(0) --- >>> function ClassC() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(126, 21) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +1->Emitted(127, 21) Source(81, 13) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^^^^^ @@ -2323,8 +2324,8 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->export class ClassC { public CisIn1_2_2() { } 2 > } -1->Emitted(127, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) -2 >Emitted(127, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) +1->Emitted(128, 21) Source(81, 59) + SourceIndex(0) +2 >Emitted(128, 22) Source(81, 60) + SourceIndex(0) --- >>> ClassC.prototype.CisIn1_2_2 = function () { }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -2337,19 +2338,19 @@ sourceFile:typeResolution.ts 3 > 4 > public CisIn1_2_2() { 5 > } -1->Emitted(128, 21) Source(81, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(128, 48) Source(81, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -3 >Emitted(128, 51) Source(81, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -4 >Emitted(128, 65) Source(81, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) -5 >Emitted(128, 66) Source(81, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) +1->Emitted(129, 21) Source(81, 42) + SourceIndex(0) +2 >Emitted(129, 48) Source(81, 52) + SourceIndex(0) +3 >Emitted(129, 51) Source(81, 35) + SourceIndex(0) +4 >Emitted(129, 65) Source(81, 57) + SourceIndex(0) +5 >Emitted(129, 66) Source(81, 58) + SourceIndex(0) --- >>> 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(130, 21) Source(81, 59) + SourceIndex(0) +2 >Emitted(130, 34) Source(81, 60) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2361,10 +2362,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(131, 17) Source(81, 59) + SourceIndex(0) +2 >Emitted(131, 18) Source(81, 60) + SourceIndex(0) +3 >Emitted(131, 18) Source(81, 13) + SourceIndex(0) +4 >Emitted(131, 22) Source(81, 60) + SourceIndex(0) --- >>> SubSubModule2.ClassC = ClassC; 1->^^^^^^^^^^^^^^^^ @@ -2376,10 +2377,10 @@ sourceFile:typeResolution.ts 2 > ClassC 3 > { public CisIn1_2_2() { } } 4 > -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, 46) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(131, 47) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(132, 17) Source(81, 26) + SourceIndex(0) +2 >Emitted(132, 37) Source(81, 32) + SourceIndex(0) +3 >Emitted(132, 46) Source(81, 60) + SourceIndex(0) +4 >Emitted(132, 47) Source(81, 60) + SourceIndex(0) --- >>> })(SubSubModule2 = SubModule2.SubSubModule2 || (SubModule2.SubSubModule2 = {})); 1->^^^^^^^^^^^^ @@ -2410,15 +2411,15 @@ sourceFile:typeResolution.ts > export interface InterfaceY { YisIn1_2_2(); } > interface NonExportedInterfaceQ { } > } -1->Emitted(132, 13) Source(84, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(132, 14) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(132, 16) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -4 >Emitted(132, 29) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -5 >Emitted(132, 32) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -6 >Emitted(132, 56) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -7 >Emitted(132, 61) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -8 >Emitted(132, 85) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -9 >Emitted(132, 93) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2) +1->Emitted(133, 13) Source(84, 9) + SourceIndex(0) +2 >Emitted(133, 14) Source(84, 10) + SourceIndex(0) +3 >Emitted(133, 16) Source(77, 23) + SourceIndex(0) +4 >Emitted(133, 29) Source(77, 36) + SourceIndex(0) +5 >Emitted(133, 32) Source(77, 23) + SourceIndex(0) +6 >Emitted(133, 56) Source(77, 36) + SourceIndex(0) +7 >Emitted(133, 61) Source(77, 23) + SourceIndex(0) +8 >Emitted(133, 85) Source(77, 36) + SourceIndex(0) +9 >Emitted(133, 93) Source(84, 10) + SourceIndex(0) --- >>> })(SubModule2 = TopLevelModule1.SubModule2 || (TopLevelModule1.SubModule2 = {})); 1 >^^^^^^^^ @@ -2453,15 +2454,15 @@ sourceFile:typeResolution.ts > > export interface InterfaceY { YisIn1_2(); } > } -1 >Emitted(133, 9) Source(87, 5) + SourceIndex(0) name (TopLevelModule1.SubModule2) -2 >Emitted(133, 10) Source(87, 6) + SourceIndex(0) name (TopLevelModule1.SubModule2) -3 >Emitted(133, 12) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(133, 22) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(133, 25) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -6 >Emitted(133, 51) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -7 >Emitted(133, 56) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -8 >Emitted(133, 82) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -9 >Emitted(133, 90) Source(87, 6) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(134, 9) Source(87, 5) + SourceIndex(0) +2 >Emitted(134, 10) Source(87, 6) + SourceIndex(0) +3 >Emitted(134, 12) Source(76, 19) + SourceIndex(0) +4 >Emitted(134, 22) Source(76, 29) + SourceIndex(0) +5 >Emitted(134, 25) Source(76, 19) + SourceIndex(0) +6 >Emitted(134, 51) Source(76, 29) + SourceIndex(0) +7 >Emitted(134, 56) Source(76, 19) + SourceIndex(0) +8 >Emitted(134, 82) Source(76, 29) + SourceIndex(0) +9 >Emitted(134, 90) Source(87, 6) + SourceIndex(0) --- >>> var ClassA = (function () { 1 >^^^^^^^^ @@ -2469,13 +2470,13 @@ sourceFile:typeResolution.ts 1 > > > -1 >Emitted(134, 9) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(135, 9) Source(89, 5) + SourceIndex(0) --- >>> function ClassA() { 1->^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(135, 13) Source(89, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) +1->Emitted(136, 13) Source(89, 5) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^ @@ -2485,8 +2486,8 @@ sourceFile:typeResolution.ts > public AisIn1() { } > 2 > } -1->Emitted(136, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) -2 >Emitted(136, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) +1->Emitted(137, 13) Source(91, 5) + SourceIndex(0) +2 >Emitted(137, 14) Source(91, 6) + SourceIndex(0) --- >>> ClassA.prototype.AisIn1 = function () { }; 1->^^^^^^^^^^^^ @@ -2499,11 +2500,11 @@ sourceFile:typeResolution.ts 3 > 4 > public AisIn1() { 5 > } -1->Emitted(137, 13) Source(90, 16) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(137, 36) Source(90, 22) + SourceIndex(0) name (TopLevelModule1.ClassA) -3 >Emitted(137, 39) Source(90, 9) + SourceIndex(0) name (TopLevelModule1.ClassA) -4 >Emitted(137, 53) Source(90, 27) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) -5 >Emitted(137, 54) Source(90, 28) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) +1->Emitted(138, 13) Source(90, 16) + SourceIndex(0) +2 >Emitted(138, 36) Source(90, 22) + SourceIndex(0) +3 >Emitted(138, 39) Source(90, 9) + SourceIndex(0) +4 >Emitted(138, 53) Source(90, 27) + SourceIndex(0) +5 >Emitted(138, 54) Source(90, 28) + SourceIndex(0) --- >>> return ClassA; 1 >^^^^^^^^^^^^ @@ -2511,8 +2512,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -1 >Emitted(138, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(138, 26) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) +1 >Emitted(139, 13) Source(91, 5) + SourceIndex(0) +2 >Emitted(139, 26) Source(91, 6) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^ @@ -2526,10 +2527,10 @@ sourceFile:typeResolution.ts 4 > class ClassA { > public AisIn1() { } > } -1 >Emitted(139, 9) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(139, 10) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) -3 >Emitted(139, 10) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(139, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(140, 9) Source(91, 5) + SourceIndex(0) +2 >Emitted(140, 10) Source(91, 6) + SourceIndex(0) +3 >Emitted(140, 10) Source(89, 5) + SourceIndex(0) +4 >Emitted(140, 14) Source(91, 6) + SourceIndex(0) --- >>> var NotExportedModule; 1->^^^^^^^^ @@ -2549,10 +2550,10 @@ sourceFile:typeResolution.ts 4 > { > export class ClassA { } > } -1->Emitted(140, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(140, 13) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(140, 30) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(140, 31) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(141, 9) Source(97, 5) + SourceIndex(0) +2 >Emitted(141, 13) Source(97, 12) + SourceIndex(0) +3 >Emitted(141, 30) Source(97, 29) + SourceIndex(0) +4 >Emitted(141, 31) Source(99, 6) + SourceIndex(0) --- >>> (function (NotExportedModule) { 1->^^^^^^^^ @@ -2566,24 +2567,24 @@ sourceFile:typeResolution.ts 3 > NotExportedModule 4 > 5 > { -1->Emitted(141, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(141, 20) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(141, 37) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(141, 39) Source(97, 30) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(141, 40) Source(97, 31) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(142, 9) Source(97, 5) + SourceIndex(0) +2 >Emitted(142, 20) Source(97, 12) + SourceIndex(0) +3 >Emitted(142, 37) Source(97, 29) + SourceIndex(0) +4 >Emitted(142, 39) Source(97, 30) + SourceIndex(0) +5 >Emitted(142, 40) Source(97, 31) + SourceIndex(0) --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(142, 13) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1->Emitted(143, 13) Source(98, 9) + SourceIndex(0) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(143, 17) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +1->Emitted(144, 17) Source(98, 9) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^ @@ -2591,16 +2592,16 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^-> 1->export class ClassA { 2 > } -1->Emitted(144, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) -2 >Emitted(144, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) +1->Emitted(145, 17) Source(98, 31) + SourceIndex(0) +2 >Emitted(145, 18) Source(98, 32) + SourceIndex(0) --- >>> return ClassA; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(145, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -2 >Emitted(145, 30) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +1->Emitted(146, 17) Source(98, 31) + SourceIndex(0) +2 >Emitted(146, 30) Source(98, 32) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -2612,10 +2613,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassA { } -1 >Emitted(146, 13) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -2 >Emitted(146, 14) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -3 >Emitted(146, 14) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -4 >Emitted(146, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1 >Emitted(147, 13) Source(98, 31) + SourceIndex(0) +2 >Emitted(147, 14) Source(98, 32) + SourceIndex(0) +3 >Emitted(147, 14) Source(98, 9) + SourceIndex(0) +4 >Emitted(147, 18) Source(98, 32) + SourceIndex(0) --- >>> NotExportedModule.ClassA = ClassA; 1->^^^^^^^^^^^^ @@ -2627,10 +2628,10 @@ sourceFile:typeResolution.ts 2 > ClassA 3 > { } 4 > -1->Emitted(147, 13) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -2 >Emitted(147, 37) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -3 >Emitted(147, 46) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -4 >Emitted(147, 47) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1->Emitted(148, 13) Source(98, 22) + SourceIndex(0) +2 >Emitted(148, 37) Source(98, 28) + SourceIndex(0) +3 >Emitted(148, 46) Source(98, 32) + SourceIndex(0) +4 >Emitted(148, 47) Source(98, 32) + SourceIndex(0) --- >>> })(NotExportedModule || (NotExportedModule = {})); 1->^^^^^^^^ @@ -2651,13 +2652,13 @@ sourceFile:typeResolution.ts 7 > { > export class ClassA { } > } -1->Emitted(148, 9) Source(99, 5) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -2 >Emitted(148, 10) Source(99, 6) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -3 >Emitted(148, 12) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(148, 29) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(148, 34) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -6 >Emitted(148, 51) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -7 >Emitted(148, 59) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(149, 9) Source(99, 5) + SourceIndex(0) +2 >Emitted(149, 10) Source(99, 6) + SourceIndex(0) +3 >Emitted(149, 12) Source(97, 12) + SourceIndex(0) +4 >Emitted(149, 29) Source(97, 29) + SourceIndex(0) +5 >Emitted(149, 34) Source(97, 12) + SourceIndex(0) +6 >Emitted(149, 51) Source(97, 29) + SourceIndex(0) +7 >Emitted(149, 59) Source(99, 6) + SourceIndex(0) --- >>> })(TopLevelModule1 = exports.TopLevelModule1 || (exports.TopLevelModule1 = {})); 1->^^^^ @@ -2778,15 +2779,15 @@ sourceFile:typeResolution.ts > export class ClassA { } > } > } -1->Emitted(149, 5) Source(100, 1) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(149, 6) Source(100, 2) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(149, 8) Source(1, 15) + SourceIndex(0) -4 >Emitted(149, 23) Source(1, 30) + SourceIndex(0) -5 >Emitted(149, 26) Source(1, 15) + SourceIndex(0) -6 >Emitted(149, 49) Source(1, 30) + SourceIndex(0) -7 >Emitted(149, 54) Source(1, 15) + SourceIndex(0) -8 >Emitted(149, 77) Source(1, 30) + SourceIndex(0) -9 >Emitted(149, 85) Source(100, 2) + SourceIndex(0) +1->Emitted(150, 5) Source(100, 1) + SourceIndex(0) +2 >Emitted(150, 6) Source(100, 2) + SourceIndex(0) +3 >Emitted(150, 8) Source(1, 15) + SourceIndex(0) +4 >Emitted(150, 23) Source(1, 30) + SourceIndex(0) +5 >Emitted(150, 26) Source(1, 15) + SourceIndex(0) +6 >Emitted(150, 49) Source(1, 30) + SourceIndex(0) +7 >Emitted(150, 54) Source(1, 15) + SourceIndex(0) +8 >Emitted(150, 77) Source(1, 30) + SourceIndex(0) +9 >Emitted(150, 85) Source(100, 2) + SourceIndex(0) --- >>> var TopLevelModule2; 1 >^^^^ @@ -2806,10 +2807,10 @@ sourceFile:typeResolution.ts > } > } > } -1 >Emitted(150, 5) Source(102, 1) + SourceIndex(0) -2 >Emitted(150, 9) Source(102, 8) + SourceIndex(0) -3 >Emitted(150, 24) Source(102, 23) + SourceIndex(0) -4 >Emitted(150, 25) Source(108, 2) + SourceIndex(0) +1 >Emitted(151, 5) Source(102, 1) + SourceIndex(0) +2 >Emitted(151, 9) Source(102, 8) + SourceIndex(0) +3 >Emitted(151, 24) Source(102, 23) + SourceIndex(0) +4 >Emitted(151, 25) Source(108, 2) + SourceIndex(0) --- >>> (function (TopLevelModule2) { 1->^^^^ @@ -2822,11 +2823,11 @@ sourceFile:typeResolution.ts 3 > TopLevelModule2 4 > 5 > { -1->Emitted(151, 5) Source(102, 1) + SourceIndex(0) -2 >Emitted(151, 16) Source(102, 8) + SourceIndex(0) -3 >Emitted(151, 31) Source(102, 23) + SourceIndex(0) -4 >Emitted(151, 33) Source(102, 24) + SourceIndex(0) -5 >Emitted(151, 34) Source(102, 25) + SourceIndex(0) +1->Emitted(152, 5) Source(102, 1) + SourceIndex(0) +2 >Emitted(152, 16) Source(102, 8) + SourceIndex(0) +3 >Emitted(152, 31) Source(102, 23) + SourceIndex(0) +4 >Emitted(152, 33) Source(102, 24) + SourceIndex(0) +5 >Emitted(152, 34) Source(102, 25) + SourceIndex(0) --- >>> var SubModule3; 1 >^^^^^^^^ @@ -2843,10 +2844,10 @@ sourceFile:typeResolution.ts > public AisIn2_3() { } > } > } -1 >Emitted(152, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) -2 >Emitted(152, 13) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -3 >Emitted(152, 23) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -4 >Emitted(152, 24) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) +1 >Emitted(153, 9) Source(103, 5) + SourceIndex(0) +2 >Emitted(153, 13) Source(103, 19) + SourceIndex(0) +3 >Emitted(153, 23) Source(103, 29) + SourceIndex(0) +4 >Emitted(153, 24) Source(107, 6) + SourceIndex(0) --- >>> (function (SubModule3) { 1->^^^^^^^^ @@ -2860,24 +2861,24 @@ sourceFile:typeResolution.ts 3 > SubModule3 4 > 5 > { -1->Emitted(153, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) -2 >Emitted(153, 20) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -3 >Emitted(153, 30) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -4 >Emitted(153, 32) Source(103, 30) + SourceIndex(0) name (TopLevelModule2) -5 >Emitted(153, 33) Source(103, 31) + SourceIndex(0) name (TopLevelModule2) +1->Emitted(154, 9) Source(103, 5) + SourceIndex(0) +2 >Emitted(154, 20) Source(103, 19) + SourceIndex(0) +3 >Emitted(154, 30) Source(103, 29) + SourceIndex(0) +4 >Emitted(154, 32) Source(103, 30) + SourceIndex(0) +5 >Emitted(154, 33) Source(103, 31) + SourceIndex(0) --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(154, 13) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1->Emitted(155, 13) Source(104, 9) + SourceIndex(0) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(155, 17) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +1->Emitted(156, 17) Source(104, 9) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^ @@ -2887,8 +2888,8 @@ sourceFile:typeResolution.ts > public AisIn2_3() { } > 2 > } -1->Emitted(156, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) -2 >Emitted(156, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) +1->Emitted(157, 17) Source(106, 9) + SourceIndex(0) +2 >Emitted(157, 18) Source(106, 10) + SourceIndex(0) --- >>> ClassA.prototype.AisIn2_3 = function () { }; 1->^^^^^^^^^^^^^^^^ @@ -2901,11 +2902,11 @@ sourceFile:typeResolution.ts 3 > 4 > public AisIn2_3() { 5 > } -1->Emitted(157, 17) Source(105, 20) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(157, 42) Source(105, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -3 >Emitted(157, 45) Source(105, 13) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -4 >Emitted(157, 59) Source(105, 33) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) -5 >Emitted(157, 60) Source(105, 34) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) +1->Emitted(158, 17) Source(105, 20) + SourceIndex(0) +2 >Emitted(158, 42) Source(105, 28) + SourceIndex(0) +3 >Emitted(158, 45) Source(105, 13) + SourceIndex(0) +4 >Emitted(158, 59) Source(105, 33) + SourceIndex(0) +5 >Emitted(158, 60) Source(105, 34) + SourceIndex(0) --- >>> return ClassA; 1 >^^^^^^^^^^^^^^^^ @@ -2913,8 +2914,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -1 >Emitted(158, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(158, 30) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +1 >Emitted(159, 17) Source(106, 9) + SourceIndex(0) +2 >Emitted(159, 30) Source(106, 10) + SourceIndex(0) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -2928,10 +2929,10 @@ sourceFile:typeResolution.ts 4 > export class ClassA { > public AisIn2_3() { } > } -1 >Emitted(159, 13) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(159, 14) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -3 >Emitted(159, 14) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) -4 >Emitted(159, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1 >Emitted(160, 13) Source(106, 9) + SourceIndex(0) +2 >Emitted(160, 14) Source(106, 10) + SourceIndex(0) +3 >Emitted(160, 14) Source(104, 9) + SourceIndex(0) +4 >Emitted(160, 18) Source(106, 10) + SourceIndex(0) --- >>> SubModule3.ClassA = ClassA; 1->^^^^^^^^^^^^ @@ -2945,10 +2946,10 @@ sourceFile:typeResolution.ts > public AisIn2_3() { } > } 4 > -1->Emitted(160, 13) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) -2 >Emitted(160, 30) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) -3 >Emitted(160, 39) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) -4 >Emitted(160, 40) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1->Emitted(161, 13) Source(104, 22) + SourceIndex(0) +2 >Emitted(161, 30) Source(104, 28) + SourceIndex(0) +3 >Emitted(161, 39) Source(106, 10) + SourceIndex(0) +4 >Emitted(161, 40) Source(106, 10) + SourceIndex(0) --- >>> })(SubModule3 = TopLevelModule2.SubModule3 || (TopLevelModule2.SubModule3 = {})); 1->^^^^^^^^ @@ -2974,15 +2975,15 @@ sourceFile:typeResolution.ts > public AisIn2_3() { } > } > } -1->Emitted(161, 9) Source(107, 5) + SourceIndex(0) name (TopLevelModule2.SubModule3) -2 >Emitted(161, 10) Source(107, 6) + SourceIndex(0) name (TopLevelModule2.SubModule3) -3 >Emitted(161, 12) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -4 >Emitted(161, 22) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -5 >Emitted(161, 25) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -6 >Emitted(161, 51) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -7 >Emitted(161, 56) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -8 >Emitted(161, 82) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -9 >Emitted(161, 90) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) +1->Emitted(162, 9) Source(107, 5) + SourceIndex(0) +2 >Emitted(162, 10) Source(107, 6) + SourceIndex(0) +3 >Emitted(162, 12) Source(103, 19) + SourceIndex(0) +4 >Emitted(162, 22) Source(103, 29) + SourceIndex(0) +5 >Emitted(162, 25) Source(103, 19) + SourceIndex(0) +6 >Emitted(162, 51) Source(103, 29) + SourceIndex(0) +7 >Emitted(162, 56) Source(103, 19) + SourceIndex(0) +8 >Emitted(162, 82) Source(103, 29) + SourceIndex(0) +9 >Emitted(162, 90) Source(107, 6) + SourceIndex(0) --- >>> })(TopLevelModule2 || (TopLevelModule2 = {})); 1 >^^^^ @@ -3006,13 +3007,13 @@ sourceFile:typeResolution.ts > } > } > } -1 >Emitted(162, 5) Source(108, 1) + SourceIndex(0) name (TopLevelModule2) -2 >Emitted(162, 6) Source(108, 2) + SourceIndex(0) name (TopLevelModule2) -3 >Emitted(162, 8) Source(102, 8) + SourceIndex(0) -4 >Emitted(162, 23) Source(102, 23) + SourceIndex(0) -5 >Emitted(162, 28) Source(102, 8) + SourceIndex(0) -6 >Emitted(162, 43) Source(102, 23) + SourceIndex(0) -7 >Emitted(162, 51) Source(108, 2) + SourceIndex(0) +1 >Emitted(163, 5) Source(108, 1) + SourceIndex(0) +2 >Emitted(163, 6) Source(108, 2) + SourceIndex(0) +3 >Emitted(163, 8) Source(102, 8) + SourceIndex(0) +4 >Emitted(163, 23) Source(102, 23) + SourceIndex(0) +5 >Emitted(163, 28) Source(102, 8) + SourceIndex(0) +6 >Emitted(163, 43) Source(102, 23) + SourceIndex(0) +7 >Emitted(163, 51) Source(108, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=typeResolution.js.map \ No newline at end of file diff --git a/tests/baselines/reference/typeofANonExportedType.js b/tests/baselines/reference/typeofANonExportedType.js index 5b24d9bc102cf..b575d4f8d4bcb 100644 --- a/tests/baselines/reference/typeofANonExportedType.js +++ b/tests/baselines/reference/typeofANonExportedType.js @@ -52,6 +52,7 @@ module foo { export var r13: typeof foo; //// [typeofANonExportedType.js] +"use strict"; var x = 1; var y = { foo: '' }; var C = (function () { diff --git a/tests/baselines/reference/typeofAmbientExternalModules.js b/tests/baselines/reference/typeofAmbientExternalModules.js index 66e6d7d45eae6..258ca3fdc2ee6 100644 --- a/tests/baselines/reference/typeofAmbientExternalModules.js +++ b/tests/baselines/reference/typeofAmbientExternalModules.js @@ -19,6 +19,7 @@ var y2: typeof exp = exp; y2 = ext; //// [typeofAmbientExternalModules_0.js] +"use strict"; var C = (function () { function C() { } @@ -26,6 +27,7 @@ var C = (function () { })(); exports.C = C; //// [typeofAmbientExternalModules_1.js] +"use strict"; var D = (function () { function D() { } @@ -33,6 +35,7 @@ var D = (function () { })(); module.exports = D; //// [typeofAmbientExternalModules_2.js] +"use strict"; /// /// var ext = require('./typeofAmbientExternalModules_0'); diff --git a/tests/baselines/reference/typeofAnExportedType.js b/tests/baselines/reference/typeofAnExportedType.js index 54de4f7566bdb..83c928fd40a14 100644 --- a/tests/baselines/reference/typeofAnExportedType.js +++ b/tests/baselines/reference/typeofAnExportedType.js @@ -52,6 +52,7 @@ export module foo { export var r13: typeof foo; //// [typeofAnExportedType.js] +"use strict"; exports.x = 1; exports.y = { foo: '' }; var C = (function () { diff --git a/tests/baselines/reference/typeofExternalModules.js b/tests/baselines/reference/typeofExternalModules.js index 676f6f10b9fc9..95c3202ed36c5 100644 --- a/tests/baselines/reference/typeofExternalModules.js +++ b/tests/baselines/reference/typeofExternalModules.js @@ -17,6 +17,7 @@ var y2: typeof exp = exp; y2 = ext; //// [typeofExternalModules_external.js] +"use strict"; var C = (function () { function C() { } @@ -24,6 +25,7 @@ var C = (function () { })(); exports.C = C; //// [typeofExternalModules_exportAssign.js] +"use strict"; var D = (function () { function D() { } @@ -31,6 +33,7 @@ var D = (function () { })(); module.exports = D; //// [typeofExternalModules_core.js] +"use strict"; var ext = require('./typeofExternalModules_external'); var exp = require('./typeofExternalModules_exportAssign'); var y1 = ext; diff --git a/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.js b/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.js index 866478114d6d3..a90cf63bac41c 100644 --- a/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.js +++ b/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.js @@ -21,7 +21,9 @@ var y: {M2: Object} = foo0; //// [foo_0.js] +"use strict"; //// [foo_1.js] +"use strict"; var foo0 = require('./foo_0'); // Per 11.2.3, foo_0 should still be "instantiated", albeit with no members var x = {}; diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.types b/tests/baselines/reference/typesWithSpecializedCallSignatures.types index fa3ac7a4ba4d4..b587ee7840e27 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.types +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.types @@ -19,22 +19,22 @@ class C { >C : C foo(x: 'hi'): Derived1; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } ->x : 'hi' +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>x : "hi" >Derived1 : Derived1 foo(x: 'bye'): Derived2; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } ->x : 'bye' +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>x : "bye" >Derived2 : Derived2 foo(x: string): Base; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } >x : string >Base : Base foo(x) { ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } >x : any return x; @@ -50,17 +50,17 @@ interface I { >I : I foo(x: 'hi'): Derived1; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } ->x : 'hi' +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>x : "hi" >Derived1 : Derived1 foo(x: 'bye'): Derived2; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } ->x : 'bye' +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>x : "bye" >Derived2 : Derived2 foo(x: string): Base; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } >x : string >Base : Base } @@ -69,20 +69,20 @@ var i: I; >I : I var a: { ->a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } foo(x: 'hi'): Derived1; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } ->x : 'hi' +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>x : "hi" >Derived1 : Derived1 foo(x: 'bye'): Derived2; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } ->x : 'bye' +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>x : "bye" >Derived2 : Derived2 foo(x: string): Base; ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } >x : string >Base : Base @@ -94,9 +94,9 @@ c = i; >i : I c = a; ->c = a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>c = a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } >c : C ->a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } i = c; >i = c : C @@ -104,44 +104,44 @@ i = c; >c : C i = a; ->i = a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>i = a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } >i : I ->a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } a = c; >a = c : C ->a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } >c : C a = i; >a = i : I ->a : { foo(x: 'hi'): Derived1; foo(x: 'bye'): Derived2; foo(x: string): Base; } +>a : { foo(x: "hi"): Derived1; foo(x: "bye"): Derived2; foo(x: string): Base; } >i : I var r1: Derived1 = c.foo('hi'); >r1 : Derived1 >Derived1 : Derived1 >c.foo('hi') : Derived1 ->c.foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } >c : C ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } ->'hi' : string +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>'hi' : "hi" var r2: Derived2 = c.foo('bye'); >r2 : Derived2 >Derived2 : Derived2 >c.foo('bye') : Derived2 ->c.foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } >c : C ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } ->'bye' : string +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } +>'bye' : "bye" var r3: Base = c.foo('hm'); >r3 : Base >Base : Base >c.foo('hm') : Base ->c.foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>c.foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } >c : C ->foo : { (x: 'hi'): Derived1; (x: 'bye'): Derived2; (x: string): Base; } +>foo : { (x: "hi"): Derived1; (x: "bye"): Derived2; (x: string): Base; } >'hm' : string diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.types b/tests/baselines/reference/typesWithSpecializedConstructSignatures.types index 66e274d917adc..3036c0cea714d 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.types +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.types @@ -19,10 +19,10 @@ class C { >C : C constructor(x: 'hi'); ->x : 'hi' +>x : "hi" constructor(x: 'bye'); ->x : 'bye' +>x : "bye" constructor(x: string); >x : string @@ -44,11 +44,11 @@ interface I { >I : I new(x: 'hi'): Derived1; ->x : 'hi' +>x : "hi" >Derived1 : Derived1 new(x: 'bye'): Derived2; ->x : 'bye' +>x : "bye" >Derived2 : Derived2 new(x: string): Base; @@ -60,14 +60,14 @@ var i: I; >I : I var a: { ->a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } new(x: 'hi'): Derived1; ->x : 'hi' +>x : "hi" >Derived1 : Derived1 new(x: 'bye'): Derived2; ->x : 'bye' +>x : "bye" >Derived2 : Derived2 new(x: string): Base; @@ -82,37 +82,37 @@ c = i; >i : I c = a; ->c = a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>c = a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } >c : C ->a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } i = a; ->i = a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>i = a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } >i : I ->a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } a = i; >a = i : I ->a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } >i : I var r1 = new C('hi'); >r1 : C >new C('hi') : C >C : typeof C ->'hi' : string +>'hi' : "hi" var r2: Derived2 = new i('bye'); >r2 : Derived2 >Derived2 : Derived2 >new i('bye') : Derived2 >i : I ->'bye' : string +>'bye' : "bye" var r3: Base = new a('hm'); >r3 : Base >Base : Base >new a('hm') : Base ->a : { new (x: 'hi'): Derived1; new (x: 'bye'): Derived2; new (x: string): Base; } +>a : { new (x: "hi"): Derived1; new (x: "bye"): Derived2; new (x: string): Base; } >'hm' : string diff --git a/tests/baselines/reference/umdDependencyComment2.js b/tests/baselines/reference/umdDependencyComment2.js index f063df77308f4..e73a5350d7930 100644 --- a/tests/baselines/reference/umdDependencyComment2.js +++ b/tests/baselines/reference/umdDependencyComment2.js @@ -15,6 +15,7 @@ m1.f(); define(["require", "exports", "bar", "m2"], factory); } })(function (require, exports) { + "use strict"; var m1 = require("m2"); m1.f(); }); diff --git a/tests/baselines/reference/umdDependencyCommentName1.js b/tests/baselines/reference/umdDependencyCommentName1.js index 763e052327269..7716ca949a3a6 100644 --- a/tests/baselines/reference/umdDependencyCommentName1.js +++ b/tests/baselines/reference/umdDependencyCommentName1.js @@ -15,6 +15,7 @@ m1.f(); define(["require", "exports", "bar", "m2"], factory); } })(function (require, exports, b) { + "use strict"; var m1 = require("m2"); m1.f(); }); diff --git a/tests/baselines/reference/umdDependencyCommentName2.js b/tests/baselines/reference/umdDependencyCommentName2.js index f749e4cc22d85..4650a8408e1f1 100644 --- a/tests/baselines/reference/umdDependencyCommentName2.js +++ b/tests/baselines/reference/umdDependencyCommentName2.js @@ -19,6 +19,7 @@ m1.f(); define(["require", "exports", "bar", "goo", "foo", "m2"], factory); } })(function (require, exports, b, c) { + "use strict"; var m1 = require("m2"); m1.f(); }); diff --git a/tests/baselines/reference/unclosedExportClause01.js b/tests/baselines/reference/unclosedExportClause01.js index a683f8d987d99..53b63e59b594a 100644 --- a/tests/baselines/reference/unclosedExportClause01.js +++ b/tests/baselines/reference/unclosedExportClause01.js @@ -17,14 +17,19 @@ export { x as a from "./t1" export { x as a, from "./t1" //// [t1.js] +"use strict"; exports.x = "x"; //// [t2.js] +"use strict"; var t1_1 = require("./t1"); exports.x = t1_1.x; //// [t3.js] +"use strict"; //// [t4.js] +"use strict"; var t1_1 = require("./t1"); exports.a = t1_1.x; //// [t5.js] +"use strict"; var t1_1 = require("./t1"); exports.a = t1_1.x; diff --git a/tests/baselines/reference/unclosedExportClause02.js b/tests/baselines/reference/unclosedExportClause02.js index 964cc29899c7d..188c8e9d18e7b 100644 --- a/tests/baselines/reference/unclosedExportClause02.js +++ b/tests/baselines/reference/unclosedExportClause02.js @@ -21,12 +21,17 @@ export { x as a, from "./t1"; //// [t1.js] +"use strict"; exports.x = "x"; //// [t2.js] +"use strict"; "./t1"; //// [t3.js] +"use strict"; "./t1"; //// [t4.js] +"use strict"; "./t1"; //// [t5.js] +"use strict"; "./t1"; diff --git a/tests/baselines/reference/undeclaredModuleError.js b/tests/baselines/reference/undeclaredModuleError.js index 0764840cadfed..b768b0d91140c 100644 --- a/tests/baselines/reference/undeclaredModuleError.js +++ b/tests/baselines/reference/undeclaredModuleError.js @@ -17,6 +17,7 @@ function instrumentFile(covFileDir: string, covFileName: string, originalFilePat //// [undeclaredModuleError.js] define(["require", "exports", 'fs'], function (require, exports, fs) { + "use strict"; function readdir(path, accept, callback) { } function join() { var paths = []; diff --git a/tests/baselines/reference/unionAndIntersectionInference1.js b/tests/baselines/reference/unionAndIntersectionInference1.js new file mode 100644 index 0000000000000..235eb23ebf847 --- /dev/null +++ b/tests/baselines/reference/unionAndIntersectionInference1.js @@ -0,0 +1,113 @@ +//// [unionAndIntersectionInference1.ts] +// Repro from #2264 + +interface Y { 'i am a very certain type': Y } +var y: Y = undefined; +function destructure( + something: a | Y, + haveValue: (value: a) => r, + haveY: (value: Y) => r +): r { + return something === y ? haveY(y) : haveValue(something); +} + +var value = Math.random() > 0.5 ? 'hey!' : undefined; + +var result = destructure(value, text => 'string', y => 'other one'); // text: string, y: Y + +// Repro from #4212 + +function isVoid(value: void | a): value is void { + return undefined; +} + +function isNonVoid(value: void | a) : value is a { + return undefined; +} + +function foo1(value: void|a): void { + if (isVoid(value)) { + value; // value is void + } else { + value; // value is a + } +} + +function baz1(value: void|a): void { + if (isNonVoid(value)) { + value; // value is a + } else { + value; // value is void + } +} + +// Repro from #5417 + +type Maybe = T | void; + +function get(x: U | void): U { + return null; // just an example +} + +let foo: Maybe; +get(foo).toUpperCase(); // Ok + +// Repro from #5456 + +interface Man { + walks: boolean; +} + +interface Bear { + roars: boolean; +} + +interface Pig { + oinks: boolean; +} + +declare function pigify(y: T & Bear): T & Pig; +declare var mbp: Man & Bear; + +pigify(mbp).oinks; // OK, mbp is treated as Pig +pigify(mbp).walks; // Ok, mbp is treated as Man + + +//// [unionAndIntersectionInference1.js] +// Repro from #2264 +var y = undefined; +function destructure(something, haveValue, haveY) { + return something === y ? haveY(y) : haveValue(something); +} +var value = Math.random() > 0.5 ? 'hey!' : undefined; +var result = destructure(value, function (text) { return 'string'; }, function (y) { return 'other one'; }); // text: string, y: Y +// Repro from #4212 +function isVoid(value) { + return undefined; +} +function isNonVoid(value) { + return undefined; +} +function foo1(value) { + if (isVoid(value)) { + value; // value is void + } + else { + value; // value is a + } +} +function baz1(value) { + if (isNonVoid(value)) { + value; // value is a + } + else { + value; // value is void + } +} +function get(x) { + return null; // just an example +} +var foo; +get(foo).toUpperCase(); // Ok +pigify(mbp).oinks; // OK, mbp is treated as Pig +pigify(mbp).walks; // Ok, mbp is treated as Man diff --git a/tests/baselines/reference/unionAndIntersectionInference1.symbols b/tests/baselines/reference/unionAndIntersectionInference1.symbols new file mode 100644 index 0000000000000..5e96790ea3470 --- /dev/null +++ b/tests/baselines/reference/unionAndIntersectionInference1.symbols @@ -0,0 +1,202 @@ +=== tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference1.ts === +// Repro from #2264 + +interface Y { 'i am a very certain type': Y } +>Y : Symbol(Y, Decl(unionAndIntersectionInference1.ts, 0, 0)) +>Y : Symbol(Y, Decl(unionAndIntersectionInference1.ts, 0, 0)) + +var y: Y = undefined; +>y : Symbol(y, Decl(unionAndIntersectionInference1.ts, 3, 3)) +>Y : Symbol(Y, Decl(unionAndIntersectionInference1.ts, 0, 0)) +>Y : Symbol(Y, Decl(unionAndIntersectionInference1.ts, 0, 0)) +>undefined : Symbol(undefined) + +function destructure( +>destructure : Symbol(destructure, Decl(unionAndIntersectionInference1.ts, 3, 24)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 4, 21)) +>r : Symbol(r, Decl(unionAndIntersectionInference1.ts, 4, 23)) + + something: a | Y, +>something : Symbol(something, Decl(unionAndIntersectionInference1.ts, 4, 27)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 4, 21)) +>Y : Symbol(Y, Decl(unionAndIntersectionInference1.ts, 0, 0)) + + haveValue: (value: a) => r, +>haveValue : Symbol(haveValue, Decl(unionAndIntersectionInference1.ts, 5, 21)) +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 6, 16)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 4, 21)) +>r : Symbol(r, Decl(unionAndIntersectionInference1.ts, 4, 23)) + + haveY: (value: Y) => r +>haveY : Symbol(haveY, Decl(unionAndIntersectionInference1.ts, 6, 31)) +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 7, 12)) +>Y : Symbol(Y, Decl(unionAndIntersectionInference1.ts, 0, 0)) +>r : Symbol(r, Decl(unionAndIntersectionInference1.ts, 4, 23)) + +): r { +>r : Symbol(r, Decl(unionAndIntersectionInference1.ts, 4, 23)) + + return something === y ? haveY(y) : haveValue(something); +>something : Symbol(something, Decl(unionAndIntersectionInference1.ts, 4, 27)) +>y : Symbol(y, Decl(unionAndIntersectionInference1.ts, 3, 3)) +>haveY : Symbol(haveY, Decl(unionAndIntersectionInference1.ts, 6, 31)) +>y : Symbol(y, Decl(unionAndIntersectionInference1.ts, 3, 3)) +>haveValue : Symbol(haveValue, Decl(unionAndIntersectionInference1.ts, 5, 21)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 4, 21)) +>something : Symbol(something, Decl(unionAndIntersectionInference1.ts, 4, 27)) +} + +var value = Math.random() > 0.5 ? 'hey!' : undefined; +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 12, 3)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Y : Symbol(Y, Decl(unionAndIntersectionInference1.ts, 0, 0)) +>undefined : Symbol(undefined) + +var result = destructure(value, text => 'string', y => 'other one'); // text: string, y: Y +>result : Symbol(result, Decl(unionAndIntersectionInference1.ts, 14, 3)) +>destructure : Symbol(destructure, Decl(unionAndIntersectionInference1.ts, 3, 24)) +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 12, 3)) +>text : Symbol(text, Decl(unionAndIntersectionInference1.ts, 14, 31)) +>y : Symbol(y, Decl(unionAndIntersectionInference1.ts, 14, 49)) + +// Repro from #4212 + +function isVoid(value: void | a): value is void { +>isVoid : Symbol(isVoid, Decl(unionAndIntersectionInference1.ts, 14, 68)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 18, 16)) +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 18, 19)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 18, 16)) +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 18, 19)) + + return undefined; +>undefined : Symbol(undefined) +} + +function isNonVoid(value: void | a) : value is a { +>isNonVoid : Symbol(isNonVoid, Decl(unionAndIntersectionInference1.ts, 20, 1)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 22, 19)) +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 22, 22)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 22, 19)) +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 22, 22)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 22, 19)) + + return undefined; +>undefined : Symbol(undefined) +} + +function foo1(value: void|a): void { +>foo1 : Symbol(foo1, Decl(unionAndIntersectionInference1.ts, 24, 1)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 26, 14)) +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 26, 17)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 26, 14)) + + if (isVoid(value)) { +>isVoid : Symbol(isVoid, Decl(unionAndIntersectionInference1.ts, 14, 68)) +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 26, 17)) + + value; // value is void +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 26, 17)) + + } else { + value; // value is a +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 26, 17)) + } +} + +function baz1(value: void|a): void { +>baz1 : Symbol(baz1, Decl(unionAndIntersectionInference1.ts, 32, 1)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 34, 14)) +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 34, 17)) +>a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 34, 14)) + + if (isNonVoid(value)) { +>isNonVoid : Symbol(isNonVoid, Decl(unionAndIntersectionInference1.ts, 20, 1)) +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 34, 17)) + + value; // value is a +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 34, 17)) + + } else { + value; // value is void +>value : Symbol(value, Decl(unionAndIntersectionInference1.ts, 34, 17)) + } +} + +// Repro from #5417 + +type Maybe = T | void; +>Maybe : Symbol(Maybe, Decl(unionAndIntersectionInference1.ts, 40, 1)) +>T : Symbol(T, Decl(unionAndIntersectionInference1.ts, 44, 11)) +>T : Symbol(T, Decl(unionAndIntersectionInference1.ts, 44, 11)) + +function get(x: U | void): U { +>get : Symbol(get, Decl(unionAndIntersectionInference1.ts, 44, 25)) +>U : Symbol(U, Decl(unionAndIntersectionInference1.ts, 46, 13)) +>x : Symbol(x, Decl(unionAndIntersectionInference1.ts, 46, 16)) +>U : Symbol(U, Decl(unionAndIntersectionInference1.ts, 46, 13)) +>U : Symbol(U, Decl(unionAndIntersectionInference1.ts, 46, 13)) + + return null; // just an example +} + +let foo: Maybe; +>foo : Symbol(foo, Decl(unionAndIntersectionInference1.ts, 50, 3)) +>Maybe : Symbol(Maybe, Decl(unionAndIntersectionInference1.ts, 40, 1)) + +get(foo).toUpperCase(); // Ok +>get(foo).toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, --, --)) +>get : Symbol(get, Decl(unionAndIntersectionInference1.ts, 44, 25)) +>foo : Symbol(foo, Decl(unionAndIntersectionInference1.ts, 50, 3)) +>toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, --, --)) + +// Repro from #5456 + +interface Man { +>Man : Symbol(Man, Decl(unionAndIntersectionInference1.ts, 51, 23)) + + walks: boolean; +>walks : Symbol(walks, Decl(unionAndIntersectionInference1.ts, 55, 15)) +} + +interface Bear { +>Bear : Symbol(Bear, Decl(unionAndIntersectionInference1.ts, 57, 1)) + + roars: boolean; +>roars : Symbol(roars, Decl(unionAndIntersectionInference1.ts, 59, 16)) +} + +interface Pig { +>Pig : Symbol(Pig, Decl(unionAndIntersectionInference1.ts, 61, 1)) + + oinks: boolean; +>oinks : Symbol(oinks, Decl(unionAndIntersectionInference1.ts, 63, 15)) +} + +declare function pigify(y: T & Bear): T & Pig; +>pigify : Symbol(pigify, Decl(unionAndIntersectionInference1.ts, 65, 1)) +>T : Symbol(T, Decl(unionAndIntersectionInference1.ts, 67, 24)) +>y : Symbol(y, Decl(unionAndIntersectionInference1.ts, 67, 27)) +>T : Symbol(T, Decl(unionAndIntersectionInference1.ts, 67, 24)) +>Bear : Symbol(Bear, Decl(unionAndIntersectionInference1.ts, 57, 1)) +>T : Symbol(T, Decl(unionAndIntersectionInference1.ts, 67, 24)) +>Pig : Symbol(Pig, Decl(unionAndIntersectionInference1.ts, 61, 1)) + +declare var mbp: Man & Bear; +>mbp : Symbol(mbp, Decl(unionAndIntersectionInference1.ts, 68, 11)) +>Man : Symbol(Man, Decl(unionAndIntersectionInference1.ts, 51, 23)) +>Bear : Symbol(Bear, Decl(unionAndIntersectionInference1.ts, 57, 1)) + +pigify(mbp).oinks; // OK, mbp is treated as Pig +>pigify(mbp).oinks : Symbol(Pig.oinks, Decl(unionAndIntersectionInference1.ts, 63, 15)) +>pigify : Symbol(pigify, Decl(unionAndIntersectionInference1.ts, 65, 1)) +>mbp : Symbol(mbp, Decl(unionAndIntersectionInference1.ts, 68, 11)) +>oinks : Symbol(Pig.oinks, Decl(unionAndIntersectionInference1.ts, 63, 15)) + +pigify(mbp).walks; // Ok, mbp is treated as Man +>pigify(mbp).walks : Symbol(Man.walks, Decl(unionAndIntersectionInference1.ts, 55, 15)) +>pigify : Symbol(pigify, Decl(unionAndIntersectionInference1.ts, 65, 1)) +>mbp : Symbol(mbp, Decl(unionAndIntersectionInference1.ts, 68, 11)) +>walks : Symbol(Man.walks, Decl(unionAndIntersectionInference1.ts, 55, 15)) + diff --git a/tests/baselines/reference/unionAndIntersectionInference1.types b/tests/baselines/reference/unionAndIntersectionInference1.types new file mode 100644 index 0000000000000..5d23688f0b7c3 --- /dev/null +++ b/tests/baselines/reference/unionAndIntersectionInference1.types @@ -0,0 +1,226 @@ +=== tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference1.ts === +// Repro from #2264 + +interface Y { 'i am a very certain type': Y } +>Y : Y +>Y : Y + +var y: Y = undefined; +>y : Y +>Y : Y +>undefined : Y +>Y : Y +>undefined : undefined + +function destructure( +>destructure : (something: a | Y, haveValue: (value: a) => r, haveY: (value: Y) => r) => r +>a : a +>r : r + + something: a | Y, +>something : a | Y +>a : a +>Y : Y + + haveValue: (value: a) => r, +>haveValue : (value: a) => r +>value : a +>a : a +>r : r + + haveY: (value: Y) => r +>haveY : (value: Y) => r +>value : Y +>Y : Y +>r : r + +): r { +>r : r + + return something === y ? haveY(y) : haveValue(something); +>something === y ? haveY(y) : haveValue(something) : r +>something === y : boolean +>something : a | Y +>y : Y +>haveY(y) : r +>haveY : (value: Y) => r +>y : Y +>haveValue(something) : r +>haveValue : (value: a) => r +>something : a +>a : a +>something : a | Y +} + +var value = Math.random() > 0.5 ? 'hey!' : undefined; +>value : string | Y +>Math.random() > 0.5 ? 'hey!' : undefined : string | Y +>Math.random() > 0.5 : boolean +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number +>0.5 : number +>'hey!' : string +>undefined : Y +>Y : Y +>undefined : undefined + +var result = destructure(value, text => 'string', y => 'other one'); // text: string, y: Y +>result : string +>destructure(value, text => 'string', y => 'other one') : string +>destructure : (something: a | Y, haveValue: (value: a) => r, haveY: (value: Y) => r) => r +>value : string | Y +>text => 'string' : (text: string) => string +>text : string +>'string' : string +>y => 'other one' : (y: Y) => string +>y : Y +>'other one' : string + +// Repro from #4212 + +function isVoid(value: void | a): value is void { +>isVoid : (value: void | a) => value is void +>a : a +>value : void | a +>a : a +>value : any + + return undefined; +>undefined : undefined +} + +function isNonVoid(value: void | a) : value is a { +>isNonVoid : (value: void | a) => value is a +>a : a +>value : void | a +>a : a +>value : any +>a : a + + return undefined; +>undefined : undefined +} + +function foo1(value: void|a): void { +>foo1 : (value: void | a) => void +>a : a +>value : void | a +>a : a + + if (isVoid(value)) { +>isVoid(value) : boolean +>isVoid : (value: void | a) => value is void +>value : void | a + + value; // value is void +>value : void + + } else { + value; // value is a +>value : a + } +} + +function baz1(value: void|a): void { +>baz1 : (value: void | a) => void +>a : a +>value : void | a +>a : a + + if (isNonVoid(value)) { +>isNonVoid(value) : boolean +>isNonVoid : (value: void | a) => value is a +>value : void | a + + value; // value is a +>value : a + + } else { + value; // value is void +>value : void + } +} + +// Repro from #5417 + +type Maybe = T | void; +>Maybe : T | void +>T : T +>T : T + +function get(x: U | void): U { +>get : (x: U | void) => U +>U : U +>x : U | void +>U : U +>U : U + + return null; // just an example +>null : null +} + +let foo: Maybe; +>foo : string | void +>Maybe : T | void + +get(foo).toUpperCase(); // Ok +>get(foo).toUpperCase() : string +>get(foo).toUpperCase : () => string +>get(foo) : string +>get : (x: U | void) => U +>foo : string | void +>toUpperCase : () => string + +// Repro from #5456 + +interface Man { +>Man : Man + + walks: boolean; +>walks : boolean +} + +interface Bear { +>Bear : Bear + + roars: boolean; +>roars : boolean +} + +interface Pig { +>Pig : Pig + + oinks: boolean; +>oinks : boolean +} + +declare function pigify(y: T & Bear): T & Pig; +>pigify : (y: T & Bear) => T & Pig +>T : T +>y : T & Bear +>T : T +>Bear : Bear +>T : T +>Pig : Pig + +declare var mbp: Man & Bear; +>mbp : Man & Bear +>Man : Man +>Bear : Bear + +pigify(mbp).oinks; // OK, mbp is treated as Pig +>pigify(mbp).oinks : boolean +>pigify(mbp) : Man & Pig +>pigify : (y: T & Bear) => T & Pig +>mbp : Man & Bear +>oinks : boolean + +pigify(mbp).walks; // Ok, mbp is treated as Man +>pigify(mbp).walks : boolean +>pigify(mbp) : Man & Pig +>pigify : (y: T & Bear) => T & Pig +>mbp : Man & Bear +>walks : boolean + diff --git a/tests/baselines/reference/unionAndIntersectionInference2.js b/tests/baselines/reference/unionAndIntersectionInference2.js new file mode 100644 index 0000000000000..18f08452a2ef5 --- /dev/null +++ b/tests/baselines/reference/unionAndIntersectionInference2.js @@ -0,0 +1,45 @@ +//// [unionAndIntersectionInference2.ts] +declare function f1(x: T | string): T; + +var a1: string; +var b1: string | string[]; +var c1: string[] | string; +var d1: string | { name: string }; +var e1: number | string | boolean; +f1(a1); // string +f1(b1); // string[] +f1(c1); // string[] +f1(d1); // { name: string } +f1(e1); // number | boolean + +declare function f2(x: T & { name: string }): T; + +var a2: string & { name: string }; +var b2: { name: string } & string[]; +var c2: string & { name: string } & number; +var d2: string & { name: string } & number & { name: string }; +f2(a2); // string +f2(b2); // string[] +f2(c2); // string & number +f2(d2); // string & number + + +//// [unionAndIntersectionInference2.js] +var a1; +var b1; +var c1; +var d1; +var e1; +f1(a1); // string +f1(b1); // string[] +f1(c1); // string[] +f1(d1); // { name: string } +f1(e1); // number | boolean +var a2; +var b2; +var c2; +var d2; +f2(a2); // string +f2(b2); // string[] +f2(c2); // string & number +f2(d2); // string & number diff --git a/tests/baselines/reference/unionAndIntersectionInference2.symbols b/tests/baselines/reference/unionAndIntersectionInference2.symbols new file mode 100644 index 0000000000000..24b1a36aa45e6 --- /dev/null +++ b/tests/baselines/reference/unionAndIntersectionInference2.symbols @@ -0,0 +1,85 @@ +=== tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference2.ts === +declare function f1(x: T | string): T; +>f1 : Symbol(f1, Decl(unionAndIntersectionInference2.ts, 0, 0)) +>T : Symbol(T, Decl(unionAndIntersectionInference2.ts, 0, 20)) +>x : Symbol(x, Decl(unionAndIntersectionInference2.ts, 0, 23)) +>T : Symbol(T, Decl(unionAndIntersectionInference2.ts, 0, 20)) +>T : Symbol(T, Decl(unionAndIntersectionInference2.ts, 0, 20)) + +var a1: string; +>a1 : Symbol(a1, Decl(unionAndIntersectionInference2.ts, 2, 3)) + +var b1: string | string[]; +>b1 : Symbol(b1, Decl(unionAndIntersectionInference2.ts, 3, 3)) + +var c1: string[] | string; +>c1 : Symbol(c1, Decl(unionAndIntersectionInference2.ts, 4, 3)) + +var d1: string | { name: string }; +>d1 : Symbol(d1, Decl(unionAndIntersectionInference2.ts, 5, 3)) +>name : Symbol(name, Decl(unionAndIntersectionInference2.ts, 5, 18)) + +var e1: number | string | boolean; +>e1 : Symbol(e1, Decl(unionAndIntersectionInference2.ts, 6, 3)) + +f1(a1); // string +>f1 : Symbol(f1, Decl(unionAndIntersectionInference2.ts, 0, 0)) +>a1 : Symbol(a1, Decl(unionAndIntersectionInference2.ts, 2, 3)) + +f1(b1); // string[] +>f1 : Symbol(f1, Decl(unionAndIntersectionInference2.ts, 0, 0)) +>b1 : Symbol(b1, Decl(unionAndIntersectionInference2.ts, 3, 3)) + +f1(c1); // string[] +>f1 : Symbol(f1, Decl(unionAndIntersectionInference2.ts, 0, 0)) +>c1 : Symbol(c1, Decl(unionAndIntersectionInference2.ts, 4, 3)) + +f1(d1); // { name: string } +>f1 : Symbol(f1, Decl(unionAndIntersectionInference2.ts, 0, 0)) +>d1 : Symbol(d1, Decl(unionAndIntersectionInference2.ts, 5, 3)) + +f1(e1); // number | boolean +>f1 : Symbol(f1, Decl(unionAndIntersectionInference2.ts, 0, 0)) +>e1 : Symbol(e1, Decl(unionAndIntersectionInference2.ts, 6, 3)) + +declare function f2(x: T & { name: string }): T; +>f2 : Symbol(f2, Decl(unionAndIntersectionInference2.ts, 11, 7)) +>T : Symbol(T, Decl(unionAndIntersectionInference2.ts, 13, 20)) +>x : Symbol(x, Decl(unionAndIntersectionInference2.ts, 13, 23)) +>T : Symbol(T, Decl(unionAndIntersectionInference2.ts, 13, 20)) +>name : Symbol(name, Decl(unionAndIntersectionInference2.ts, 13, 31)) +>T : Symbol(T, Decl(unionAndIntersectionInference2.ts, 13, 20)) + +var a2: string & { name: string }; +>a2 : Symbol(a2, Decl(unionAndIntersectionInference2.ts, 15, 3)) +>name : Symbol(name, Decl(unionAndIntersectionInference2.ts, 15, 18)) + +var b2: { name: string } & string[]; +>b2 : Symbol(b2, Decl(unionAndIntersectionInference2.ts, 16, 3)) +>name : Symbol(name, Decl(unionAndIntersectionInference2.ts, 16, 9)) + +var c2: string & { name: string } & number; +>c2 : Symbol(c2, Decl(unionAndIntersectionInference2.ts, 17, 3)) +>name : Symbol(name, Decl(unionAndIntersectionInference2.ts, 17, 18)) + +var d2: string & { name: string } & number & { name: string }; +>d2 : Symbol(d2, Decl(unionAndIntersectionInference2.ts, 18, 3)) +>name : Symbol(name, Decl(unionAndIntersectionInference2.ts, 18, 18)) +>name : Symbol(name, Decl(unionAndIntersectionInference2.ts, 18, 46)) + +f2(a2); // string +>f2 : Symbol(f2, Decl(unionAndIntersectionInference2.ts, 11, 7)) +>a2 : Symbol(a2, Decl(unionAndIntersectionInference2.ts, 15, 3)) + +f2(b2); // string[] +>f2 : Symbol(f2, Decl(unionAndIntersectionInference2.ts, 11, 7)) +>b2 : Symbol(b2, Decl(unionAndIntersectionInference2.ts, 16, 3)) + +f2(c2); // string & number +>f2 : Symbol(f2, Decl(unionAndIntersectionInference2.ts, 11, 7)) +>c2 : Symbol(c2, Decl(unionAndIntersectionInference2.ts, 17, 3)) + +f2(d2); // string & number +>f2 : Symbol(f2, Decl(unionAndIntersectionInference2.ts, 11, 7)) +>d2 : Symbol(d2, Decl(unionAndIntersectionInference2.ts, 18, 3)) + diff --git a/tests/baselines/reference/unionAndIntersectionInference2.types b/tests/baselines/reference/unionAndIntersectionInference2.types new file mode 100644 index 0000000000000..beeb2a261f3ec --- /dev/null +++ b/tests/baselines/reference/unionAndIntersectionInference2.types @@ -0,0 +1,94 @@ +=== tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference2.ts === +declare function f1(x: T | string): T; +>f1 : (x: T | string) => T +>T : T +>x : T | string +>T : T +>T : T + +var a1: string; +>a1 : string + +var b1: string | string[]; +>b1 : string | string[] + +var c1: string[] | string; +>c1 : string[] | string + +var d1: string | { name: string }; +>d1 : string | { name: string; } +>name : string + +var e1: number | string | boolean; +>e1 : number | string | boolean + +f1(a1); // string +>f1(a1) : string +>f1 : (x: T | string) => T +>a1 : string + +f1(b1); // string[] +>f1(b1) : string[] +>f1 : (x: T | string) => T +>b1 : string | string[] + +f1(c1); // string[] +>f1(c1) : string[] +>f1 : (x: T | string) => T +>c1 : string[] | string + +f1(d1); // { name: string } +>f1(d1) : { name: string; } +>f1 : (x: T | string) => T +>d1 : string | { name: string; } + +f1(e1); // number | boolean +>f1(e1) : number | boolean +>f1 : (x: T | string) => T +>e1 : number | string | boolean + +declare function f2(x: T & { name: string }): T; +>f2 : (x: T & { name: string; }) => T +>T : T +>x : T & { name: string; } +>T : T +>name : string +>T : T + +var a2: string & { name: string }; +>a2 : string & { name: string; } +>name : string + +var b2: { name: string } & string[]; +>b2 : { name: string; } & string[] +>name : string + +var c2: string & { name: string } & number; +>c2 : string & { name: string; } & number +>name : string + +var d2: string & { name: string } & number & { name: string }; +>d2 : string & { name: string; } & number & { name: string; } +>name : string +>name : string + +f2(a2); // string +>f2(a2) : string +>f2 : (x: T & { name: string; }) => T +>a2 : string & { name: string; } + +f2(b2); // string[] +>f2(b2) : string[] +>f2 : (x: T & { name: string; }) => T +>b2 : { name: string; } & string[] + +f2(c2); // string & number +>f2(c2) : string & number +>f2 : (x: T & { name: string; }) => T +>c2 : string & { name: string; } & number + +f2(d2); // string & number +>f2(d2) : string & number +>f2 : (x: T & { name: string; }) => T +>d2 : string & { name: string; } & number & { name: string; } + diff --git a/tests/baselines/reference/unusedImportDeclaration.js b/tests/baselines/reference/unusedImportDeclaration.js index 04e897c081a3e..7ed19f775f677 100644 --- a/tests/baselines/reference/unusedImportDeclaration.js +++ b/tests/baselines/reference/unusedImportDeclaration.js @@ -16,6 +16,7 @@ foo("IN " + thingy.me + "!"); //// [unusedImportDeclaration_testerB.js] +"use strict"; var TesterB = (function () { function TesterB() { } @@ -23,6 +24,7 @@ var TesterB = (function () { })(); module.exports = TesterB; //// [unusedImportDeclaration_testerA.js] +"use strict"; var thingy = { me: "A" }; diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index c3daf0c1004eb..eb9571c97f5ed 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -31,6 +31,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; define(["require", "exports"], function (require, exports) { + "use strict"; var A = (function () { function A(ctor) { } diff --git a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js index 660a4017a7fae..c80d65158dcf2 100644 --- a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js +++ b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js @@ -26,9 +26,12 @@ function run(configuration: commands.IConfiguration) { } //// [visibilityOfCrossModuleTypeUsage_server.js] +"use strict"; //// [visibilityOfCrossModuleTypeUsage_commands.js] //visibilityOfCrossModuleTypeUsage +"use strict"; //// [visibilityOfCrossModuleTypeUsage_fs.js] +"use strict"; function run(configuration) { var absoluteWorkspacePath = configuration.workspace.toAbsolutePath(configuration.server); } diff --git a/tests/baselines/reference/visibilityOfTypeParameters.js b/tests/baselines/reference/visibilityOfTypeParameters.js index 2cb006737b28c..170a8ef5d3778 100644 --- a/tests/baselines/reference/visibilityOfTypeParameters.js +++ b/tests/baselines/reference/visibilityOfTypeParameters.js @@ -7,6 +7,7 @@ export class MyClass { } //// [visibilityOfTypeParameters.js] +"use strict"; var MyClass = (function () { function MyClass() { } diff --git a/tests/baselines/reference/voidAsNonAmbiguousReturnType.js b/tests/baselines/reference/voidAsNonAmbiguousReturnType.js index 0ab15304493c3..7a31dcb97d0f3 100644 --- a/tests/baselines/reference/voidAsNonAmbiguousReturnType.js +++ b/tests/baselines/reference/voidAsNonAmbiguousReturnType.js @@ -14,9 +14,11 @@ function main() { //// [voidAsNonAmbiguousReturnType_0.js] +"use strict"; function mkdirSync(path, mode) { } exports.mkdirSync = mkdirSync; //// [voidAsNonAmbiguousReturnType_1.js] +"use strict"; /// var fs = require("./voidAsNonAmbiguousReturnType_0"); function main() { diff --git a/tests/baselines/reference/withExportDecl.errors.txt b/tests/baselines/reference/withExportDecl.errors.txt deleted file mode 100644 index 77d185d207f01..0000000000000 --- a/tests/baselines/reference/withExportDecl.errors.txt +++ /dev/null @@ -1,64 +0,0 @@ -tests/cases/compiler/withExportDecl.ts(43,9): error TS1029: 'export' modifier must precede 'declare' modifier. - - -==== tests/cases/compiler/withExportDecl.ts (1 errors) ==== - var simpleVar; - export var exportedSimpleVar; - - var anotherVar: any; - var varWithSimpleType: number; - var varWithArrayType: number[]; - - var varWithInitialValue = 30; - export var exportedVarWithInitialValue = 70; - - var withComplicatedValue = { x: 30, y: 70, desc: "position" }; - export var exportedWithComplicatedValue = { x: 30, y: 70, desc: "position" }; - - declare var declaredVar; - declare var declareVar2 - - declare var declaredVar; - declare var deckareVarWithType: number; - export declare var exportedDeclaredVar: number; - - var arrayVar: string[] = ['a', 'b']; - - export var exportedArrayVar: { x: number; y: string; }[] ; - exportedArrayVar.push({ x: 30, y : 'hello world' }); - - function simpleFunction() { - return { - x: "Hello", - y: "word", - n: 2 - }; - } - - export function exportedFunction() { - return simpleFunction(); - } - - module m1 { - export function foo() { - return "Hello"; - } - } - declare export module m2 { - ~~~~~~ -!!! error TS1029: 'export' modifier must precede 'declare' modifier. - - export var a: number; - } - - - export module m3 { - - export function foo() { - return m1.foo(); - } - } - - export var eVar1, eVar2 = 10; - var eVar22; - export var eVar3 = 10, eVar4, eVar5; \ No newline at end of file diff --git a/tests/baselines/reference/withExportDecl.js b/tests/baselines/reference/withExportDecl.js index 8d8b8b817ea81..efb5454c261a2 100644 --- a/tests/baselines/reference/withExportDecl.js +++ b/tests/baselines/reference/withExportDecl.js @@ -41,7 +41,7 @@ module m1 { return "Hello"; } } -declare export module m2 { +export declare module m2 { export var a: number; } @@ -60,6 +60,7 @@ export var eVar3 = 10, eVar4, eVar5; //// [withExportDecl.js] define(["require", "exports"], function (require, exports) { + "use strict"; var simpleVar; var anotherVar; var varWithSimpleType; diff --git a/tests/baselines/reference/withExportDecl.symbols b/tests/baselines/reference/withExportDecl.symbols new file mode 100644 index 0000000000000..4457abb76ea9f --- /dev/null +++ b/tests/baselines/reference/withExportDecl.symbols @@ -0,0 +1,129 @@ +=== tests/cases/compiler/withExportDecl.ts === +var simpleVar; +>simpleVar : Symbol(simpleVar, Decl(withExportDecl.ts, 0, 3)) + +export var exportedSimpleVar; +>exportedSimpleVar : Symbol(exportedSimpleVar, Decl(withExportDecl.ts, 1, 10)) + +var anotherVar: any; +>anotherVar : Symbol(anotherVar, Decl(withExportDecl.ts, 3, 3)) + +var varWithSimpleType: number; +>varWithSimpleType : Symbol(varWithSimpleType, Decl(withExportDecl.ts, 4, 3)) + +var varWithArrayType: number[]; +>varWithArrayType : Symbol(varWithArrayType, Decl(withExportDecl.ts, 5, 3)) + +var varWithInitialValue = 30; +>varWithInitialValue : Symbol(varWithInitialValue, Decl(withExportDecl.ts, 7, 3)) + +export var exportedVarWithInitialValue = 70; +>exportedVarWithInitialValue : Symbol(exportedVarWithInitialValue, Decl(withExportDecl.ts, 8, 10)) + +var withComplicatedValue = { x: 30, y: 70, desc: "position" }; +>withComplicatedValue : Symbol(withComplicatedValue, Decl(withExportDecl.ts, 10, 3)) +>x : Symbol(x, Decl(withExportDecl.ts, 10, 28)) +>y : Symbol(y, Decl(withExportDecl.ts, 10, 35)) +>desc : Symbol(desc, Decl(withExportDecl.ts, 10, 42)) + +export var exportedWithComplicatedValue = { x: 30, y: 70, desc: "position" }; +>exportedWithComplicatedValue : Symbol(exportedWithComplicatedValue, Decl(withExportDecl.ts, 11, 10)) +>x : Symbol(x, Decl(withExportDecl.ts, 11, 43)) +>y : Symbol(y, Decl(withExportDecl.ts, 11, 50)) +>desc : Symbol(desc, Decl(withExportDecl.ts, 11, 57)) + +declare var declaredVar; +>declaredVar : Symbol(declaredVar, Decl(withExportDecl.ts, 13, 11), Decl(withExportDecl.ts, 16, 11)) + +declare var declareVar2 +>declareVar2 : Symbol(declareVar2, Decl(withExportDecl.ts, 14, 11)) + +declare var declaredVar; +>declaredVar : Symbol(declaredVar, Decl(withExportDecl.ts, 13, 11), Decl(withExportDecl.ts, 16, 11)) + +declare var deckareVarWithType: number; +>deckareVarWithType : Symbol(deckareVarWithType, Decl(withExportDecl.ts, 17, 11)) + +export declare var exportedDeclaredVar: number; +>exportedDeclaredVar : Symbol(exportedDeclaredVar, Decl(withExportDecl.ts, 18, 18)) + +var arrayVar: string[] = ['a', 'b']; +>arrayVar : Symbol(arrayVar, Decl(withExportDecl.ts, 20, 3)) + +export var exportedArrayVar: { x: number; y: string; }[] ; +>exportedArrayVar : Symbol(exportedArrayVar, Decl(withExportDecl.ts, 22, 10)) +>x : Symbol(x, Decl(withExportDecl.ts, 22, 30)) +>y : Symbol(y, Decl(withExportDecl.ts, 22, 41)) + +exportedArrayVar.push({ x: 30, y : 'hello world' }); +>exportedArrayVar.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) +>exportedArrayVar : Symbol(exportedArrayVar, Decl(withExportDecl.ts, 22, 10)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(withExportDecl.ts, 23, 23)) +>y : Symbol(y, Decl(withExportDecl.ts, 23, 30)) + +function simpleFunction() { +>simpleFunction : Symbol(simpleFunction, Decl(withExportDecl.ts, 23, 52)) + + return { + x: "Hello", +>x : Symbol(x, Decl(withExportDecl.ts, 26, 12)) + + y: "word", +>y : Symbol(y, Decl(withExportDecl.ts, 27, 19)) + + n: 2 +>n : Symbol(n, Decl(withExportDecl.ts, 28, 18)) + + }; +} + +export function exportedFunction() { +>exportedFunction : Symbol(exportedFunction, Decl(withExportDecl.ts, 31, 1)) + + return simpleFunction(); +>simpleFunction : Symbol(simpleFunction, Decl(withExportDecl.ts, 23, 52)) +} + +module m1 { +>m1 : Symbol(m1, Decl(withExportDecl.ts, 35, 1)) + + export function foo() { +>foo : Symbol(foo, Decl(withExportDecl.ts, 37, 11)) + + return "Hello"; + } +} +export declare module m2 { +>m2 : Symbol(m2, Decl(withExportDecl.ts, 41, 1)) + + export var a: number; +>a : Symbol(a, Decl(withExportDecl.ts, 44, 14)) +} + + +export module m3 { +>m3 : Symbol(m3, Decl(withExportDecl.ts, 45, 1)) + + export function foo() { +>foo : Symbol(foo, Decl(withExportDecl.ts, 48, 18)) + + return m1.foo(); +>m1.foo : Symbol(m1.foo, Decl(withExportDecl.ts, 37, 11)) +>m1 : Symbol(m1, Decl(withExportDecl.ts, 35, 1)) +>foo : Symbol(m1.foo, Decl(withExportDecl.ts, 37, 11)) + } +} + +export var eVar1, eVar2 = 10; +>eVar1 : Symbol(eVar1, Decl(withExportDecl.ts, 55, 10)) +>eVar2 : Symbol(eVar2, Decl(withExportDecl.ts, 55, 17)) + +var eVar22; +>eVar22 : Symbol(eVar22, Decl(withExportDecl.ts, 56, 3)) + +export var eVar3 = 10, eVar4, eVar5; +>eVar3 : Symbol(eVar3, Decl(withExportDecl.ts, 57, 10)) +>eVar4 : Symbol(eVar4, Decl(withExportDecl.ts, 57, 22)) +>eVar5 : Symbol(eVar5, Decl(withExportDecl.ts, 57, 29)) + diff --git a/tests/baselines/reference/withExportDecl.types b/tests/baselines/reference/withExportDecl.types new file mode 100644 index 0000000000000..099a6241f4475 --- /dev/null +++ b/tests/baselines/reference/withExportDecl.types @@ -0,0 +1,156 @@ +=== tests/cases/compiler/withExportDecl.ts === +var simpleVar; +>simpleVar : any + +export var exportedSimpleVar; +>exportedSimpleVar : any + +var anotherVar: any; +>anotherVar : any + +var varWithSimpleType: number; +>varWithSimpleType : number + +var varWithArrayType: number[]; +>varWithArrayType : number[] + +var varWithInitialValue = 30; +>varWithInitialValue : number +>30 : number + +export var exportedVarWithInitialValue = 70; +>exportedVarWithInitialValue : number +>70 : number + +var withComplicatedValue = { x: 30, y: 70, desc: "position" }; +>withComplicatedValue : { x: number; y: number; desc: string; } +>{ x: 30, y: 70, desc: "position" } : { x: number; y: number; desc: string; } +>x : number +>30 : number +>y : number +>70 : number +>desc : string +>"position" : string + +export var exportedWithComplicatedValue = { x: 30, y: 70, desc: "position" }; +>exportedWithComplicatedValue : { x: number; y: number; desc: string; } +>{ x: 30, y: 70, desc: "position" } : { x: number; y: number; desc: string; } +>x : number +>30 : number +>y : number +>70 : number +>desc : string +>"position" : string + +declare var declaredVar; +>declaredVar : any + +declare var declareVar2 +>declareVar2 : any + +declare var declaredVar; +>declaredVar : any + +declare var deckareVarWithType: number; +>deckareVarWithType : number + +export declare var exportedDeclaredVar: number; +>exportedDeclaredVar : number + +var arrayVar: string[] = ['a', 'b']; +>arrayVar : string[] +>['a', 'b'] : string[] +>'a' : string +>'b' : string + +export var exportedArrayVar: { x: number; y: string; }[] ; +>exportedArrayVar : { x: number; y: string; }[] +>x : number +>y : string + +exportedArrayVar.push({ x: 30, y : 'hello world' }); +>exportedArrayVar.push({ x: 30, y : 'hello world' }) : number +>exportedArrayVar.push : (...items: { x: number; y: string; }[]) => number +>exportedArrayVar : { x: number; y: string; }[] +>push : (...items: { x: number; y: string; }[]) => number +>{ x: 30, y : 'hello world' } : { x: number; y: string; } +>x : number +>30 : number +>y : string +>'hello world' : string + +function simpleFunction() { +>simpleFunction : () => { x: string; y: string; n: number; } + + return { +>{ x: "Hello", y: "word", n: 2 } : { x: string; y: string; n: number; } + + x: "Hello", +>x : string +>"Hello" : string + + y: "word", +>y : string +>"word" : string + + n: 2 +>n : number +>2 : number + + }; +} + +export function exportedFunction() { +>exportedFunction : () => { x: string; y: string; n: number; } + + return simpleFunction(); +>simpleFunction() : { x: string; y: string; n: number; } +>simpleFunction : () => { x: string; y: string; n: number; } +} + +module m1 { +>m1 : typeof m1 + + export function foo() { +>foo : () => string + + return "Hello"; +>"Hello" : string + } +} +export declare module m2 { +>m2 : typeof m2 + + export var a: number; +>a : number +} + + +export module m3 { +>m3 : typeof m3 + + export function foo() { +>foo : () => string + + return m1.foo(); +>m1.foo() : string +>m1.foo : () => string +>m1 : typeof m1 +>foo : () => string + } +} + +export var eVar1, eVar2 = 10; +>eVar1 : any +>eVar2 : number +>10 : number + +var eVar22; +>eVar22 : any + +export var eVar3 = 10, eVar4, eVar5; +>eVar3 : number +>10 : number +>eVar4 : any +>eVar5 : any + diff --git a/tests/baselines/reference/withImportDecl.js b/tests/baselines/reference/withImportDecl.js index 2f2abb0bcb0ae..275d5fcadcc21 100644 --- a/tests/baselines/reference/withImportDecl.js +++ b/tests/baselines/reference/withImportDecl.js @@ -45,6 +45,7 @@ b.foo; //// [withImportDecl_0.js] define(["require", "exports"], function (require, exports) { + "use strict"; var A = (function () { function A() { } @@ -54,6 +55,7 @@ define(["require", "exports"], function (require, exports) { }); //// [withImportDecl_1.js] define(["require", "exports", "withImportDecl_0"], function (require, exports, m3) { + "use strict"; /// var simpleVar; var anotherVar; diff --git a/tests/cases/compiler/allowSyntheticDefaultImports1.ts b/tests/cases/compiler/allowSyntheticDefaultImports1.ts new file mode 100644 index 0000000000000..4793da791361c --- /dev/null +++ b/tests/cases/compiler/allowSyntheticDefaultImports1.ts @@ -0,0 +1,10 @@ +// @allowSyntheticDefaultImports: true +// @module: commonjs +// @Filename: a.ts +import Namespace from "./b"; +export var x = new Namespace.Foo(); + +// @Filename: b.ts +export class Foo { + member: string; +} diff --git a/tests/cases/compiler/allowSyntheticDefaultImports2.ts b/tests/cases/compiler/allowSyntheticDefaultImports2.ts new file mode 100644 index 0000000000000..8fa004be38720 --- /dev/null +++ b/tests/cases/compiler/allowSyntheticDefaultImports2.ts @@ -0,0 +1,9 @@ +// @module: system +// @Filename: a.ts +import Namespace from "./b"; +export var x = new Namespace.Foo(); + +// @Filename: b.ts +export class Foo { + member: string; +} \ No newline at end of file diff --git a/tests/cases/compiler/allowSyntheticDefaultImports3.ts b/tests/cases/compiler/allowSyntheticDefaultImports3.ts new file mode 100644 index 0000000000000..65d11c892c97c --- /dev/null +++ b/tests/cases/compiler/allowSyntheticDefaultImports3.ts @@ -0,0 +1,10 @@ +// @allowSyntheticDefaultImports: false +// @module: system +// @Filename: a.ts +import Namespace from "./b"; +export var x = new Namespace.Foo(); + +// @Filename: b.ts +export class Foo { + member: string; +} diff --git a/tests/cases/compiler/allowSyntheticDefaultImports4.ts b/tests/cases/compiler/allowSyntheticDefaultImports4.ts new file mode 100644 index 0000000000000..1d26c6277c1c6 --- /dev/null +++ b/tests/cases/compiler/allowSyntheticDefaultImports4.ts @@ -0,0 +1,11 @@ +// @allowSyntheticDefaultImports: true +// @module: commonjs +// @Filename: b.d.ts +declare class Foo { + member: string; +} +export = Foo; + +// @Filename: a.ts +import Foo from "./b"; +export var x = new Foo(); diff --git a/tests/cases/compiler/allowSyntheticDefaultImports5.ts b/tests/cases/compiler/allowSyntheticDefaultImports5.ts new file mode 100644 index 0000000000000..30ebba67144a8 --- /dev/null +++ b/tests/cases/compiler/allowSyntheticDefaultImports5.ts @@ -0,0 +1,10 @@ +// @module: system +// @Filename: b.d.ts +declare class Foo { + member: string; +} +export = Foo; + +// @Filename: a.ts +import Foo from "./b"; +export var x = new Foo(); diff --git a/tests/cases/compiler/allowSyntheticDefaultImports6.ts b/tests/cases/compiler/allowSyntheticDefaultImports6.ts new file mode 100644 index 0000000000000..ff0300e30b472 --- /dev/null +++ b/tests/cases/compiler/allowSyntheticDefaultImports6.ts @@ -0,0 +1,11 @@ +// @allowSyntheticDefaultImports: false +// @module: system +// @Filename: b.d.ts +declare class Foo { + member: string; +} +export = Foo; + +// @Filename: a.ts +import Foo from "./b"; +export var x = new Foo(); diff --git a/tests/cases/compiler/ambientClassDeclarationWithExtends.ts b/tests/cases/compiler/ambientClassDeclarationWithExtends.ts index 0c5d8d156bf27..ca26f1b2a4415 100644 --- a/tests/cases/compiler/ambientClassDeclarationWithExtends.ts +++ b/tests/cases/compiler/ambientClassDeclarationWithExtends.ts @@ -1,2 +1,23 @@ +// @Filename: ambientClassDeclarationExtends_singleFile.ts declare class A { } declare class B extends A { } + +declare class C { + public foo; +} +namespace D { var x; } +declare class D extends C { } + +var d: C = new D(); + +// @Filename: ambientClassDeclarationExtends_file1.ts + +declare class E { + public bar; +} +namespace F { var y; } + +// @Filename: ambientClassDeclarationExtends_file2.ts + +declare class F extends E { } +var f: E = new F(); diff --git a/tests/cases/compiler/bangInModuleName.ts b/tests/cases/compiler/bangInModuleName.ts new file mode 100644 index 0000000000000..6e8f7163109fa --- /dev/null +++ b/tests/cases/compiler/bangInModuleName.ts @@ -0,0 +1,17 @@ +// @module: amd + +// @filename: a.d.ts + +declare module "http" { +} + +declare module 'intern/dojo/node!http' { + import http = require('http'); + export = http; +} + +// @filename: a.ts + +/// + +import * as http from 'intern/dojo/node!http'; \ No newline at end of file diff --git a/tests/cases/compiler/capturedLetConstInLoop10.ts b/tests/cases/compiler/capturedLetConstInLoop10.ts new file mode 100644 index 0000000000000..47eee6d6a7d47 --- /dev/null +++ b/tests/cases/compiler/capturedLetConstInLoop10.ts @@ -0,0 +1,45 @@ +class A { + foo() { + for (let x of [0]) { + let f = function() { return x; }; + this.bar(f()); + } + } + bar(a: number) { + } + + baz() { + for (let x of [1]) { + let a = function() { return x; }; + for (let y of [1]) { + let b = function() { return y; }; + this.bar(b()); + } + this.bar(a()); + } + } + baz2() { + for (let x of [1]) { + let a = function() { return x; }; + this.bar(a()); + for (let y of [1]) { + let b = function() { return y; }; + this.bar(b()); + } + } + } +} + +class B { + foo() { + let a = + () => { + for (let x of [0]) { + let f = () => x; + this.bar(f()); + } + } + } + bar(a: number) { + } +} \ No newline at end of file diff --git a/tests/cases/compiler/capturedLetConstInLoop10_ES6.ts b/tests/cases/compiler/capturedLetConstInLoop10_ES6.ts new file mode 100644 index 0000000000000..21c58e3aa3d49 --- /dev/null +++ b/tests/cases/compiler/capturedLetConstInLoop10_ES6.ts @@ -0,0 +1,46 @@ +// @target: ES6 +class A { + foo() { + for (let x of [0]) { + let f = function() { return x; }; + this.bar(f()); + } + } + bar(a: number) { + } + + baz() { + for (let x of [1]) { + let a = function() { return x; }; + for (let y of [1]) { + let b = function() { return y; }; + this.bar(b()); + } + this.bar(a()); + } + } + baz2() { + for (let x of [1]) { + let a = function() { return x; }; + this.bar(a()); + for (let y of [1]) { + let b = function() { return y; }; + this.bar(b()); + } + } + } +} + +class B { + foo() { + let a = + () => { + for (let x of [0]) { + let f = () => x; + this.bar(f()); + } + } + } + bar(a: number) { + } +} \ No newline at end of file diff --git a/tests/cases/compiler/checkSwitchStatementIfCaseTypeIsString.ts b/tests/cases/compiler/checkSwitchStatementIfCaseTypeIsString.ts new file mode 100644 index 0000000000000..931f64a4b2957 --- /dev/null +++ b/tests/cases/compiler/checkSwitchStatementIfCaseTypeIsString.ts @@ -0,0 +1,11 @@ +declare function use(a: any): void; + +class A { + doIt(x: Array): void { + x.forEach((v) => { + switch(v) { + case "test": use(this); + } + }); + } +} \ No newline at end of file diff --git a/tests/cases/compiler/classdecl.ts b/tests/cases/compiler/classdecl.ts index 785faf82865e3..2b9a55a1f3ec0 100644 --- a/tests/cases/compiler/classdecl.ts +++ b/tests/cases/compiler/classdecl.ts @@ -1,4 +1,5 @@ // @declaration: true +// @target: es5 class a { //constructor (); constructor (n: number); @@ -13,7 +14,7 @@ class a { public get d() { return 30; } - public set d() { + public set d(a: number) { } public static get p2() { diff --git a/tests/cases/compiler/commonSourceDir1.ts b/tests/cases/compiler/commonSourceDir1.ts new file mode 100644 index 0000000000000..1a178ac0226c8 --- /dev/null +++ b/tests/cases/compiler/commonSourceDir1.ts @@ -0,0 +1,6 @@ +// @outDir: A:/ +// @Filename: A:/foo/bar.ts +var x: number; + +// @Filename: A:/foo/baz.ts +var y: number; diff --git a/tests/cases/compiler/commonSourceDir2.ts b/tests/cases/compiler/commonSourceDir2.ts new file mode 100644 index 0000000000000..68dab0727a3ad --- /dev/null +++ b/tests/cases/compiler/commonSourceDir2.ts @@ -0,0 +1,6 @@ +// @outDir: A:/ +// @Filename: A:/foo/bar.ts +var x: number; + +// @Filename: B:/foo/baz.ts +var y: number; \ No newline at end of file diff --git a/tests/cases/compiler/commonSourceDir3.ts b/tests/cases/compiler/commonSourceDir3.ts new file mode 100644 index 0000000000000..54b6e8c89b78a --- /dev/null +++ b/tests/cases/compiler/commonSourceDir3.ts @@ -0,0 +1,7 @@ +// @useCaseSensitiveFileNames: false +// @outDir: A:/ +// @Filename: A:/foo/bar.ts +var x: number; + +// @Filename: a:/foo/baz.ts +var y: number; \ No newline at end of file diff --git a/tests/cases/compiler/commonSourceDir4.ts b/tests/cases/compiler/commonSourceDir4.ts new file mode 100644 index 0000000000000..41ee7a0344a45 --- /dev/null +++ b/tests/cases/compiler/commonSourceDir4.ts @@ -0,0 +1,7 @@ +// @useCaseSensitiveFileNames: true +// @outDir: A:/ +// @Filename: A:/foo/bar.ts +var x: number; + +// @Filename: a:/foo/baz.ts +var y: number; \ No newline at end of file diff --git a/tests/cases/compiler/commonSourceDir5.ts b/tests/cases/compiler/commonSourceDir5.ts new file mode 100644 index 0000000000000..d181bef68fe01 --- /dev/null +++ b/tests/cases/compiler/commonSourceDir5.ts @@ -0,0 +1,17 @@ +// @outFile: concat.js +// @module: amd +// @moduleResolution: node +// @Filename: A:/bar.ts +import {z} from "./foo"; +export var x = z + z; + +// @Filename: A:/foo.ts +import {pi} from "B:/baz"; +export var i = Math.sqrt(-1); +export var z = pi * pi; + +// @Filename: B:/baz.ts +import {x} from "A:/bar"; +import {i} from "A:/foo"; +export var pi = Math.PI; +export var y = x * i; \ No newline at end of file diff --git a/tests/cases/compiler/commonSourceDir6.ts b/tests/cases/compiler/commonSourceDir6.ts new file mode 100644 index 0000000000000..ff2b1309035cf --- /dev/null +++ b/tests/cases/compiler/commonSourceDir6.ts @@ -0,0 +1,17 @@ +// @outFile: concat.js +// @outDir: a +// @module: amd +// @Filename: a/bar.ts +import {z} from "./foo"; +export var x = z + z; + +// @Filename: a/foo.ts +import {pi} from "../baz"; +export var i = Math.sqrt(-1); +export var z = pi * pi; + +// @Filename: baz.ts +import {x} from "a/bar"; +import {i} from "a/foo"; +export var pi = Math.PI; +export var y = x * i; \ No newline at end of file diff --git a/tests/cases/compiler/computedPropertiesInDestructuring1.ts b/tests/cases/compiler/computedPropertiesInDestructuring1.ts new file mode 100644 index 0000000000000..d3ccaa57ad105 --- /dev/null +++ b/tests/cases/compiler/computedPropertiesInDestructuring1.ts @@ -0,0 +1,36 @@ +// destructuring in variable declarations +let foo = "bar"; +let {[foo]: bar} = {bar: "bar"}; + +let {["bar"]: bar2} = {bar: "bar"}; + +let foo2 = () => "bar"; +let {[foo2()]: bar3} = {bar: "bar"}; + +let [{[foo]: bar4}] = [{bar: "bar"}]; +let [{[foo2()]: bar5}] = [{bar: "bar"}]; + +function f1({["bar"]: x}: { bar: number }) {} +function f2({[foo]: x}: { bar: number }) {} +function f3({[foo2()]: x}: { bar: number }) {} +function f4([{[foo]: x}]: [{ bar: number }]) {} +function f5([{[foo2()]: x}]: [{ bar: number }]) {} + +// report errors on type errors in computed properties used in destructuring +let [{[foo()]: bar6}] = [{bar: "bar"}]; +let [{[foo.toExponential()]: bar7}] = [{bar: "bar"}]; + +// destructuring assignment +({[foo]: bar} = {bar: "bar"}); + +({["bar"]: bar2} = {bar: "bar"}); + +({[foo2()]: bar3} = {bar: "bar"}); + +[{[foo]: bar4}] = [{bar: "bar"}]; +[{[foo2()]: bar5}] = [{bar: "bar"}]; + +[{[foo()]: bar4}] = [{bar: "bar"}]; +[{[(1 + {})]: bar4}] = [{bar: "bar"}]; + + diff --git a/tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts b/tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts new file mode 100644 index 0000000000000..4951e474fdba7 --- /dev/null +++ b/tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts @@ -0,0 +1,36 @@ +// @target: ES6 +// destructuring in variable declarations +let foo = "bar"; +let {[foo]: bar} = {bar: "bar"}; + +let {["bar"]: bar2} = {bar: "bar"}; +let {[11]: bar2_1} = {11: "bar"}; + +let foo2 = () => "bar"; +let {[foo2()]: bar3} = {bar: "bar"}; + +let [{[foo]: bar4}] = [{bar: "bar"}]; +let [{[foo2()]: bar5}] = [{bar: "bar"}]; + +function f1({["bar"]: x}: { bar: number }) {} +function f2({[foo]: x}: { bar: number }) {} +function f3({[foo2()]: x}: { bar: number }) {} +function f4([{[foo]: x}]: [{ bar: number }]) {} +function f5([{[foo2()]: x}]: [{ bar: number }]) {} + +// report errors on type errors in computed properties used in destructuring +let [{[foo()]: bar6}] = [{bar: "bar"}]; +let [{[foo.toExponential()]: bar7}] = [{bar: "bar"}]; + +// destructuring assignment +({[foo]: bar} = {bar: "bar"}); + +({["bar"]: bar2} = {bar: "bar"}); + +({[foo2()]: bar3} = {bar: "bar"}); + +[{[foo]: bar4}] = [{bar: "bar"}]; +[{[foo2()]: bar5}] = [{bar: "bar"}]; + +[{[foo()]: bar4}] = [{bar: "bar"}]; +[{[(1 + {})]: bar4}] = [{bar: "bar"}]; diff --git a/tests/cases/compiler/computedPropertiesInDestructuring2.ts b/tests/cases/compiler/computedPropertiesInDestructuring2.ts new file mode 100644 index 0000000000000..806c528c17cc6 --- /dev/null +++ b/tests/cases/compiler/computedPropertiesInDestructuring2.ts @@ -0,0 +1,2 @@ +let foo2 = () => "bar"; +let {[foo2()]: bar3} = {}; \ No newline at end of file diff --git a/tests/cases/compiler/computedPropertiesInDestructuring2_ES6.ts b/tests/cases/compiler/computedPropertiesInDestructuring2_ES6.ts new file mode 100644 index 0000000000000..c21f86bed1cee --- /dev/null +++ b/tests/cases/compiler/computedPropertiesInDestructuring2_ES6.ts @@ -0,0 +1,4 @@ +// @target: ES6 + +let foo2 = () => "bar"; +let {[foo2()]: bar3} = {}; \ No newline at end of file diff --git a/tests/cases/compiler/declFileObjectLiteralWithAccessors.ts b/tests/cases/compiler/declFileObjectLiteralWithAccessors.ts index 4d424e75d23f7..24b094b602d87 100644 --- a/tests/cases/compiler/declFileObjectLiteralWithAccessors.ts +++ b/tests/cases/compiler/declFileObjectLiteralWithAccessors.ts @@ -1,4 +1,5 @@ // @declaration: true +// @target: es5 function /*1*/makePoint(x: number) { return { diff --git a/tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts b/tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts index 545018c5a7f21..79c9b581e5f77 100644 --- a/tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts +++ b/tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts @@ -1,4 +1,5 @@ // @declaration: true +// @target: es5 function /*1*/makePoint(x: number) { return { diff --git a/tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts b/tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts index b82cebc553fc8..de11cec9fe8dc 100644 --- a/tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts +++ b/tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts @@ -1,4 +1,5 @@ // @declaration: true +// @target: es5 function /*1*/makePoint(x: number) { return { diff --git a/tests/cases/compiler/declFilePrivateStatic.ts b/tests/cases/compiler/declFilePrivateStatic.ts index 77edf963b697e..0d64844ff99d2 100644 --- a/tests/cases/compiler/declFilePrivateStatic.ts +++ b/tests/cases/compiler/declFilePrivateStatic.ts @@ -1,4 +1,5 @@ // @declaration: true +// @target: es5 class C { private static x = 1; diff --git a/tests/cases/compiler/declFileWithErrorsInInputDeclarationFile.ts b/tests/cases/compiler/declFileWithErrorsInInputDeclarationFile.ts new file mode 100644 index 0000000000000..e7d3b592932ef --- /dev/null +++ b/tests/cases/compiler/declFileWithErrorsInInputDeclarationFile.ts @@ -0,0 +1,15 @@ +// @declaration: true + +// @Filename: declFile.d.ts +declare module M { + declare var x; + declare function f(); + + declare module N { } + + declare class C { } +} + +// @Filename: client.ts +/// +var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file diff --git a/tests/cases/compiler/declFileWithErrorsInInputDeclarationFileWithOut.ts b/tests/cases/compiler/declFileWithErrorsInInputDeclarationFileWithOut.ts new file mode 100644 index 0000000000000..005b52d5bc9f6 --- /dev/null +++ b/tests/cases/compiler/declFileWithErrorsInInputDeclarationFileWithOut.ts @@ -0,0 +1,16 @@ +// @declaration: true +// @out: out.js + +// @Filename: declFile.d.ts +declare module M { + declare var x; + declare function f(); + + declare module N { } + + declare class C { } +} + +// @Filename: client.ts +/// +var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file diff --git a/tests/cases/compiler/declarationFileOverwriteError.ts b/tests/cases/compiler/declarationFileOverwriteError.ts new file mode 100644 index 0000000000000..b7ecb6540028c --- /dev/null +++ b/tests/cases/compiler/declarationFileOverwriteError.ts @@ -0,0 +1,9 @@ +// @declaration: true + +// @Filename: a.d.ts +declare class c { +} + +// @FileName: a.ts +class d { +} \ No newline at end of file diff --git a/tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts b/tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts new file mode 100644 index 0000000000000..b43c9a8b2e04f --- /dev/null +++ b/tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts @@ -0,0 +1,10 @@ +// @declaration: true +// @out: tests/cases/compiler/out.js + +// @Filename: out.d.ts +declare class c { +} + +// @FileName: a.ts +class d { +} \ No newline at end of file diff --git a/tests/cases/compiler/errorElaboration.ts b/tests/cases/compiler/errorElaboration.ts new file mode 100644 index 0000000000000..97ec0dde61cd5 --- /dev/null +++ b/tests/cases/compiler/errorElaboration.ts @@ -0,0 +1,12 @@ +// Repro for #5712 + +interface Ref { + prop: T; +} +interface Container { + m1: Container>; + m2: T; +} +declare function foo(x: () => Container>): void; +let a: () => Container>; +foo(a); diff --git a/tests/cases/compiler/errorOnInitializerInInterfaceProperty.ts b/tests/cases/compiler/errorOnInitializerInInterfaceProperty.ts new file mode 100644 index 0000000000000..ac600103e7252 --- /dev/null +++ b/tests/cases/compiler/errorOnInitializerInInterfaceProperty.ts @@ -0,0 +1,3 @@ +interface Foo { + bar: number = 5; +} diff --git a/tests/cases/compiler/errorOnInitializerInObjectTypeLiteralProperty.ts b/tests/cases/compiler/errorOnInitializerInObjectTypeLiteralProperty.ts new file mode 100644 index 0000000000000..a02f8b0f709a1 --- /dev/null +++ b/tests/cases/compiler/errorOnInitializerInObjectTypeLiteralProperty.ts @@ -0,0 +1,7 @@ +var Foo: { + bar: number = 5; +}; + +let Bar: { + bar: number = 5; +}; diff --git a/tests/cases/compiler/filesEmittingIntoSameOutput.ts b/tests/cases/compiler/filesEmittingIntoSameOutput.ts new file mode 100644 index 0000000000000..2e53db45edc60 --- /dev/null +++ b/tests/cases/compiler/filesEmittingIntoSameOutput.ts @@ -0,0 +1,7 @@ +// @filename: a.ts +class c { +} + +// @filename: a.tsx +function foo() { +} diff --git a/tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts b/tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts new file mode 100644 index 0000000000000..e8770c99fba0c --- /dev/null +++ b/tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts @@ -0,0 +1,9 @@ +// @out: tests/cases/compiler/a.js +// @module: amd +// @filename: a.ts +export class c { +} + +// @filename: b.ts +function foo() { +} diff --git a/tests/cases/compiler/functionVariableInReturnTypeAnnotation.ts b/tests/cases/compiler/functionVariableInReturnTypeAnnotation.ts new file mode 100644 index 0000000000000..c8936034a2578 --- /dev/null +++ b/tests/cases/compiler/functionVariableInReturnTypeAnnotation.ts @@ -0,0 +1,4 @@ +function bar(): typeof b { + var b = 1; + return undefined; +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts b/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts new file mode 100644 index 0000000000000..2654dddf2bc60 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +declare var v; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationBindErrors.ts b/tests/cases/compiler/jsFileCompilationBindErrors.ts new file mode 100644 index 0000000000000..37bdbc62916a0 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationBindErrors.ts @@ -0,0 +1,15 @@ +// @allowJs: true +// @noEmit: true +// @filename: a.js +let C = "sss"; +let C = 0; // Error: Cannot redeclare block-scoped variable 'C'. + +function f() { + return; + return; // Error: Unreachable code detected. +} + +function b() { + "use strict"; + var arguments = 0; // Error: Invalid use of 'arguments' in strict mode. +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationClassMethodContainingArrowFunction.ts b/tests/cases/compiler/jsFileCompilationClassMethodContainingArrowFunction.ts new file mode 100644 index 0000000000000..50adc50388d2f --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationClassMethodContainingArrowFunction.ts @@ -0,0 +1,9 @@ +// @allowJs: true +// @out: out.js + +// @FileName: a.js +class c { + method(a) { + let x = a => this.method(a); + } +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts b/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts new file mode 100644 index 0000000000000..2ef95db01fe1f --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +@internal class C { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts b/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts new file mode 100644 index 0000000000000..8517c9dbf8e6d --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts @@ -0,0 +1,12 @@ +// @allowJs: true +// @out: out.js +// @declaration: true +// @filename: b.js +function foo() { + return 10; +} +// @filename: a.ts +function foo() { + return 30; +} + diff --git a/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts b/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts new file mode 100644 index 0000000000000..a02b7d9d88a95 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts @@ -0,0 +1,13 @@ +// @allowJs: true +// @out: out.js +// @declaration: true +// @filename: a.ts +function foo() { + return 30; +} + +// @filename: b.js +function foo() { + return 10; +} + diff --git a/tests/cases/compiler/jsFileCompilationDuplicateVariable.ts b/tests/cases/compiler/jsFileCompilationDuplicateVariable.ts new file mode 100644 index 0000000000000..cf2e27de885e5 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationDuplicateVariable.ts @@ -0,0 +1,8 @@ +// @allowJs: true +// @out: out.js +// @declaration: true +// @filename: a.ts +var x = 10; + +// @filename: b.js +var x = "hello"; // No error is recorded here and declaration file will show this as number \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts b/tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts new file mode 100644 index 0000000000000..05b750fe6082b --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts @@ -0,0 +1,8 @@ +// @allowJs: true +// @out: out.js +// @declaration: true +// @filename: b.js +var x = "hello"; + +// @filename: a.ts +var x = 10; // Error reported so no declaration file generated? \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts b/tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts new file mode 100644 index 0000000000000..55f1d0ad933ca --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts @@ -0,0 +1,13 @@ +// @allowJs: true +// @filename: a.ts +class c { +} + +// @filename: b.ts +// this should be emitted +class d { +} + +// @filename: a.js +function foo() { +} diff --git a/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts b/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts new file mode 100644 index 0000000000000..9d6daeac6fa6c --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationEmitDeclarations.ts @@ -0,0 +1,10 @@ +// @allowJs: true +// @out: out.js +// @declaration: true +// @filename: a.ts +class c { +} + +// @filename: b.js +function foo() { +} diff --git a/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts b/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts new file mode 100644 index 0000000000000..8d41ac2ef1336 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts @@ -0,0 +1,15 @@ +// @allowJs: true +// @out: out.js +// @declaration: true +// @filename: a.ts +class c { +} + +// @filename: b.js +/// +function foo() { +} + +// @filename: c.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationEnumSyntax.ts b/tests/cases/compiler/jsFileCompilationEnumSyntax.ts new file mode 100644 index 0000000000000..1c607d09cb66f --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationEnumSyntax.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +enum E { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts new file mode 100644 index 0000000000000..1741e3c280270 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts @@ -0,0 +1,15 @@ +// @allowJs: true +// @declaration: true +// @filename: a.ts +class c { +} + +// @filename: b.ts +/// +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files +function foo() { +} + +// @filename: c.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts new file mode 100644 index 0000000000000..35228678bb72a --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts @@ -0,0 +1,16 @@ +// @allowJs: true +// @out: out.js +// @declaration: true +// @filename: a.ts +class c { +} + +// @filename: b.ts +/// +// error on above reference when emitting declarations +function foo() { +} + +// @filename: c.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.ts b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.ts new file mode 100644 index 0000000000000..64e009c251591 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.ts @@ -0,0 +1,16 @@ +// @allowJs: true +// @declaration: true +// @outDir: outDir +// @filename: a.ts +class c { +} + +// @filename: b.ts +/// +// b.d.ts should have c.js as the reference path since we dont emit declarations for js files +function foo() { +} + +// @filename: c.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts b/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts new file mode 100644 index 0000000000000..c6fced0e2d31f --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +export = b; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts new file mode 100644 index 0000000000000..5e8587bb2520a --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +class C implements D { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts b/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts new file mode 100644 index 0000000000000..e7a389149310f --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +import a = b; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts b/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts new file mode 100644 index 0000000000000..205e06395ac0e --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +interface I { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts b/tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts new file mode 100644 index 0000000000000..177b0f55e27dd --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts @@ -0,0 +1,9 @@ +// @allowJs: true +// @out: out.js + +// @FileName: a.js +function foo(a) { + for (let a = 0; a < 10; a++) { + // do something + } +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts b/tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts new file mode 100644 index 0000000000000..962267c5cabb3 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts @@ -0,0 +1,10 @@ +// @allowJs: true +// @out: out.js +// @declaration: true +// @filename: b.js +let a = 10; +b = 30; + +// @filename: a.ts +let b = 30; +a = 10; diff --git a/tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts b/tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts new file mode 100644 index 0000000000000..8f89c57ade21e --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts @@ -0,0 +1,9 @@ +// @allowJs: true +// @out: out.js +// @declaration: true +// @filename: a.ts +let b = 30; +a = 10; +// @filename: b.js +let a = 10; +b = 30; diff --git a/tests/cases/compiler/jsFileCompilationModuleSyntax.ts b/tests/cases/compiler/jsFileCompilationModuleSyntax.ts new file mode 100644 index 0000000000000..f7d1a9070f6e7 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationModuleSyntax.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +module M { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts new file mode 100644 index 0000000000000..111645d995e34 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts @@ -0,0 +1,14 @@ +// @allowJs: true +// @filename: a.ts +class c { +} + +// @filename: b.ts +/// +// no error on above reference path since not emitting declarations +function foo() { +} + +// @filename: c.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts new file mode 100644 index 0000000000000..8783b722f2a29 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts @@ -0,0 +1,15 @@ +// @allowJs: true +// @out: out.js +// @filename: a.ts +class c { +} + +// @filename: b.ts +/// +//no error on above reference since not emitting declarations +function foo() { +} + +// @filename: c.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationOptionalParameter.ts b/tests/cases/compiler/jsFileCompilationOptionalParameter.ts new file mode 100644 index 0000000000000..541ff041c2a66 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationOptionalParameter.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +function F(p?) { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts new file mode 100644 index 0000000000000..62a0058bcefa7 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationPropertySyntaxOfClass.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +class C { v } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts new file mode 100644 index 0000000000000..2016d4afdbd36 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts @@ -0,0 +1,6 @@ +// @allowJs: true +// @filename: a.js +class C { + public foo() { + } +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts b/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts new file mode 100644 index 0000000000000..0c17ea98ccc1e --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +class C { constructor(public x) { }} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationRestParameter.ts b/tests/cases/compiler/jsFileCompilationRestParameter.ts new file mode 100644 index 0000000000000..560fc1ebd1a3b --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationRestParameter.ts @@ -0,0 +1,5 @@ +// @allowJs: true +// @filename: a.js +// @target: es6 +// @out: b.js +function foo(...a) { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts b/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts new file mode 100644 index 0000000000000..8e9412d489ae0 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +function F(): number { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationShortHandProperty.ts b/tests/cases/compiler/jsFileCompilationShortHandProperty.ts new file mode 100644 index 0000000000000..476658e0fa116 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationShortHandProperty.ts @@ -0,0 +1,12 @@ +// @allowJs: true +// @out: out.js + +// @FileName: a.js +function foo() { + var a = 10; + var b = "Hello"; + return { + a, + b + }; +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationSyntaxError.ts b/tests/cases/compiler/jsFileCompilationSyntaxError.ts new file mode 100644 index 0000000000000..4d17d6d3aaeae --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationSyntaxError.ts @@ -0,0 +1,7 @@ +// @allowJs: true +// @filename: a.js +/** + * @type {number} + * @type {string} + */ +var v; diff --git a/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts b/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts new file mode 100644 index 0000000000000..d849ca5ea4bea --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +type a = b; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts b/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts new file mode 100644 index 0000000000000..a5bcdae904b61 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +Foo(); \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeAssertions.ts b/tests/cases/compiler/jsFileCompilationTypeAssertions.ts new file mode 100644 index 0000000000000..15f39b36d01ba --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeAssertions.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +var v = undefined; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts b/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts new file mode 100644 index 0000000000000..d9e42c264da88 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeOfParameter.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +function F(a: number) { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts new file mode 100644 index 0000000000000..d0aa85f59939a --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +class C { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts new file mode 100644 index 0000000000000..19a567fbdb5a6 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +function F() { } \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts b/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts new file mode 100644 index 0000000000000..14085ea9dfb35 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts @@ -0,0 +1,3 @@ +// @allowJs: true +// @filename: a.js +var v: () => number; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts b/tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts new file mode 100644 index 0000000000000..c200602dddd65 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts @@ -0,0 +1,7 @@ +// @declaration: true +// @filename: a.ts +class c { +} + +// @filename: a.d.ts +declare function isC(): boolean; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithJsEmitPathSameAsInput.ts b/tests/cases/compiler/jsFileCompilationWithJsEmitPathSameAsInput.ts new file mode 100644 index 0000000000000..82dba88f78568 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithJsEmitPathSameAsInput.ts @@ -0,0 +1,8 @@ +// @allowJs: true +// @filename: a.ts +class c { +} + +// @filename: a.js +function foo() { +} diff --git a/tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts b/tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts new file mode 100644 index 0000000000000..4008204cd66e1 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts @@ -0,0 +1,14 @@ +// @allowJs: true +// @sourcemap: true + +// @filename: a.ts +class c { +} + +// @filename: b.js.map +function foo() { +} + +// @filename: b.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts b/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts new file mode 100644 index 0000000000000..ae510f9eec32f --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts @@ -0,0 +1,14 @@ +// @allowJs: true +// @inlineSourceMap: true + +// @filename: a.ts +class c { +} + +// @filename: b.js.map +function foo() { +} + +// @filename: b.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts b/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts new file mode 100644 index 0000000000000..9e39ae274b4fa --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts @@ -0,0 +1,15 @@ +// @allowJs: true,map +// @sourcemap: true +// @outdir: out + +// @filename: a.ts +class c { +} + +// @filename: b.js.map +function foo() { +} + +// @filename: b.js +function bar() { +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithOut.ts b/tests/cases/compiler/jsFileCompilationWithOut.ts new file mode 100644 index 0000000000000..f76605b7fe621 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithOut.ts @@ -0,0 +1,9 @@ +// @allowJs: true +// @out: out.js +// @filename: a.ts +class c { +} + +// @filename: b.js +function foo() { +} diff --git a/tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts b/tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts new file mode 100644 index 0000000000000..1c6bb41de14db --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts @@ -0,0 +1,8 @@ +// @declaration: true +// @out: tests/cases/compiler/b.js +// @filename: a.ts +class c { +} + +// @filename: b.d.ts +declare function foo(): boolean; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts b/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts new file mode 100644 index 0000000000000..1641024400402 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts @@ -0,0 +1,9 @@ +// @allowJs: true +// @out: tests/cases/compiler/b.js +// @filename: a.ts +class c { +} + +// @filename: b.js +function foo() { +} diff --git a/tests/cases/compiler/jsFileCompilationWithoutJsExtensions.ts b/tests/cases/compiler/jsFileCompilationWithoutJsExtensions.ts new file mode 100644 index 0000000000000..636866e7eeb79 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithoutJsExtensions.ts @@ -0,0 +1,2 @@ +// @filename: a.js +declare var v; \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationWithoutOut.ts b/tests/cases/compiler/jsFileCompilationWithoutOut.ts new file mode 100644 index 0000000000000..667315a55a9c1 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationWithoutOut.ts @@ -0,0 +1,8 @@ +// @allowJs: true +// @filename: a.ts +class c { +} + +// @filename: b.js +function foo() { +} diff --git a/tests/cases/compiler/literalsInComputedProperties1.ts b/tests/cases/compiler/literalsInComputedProperties1.ts new file mode 100644 index 0000000000000..e3fed5b80aab1 --- /dev/null +++ b/tests/cases/compiler/literalsInComputedProperties1.ts @@ -0,0 +1,52 @@ +// @noImplicitAny: true + +let x = { + 1:1, + [2]:1, + "3":1, + ["4"]:1 +} +x[1].toExponential(); +x[2].toExponential(); +x[3].toExponential(); +x[4].toExponential(); + +interface A { + 1:number; + [2]:number; + "3":number; + ["4"]:number; +} + +let y:A; +y[1].toExponential(); +y[2].toExponential(); +y[3].toExponential(); +y[4].toExponential(); + +class C { + 1:number; + [2]:number; + "3":number; + ["4"]:number; +} + +let z:C; +z[1].toExponential(); +z[2].toExponential(); +z[3].toExponential(); +z[4].toExponential(); + +enum X { + 1 = 1, + [2] = 2, + "3" = 3, + ["4"] = 4, + "foo" = 5, + ["bar"] = 6 +} + +let a = X["foo"]; +let a0 = X["bar"]; + +// TODO: make sure that enum still disallow template literals as member names \ No newline at end of file diff --git a/tests/cases/compiler/mixedStaticAndInstanceClassMembers.ts b/tests/cases/compiler/mixedStaticAndInstanceClassMembers.ts new file mode 100644 index 0000000000000..6395813b65892 --- /dev/null +++ b/tests/cases/compiler/mixedStaticAndInstanceClassMembers.ts @@ -0,0 +1,15 @@ +class A { + f() {} + static m1 (a: string): void; + m1 (a: number): void; + m1 (a: any): void { + } +} + +class B { + f() {} + m1 (a: string): void; + static m1 (a: number): void; + m1 (a: any): void { + } +} \ No newline at end of file diff --git a/tests/cases/compiler/moduledecl.ts b/tests/cases/compiler/moduledecl.ts index 0997f00eab407..eac2e9ff78c2a 100644 --- a/tests/cases/compiler/moduledecl.ts +++ b/tests/cases/compiler/moduledecl.ts @@ -1,4 +1,6 @@ // @declaration: true +// @target: es5 + module a { } diff --git a/tests/cases/compiler/nonMergedDeclarationsAndOverloads.ts b/tests/cases/compiler/nonMergedDeclarationsAndOverloads.ts new file mode 100644 index 0000000000000..6ec4c6076f22a --- /dev/null +++ b/tests/cases/compiler/nonMergedDeclarationsAndOverloads.ts @@ -0,0 +1,8 @@ +class A { + m1: string; + f() {} + m1 (a: string): void; + m1 (a: number): void; + m1 (a: any): void { + } +} \ No newline at end of file diff --git a/tests/cases/compiler/nonMergedOverloads.ts b/tests/cases/compiler/nonMergedOverloads.ts new file mode 100644 index 0000000000000..582cd72e1f4c1 --- /dev/null +++ b/tests/cases/compiler/nonMergedOverloads.ts @@ -0,0 +1,5 @@ +var f = 10; + +export function f(); +export function f() { +} \ No newline at end of file diff --git a/tests/cases/compiler/optionsInlineSourceMapMapRoot.ts b/tests/cases/compiler/optionsInlineSourceMapMapRoot.ts new file mode 100644 index 0000000000000..ddea5f363c7b1 --- /dev/null +++ b/tests/cases/compiler/optionsInlineSourceMapMapRoot.ts @@ -0,0 +1,4 @@ +// @mapRoot: local +// @inlineSourceMap: true + +var a = 10; \ No newline at end of file diff --git a/tests/cases/compiler/optionsInlineSourceMapSourceRoot.ts b/tests/cases/compiler/optionsInlineSourceMapSourceRoot.ts new file mode 100644 index 0000000000000..b4fdc66e309ee --- /dev/null +++ b/tests/cases/compiler/optionsInlineSourceMapSourceRoot.ts @@ -0,0 +1,4 @@ +// @sourceRoot: local +// @inlineSourceMap: true + +var a = 10; \ No newline at end of file diff --git a/tests/cases/compiler/optionsInlineSourceMapSourcemap.ts b/tests/cases/compiler/optionsInlineSourceMapSourcemap.ts new file mode 100644 index 0000000000000..d78097985d8af --- /dev/null +++ b/tests/cases/compiler/optionsInlineSourceMapSourcemap.ts @@ -0,0 +1,4 @@ +// @sourcemap: true +// @inlineSourceMap: true + +var a = 10; \ No newline at end of file diff --git a/tests/cases/compiler/optionsSourcemapInlineSources.ts b/tests/cases/compiler/optionsSourcemapInlineSources.ts new file mode 100644 index 0000000000000..dddfb5f84ca4e --- /dev/null +++ b/tests/cases/compiler/optionsSourcemapInlineSources.ts @@ -0,0 +1,4 @@ +// @sourcemap: true +// @inlineSources: true + +var a = 10; \ No newline at end of file diff --git a/tests/cases/compiler/optionsSourcemapInlineSourcesMapRoot.ts b/tests/cases/compiler/optionsSourcemapInlineSourcesMapRoot.ts new file mode 100644 index 0000000000000..c7a74469dc1c0 --- /dev/null +++ b/tests/cases/compiler/optionsSourcemapInlineSourcesMapRoot.ts @@ -0,0 +1,5 @@ +// @sourcemap: true +// @inlineSources: true +// @mapRoot: local + +var a = 10; \ No newline at end of file diff --git a/tests/cases/compiler/optionsSourcemapInlineSourcesSourceRoot.ts b/tests/cases/compiler/optionsSourcemapInlineSourcesSourceRoot.ts new file mode 100644 index 0000000000000..4fd372658adcf --- /dev/null +++ b/tests/cases/compiler/optionsSourcemapInlineSourcesSourceRoot.ts @@ -0,0 +1,5 @@ +// @sourcemap: true +// @inlineSources: true +// @sourceRoot: local + +var a = 10; \ No newline at end of file diff --git a/tests/cases/compiler/overloadConsecutiveness.ts b/tests/cases/compiler/overloadConsecutiveness.ts new file mode 100644 index 0000000000000..ced6d88b80cf9 --- /dev/null +++ b/tests/cases/compiler/overloadConsecutiveness.ts @@ -0,0 +1,11 @@ +// Making sure compiler won't break with declarations that are consecutive in the AST but not consecutive in the source. Syntax errors intentional. + +function f1(), function f1(); +function f2(), function f2() {} +function f3() {}, function f3(); + +class C { + m1(), m1(); + m2(), m2() {} + m3() {}, m3(); +} diff --git a/tests/cases/compiler/parameterNamesInTypeParameterList.ts b/tests/cases/compiler/parameterNamesInTypeParameterList.ts new file mode 100644 index 0000000000000..dba122db866ee --- /dev/null +++ b/tests/cases/compiler/parameterNamesInTypeParameterList.ts @@ -0,0 +1,23 @@ +function f0(a: T) { + a.b; +} + +function f1({a}: {a:T}) { + a.b; +} + +function f2([a]: T[]) { + a.b; +} + +class A { + m0(a: T) { + a.b + } + m1({a}: {a:T}) { + a.b + } + m2([a]: T[]) { + a.b + } +} \ No newline at end of file diff --git a/tests/cases/compiler/reachabilityChecks6.ts b/tests/cases/compiler/reachabilityChecks6.ts new file mode 100644 index 0000000000000..725563a44885a --- /dev/null +++ b/tests/cases/compiler/reachabilityChecks6.ts @@ -0,0 +1,131 @@ +// @allowUnreachableCode: false +// @noImplicitReturns: true + +function f0(x) { + while (true); +} + +function f1(x) { + if (x) { + return 1 + } +} + +function f2(x) { + while (x) { + throw new Error(); + } + return 1; +} + +function f3(x) { + while (x) { + throw new Error(); + } +} + +function f3_1 (x) { + while (x) { + } + throw new Error(); +} + +function f4(x) { + try { + if (x) { + return 1; + } + } + catch (e) { + } +} + +function f5(x) { + try { + if (x) { + return 1; + } + } + catch (e) { + return 2; + } +} + +function f6(x) { + try { + if (x) { + return 1; + } + else + { + throw new Error(); + } + } + catch (e) { + } +} + +function f7(x) { + try { + if (x) { + return 1; + } + else { + throw new Error(); + } + } + catch (e) { + return 1; + } +} + +function f8(x) { + try { + if (true) { + x++; + } + else { + return 1; + } + } + catch (e) { + return 1; + } +} + +function f9(x) { + try { + while (false) { + return 1; + } + } + catch (e) { + return 1; + } +} + +function f10(x) { + try { + do { + x++; + } while (true); + } + catch (e) { + return 1; + } +} + +function f11(x) { + test: + try { + do { + do { + break test; + } while (true); + x++; + } while (true); + } + catch (e) { + return 1; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/reachabilityChecks7.ts b/tests/cases/compiler/reachabilityChecks7.ts new file mode 100644 index 0000000000000..53702037e3fe0 --- /dev/null +++ b/tests/cases/compiler/reachabilityChecks7.ts @@ -0,0 +1,32 @@ +// @target: ES6 +// @noImplicitReturns: true + +// async function without return type annotation - error +async function f1() { +} + +let x = async function() { +} + +// async function with which promised type is void - return can be omitted +async function f2(): Promise { + +} + +async function f3(x) { + if (x) return 10; +} + +async function f4(): Promise { + +} + +function voidFunc(): void { +} + +function calltoVoidFunc(x) { + if (x) return voidFunc(); +} + +declare function use(s: string): void; +let x1 = () => { use("Test"); } \ No newline at end of file diff --git a/tests/cases/compiler/shebangBeforeReferences.ts b/tests/cases/compiler/shebangBeforeReferences.ts new file mode 100644 index 0000000000000..f03933959ee6a --- /dev/null +++ b/tests/cases/compiler/shebangBeforeReferences.ts @@ -0,0 +1,15 @@ +// @module: commonjs + +// @filename: f.d.ts +declare module "test" { + let x: number; +} + +// @filename: f.ts +#!/usr/bin/env node + +/// + +declare function use(f: number): void; +import {x} from "test"; +use(x); \ No newline at end of file diff --git a/tests/cases/compiler/shorthandPropertyAssignmentInES6Module.ts b/tests/cases/compiler/shorthandPropertyAssignmentInES6Module.ts new file mode 100644 index 0000000000000..8b08fd64e3e56 --- /dev/null +++ b/tests/cases/compiler/shorthandPropertyAssignmentInES6Module.ts @@ -0,0 +1,16 @@ +// @target: ES6 +// @module: commonjs + +// @filename: existingModule.ts +export var x = 1; + +// @filename: test.ts +import {x} from './existingModule'; +import {foo} from './missingModule'; + +declare function use(a: any): void; + +const test = { x, foo }; + +use(x); +use(foo); \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationLambdaSpanningMultipleLines.ts b/tests/cases/compiler/sourceMapValidationLambdaSpanningMultipleLines.ts new file mode 100644 index 0000000000000..57ba843a69c23 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationLambdaSpanningMultipleLines.ts @@ -0,0 +1,4 @@ +// @sourcemap: true +((item: string) => + item +) \ No newline at end of file diff --git a/tests/cases/compiler/typeCheckTypeArgument.ts b/tests/cases/compiler/typeCheckTypeArgument.ts index ea125f62c07ce..1647f40dafb2e 100644 --- a/tests/cases/compiler/typeCheckTypeArgument.ts +++ b/tests/cases/compiler/typeCheckTypeArgument.ts @@ -1,4 +1,3 @@ -/// var f: () => void; diff --git a/tests/cases/compiler/typeParametersAndParametersInComputedNames.ts b/tests/cases/compiler/typeParametersAndParametersInComputedNames.ts new file mode 100644 index 0000000000000..273dcb2a3eacc --- /dev/null +++ b/tests/cases/compiler/typeParametersAndParametersInComputedNames.ts @@ -0,0 +1,8 @@ +function foo(a: T) : string { + return ""; +} + +class A { + [foo(a)](a: T) { + } +} \ No newline at end of file diff --git a/tests/cases/compiler/withExportDecl.ts b/tests/cases/compiler/withExportDecl.ts index c7ae2f1bf38c7..f3c926ad7071a 100644 --- a/tests/cases/compiler/withExportDecl.ts +++ b/tests/cases/compiler/withExportDecl.ts @@ -42,7 +42,7 @@ module m1 { return "Hello"; } } -declare export module m2 { +export declare module m2 { export var a: number; } diff --git a/tests/cases/conformance/async/es6/asyncMultiFile.ts b/tests/cases/conformance/async/es6/asyncMultiFile.ts new file mode 100644 index 0000000000000..55f5e4b9e9224 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncMultiFile.ts @@ -0,0 +1,5 @@ +// @target: es6 +// @filename: a.ts +async function f() {} +// @filename: b.ts +function g() { } \ No newline at end of file diff --git a/tests/cases/conformance/classes/classExpressions/genericClassExpressionInFunction.ts b/tests/cases/conformance/classes/classExpressions/genericClassExpressionInFunction.ts new file mode 100644 index 0000000000000..14885ca99056c --- /dev/null +++ b/tests/cases/conformance/classes/classExpressions/genericClassExpressionInFunction.ts @@ -0,0 +1,30 @@ +class A { + genericVar: T +} +function B1() { + // class expression can use T + return class extends A { } +} +class B2 { + anon = class extends A { } +} +function B3() { + return class Inner extends A { } +} +// extends can call B +class K extends B1() { + namae: string; +} +class C extends (new B2().anon) { + name: string; +} +let b3Number = B3(); +class S extends b3Number { + nom: string; +} +var c = new C(); +var k = new K(); +var s = new S(); +c.genericVar = 12; +k.genericVar = 12; +s.genericVar = 12; diff --git a/tests/cases/conformance/decorators/decoratorMetadata.ts b/tests/cases/conformance/decorators/decoratorMetadata.ts index 3f62290930946..6d7792bb832db 100644 --- a/tests/cases/conformance/decorators/decoratorMetadata.ts +++ b/tests/cases/conformance/decorators/decoratorMetadata.ts @@ -14,4 +14,8 @@ declare var decorator: any; class MyComponent { constructor(public Service: Service) { } + + @decorator + method(x: this) { + } } \ No newline at end of file diff --git a/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithGetterSetterInES6.ts b/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithGetterSetterInES6.ts index 70c0b35763e9b..54c95c95a37d5 100644 --- a/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithGetterSetterInES6.ts +++ b/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithGetterSetterInES6.ts @@ -10,16 +10,16 @@ class C { static get ["computedname"]() { return ""; } - get ["computedname"]() { + get ["computedname1"]() { return ""; } - get ["computedname"]() { + get ["computedname2"]() { return ""; } - set ["computedname"](x: any) { + set ["computedname3"](x: any) { } - set ["computedname"](y: string) { + set ["computedname4"](y: string) { } set foo(a: string) { } diff --git a/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithMethodInES6.ts b/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithMethodInES6.ts index c5d95bc6cb16f..b7399a3511c96 100644 --- a/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithMethodInES6.ts +++ b/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithMethodInES6.ts @@ -2,18 +2,18 @@ class D { _bar: string; foo() { } - ["computedName"]() { } - ["computedName"](a: string) { } - ["computedName"](a: string): number { return 1; } + ["computedName1"]() { } + ["computedName2"](a: string) { } + ["computedName3"](a: string): number { return 1; } bar(): string { return this._bar; } baz(a: any, x: string): string { return "HELLO"; } - static ["computedname"]() { } - static ["computedname"](a: string) { } - static ["computedname"](a: string): boolean { return true; } + static ["computedname4"]() { } + static ["computedname5"](a: string) { } + static ["computedname6"](a: string): boolean { return true; } static staticMethod() { var x = 1 + 2; return x diff --git a/tests/cases/conformance/es6/moduleExportsAmd/decoratedDefaultExportsGetExportedAmd.ts b/tests/cases/conformance/es6/moduleExportsAmd/decoratedDefaultExportsGetExportedAmd.ts new file mode 100644 index 0000000000000..87fc8afd263b8 --- /dev/null +++ b/tests/cases/conformance/es6/moduleExportsAmd/decoratedDefaultExportsGetExportedAmd.ts @@ -0,0 +1,8 @@ +// @target: ES6 +// @experimentalDecorators: true +// @module: amd + +var decorator: ClassDecorator; + +@decorator +export default class Foo {} diff --git a/tests/cases/conformance/es6/moduleExportsAmd/defaultExportsGetExportedAmd.ts b/tests/cases/conformance/es6/moduleExportsAmd/defaultExportsGetExportedAmd.ts new file mode 100644 index 0000000000000..ef0f2ffde177c --- /dev/null +++ b/tests/cases/conformance/es6/moduleExportsAmd/defaultExportsGetExportedAmd.ts @@ -0,0 +1,3 @@ +// @target: ES6 +// @module: amd +export default class Foo {} diff --git a/tests/cases/conformance/es6/moduleExportsCommonjs/decoratedDefaultExportsGetExportedCommonjs.ts b/tests/cases/conformance/es6/moduleExportsCommonjs/decoratedDefaultExportsGetExportedCommonjs.ts new file mode 100644 index 0000000000000..aefd07ffdb9bd --- /dev/null +++ b/tests/cases/conformance/es6/moduleExportsCommonjs/decoratedDefaultExportsGetExportedCommonjs.ts @@ -0,0 +1,8 @@ +// @target: ES6 +// @experimentalDecorators: true +// @module: commonjs + +var decorator: ClassDecorator; + +@decorator +export default class Foo {} diff --git a/tests/cases/conformance/es6/moduleExportsCommonjs/defaultExportsGetExportedCommonjs.ts b/tests/cases/conformance/es6/moduleExportsCommonjs/defaultExportsGetExportedCommonjs.ts new file mode 100644 index 0000000000000..994f24df65879 --- /dev/null +++ b/tests/cases/conformance/es6/moduleExportsCommonjs/defaultExportsGetExportedCommonjs.ts @@ -0,0 +1,3 @@ +// @target: ES6 +// @module: commonjs +export default class Foo {} diff --git a/tests/cases/conformance/es6/moduleExportsSystem/decoratedDefaultExportsGetExportedSystem.ts b/tests/cases/conformance/es6/moduleExportsSystem/decoratedDefaultExportsGetExportedSystem.ts new file mode 100644 index 0000000000000..b871b3c7b35d9 --- /dev/null +++ b/tests/cases/conformance/es6/moduleExportsSystem/decoratedDefaultExportsGetExportedSystem.ts @@ -0,0 +1,8 @@ +// @target: ES6 +// @experimentalDecorators: true +// @module: system + +var decorator: ClassDecorator; + +@decorator +export default class Foo {} diff --git a/tests/cases/conformance/es6/moduleExportsSystem/defaultExportsGetExportedSystem.ts b/tests/cases/conformance/es6/moduleExportsSystem/defaultExportsGetExportedSystem.ts new file mode 100644 index 0000000000000..3764f2ec36c3d --- /dev/null +++ b/tests/cases/conformance/es6/moduleExportsSystem/defaultExportsGetExportedSystem.ts @@ -0,0 +1,3 @@ +// @target: ES6 +// @module: system +export default class Foo {} diff --git a/tests/cases/conformance/es6/moduleExportsUmd/decoratedDefaultExportsGetExportedUmd.ts b/tests/cases/conformance/es6/moduleExportsUmd/decoratedDefaultExportsGetExportedUmd.ts new file mode 100644 index 0000000000000..9b0a7d773ef88 --- /dev/null +++ b/tests/cases/conformance/es6/moduleExportsUmd/decoratedDefaultExportsGetExportedUmd.ts @@ -0,0 +1,8 @@ +// @target: ES6 +// @experimentalDecorators: true +// @module: umd + +var decorator: ClassDecorator; + +@decorator +export default class Foo {} diff --git a/tests/cases/conformance/es6/moduleExportsUmd/defaultExportsGetExportedUmd.ts b/tests/cases/conformance/es6/moduleExportsUmd/defaultExportsGetExportedUmd.ts new file mode 100644 index 0000000000000..39784fc718823 --- /dev/null +++ b/tests/cases/conformance/es6/moduleExportsUmd/defaultExportsGetExportedUmd.ts @@ -0,0 +1,3 @@ +// @target: ES6 +// @module: umd +export default class Foo {} diff --git a/tests/cases/conformance/es6/modules/reExportDefaultExport.ts b/tests/cases/conformance/es6/modules/reExportDefaultExport.ts new file mode 100644 index 0000000000000..730435fd4eebc --- /dev/null +++ b/tests/cases/conformance/es6/modules/reExportDefaultExport.ts @@ -0,0 +1,15 @@ +// @module: commonjs +// @target: ES5 + +// @filename: m1.ts +export default function f() { +} +export {f}; + + +// @filename: m2.ts +import foo from "./m1"; +import {f} from "./m1"; + +f(); +foo(); \ No newline at end of file diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardEnums.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardEnums.ts new file mode 100644 index 0000000000000..54e9a1bd8fe4b --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardEnums.ts @@ -0,0 +1,18 @@ +enum E {} +enum V {} + +let x: number|string|E|V; + +if (typeof x === "number") { + x; // number|E|V +} +else { + x; // string +} + +if (typeof x !== "number") { + x; // string +} +else { + x; // number|E|V +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardInClass.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardInClass.ts new file mode 100644 index 0000000000000..aa394aaa75b99 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardInClass.ts @@ -0,0 +1,16 @@ +let x: string | number; + +if (typeof x === "string") { + let n = class { + constructor() { + let y: string = x; + } + } +} +else { + let m = class { + constructor() { + let y: number = x; + } + } +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardNesting.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardNesting.ts new file mode 100644 index 0000000000000..6423af18a5adc --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardNesting.ts @@ -0,0 +1,14 @@ +let strOrBool: string|boolean; +if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'string') { + let label: string = (typeof strOrBool === 'string') ? strOrBool : "string"; + let bool: boolean = (typeof strOrBool === 'boolean') ? strOrBool : false; + let label2: string = (typeof strOrBool !== 'boolean') ? strOrBool : "string"; + let bool2: boolean = (typeof strOrBool !== 'string') ? strOrBool : false; +} + +if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boolean') { + let label: string = (typeof strOrBool === 'string') ? strOrBool : "string"; + let bool: boolean = (typeof strOrBool === 'boolean') ? strOrBool : false; + let label2: string = (typeof strOrBool !== 'boolean') ? strOrBool : "string"; + let bool2: boolean = (typeof strOrBool !== 'string') ? strOrBool : false; +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts index 9d7d555fc1850..ac3403d8151ad 100644 --- a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts @@ -22,19 +22,19 @@ if (typeof strOrC === "Object") { c = strOrC; // C } else { - var r2: string | C = strOrC; // string | C + var r2: string = strOrC; // string } if (typeof numOrC === "Object") { c = numOrC; // C } else { - var r3: number | C = numOrC; // number | C + var r3: number = numOrC; // number } if (typeof boolOrC === "Object") { c = boolOrC; // C } else { - var r4: boolean | C = boolOrC; // boolean | C + var r4: boolean = boolOrC; // boolean } // Narrowing occurs only if target type is a subtype of variable type @@ -49,19 +49,19 @@ else { // - when true, narrows the type of x by typeof x === s when false, or // - when false, narrows the type of x by typeof x === s when true. if (typeof strOrC !== "Object") { - var r2: string | C = strOrC; // string | C + var r2: string = strOrC; // string } else { c = strOrC; // C } if (typeof numOrC !== "Object") { - var r3: number | C = numOrC; // number | C + var r3: number = numOrC; // number } else { c = numOrC; // C } if (typeof boolOrC !== "Object") { - var r4: boolean | C = boolOrC; // boolean | C + var r4: boolean = boolOrC; // boolean } else { c = boolOrC; // C diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardRedundancy.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardRedundancy.ts new file mode 100644 index 0000000000000..4e9e3137d7871 --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardRedundancy.ts @@ -0,0 +1,9 @@ +var x: string|number; + +var r1 = typeof x === "string" && typeof x === "string" ? x.substr : x.toFixed; + +var r2 = !(typeof x === "string" && typeof x === "string") ? x.toFixed : x.substr; + +var r3 = typeof x === "string" || typeof x === "string" ? x.substr : x.toFixed; + +var r4 = !(typeof x === "string" || typeof x === "string") ? x.toFixed : x.substr; \ No newline at end of file diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardTautologicalConsistiency.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardTautologicalConsistiency.ts new file mode 100644 index 0000000000000..9a44603d2d43b --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardTautologicalConsistiency.ts @@ -0,0 +1,11 @@ +let stringOrNumber: string | number; + +if (typeof stringOrNumber === "number") { + if (typeof stringOrNumber !== "number") { + stringOrNumber; + } +} + +if (typeof stringOrNumber === "number" && typeof stringOrNumber !== "number") { + stringOrNumber; +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardTypeOfUndefined.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardTypeOfUndefined.ts new file mode 100644 index 0000000000000..766c5ed8ca21f --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardTypeOfUndefined.ts @@ -0,0 +1,184 @@ +// undefined type guard adds no new type information +function test1(a: any) { + if (typeof a !== "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test2(a: any) { + if (typeof a === "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test3(a: any) { + if (typeof a === "undefined" || typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test4(a: any) { + if (typeof a !== "undefined" && typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test5(a: boolean | void) { + if (typeof a !== "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test6(a: boolean | void) { + if (typeof a === "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test7(a: boolean | void) { + if (typeof a === "undefined" || typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test8(a: boolean | void) { + if (typeof a !== "undefined" && typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test9(a: boolean | number) { + if (typeof a !== "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test10(a: boolean | number) { + if (typeof a === "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test11(a: boolean | number) { + if (typeof a === "undefined" || typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test12(a: boolean | number) { + if (typeof a !== "undefined" && typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test13(a: boolean | number | void) { + if (typeof a !== "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test14(a: boolean | number | void) { + if (typeof a === "undefined") { + if (typeof a === "boolean") { + a; + } + else { + a; + } + } + else { + a; + } +} + +function test15(a: boolean | number | void) { + if (typeof a === "undefined" || typeof a === "boolean") { + a; + } + else { + a; + } +} + +function test16(a: boolean | number | void) { + if (typeof a !== "undefined" && typeof a === "boolean") { + a; + } + else { + a; + } +} diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts index ec23b75b590ae..5dbc925d04b40 100644 --- a/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts @@ -40,12 +40,12 @@ function foo4(x: number | string | boolean) { : x.toString(); // number })(x); // x here is narrowed to number | boolean } -// Type guards affect nested function expressions, but not nested function declarations +// Type guards affect nested function expressions and nested function declarations function foo5(x: number | string | boolean) { if (typeof x === "string") { var y = x; // string; function foo() { - var z = x; // number | string | boolean, type guard has no effect + var z = x; // string } } } diff --git a/tests/cases/conformance/jsx/tsxReactEmit7.tsx b/tests/cases/conformance/jsx/tsxReactEmit7.tsx new file mode 100644 index 0000000000000..847a55d471947 --- /dev/null +++ b/tests/cases/conformance/jsx/tsxReactEmit7.tsx @@ -0,0 +1,22 @@ +//@jsx: react +//@module: commonjs + +//@filename: file.tsx +declare module JSX { + interface Element { } + interface IntrinsicElements { + [s: string]: any; + } +} + +var m =
; +var n =
; +var o =
; +var p =
; + +// Investigation +var a =
; +var b =
; +var c =
; +var d =
; +var e =
; diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf01.ts new file mode 100644 index 0000000000000..f13ce35e82914 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf01.ts @@ -0,0 +1,15 @@ + +type S = "a" | "b"; +type T = S[] | S; + +function f(foo: T) { + if (foo === "a") { + return foo; + } + else if (foo === "b") { + return foo; + } + else { + return (foo as S[])[0]; + } +} \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf02.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf02.ts new file mode 100644 index 0000000000000..4eaf18ca7ccb4 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf02.ts @@ -0,0 +1,16 @@ + +type S = "a" | "b"; +type T = S[] | S; + +function isS(t: T): t is S { + return t === "a" || t === "b"; +} + +function f(foo: T) { + if (isS(foo)) { + return foo; + } + else { + return foo[0]; + } +} \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralMatchedInSwitch01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralMatchedInSwitch01.ts new file mode 100644 index 0000000000000..141f5d12795ef --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralMatchedInSwitch01.ts @@ -0,0 +1,13 @@ + +type S = "a" | "b"; +type T = S[] | S; + +var foo: T; +switch (foo) { + case "a": + case "b": + break; + default: + foo = (foo as S[])[0]; + break; +} \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypeAssertion01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypeAssertion01.ts new file mode 100644 index 0000000000000..ec1f1e5eb5634 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypeAssertion01.ts @@ -0,0 +1,31 @@ + +type S = "a" | "b"; +type T = S[] | S; + +var s: S; +var t: T; +var str: string; + +//////////////// + +s = t; +s = t as S; + +s = str; +s = str as S; + +//////////////// + +t = s; +t = s as T; + +t = str; +t = str as T; + +//////////////// + +str = s; +str = s as string; + +str = t; +str = t as string; diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndLogicalOrExpressions01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndLogicalOrExpressions01.ts new file mode 100644 index 0000000000000..8a257ae1caf5e --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndLogicalOrExpressions01.ts @@ -0,0 +1,9 @@ +// @declaration: true + +declare function myRandBool(): boolean; + +let a: "foo" = "foo"; +let b = a || "foo"; +let c: "foo" = b; +let d = b || "bar"; +let e: "foo" | "bar" = d; diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndParenthesizedExpressions01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndParenthesizedExpressions01.ts new file mode 100644 index 0000000000000..7910c0e16b709 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndParenthesizedExpressions01.ts @@ -0,0 +1,8 @@ +// @declaration: true + +declare function myRandBool(): boolean; + +let a: "foo" = ("foo"); +let b: "foo" | "bar" = ("foo"); +let c: "foo" = (myRandBool ? "foo" : ("foo")); +let d: "foo" | "bar" = (myRandBool ? "foo" : ("bar")); diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndTuples01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndTuples01.ts new file mode 100644 index 0000000000000..388f4567ed72a --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndTuples01.ts @@ -0,0 +1,20 @@ +// @declaration: true + +// Should all be strings. +let [hello, brave, newish, world] = ["Hello", "Brave", "New", "World"]; + +type RexOrRaptor = "t-rex" | "raptor" +let [im, a, dinosaur]: ["I'm", "a", RexOrRaptor] = ['I\'m', 'a', 't-rex']; + +rawr(dinosaur); + +function rawr(dino: RexOrRaptor) { + if (dino === "t-rex") { + return "ROAAAAR!"; + } + if (dino === "raptor") { + return "yip yip!"; + } + + throw "Unexpected " + dino; +} \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags01.ts new file mode 100644 index 0000000000000..cea04f0818e75 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags01.ts @@ -0,0 +1,43 @@ +// @declaration: true + +type Kind = "A" | "B" + +interface Entity { + kind: Kind; +} + +interface A extends Entity { + kind: "A"; + a: number; +} + +interface B extends Entity { + kind: "B"; + b: string; +} + +function hasKind(entity: Entity, kind: "A"): entity is A; +function hasKind(entity: Entity, kind: "B"): entity is B; +function hasKind(entity: Entity, kind: Kind): entity is Entity; +function hasKind(entity: Entity, kind: Kind): boolean { + return kind === is; +} + +let x: A = { + kind: "A", + a: 100, +} + +if (hasKind(x, "A")) { + let a = x; +} +else { + let b = x; +} + +if (!hasKind(x, "B")) { + let c = x; +} +else { + let d = x; +} \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.ts new file mode 100644 index 0000000000000..53f516f4209b9 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.ts @@ -0,0 +1,19 @@ +// @declaration: true + +function foo(f: (x: T) => T) { + return f; +} + +function bar(f: (x: T) => T) { + return f; +} + +let f = foo(x => x); +let fResult = f("foo"); + +let g = foo((x => x)); +let gResult = g("foo"); + +let h = bar(x => x); +let hResult = h("foo"); +hResult = h("bar"); \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint02.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint02.ts new file mode 100644 index 0000000000000..fb3a019402dae --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint02.ts @@ -0,0 +1,8 @@ +// @declaration: true + +function foo(f: (x: T) => T) { + return f; +} + +let f = foo((y: "foo" | "bar") => y === "foo" ? y : "foo"); +let fResult = f("foo"); \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes01.ts new file mode 100644 index 0000000000000..b8ed1b47dd404 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes01.ts @@ -0,0 +1,21 @@ +// @declaration: true + +type T = "foo" | "bar" | "baz"; + +var x: "foo" | "bar" | "baz" = "foo"; +var y: T = "bar"; + +if (x === "foo") { + let a = x; +} +else if (x !== "bar") { + let b = x || y; +} +else { + let c = x; + let d = y; + let e: (typeof x) | (typeof y) = c || d; +} + +x = y; +y = x; \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes02.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes02.ts new file mode 100644 index 0000000000000..2cc63ab44605d --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes02.ts @@ -0,0 +1,21 @@ +// @declaration: true + +type T = string | "foo" | "bar" | "baz"; + +var x: "foo" | "bar" | "baz" | string = "foo"; +var y: T = "bar"; + +if (x === "foo") { + let a = x; +} +else if (x !== "bar") { + let b = x || y; +} +else { + let c = x; + let d = y; + let e: (typeof x) | (typeof y) = c || d; +} + +x = y; +y = x; \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes03.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes03.ts new file mode 100644 index 0000000000000..d5c6a38af799c --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes03.ts @@ -0,0 +1,21 @@ +// @declaration: true + +type T = number | "foo" | "bar"; + +var x: "foo" | "bar" | number; +var y: T = "bar"; + +if (x === "foo") { + let a = x; +} +else if (x !== "bar") { + let b = x || y; +} +else { + let c = x; + let d = y; + let e: (typeof x) | (typeof y) = c || d; +} + +x = y; +y = x; \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes04.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes04.ts new file mode 100644 index 0000000000000..e9d062b0e5c20 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes04.ts @@ -0,0 +1,38 @@ +// @declaration: true + +type T = "" | "foo"; + +let x: T = ""; +let y: T = "foo"; + +if (x === "") { + let a = x; +} + +if (x !== "") { + let b = x; +} + +if (x == "") { + let c = x; +} + +if (x != "") { + let d = x; +} + +if (x) { + let e = x; +} + +if (!x) { + let f = x; +} + +if (!!x) { + let g = x; +} + +if (!!!x) { + let h = x; +} \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInVariableDeclarations01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInVariableDeclarations01.ts new file mode 100644 index 0000000000000..4f0063876876a --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesInVariableDeclarations01.ts @@ -0,0 +1,19 @@ +// @declaration: true + +let a: ""; +var b: "foo"; +let c: "bar"; +const d: "baz"; + +a = ""; +b = "foo"; +c = "bar"; + +let e: "" = ""; +var f: "foo" = "foo"; +let g: "bar" = "bar"; +const h: "baz" = "baz"; + +e = ""; +f = "foo"; +g = "bar"; \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads01.ts new file mode 100644 index 0000000000000..d88167eaeffe7 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads01.ts @@ -0,0 +1,53 @@ +// @declaration: true + +type PrimitiveName = 'string' | 'number' | 'boolean'; + +function getFalsyPrimitive(x: "string"): string; +function getFalsyPrimitive(x: "number"): number; +function getFalsyPrimitive(x: "boolean"): boolean; +function getFalsyPrimitive(x: "boolean" | "string"): boolean | string; +function getFalsyPrimitive(x: "boolean" | "number"): boolean | number; +function getFalsyPrimitive(x: "number" | "string"): number | string; +function getFalsyPrimitive(x: "number" | "string" | "boolean"): number | string | boolean; +function getFalsyPrimitive(x: PrimitiveName) { + if (x === "string") { + return ""; + } + if (x === "number") { + return 0; + } + if (x === "boolean") { + return false; + } + + // Should be unreachable. + throw "Invalid value"; +} + +namespace Consts1 { + const EMPTY_STRING = getFalsyPrimitive("string"); + const ZERO = getFalsyPrimitive('number'); + const FALSE = getFalsyPrimitive("boolean"); +} + +const string: "string" = "string" +const number: "number" = "number" +const boolean: "boolean" = "boolean" + +const stringOrNumber = string || number; +const stringOrBoolean = string || boolean; +const booleanOrNumber = number || boolean; +const stringOrBooleanOrNumber = stringOrBoolean || number; + +namespace Consts2 { + const EMPTY_STRING = getFalsyPrimitive(string); + const ZERO = getFalsyPrimitive(number); + const FALSE = getFalsyPrimitive(boolean); + + const a = getFalsyPrimitive(stringOrNumber); + const b = getFalsyPrimitive(stringOrBoolean); + const c = getFalsyPrimitive(booleanOrNumber); + const d = getFalsyPrimitive(stringOrBooleanOrNumber); +} + + diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads02.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads02.ts new file mode 100644 index 0000000000000..5801aa50076b2 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads02.ts @@ -0,0 +1,51 @@ +// @declaration: true + +function getFalsyPrimitive(x: "string"): string; +function getFalsyPrimitive(x: "number"): number; +function getFalsyPrimitive(x: "boolean"): boolean; +function getFalsyPrimitive(x: "boolean" | "string"): boolean | string; +function getFalsyPrimitive(x: "boolean" | "number"): boolean | number; +function getFalsyPrimitive(x: "number" | "string"): number | string; +function getFalsyPrimitive(x: "number" | "string" | "boolean"): number | string | boolean; +function getFalsyPrimitive(x: string) { + if (x === "string") { + return ""; + } + if (x === "number") { + return 0; + } + if (x === "boolean") { + return false; + } + + // Should be unreachable. + throw "Invalid value"; +} + +namespace Consts1 { + const EMPTY_STRING = getFalsyPrimitive("string"); + const ZERO = getFalsyPrimitive('number'); + const FALSE = getFalsyPrimitive("boolean"); +} + +const string: "string" = "string" +const number: "number" = "number" +const boolean: "boolean" = "boolean" + +const stringOrNumber = string || number; +const stringOrBoolean = string || boolean; +const booleanOrNumber = number || boolean; +const stringOrBooleanOrNumber = stringOrBoolean || number; + +namespace Consts2 { + const EMPTY_STRING = getFalsyPrimitive(string); + const ZERO = getFalsyPrimitive(number); + const FALSE = getFalsyPrimitive(boolean); + + const a = getFalsyPrimitive(stringOrNumber); + const b = getFalsyPrimitive(stringOrBoolean); + const c = getFalsyPrimitive(booleanOrNumber); + const d = getFalsyPrimitive(stringOrBooleanOrNumber); +} + + diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads03.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads03.ts new file mode 100644 index 0000000000000..a675c2c0eaed7 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads03.ts @@ -0,0 +1,46 @@ +// @declaration: true + +interface Base { + x: string; + y: number; +} + +interface HelloOrWorld extends Base { + p1: boolean; +} + +interface JustHello extends Base { + p2: boolean; +} + +interface JustWorld extends Base { + p3: boolean; +} + +let hello: "hello"; +let world: "world"; +let helloOrWorld: "hello" | "world"; + +function f(p: "hello"): JustHello; +function f(p: "hello" | "world"): HelloOrWorld; +function f(p: "world"): JustWorld; +function f(p: string): Base; +function f(...args: any[]): any { + return undefined; +} + +let fResult1 = f(hello); +let fResult2 = f(world); +let fResult3 = f(helloOrWorld); + +function g(p: string): Base; +function g(p: "hello"): JustHello; +function g(p: "hello" | "world"): HelloOrWorld; +function g(p: "world"): JustWorld; +function g(...args: any[]): any { + return undefined; +} + +let gResult1 = g(hello); +let gResult2 = g(world); +let gResult3 = g(helloOrWorld); \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts new file mode 100644 index 0000000000000..8bc2a0c94b8e6 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts @@ -0,0 +1,8 @@ +// @declaration: true + +declare function f(x: (p: "foo" | "bar") => "foo"); + +f(y => { + let z = y = "foo"; + return z; +}) \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesTypePredicates01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesTypePredicates01.ts new file mode 100644 index 0000000000000..a78918c8122be --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesTypePredicates01.ts @@ -0,0 +1,25 @@ +// @declaration: true + +type Kind = "A" | "B" + +function kindIs(kind: Kind, is: "A"): kind is "A"; +function kindIs(kind: Kind, is: "B"): kind is "B"; +function kindIs(kind: Kind, is: Kind): boolean { + return kind === is; +} + +var x: Kind = "A"; + +if (kindIs(x, "A")) { + let a = x; +} +else { + let b = x; +} + +if (!kindIs(x, "B")) { + let c = x; +} +else { + let d = x; +} \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings01.ts new file mode 100644 index 0000000000000..1920551abd812 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings01.ts @@ -0,0 +1,7 @@ +// @declaration: true + +let ABC: "ABC" = `ABC`; +let DE_NEWLINE_F: "DE\nF" = `DE +F`; +let G_QUOTE_HI: 'G"HI'; +let JK_BACKTICK_L: "JK`L" = `JK\`L`; \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings02.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings02.ts new file mode 100644 index 0000000000000..12debae4e2030 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings02.ts @@ -0,0 +1,5 @@ +// @declaration: true + +let abc: "AB\r\nC" = `AB +C`; +let de_NEWLINE_f: "DE\nF" = `DE${"\n"}F`; \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators01.ts new file mode 100644 index 0000000000000..28c34d3c74a99 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators01.ts @@ -0,0 +1,29 @@ +// @declaration: true + +let abc: "ABC" = "ABC"; +let xyz: "XYZ" = "XYZ"; +let abcOrXyz: "ABC" | "XYZ" = abc || xyz; +let abcOrXyzOrNumber: "ABC" | "XYZ" | number = abcOrXyz || 100; + +let a = "" + abc; +let b = abc + ""; +let c = 10 + abc; +let d = abc + 10; +let e = xyz + abc; +let f = abc + xyz; +let g = true + abc; +let h = abc + true; +let i = abc + abcOrXyz + xyz; +let j = abcOrXyz + abcOrXyz; +let k = +abcOrXyz; +let l = -abcOrXyz; +let m = abcOrXyzOrNumber + ""; +let n = "" + abcOrXyzOrNumber; +let o = abcOrXyzOrNumber + abcOrXyz; +let p = abcOrXyz + abcOrXyzOrNumber; +let q = !abcOrXyzOrNumber; +let r = ~abcOrXyzOrNumber; +let s = abcOrXyzOrNumber < abcOrXyzOrNumber; +let t = abcOrXyzOrNumber >= abcOrXyz; +let u = abc === abcOrXyz; +let v = abcOrXyz === abcOrXyzOrNumber; \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts new file mode 100644 index 0000000000000..cf66f66e47c30 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts @@ -0,0 +1,19 @@ +// @declaration: true + +let abc: "ABC" = "ABC"; +let xyz: "XYZ" = "XYZ"; +let abcOrXyz: "ABC" | "XYZ" = abc || xyz; +let abcOrXyzOrNumber: "ABC" | "XYZ" | number = abcOrXyz || 100; + +let a = abcOrXyzOrNumber + 100; +let b = 100 + abcOrXyzOrNumber; +let c = abcOrXyzOrNumber + abcOrXyzOrNumber; +let d = abcOrXyzOrNumber + true; +let e = false + abcOrXyzOrNumber; +let f = abcOrXyzOrNumber++; +let g = --abcOrXyzOrNumber; +let h = abcOrXyzOrNumber ^ 10; +let i = abcOrXyzOrNumber | 10; +let j = abc < xyz; +let k = abc === xyz; +let l = abc != xyz; \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts b/tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts new file mode 100644 index 0000000000000..08c971458e354 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts @@ -0,0 +1,113 @@ +// @declaration: true + +declare function randBool(): boolean; +declare function takeReturnString(str: string): string; +declare function takeReturnHello(str: "Hello"): "Hello"; +declare function takeReturnHelloWorld(str: "Hello" | "World"): "Hello" | "World"; + +function fun1(x: T, y: T) { + return randBool() ? x : y; +} + +function fun2(x: T, y: U) { + return randBool() ? x : y; +} + +function fun3(...args: T[]): T { + return args[+randBool()]; +} + +namespace n1 { + // The following should all come back as strings. + // They should be assignable to/from something of a type 'string'. + // They should not be assignable to either "Hello" or "World". + export let a = fun1("Hello", "World"); + export let b = fun1("Hello", "Hello"); + export let c = fun2("Hello", "World"); + export let d = fun2("Hello", "Hello"); + export let e = fun3("Hello", "Hello", "World", "Foo"); + + // Should be valid + a = takeReturnString(a); + b = takeReturnString(b); + c = takeReturnString(c); + d = takeReturnString(d); + e = takeReturnString(e); + + // Passing these as arguments should cause an error. + a = takeReturnHello(a); + b = takeReturnHello(b); + c = takeReturnHello(c); + d = takeReturnHello(d); + e = takeReturnHello(e); + + // Passing these as arguments should cause an error. + a = takeReturnHelloWorld(a); + b = takeReturnHelloWorld(b); + c = takeReturnHelloWorld(c); + d = takeReturnHelloWorld(d); + e = takeReturnHelloWorld(e); +} + +namespace n2 { + // The following (regardless of errors) should come back typed + // as "Hello" (or "Hello" | "Hello"). + export let a = fun1<"Hello">("Hello", "Hello"); + export let b = fun1<"Hello">("Hello", "World"); + export let c = fun2<"Hello", "Hello">("Hello", "Hello"); + export let d = fun2<"Hello", "Hello">("Hello", "World"); + export let e = fun3<"Hello">("Hello", "World"); + + // Assignment from the returned value should cause an error. + a = takeReturnString(a); + b = takeReturnString(b); + c = takeReturnString(c); + d = takeReturnString(d); + e = takeReturnString(e); + + // Should be valid + a = takeReturnHello(a); + b = takeReturnHello(b); + c = takeReturnHello(c); + d = takeReturnHello(d); + e = takeReturnHello(e); + + // Assignment from the returned value should cause an error. + a = takeReturnHelloWorld(a); + b = takeReturnHelloWorld(b); + c = takeReturnHelloWorld(c); + d = takeReturnHelloWorld(d); + e = takeReturnHelloWorld(e); +} + + +namespace n3 { + // The following (regardless of errors) should come back typed + // as "Hello" | "World" (or "World" | "Hello"). + export let a = fun2<"Hello", "World">("Hello", "World"); + export let b = fun2<"Hello", "World">("World", "Hello"); + export let c = fun2<"World", "Hello">("Hello", "Hello"); + export let d = fun2<"World", "Hello">("World", "World"); + export let e = fun3<"Hello" | "World">("Hello", "World"); + + // Assignment from the returned value should cause an error. + a = takeReturnString(a); + b = takeReturnString(b); + c = takeReturnString(c); + d = takeReturnString(d); + e = takeReturnString(e); + + // Passing these as arguments should cause an error. + a = takeReturnHello(a); + b = takeReturnHello(b); + c = takeReturnHello(c); + d = takeReturnHello(d); + e = takeReturnHello(e); + + // Both should be valid. + a = takeReturnHelloWorld(a); + b = takeReturnHelloWorld(b); + c = takeReturnHelloWorld(c); + d = takeReturnHelloWorld(d); + e = takeReturnHelloWorld(e); +} \ No newline at end of file diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference1.ts b/tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference1.ts new file mode 100644 index 0000000000000..7066c3e679084 --- /dev/null +++ b/tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference1.ts @@ -0,0 +1,72 @@ +// Repro from #2264 + +interface Y { 'i am a very certain type': Y } +var y: Y = undefined; +function destructure( + something: a | Y, + haveValue: (value: a) => r, + haveY: (value: Y) => r +): r { + return something === y ? haveY(y) : haveValue(
something); +} + +var value = Math.random() > 0.5 ? 'hey!' : undefined; + +var result = destructure(value, text => 'string', y => 'other one'); // text: string, y: Y + +// Repro from #4212 + +function isVoid(value: void | a): value is void { + return undefined; +} + +function isNonVoid(value: void | a) : value is a { + return undefined; +} + +function foo1(value: void|a): void { + if (isVoid(value)) { + value; // value is void + } else { + value; // value is a + } +} + +function baz1(value: void|a): void { + if (isNonVoid(value)) { + value; // value is a + } else { + value; // value is void + } +} + +// Repro from #5417 + +type Maybe = T | void; + +function get(x: U | void): U { + return null; // just an example +} + +let foo: Maybe; +get(foo).toUpperCase(); // Ok + +// Repro from #5456 + +interface Man { + walks: boolean; +} + +interface Bear { + roars: boolean; +} + +interface Pig { + oinks: boolean; +} + +declare function pigify(y: T & Bear): T & Pig; +declare var mbp: Man & Bear; + +pigify(mbp).oinks; // OK, mbp is treated as Pig +pigify(mbp).walks; // Ok, mbp is treated as Man diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference2.ts b/tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference2.ts new file mode 100644 index 0000000000000..1b6a928ce028c --- /dev/null +++ b/tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference2.ts @@ -0,0 +1,23 @@ +declare function f1(x: T | string): T; + +var a1: string; +var b1: string | string[]; +var c1: string[] | string; +var d1: string | { name: string }; +var e1: number | string | boolean; +f1(a1); // string +f1(b1); // string[] +f1(c1); // string[] +f1(d1); // { name: string } +f1(e1); // number | boolean + +declare function f2(x: T & { name: string }): T; + +var a2: string & { name: string }; +var b2: { name: string } & string[]; +var c2: string & { name: string } & number; +var d2: string & { name: string } & number & { name: string }; +f2(a2); // string +f2(b2); // string[] +f2(c2); // string & number +f2(d2); // string & number diff --git a/tests/cases/fourslash/breakpointValidationDecorators.ts b/tests/cases/fourslash/breakpointValidationDecorators.ts new file mode 100644 index 0000000000000..9eb4463e00209 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDecorators.ts @@ -0,0 +1,60 @@ +/// + +// @BaselineFile: bpSpan_decorators.baseline +// @Filename: bpSpan_decorators.ts +////declare function ClassDecorator1(target: Function): void; +////declare function ClassDecorator2(x: number): (target: Function) => void; +////declare function PropertyDecorator1(target: Object, key: string | symbol, descriptor?: PropertyDescriptor): void; +////declare function PropertyDecorator2(x: number): (target: Object, key: string | symbol, descriptor?: PropertyDescriptor) => void; +////declare function ParameterDecorator1(target: Object, key: string | symbol, paramIndex: number): void; +////declare function ParameterDecorator2(x: number): (target: Object, key: string | symbol, paramIndex: number) => void; +//// +////@ClassDecorator1 +////@ClassDecorator2(10) +////class Greeter { +//// constructor( +//// @ParameterDecorator1 +//// @ParameterDecorator2(20) +//// public greeting: string, +//// +//// @ParameterDecorator1 +//// @ParameterDecorator2(30) +//// ...b: string[]) { +//// } +//// +//// @PropertyDecorator1 +//// @PropertyDecorator2(40) +//// greet() { +//// return "

" + this.greeting + "

"; +//// } +//// +//// @PropertyDecorator1 +//// @PropertyDecorator2(50) +//// private x: string; +//// +//// @PropertyDecorator1 +//// @PropertyDecorator2(60) +//// private static x1: number = 10; +//// +//// private fn( +//// @ParameterDecorator1 +//// @ParameterDecorator2(70) +//// x: number) { +//// return this.greeting; +//// } +//// +//// @PropertyDecorator1 +//// @PropertyDecorator2(80) +//// get greetings() { +//// return this.greeting; +//// } +//// +//// set greetings( +//// @ParameterDecorator1 +//// @ParameterDecorator2(90) +//// greetings: string) { +//// this.greeting = greetings; +//// } +////} + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts b/tests/cases/fourslash/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts new file mode 100644 index 0000000000000..07f6316e4dd54 --- /dev/null +++ b/tests/cases/fourslash/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts @@ -0,0 +1,13 @@ +/// + +// @BaselineFile: compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline +// @allowJs: true +// @Filename: b.js +// @emitThisFile: true +////function foo() { } // This has error because js file cannot be overwritten - emitSkipped should be true + +// @Filename: a.ts +// @emitThisFile: true +////function foo2() { return 30; } // no error - should emit a.js + +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/completionBeforeSemanticDiagnosticsInArrowFunction1.ts b/tests/cases/fourslash/completionBeforeSemanticDiagnosticsInArrowFunction1.ts index 16d2efcd6d4b0..d66c16207518d 100644 --- a/tests/cases/fourslash/completionBeforeSemanticDiagnosticsInArrowFunction1.ts +++ b/tests/cases/fourslash/completionBeforeSemanticDiagnosticsInArrowFunction1.ts @@ -3,16 +3,16 @@ //// var f4 = (x: T/**/ ) => { //// } -fs.goTo.marker(); +goTo.marker(); // Replace the "T" type with the non-existent type 'V'. -fs.edit.backspace(1); -fs.edit.insert("A"); +edit.backspace(1); +edit.insert("A"); // Bring up completion to force a pull resolve. This will end up resolving several symbols and // producing unreported diagnostics (i.e. that 'V' wasn't found). -fs.verify.completionListContains("T"); -fs.verify.completionEntryDetailIs("T", "(type parameter) T in (x: any): void"); +verify.completionListContains("T"); +verify.completionEntryDetailIs("T", "(type parameter) T in (x: any): void"); // There should now be a single error. -fs.verify.numberOfErrorsInCurrentFile(1); \ No newline at end of file +verify.numberOfErrorsInCurrentFile(1); diff --git a/tests/cases/fourslash/completionInJsDoc.ts b/tests/cases/fourslash/completionInJsDoc.ts index 5424c8e79faa5..8051630385649 100644 --- a/tests/cases/fourslash/completionInJsDoc.ts +++ b/tests/cases/fourslash/completionInJsDoc.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: Foo.js /////** @/*1*/ */ ////var v1; diff --git a/tests/cases/fourslash/completionListInTypeParameterOfTypeAlias3.ts b/tests/cases/fourslash/completionListInTypeParameterOfTypeAlias3.ts new file mode 100644 index 0000000000000..59cceda2aad48 --- /dev/null +++ b/tests/cases/fourslash/completionListInTypeParameterOfTypeAlias3.ts @@ -0,0 +1,13 @@ +/// + +//// type constructorType = new + +////interface IFoo { +//// [|a|]: string; +////} +////class C { +//// method() { +//// var x: T = { +//// [|a|]: "" +//// }; +//// x.[|a|]; +//// } +////} +//// +//// +////var x: IFoo = { +//// [|a|]: "ss" +////}; + +let ranges = test.ranges() +for (let range of ranges) { + goTo.position(range.start); + + verify.referencesCountIs(ranges.length); + for (let expectedReference of ranges) { + verify.referencesAtPositionContains(expectedReference); + } +} \ No newline at end of file diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 41e8d9005f762..b9b379bd46571 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -24,10 +24,7 @@ // @Module: Node // @Target: ES5 -// In the imperative section, you can write any valid TypeScript code. If -// you need help finding a something in Intellisense, you can -// type 'fs.' as an alternate way of accessing the top-level objects -// (e.g. 'fs.goTo.eof();') +// In the imperative section, you can write any valid TypeScript code. //--------------------------------------- // For API editors: @@ -45,52 +42,38 @@ // // TODO: figure out a better solution to the API exposure problem. -// /// -// /// - -declare var FourSlash; -module ts { - export interface SymbolDisplayPart { +declare module ts { + interface SymbolDisplayPart { text: string; kind: string; } -} -//--------------------------------------------- + enum IndentStyle { + None = 0, + Block = 1, + Smart = 2, + } -// Return code used by getEmitOutput function to indicate status of the function -// It is a duplicate of the one in types.ts to expose it to testcases in fourslash -enum EmitReturnStatus { - Succeeded = 0, // All outputs generated if requested (.js, .map, .d.ts), no errors reported - AllOutputGenerationSkipped = 1, // No .js generated because of syntax errors, or compiler options errors, nothing generated - JSGeneratedWithSemanticErrors = 2, // .js and .map generated with semantic errors - DeclarationGenerationSkipped = 3, // .d.ts generation skipped because of semantic errors or declaration emitter specific errors; Output .js with semantic errors - EmitErrorsEncountered = 4 // Emitter errors occurred during emitting process -} - -// This is a duplicate of the indentstyle in services.ts to expose it to testcases in fourslash -enum IndentStyle { - None, - Block, - Smart, + interface OutputFile { + name: string; + writeByteOrderMark: boolean; + text: string; + } } -module FourSlashInterface { - - export interface Marker { +declare namespace FourSlashInterface { + interface Marker { fileName: string; position: number; data?: any; } - - export interface EditorOptions { + interface EditorOptions { IndentSize: number; TabSize: number; NewLineCharacter: string; ConvertTabsToSpaces: boolean; } - - export interface FormatCodeOptions extends EditorOptions { + interface FormatCodeOptions extends EditorOptions { InsertSpaceAfterCommaDelimiter: boolean; InsertSpaceAfterSemicolonInForStatements: boolean; InsertSpaceBeforeAndAfterBinaryOperators: boolean; @@ -100,646 +83,267 @@ module FourSlashInterface { InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean; PlaceOpenBraceOnNewLineForFunctions: boolean; PlaceOpenBraceOnNewLineForControlBlocks: boolean; - [s: string]: boolean | number| string; + [s: string]: boolean | number | string; } - - export interface Range { + interface Range { fileName: string; start: number; end: number; marker?: Marker; } - - export interface TextSpan { + interface TextSpan { start: number; end: number; } - - export class test_ { - public markers(): Marker[] { - return FourSlash.currentTestState.getMarkers(); - } - - public marker(name?: string): Marker { - return FourSlash.currentTestState.getMarkerByName(name); - } - - public ranges(): Range[] { - return FourSlash.currentTestState.getRanges(); - } - - public markerByName(s: string): Marker { - return FourSlash.currentTestState.getMarkerByName(s); - } + class test_ { + markers(): Marker[]; + marker(name?: string): Marker; + ranges(): Range[]; + markerByName(s: string): Marker; } - - export class goTo { - // Moves the caret to the specified marker, - // or the anonymous marker ('/**/') if no name - // is given - public marker(name?: string) { - FourSlash.currentTestState.goToMarker(name); - } - - public bof() { - FourSlash.currentTestState.goToBOF(); - } - - public eof() { - FourSlash.currentTestState.goToEOF(); - } - - public definition(definitionIndex: number = 0) { - FourSlash.currentTestState.goToDefinition(definitionIndex); - } - - public type(definitionIndex: number = 0) { - FourSlash.currentTestState.goToTypeDefinition(definitionIndex); - } - - public position(position: number, fileIndex?: number); - public position(position: number, fileName?: string); - public position(position: number, fileNameOrIndex?: any) { - if (fileNameOrIndex !== undefined) { - this.file(fileNameOrIndex); - } - FourSlash.currentTestState.goToPosition(position); - } - - // Opens a file, given either its index as it - // appears in the test source, or its filename - // as specified in the test metadata - public file(index: number); - public file(name: string); - public file(indexOrName: any) { - FourSlash.currentTestState.openFile(indexOrName); - } + class goTo { + marker(name?: string): void; + bof(): void; + eof(): void; + definition(definitionIndex?: number): void; + type(definitionIndex?: number): void; + position(position: number, fileIndex?: number): any; + position(position: number, fileName?: string): any; + file(index: number, content?: string): any; + file(name: string, content?: string): any; } - - export class verifyNegatable { - public not: verifyNegatable; - - constructor(private negative = false) { - if (!negative) { - this.not = new verifyNegatable(true); - } - } - - // Verifies the member list contains the specified symbol. The - // member list is brought up if necessary - public memberListContains(symbol: string, text?: string, documenation?: string, kind?: string) { - if (this.negative) { - FourSlash.currentTestState.verifyMemberListDoesNotContain(symbol); - } else { - FourSlash.currentTestState.verifyMemberListContains(symbol, text, documenation, kind); - } - } - - public memberListCount(expectedCount: number) { - FourSlash.currentTestState.verifyMemberListCount(expectedCount, this.negative); - } - - // Verifies the completion list contains the specified symbol. The - // completion list is brought up if necessary - public completionListContains(symbol: string, text?: string, documentation?: string, kind?: string) { - if (this.negative) { - FourSlash.currentTestState.verifyCompletionListDoesNotContain(symbol, text, documentation, kind); - } else { - FourSlash.currentTestState.verifyCompletionListContains(symbol, text, documentation, kind); - } - } - - // Verifies the completion list items count to be greater than the specified amount. The - // completion list is brought up if necessary - public completionListItemsCountIsGreaterThan(count: number) { - FourSlash.currentTestState.verifyCompletionListItemsCountIsGreaterThan(count, this.negative); - } - - public completionListIsEmpty() { - FourSlash.currentTestState.verifyCompletionListIsEmpty(this.negative); - } - - public completionListAllowsNewIdentifier() { - FourSlash.currentTestState.verifyCompletionListAllowsNewIdentifier(this.negative); - } - - public memberListIsEmpty() { - FourSlash.currentTestState.verifyMemberListIsEmpty(this.negative); - } - - public referencesCountIs(count: number) { - FourSlash.currentTestState.verifyReferencesCountIs(count, /*localFilesOnly*/ false); - } - - public referencesAtPositionContains(range: Range, isWriteAccess?: boolean) { - FourSlash.currentTestState.verifyReferencesAtPositionListContains(range.fileName, range.start, range.end, isWriteAccess); - } - - public signatureHelpPresent() { - FourSlash.currentTestState.verifySignatureHelpPresent(!this.negative); - } - - public errorExistsBetweenMarkers(startMarker: string, endMarker: string) { - FourSlash.currentTestState.verifyErrorExistsBetweenMarkers(startMarker, endMarker, !this.negative); - } - - public errorExistsAfterMarker(markerName = "") { - FourSlash.currentTestState.verifyErrorExistsAfterMarker(markerName, !this.negative, true); - } - - public errorExistsBeforeMarker(markerName = "") { - FourSlash.currentTestState.verifyErrorExistsAfterMarker(markerName, !this.negative, false); - } - - public quickInfoIs(expectedText?: string, expectedDocumentation?: string) { - FourSlash.currentTestState.verifyQuickInfoString(this.negative, expectedText, expectedDocumentation); - } - - public quickInfoExists() { - FourSlash.currentTestState.verifyQuickInfoExists(this.negative); - } - - public definitionCountIs(expectedCount: number) { - FourSlash.currentTestState.verifyDefinitionsCount(this.negative, expectedCount); - } - - public typeDefinitionCountIs(expectedCount: number) { - FourSlash.currentTestState.verifyTypeDefinitionsCount(this.negative, expectedCount); - } - - public definitionLocationExists() { - FourSlash.currentTestState.verifyDefinitionLocationExists(this.negative); - } - - public verifyDefinitionsName(name: string, containerName: string) { - FourSlash.currentTestState.verifyDefinitionsName(this.negative, name, containerName); - } + class verifyNegatable { + private negative; + not: verifyNegatable; + constructor(negative?: boolean); + memberListContains(symbol: string, text?: string, documenation?: string, kind?: string): void; + memberListCount(expectedCount: number): void; + completionListContains(symbol: string, text?: string, documentation?: string, kind?: string): void; + completionListItemsCountIsGreaterThan(count: number): void; + completionListIsEmpty(): void; + completionListAllowsNewIdentifier(): void; + memberListIsEmpty(): void; + referencesCountIs(count: number): void; + referencesAtPositionContains(range: Range, isWriteAccess?: boolean): void; + signatureHelpPresent(): void; + errorExistsBetweenMarkers(startMarker: string, endMarker: string): void; + errorExistsAfterMarker(markerName?: string): void; + errorExistsBeforeMarker(markerName?: string): void; + quickInfoIs(expectedText?: string, expectedDocumentation?: string): void; + quickInfoExists(): void; + definitionCountIs(expectedCount: number): void; + typeDefinitionCountIs(expectedCount: number): void; + definitionLocationExists(): void; + verifyDefinitionsName(name: string, containerName: string): void; } - - export class verify extends verifyNegatable { - public caretAtMarker(markerName?: string) { - FourSlash.currentTestState.verifyCaretAtMarker(markerName); - } - - public indentationIs(numberOfSpaces: number) { - FourSlash.currentTestState.verifyIndentationAtCurrentPosition(numberOfSpaces); - } - - public indentationAtPositionIs(fileName: string, position: number, numberOfSpaces: number, indentStyle = IndentStyle.Smart) { - FourSlash.currentTestState.verifyIndentationAtPosition(fileName, position, numberOfSpaces, indentStyle); - } - - public textAtCaretIs(text: string) { - FourSlash.currentTestState.verifyTextAtCaretIs(text); - } - + class verify extends verifyNegatable { + caretAtMarker(markerName?: string): void; + indentationIs(numberOfSpaces: number): void; + indentationAtPositionIs(fileName: string, position: number, numberOfSpaces: number, indentStyle?: ts.IndentStyle): void; + textAtCaretIs(text: string): void; /** * Compiles the current file and evaluates 'expr' in a context containing * the emitted output, then compares (using ===) the result of that expression * to 'value'. Do not use this function with external modules as it is not supported. */ - public eval(expr: string, value: any) { - FourSlash.currentTestState.verifyEval(expr, value); - } - - public currentLineContentIs(text: string) { - FourSlash.currentTestState.verifyCurrentLineContent(text); - } - - public currentFileContentIs(text: string) { - FourSlash.currentTestState.verifyCurrentFileContent(text); - } - - public verifyGetEmitOutputForCurrentFile(expected: string): void { - FourSlash.currentTestState.verifyGetEmitOutputForCurrentFile(expected); - } - - public currentParameterHelpArgumentNameIs(name: string) { - FourSlash.currentTestState.verifyCurrentParameterHelpName(name); - } - - public currentParameterSpanIs(parameter: string) { - FourSlash.currentTestState.verifyCurrentParameterSpanIs(parameter); - } - - public currentParameterHelpArgumentDocCommentIs(docComment: string) { - FourSlash.currentTestState.verifyCurrentParameterHelpDocComment(docComment); - } - - public currentSignatureHelpDocCommentIs(docComment: string) { - FourSlash.currentTestState.verifyCurrentSignatureHelpDocComment(docComment); - } - - public signatureHelpCountIs(expected: number) { - FourSlash.currentTestState.verifySignatureHelpCount(expected); - } - - public signatureHelpArgumentCountIs(expected: number) { - FourSlash.currentTestState.verifySignatureHelpArgumentCount(expected); - } - - public currentSignatureParameterCountIs(expected: number) { - FourSlash.currentTestState.verifyCurrentSignatureHelpParameterCount(expected); - } - - public currentSignatureTypeParameterCountIs(expected: number) { - FourSlash.currentTestState.verifyCurrentSignatureHelpTypeParameterCount(expected); - } - - public currentSignatureHelpIs(expected: string) { - FourSlash.currentTestState.verifyCurrentSignatureHelpIs(expected); - } - - public numberOfErrorsInCurrentFile(expected: number) { - FourSlash.currentTestState.verifyNumberOfErrorsInCurrentFile(expected); - } - - public baselineCurrentFileBreakpointLocations() { - FourSlash.currentTestState.baselineCurrentFileBreakpointLocations(); - } - - public baselineCurrentFileNameOrDottedNameSpans() { - FourSlash.currentTestState.baselineCurrentFileNameOrDottedNameSpans(); - } - - public baselineGetEmitOutput() { - FourSlash.currentTestState.baselineGetEmitOutput(); - } - - public nameOrDottedNameSpanTextIs(text: string) { - FourSlash.currentTestState.verifyCurrentNameOrDottedNameSpanText(text); - } - - public outliningSpansInCurrentFile(spans: TextSpan[]) { - FourSlash.currentTestState.verifyOutliningSpans(spans); - } - - public todoCommentsInCurrentFile(descriptors: string[]) { - FourSlash.currentTestState.verifyTodoComments(descriptors, test.ranges()); - } - - public matchingBracePositionInCurrentFile(bracePosition: number, expectedMatchPosition: number) { - FourSlash.currentTestState.verifyMatchingBracePosition(bracePosition, expectedMatchPosition); - } - - public noMatchingBracePositionInCurrentFile(bracePosition: number) { - FourSlash.currentTestState.verifyNoMatchingBracePosition(bracePosition); - } - - public DocCommentTemplate(expectedText: string, expectedOffset: number, empty?: boolean) { - FourSlash.currentTestState.verifyDocCommentTemplate(empty ? undefined : { newText: expectedText, caretOffset: expectedOffset }); - } - - public noDocCommentTemplate() { - this.DocCommentTemplate(/*expectedText*/ undefined, /*expectedOffset*/ undefined, true); - } - - public getScriptLexicalStructureListCount(count: number) { - FourSlash.currentTestState.verifyGetScriptLexicalStructureListCount(count); - } - - // TODO: figure out what to do with the unused arguments. - public getScriptLexicalStructureListContains( - name: string, - kind: string, - fileName?: string, - parentName?: string, - isAdditionalSpan?: boolean, - markerPosition?: number) { - FourSlash.currentTestState.verifyGetScriptLexicalStructureListContains(name, kind); - } - - public navigationItemsListCount(count: number, searchValue: string, matchKind?: string) { - FourSlash.currentTestState.verifyNavigationItemsCount(count, searchValue, matchKind); - } - - public navigationItemsListContains( - name: string, - kind: string, - searchValue: string, - matchKind: string, - fileName?: string, - parentName?: string) { - FourSlash.currentTestState.verifyNavigationItemsListContains( - name, - kind, - searchValue, - matchKind, - fileName, - parentName); - } - - public occurrencesAtPositionContains(range: Range, isWriteAccess?: boolean) { - FourSlash.currentTestState.verifyOccurrencesAtPositionListContains(range.fileName, range.start, range.end, isWriteAccess); - } - - public occurrencesAtPositionCount(expectedCount: number) { - FourSlash.currentTestState.verifyOccurrencesAtPositionListCount(expectedCount); - } - - public documentHighlightsAtPositionContains(range: Range, fileNamesToSearch: string[], kind?: string) { - FourSlash.currentTestState.verifyDocumentHighlightsAtPositionListContains(range.fileName, range.start, range.end, fileNamesToSearch, kind); - } - - public documentHighlightsAtPositionCount(expectedCount: number, fileNamesToSearch: string[]) { - FourSlash.currentTestState.verifyDocumentHighlightsAtPositionListCount(expectedCount, fileNamesToSearch); - } - - public completionEntryDetailIs(entryName: string, text: string, documentation?: string, kind?: string) { - FourSlash.currentTestState.verifyCompletionEntryDetails(entryName, text, documentation, kind); - } - + eval(expr: string, value: any): void; + currentLineContentIs(text: string): void; + currentFileContentIs(text: string): void; + verifyGetEmitOutputForCurrentFile(expected: string): void; + verifyGetEmitOutputContentsForCurrentFile(expected: ts.OutputFile[]): void; + currentParameterHelpArgumentNameIs(name: string): void; + currentParameterSpanIs(parameter: string): void; + currentParameterHelpArgumentDocCommentIs(docComment: string): void; + currentSignatureHelpDocCommentIs(docComment: string): void; + signatureHelpCountIs(expected: number): void; + signatureHelpArgumentCountIs(expected: number): void; + currentSignatureParameterCountIs(expected: number): void; + currentSignatureTypeParameterCountIs(expected: number): void; + currentSignatureHelpIs(expected: string): void; + numberOfErrorsInCurrentFile(expected: number): void; + baselineCurrentFileBreakpointLocations(): void; + baselineCurrentFileNameOrDottedNameSpans(): void; + baselineGetEmitOutput(): void; + nameOrDottedNameSpanTextIs(text: string): void; + outliningSpansInCurrentFile(spans: TextSpan[]): void; + todoCommentsInCurrentFile(descriptors: string[]): void; + matchingBracePositionInCurrentFile(bracePosition: number, expectedMatchPosition: number): void; + noMatchingBracePositionInCurrentFile(bracePosition: number): void; + DocCommentTemplate(expectedText: string, expectedOffset: number, empty?: boolean): void; + noDocCommentTemplate(): void; + getScriptLexicalStructureListCount(count: number): void; + getScriptLexicalStructureListContains(name: string, kind: string, fileName?: string, parentName?: string, isAdditionalSpan?: boolean, markerPosition?: number): void; + navigationItemsListCount(count: number, searchValue: string, matchKind?: string): void; + navigationItemsListContains(name: string, kind: string, searchValue: string, matchKind: string, fileName?: string, parentName?: string): void; + occurrencesAtPositionContains(range: Range, isWriteAccess?: boolean): void; + occurrencesAtPositionCount(expectedCount: number): void; + documentHighlightsAtPositionContains(range: Range, fileNamesToSearch: string[], kind?: string): void; + documentHighlightsAtPositionCount(expectedCount: number, fileNamesToSearch: string[]): void; + completionEntryDetailIs(entryName: string, text: string, documentation?: string, kind?: string): void; /** * This method *requires* a contiguous, complete, and ordered stream of classifications for a file. */ - public syntacticClassificationsAre(...classifications: { classificationType: string; text: string }[]) { - FourSlash.currentTestState.verifySyntacticClassifications(classifications); - } - + syntacticClassificationsAre(...classifications: { + classificationType: string; + text: string; + }[]): void; /** * This method *requires* an ordered stream of classifications for a file, and spans are highly recommended. */ - public semanticClassificationsAre(...classifications: { classificationType: string; text: string; textSpan?: TextSpan }[]) { - FourSlash.currentTestState.verifySemanticClassifications(classifications); - } - - public renameInfoSucceeded(displayName?: string, fullDisplayName?: string, kind?: string, kindModifiers?: string) { - FourSlash.currentTestState.verifyRenameInfoSucceeded(displayName, fullDisplayName, kind, kindModifiers) - } - - public renameInfoFailed(message?: string) { - FourSlash.currentTestState.verifyRenameInfoFailed(message) - } - - public renameLocations(findInStrings: boolean, findInComments: boolean) { - FourSlash.currentTestState.verifyRenameLocations(findInStrings, findInComments); - } - - public verifyQuickInfoDisplayParts(kind: string, kindModifiers: string, textSpan: { start: number; length: number; }, - displayParts: ts.SymbolDisplayPart[], documentation: ts.SymbolDisplayPart[]) { - FourSlash.currentTestState.verifyQuickInfoDisplayParts(kind, kindModifiers, textSpan, displayParts, documentation); - } - - public getSyntacticDiagnostics(expected: string) { - FourSlash.currentTestState.getSyntacticDiagnostics(expected); - } - - public getSemanticDiagnostics(expected: string) { - FourSlash.currentTestState.getSemanticDiagnostics(expected); - } - - public ProjectInfo(expected: string []) { - FourSlash.currentTestState.verifyProjectInfo(expected); - } + semanticClassificationsAre(...classifications: { + classificationType: string; + text: string; + textSpan?: TextSpan; + }[]): void; + renameInfoSucceeded(displayName?: string, fullDisplayName?: string, kind?: string, kindModifiers?: string): void; + renameInfoFailed(message?: string): void; + renameLocations(findInStrings: boolean, findInComments: boolean): void; + verifyQuickInfoDisplayParts(kind: string, kindModifiers: string, textSpan: { + start: number; + length: number; + }, displayParts: ts.SymbolDisplayPart[], documentation: ts.SymbolDisplayPart[]): void; + getSyntacticDiagnostics(expected: string): void; + getSemanticDiagnostics(expected: string): void; + ProjectInfo(expected: string[]): void; } - - export class edit { - public backspace(count?: number) { - FourSlash.currentTestState.deleteCharBehindMarker(count); - } - - public deleteAtCaret(times?: number) { - FourSlash.currentTestState.deleteChar(times); - } - - public replace(start: number, length: number, text: string) { - FourSlash.currentTestState.replace(start, length, text); - } - - public paste(text: string) { - FourSlash.currentTestState.paste(text); - } - - public insert(text: string) { - this.insertLines(text); - } - - public insertLine(text: string) { - this.insertLines(text + '\n'); - } - - public insertLines(...lines: string[]) { - FourSlash.currentTestState.type(lines.join('\n')); - } - - public moveRight(count?: number) { - FourSlash.currentTestState.moveCaretRight(count); - } - - public moveLeft(count?: number) { - if (typeof count === 'undefined') { - count = 1; - } - FourSlash.currentTestState.moveCaretRight(count * -1); - } - - public enableFormatting() { - FourSlash.currentTestState.enableFormatting = true; - } - - public disableFormatting() { - FourSlash.currentTestState.enableFormatting = false; - } + class edit { + backspace(count?: number): void; + deleteAtCaret(times?: number): void; + replace(start: number, length: number, text: string): void; + paste(text: string): void; + insert(text: string): void; + insertLine(text: string): void; + insertLines(...lines: string[]): void; + moveRight(count?: number): void; + moveLeft(count?: number): void; + enableFormatting(): void; + disableFormatting(): void; } - - export class debug { - public printCurrentParameterHelp() { - FourSlash.currentTestState.printCurrentParameterHelp(); - } - - public printCurrentFileState() { - FourSlash.currentTestState.printCurrentFileState(); - } - - public printCurrentFileStateWithWhitespace() { - FourSlash.currentTestState.printCurrentFileState(/*withWhiteSpace=*/true); - } - - public printCurrentFileStateWithoutCaret() { - FourSlash.currentTestState.printCurrentFileState(/*withWhiteSpace=*/false, /*withCaret=*/false); - } - - public printCurrentQuickInfo() { - FourSlash.currentTestState.printCurrentQuickInfo(); - } - - public printCurrentSignatureHelp() { - FourSlash.currentTestState.printCurrentSignatureHelp(); - } - - public printMemberListMembers() { - FourSlash.currentTestState.printMemberListMembers(); - } - - public printCompletionListMembers() { - FourSlash.currentTestState.printCompletionListMembers(); - } - - public printBreakpointLocation(pos: number) { - FourSlash.currentTestState.printBreakpointLocation(pos); - } - public printBreakpointAtCurrentLocation() { - FourSlash.currentTestState.printBreakpointAtCurrentLocation(); - } - - public printNameOrDottedNameSpans(pos: number) { - FourSlash.currentTestState.printNameOrDottedNameSpans(pos); - } - - public printErrorList() { - FourSlash.currentTestState.printErrorList(); - } - - public printNavigationItems(searchValue: string = ".*") { - FourSlash.currentTestState.printNavigationItems(searchValue); - } - - public printScriptLexicalStructureItems() { - FourSlash.currentTestState.printScriptLexicalStructureItems(); - } - - public printReferences() { - FourSlash.currentTestState.printReferences(); - } - - public printContext() { - FourSlash.currentTestState.printContext(); - } + class debug { + printCurrentParameterHelp(): void; + printCurrentFileState(): void; + printCurrentFileStateWithWhitespace(): void; + printCurrentFileStateWithoutCaret(): void; + printCurrentQuickInfo(): void; + printCurrentSignatureHelp(): void; + printMemberListMembers(): void; + printCompletionListMembers(): void; + printBreakpointLocation(pos: number): void; + printBreakpointAtCurrentLocation(): void; + printNameOrDottedNameSpans(pos: number): void; + printErrorList(): void; + printNavigationItems(searchValue?: string): void; + printScriptLexicalStructureItems(): void; + printReferences(): void; + printContext(): void; } - - export class format { - public document() { - FourSlash.currentTestState.formatDocument(); - } - - public copyFormatOptions(): FormatCodeOptions { - return FourSlash.currentTestState.copyFormatOptions(); - } - - public setFormatOptions(options: FormatCodeOptions) { - return FourSlash.currentTestState.setFormatOptions(options); - } - - public selection(startMarker: string, endMarker: string) { - FourSlash.currentTestState.formatSelection(FourSlash.currentTestState.getMarkerByName(startMarker).position, FourSlash.currentTestState.getMarkerByName(endMarker).position); - } - - public setOption(name: string, value: number); - public setOption(name: string, value: string); - public setOption(name: string, value: boolean); - public setOption(name: string, value: any) { - FourSlash.currentTestState.formatCodeOptions[name] = value; - } + class format { + document(): void; + copyFormatOptions(): FormatCodeOptions; + setFormatOptions(options: FormatCodeOptions): any; + selection(startMarker: string, endMarker: string): void; + setOption(name: string, value: number): any; + setOption(name: string, value: string): any; + setOption(name: string, value: boolean): any; } - - export class cancellation { - public resetCancelled() { - FourSlash.currentTestState.resetCancelled(); - } - - public setCancelled(numberOfCalls: number = 0) { - FourSlash.currentTestState.setCancelled(numberOfCalls); - } + class cancellation { + resetCancelled(): void; + setCancelled(numberOfCalls?: number): void; } - - export module classification { - export function comment(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("comment", text, position); - } - - export function identifier(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("identifier", text, position); - } - - export function keyword(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("keyword", text, position); - } - - export function numericLiteral(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("numericLiteral", text, position); - } - - export function operator(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("operator", text, position); - } - - export function stringLiteral(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("stringLiteral", text, position); - } - - export function whiteSpace(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("whiteSpace", text, position); - } - - export function text(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("text", text, position); - } - - export function punctuation(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("punctuation", text, position); - } - - export function docCommentTagName(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("docCommentTagName", text, position); - } - - export function className(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("className", text, position); - } - - export function enumName(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("enumName", text, position); - } - - export function interfaceName(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("interfaceName", text, position); - } - - export function moduleName(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("moduleName", text, position); - } - - export function typeParameterName(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("typeParameterName", text, position); - } - - export function parameterName(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("parameterName", text, position); - } - - export function typeAliasName(text: string, position?: number): { classificationType: string; text: string; textSpan?: TextSpan } { - return getClassification("typeAliasName", text, position); - } - - function getClassification(type: string, text: string, position?: number) { - return { - classificationType: type, - text: text, - textSpan: position === undefined ? undefined : { start: position, end: position + text.length } - }; - } + module classification { + function comment(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function identifier(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function keyword(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function numericLiteral(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function operator(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function stringLiteral(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function whiteSpace(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function text(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function punctuation(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function docCommentTagName(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function className(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function enumName(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function interfaceName(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function moduleName(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function typeParameterName(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function parameterName(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function typeAliasName(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; } } - -module fs { - export var test = new FourSlashInterface.test_(); - export var goTo = new FourSlashInterface.goTo(); - export var verify = new FourSlashInterface.verify(); - export var edit = new FourSlashInterface.edit(); - export var debug = new FourSlashInterface.debug(); - export var format = new FourSlashInterface.format(); - export var cancellation = new FourSlashInterface.cancellation(); -} - -function verifyOperationIsCancelled(f) { - FourSlash.verifyOperationIsCancelled(f); -} - -var test = new FourSlashInterface.test_(); -var goTo = new FourSlashInterface.goTo(); -var verify = new FourSlashInterface.verify(); -var edit = new FourSlashInterface.edit(); -var debug = new FourSlashInterface.debug(); -var format = new FourSlashInterface.format(); -var cancellation = new FourSlashInterface.cancellation(); -var classification = FourSlashInterface.classification; +declare function verifyOperationIsCancelled(f: any): void; +declare var test: FourSlashInterface.test_; +declare var goTo: FourSlashInterface.goTo; +declare var verify: FourSlashInterface.verify; +declare var edit: FourSlashInterface.edit; +declare var debug: FourSlashInterface.debug; +declare var format: FourSlashInterface.format; +declare var cancellation: FourSlashInterface.cancellation; +declare var classification: typeof FourSlashInterface.classification; diff --git a/tests/cases/fourslash/getEmitOutputTsxFile_React.ts b/tests/cases/fourslash/getEmitOutputTsxFile_React.ts index ccfa3bcc0c2b5..0620f6d83ef7f 100644 --- a/tests/cases/fourslash/getEmitOutputTsxFile_React.ts +++ b/tests/cases/fourslash/getEmitOutputTsxFile_React.ts @@ -13,10 +13,18 @@ //// x : string; //// y : number //// } +//// /*1*/ // @Filename: inputFile2.tsx // @emitThisFile: true +//// declare var React: any; //// var y = "my div"; //// var x =
+//// /*2*/ + +goTo.marker("1"); +verify.numberOfErrorsInCurrentFile(0); +goTo.marker("2"); +verify.numberOfErrorsInCurrentFile(0); verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics1.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics1.ts index 05bc67277108e..a94318c84fde9 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics1.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics1.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// import a = b; diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics10.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics10.ts index 84c6c45f8708b..957357fc2c110 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics10.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics10.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// function F() { } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics11.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics11.ts index 7dfd3c4965b72..d9c16fca65164 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics11.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics11.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// function F(): number { } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics12.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics12.ts index 88a1331ef2361..b4dcf07674323 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics12.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics12.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// declare var v; diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics13.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics13.ts index 21a5e9cdcaa17..a20bccc088763 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics13.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics13.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// var v: () => number; diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics14.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics14.ts index 8cd178ffec1e3..4f7673be38455 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics14.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics14.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// Foo(); diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics15.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics15.ts index d1c3a8c6e635e..f7cd4db362621 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics15.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics15.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// function F(public p) { } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics16.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics16.ts index 1e114532c79d5..cd19bd580cc25 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics16.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics16.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// function F(p?) { } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics17.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics17.ts index 5e94c806c6025..5a1ec6d92cf24 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics17.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics17.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// function F(a: number) { } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics18.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics18.ts index a2859060cdeab..fdaafa9aa516b 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics18.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics18.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// class C { v } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics19.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics19.ts index 34dbbc0271d6f..a7fbe3e0ecc64 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics19.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics19.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// enum E { } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics2.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics2.ts index b26d16f901706..9ab29b417984b 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics2.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics2.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// export = b; diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts index 790f02bac92d0..c34f860b5fe4a 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts @@ -1,9 +1,10 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// var v = undefined; +verify.getSyntacticDiagnostics(`[]`); verify.getSemanticDiagnostics(`[ { "message": "'type assertion expressions' can only be used in a .ts file.", diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics21.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics21.ts index 23e3274261c0b..b71677554a215 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics21.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics21.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// @internal class C {} diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics22.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics22.ts index 16c5380189e4f..d4d830d29e9ce 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics22.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics22.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// function foo(...a) {} diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts index c7b6c6a80cf76..3aff51d881b09 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// class C { } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts index f32ee5c4b68cf..99319b047e63c 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// public class C { } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts index e405624c9b037..18df3500bd975 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// class C implements D { } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics6.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics6.ts index 918eb035a8b50..e18f8f9be52c4 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics6.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics6.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// interface I { } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics7.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics7.ts index cdec262f699fe..32cad0e5a07bf 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics7.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics7.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// module M { } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts index a71a2cf2bc717..ba2d9faae8c66 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// type a = b; diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics9.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics9.ts index 4bd4ce706b97e..4c531b5255b92 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics9.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics9.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: a.js //// public function F() { } diff --git a/tests/cases/fourslash/indentationBlock.ts b/tests/cases/fourslash/indentationBlock.ts index e880c4a095769..853ff43b0d6dd 100644 --- a/tests/cases/fourslash/indentationBlock.ts +++ b/tests/cases/fourslash/indentationBlock.ts @@ -179,5 +179,5 @@ ////{| "indent": 0 |} test.markers().forEach(marker => { - verify.indentationAtPositionIs(marker.fileName, marker.position, marker.data.indent, IndentStyle.Block); + verify.indentationAtPositionIs(marker.fileName, marker.position, marker.data.indent, ts.IndentStyle.Block); }); diff --git a/tests/cases/fourslash/indentationNone.ts b/tests/cases/fourslash/indentationNone.ts index 078f5ab35f65e..610a336cddada 100644 --- a/tests/cases/fourslash/indentationNone.ts +++ b/tests/cases/fourslash/indentationNone.ts @@ -179,5 +179,5 @@ ////{| "indent": 0 |} test.markers().forEach(marker => { - verify.indentationAtPositionIs(marker.fileName, marker.position, marker.data.indent, IndentStyle.None); + verify.indentationAtPositionIs(marker.fileName, marker.position, marker.data.indent, ts.IndentStyle.None); }); diff --git a/tests/cases/fourslash/javaScriptModules12.ts b/tests/cases/fourslash/javaScriptModules12.ts index c391f150963f1..5ed2431cf9277 100644 --- a/tests/cases/fourslash/javaScriptModules12.ts +++ b/tests/cases/fourslash/javaScriptModules12.ts @@ -2,7 +2,7 @@ // Invocations of 'require' stop top-level variables from becoming global -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: mod1.js //// var x = require('fs'); diff --git a/tests/cases/fourslash/javaScriptModules13.ts b/tests/cases/fourslash/javaScriptModules13.ts index 8b22971009cf4..4eed369836fe4 100644 --- a/tests/cases/fourslash/javaScriptModules13.ts +++ b/tests/cases/fourslash/javaScriptModules13.ts @@ -2,7 +2,7 @@ // Assignments to 'module.exports' create an external module -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: myMod.js //// if (true) { //// module.exports = { a: 10 }; diff --git a/tests/cases/fourslash/javaScriptModules14.ts b/tests/cases/fourslash/javaScriptModules14.ts index 5434f94cf8de6..9039292d511cb 100644 --- a/tests/cases/fourslash/javaScriptModules14.ts +++ b/tests/cases/fourslash/javaScriptModules14.ts @@ -2,7 +2,7 @@ // Assignments to 'exports.p' stop global variables from being visible in other files -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: myMod.js //// if (true) { //// exports.b = true; diff --git a/tests/cases/fourslash/javaScriptModules15.ts b/tests/cases/fourslash/javaScriptModules15.ts index ff888d993367f..5cd7545c83d40 100644 --- a/tests/cases/fourslash/javaScriptModules15.ts +++ b/tests/cases/fourslash/javaScriptModules15.ts @@ -2,7 +2,7 @@ // Assignments to 'exports.p' define a property 'p' even if they're not at top-level -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: myMod.js //// if (true) { //// exports.b = true; diff --git a/tests/cases/fourslash/javaScriptModules16.ts b/tests/cases/fourslash/javaScriptModules16.ts index c556f288145cb..c34660df59f7e 100644 --- a/tests/cases/fourslash/javaScriptModules16.ts +++ b/tests/cases/fourslash/javaScriptModules16.ts @@ -2,7 +2,7 @@ // Assignments to 'exports.p' define a property 'p' -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: myMod.js //// exports.n = 3; //// exports.s = 'foo'; diff --git a/tests/cases/fourslash/javaScriptModules17.ts b/tests/cases/fourslash/javaScriptModules17.ts index 8514ed0ee1844..83ae882f32360 100644 --- a/tests/cases/fourslash/javaScriptModules17.ts +++ b/tests/cases/fourslash/javaScriptModules17.ts @@ -1,6 +1,6 @@ /// -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: myMod.js //// module.exports = { n: 3, s: 'foo', b: true }; diff --git a/tests/cases/fourslash/javaScriptModules18.ts b/tests/cases/fourslash/javaScriptModules18.ts index d3117f86b3f35..77a751f2a9bb4 100644 --- a/tests/cases/fourslash/javaScriptModules18.ts +++ b/tests/cases/fourslash/javaScriptModules18.ts @@ -2,7 +2,7 @@ // CommonJS modules should not pollute the global namespace -// @allowNonTsExtensions: true +// @allowJs: true // @Filename: myMod.js //// var x = require('fs'); diff --git a/tests/cases/fourslash/javaScriptPrototype1.ts b/tests/cases/fourslash/javaScriptPrototype1.ts new file mode 100644 index 0000000000000..0473d18aae873 --- /dev/null +++ b/tests/cases/fourslash/javaScriptPrototype1.ts @@ -0,0 +1,46 @@ +/// + +// Assignments to the 'prototype' property of a function create a class + +// @allowNonTsExtensions: true +// @Filename: myMod.js +//// function myCtor(x) { +//// } +//// myCtor.prototype.foo = function() { return 32 }; +//// myCtor.prototype.bar = function() { return '' }; +//// +//// var m = new myCtor(10); +//// m/*1*/ +//// var a = m.foo; +//// a/*2*/ +//// var b = a(); +//// b/*3*/ +//// var c = m.bar(); +//// c/*4*/ + + +// Members of the class instance +goTo.marker('1'); +edit.insert('.'); +verify.memberListContains('foo', undefined, undefined, 'method'); +verify.memberListContains('bar', undefined, undefined, 'method'); +edit.backspace(); + +// Members of a class method (1) +goTo.marker('2'); +edit.insert('.'); +verify.memberListContains('length', undefined, undefined, 'property'); +edit.backspace(); + +// Members of the invocation of a class method (1) +goTo.marker('3'); +edit.insert('.'); +verify.memberListContains('toFixed', undefined, undefined, 'method'); +verify.not.memberListContains('substr', undefined, undefined, 'method'); +edit.backspace(); + +// Members of the invocation of a class method (2) +goTo.marker('4'); +edit.insert('.'); +verify.memberListContains('substr', undefined, undefined, 'method'); +verify.not.memberListContains('toFixed', undefined, undefined, 'method'); diff --git a/tests/cases/fourslash/javaScriptPrototype2.ts b/tests/cases/fourslash/javaScriptPrototype2.ts new file mode 100644 index 0000000000000..ab6afff3d2ce7 --- /dev/null +++ b/tests/cases/fourslash/javaScriptPrototype2.ts @@ -0,0 +1,36 @@ +/// + +// Assignments to 'this' in the constructorish body create +// properties with those names + +// @allowNonTsExtensions: true +// @Filename: myMod.js +//// function myCtor(x) { +//// this.qua = 10; +//// } +//// myCtor.prototype.foo = function() { return 32 }; +//// myCtor.prototype.bar = function() { return '' }; +//// +//// var m = new myCtor(10); +//// m/*1*/ +//// var x = m.qua; +//// x/*2*/ +//// myCtor/*3*/ + +// Verify the instance property exists +goTo.marker('1'); +edit.insert('.'); +verify.completionListContains('qua', undefined, undefined, 'property'); +edit.backspace(); + +// Verify the type of the instance property +goTo.marker('2'); +edit.insert('.'); +verify.completionListContains('toFixed', undefined, undefined, 'method'); + +goTo.marker('3'); +edit.insert('.'); +// Make sure symbols don't leak out into the constructor +verify.completionListContains('qua', undefined, undefined, 'warning'); +verify.completionListContains('foo', undefined, undefined, 'warning'); +verify.completionListContains('bar', undefined, undefined, 'warning'); diff --git a/tests/cases/fourslash/javaScriptPrototype3.ts b/tests/cases/fourslash/javaScriptPrototype3.ts new file mode 100644 index 0000000000000..900a39ddce9eb --- /dev/null +++ b/tests/cases/fourslash/javaScriptPrototype3.ts @@ -0,0 +1,40 @@ +/// + +// ES6 classes can extend from JS classes + +// @allowNonTsExtensions: true +// @Filename: myMod.js +//// function myCtor(x) { +//// this.qua = 10; +//// } +//// myCtor.prototype.foo = function() { return 32 }; +//// myCtor.prototype.bar = function() { return '' }; +//// +//// class MyClass extends myCtor { +//// fn() { +//// this/*1*/ +//// let y = super.foo(); +//// y; +//// } +//// } +//// var n = new MyClass(3); +//// n/*2*/; + +goTo.marker('1'); +edit.insert('.'); +// Current class method +verify.completionListContains('fn', undefined, undefined, 'method'); +// Base class method +verify.completionListContains('foo', undefined, undefined, 'method'); +// Base class instance property +verify.completionListContains('qua', undefined, undefined, 'property'); +edit.backspace(); + +// Derived class instance from outside the class +goTo.marker('2'); +edit.insert('.'); +verify.completionListContains('fn', undefined, undefined, 'method'); +// Base class method +verify.completionListContains('foo', undefined, undefined, 'method'); +// Base class instance property +verify.completionListContains('qua', undefined, undefined, 'property'); diff --git a/tests/cases/fourslash/javaScriptPrototype4.ts b/tests/cases/fourslash/javaScriptPrototype4.ts new file mode 100644 index 0000000000000..3ed723740b489 --- /dev/null +++ b/tests/cases/fourslash/javaScriptPrototype4.ts @@ -0,0 +1,30 @@ +/// + +// Check for any odd symbol leakage + +// @allowNonTsExtensions: true +// @Filename: myMod.js +//// function myCtor(x) { +//// this.qua = 10; +//// } +//// myCtor.prototype.foo = function() { return 32 }; +//// myCtor.prototype.bar = function() { return '' }; +//// +//// myCtor/*1*/ + +goTo.marker('1'); +edit.insert('.'); + +// Check members of the function +verify.completionListContains('prototype', undefined, undefined, 'property'); +verify.completionListContains('foo', undefined, undefined, 'warning'); +verify.completionListContains('bar', undefined, undefined, 'warning'); +verify.completionListContains('qua', undefined, undefined, 'warning'); + +// Check members of function.prototype +edit.insert('prototype.'); +verify.completionListContains('foo', undefined, undefined, 'method'); +verify.completionListContains('bar', undefined, undefined, 'method'); +verify.completionListContains('qua', undefined, undefined, 'warning'); +verify.completionListContains('prototype', undefined, undefined, 'warning'); + diff --git a/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts b/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts new file mode 100644 index 0000000000000..00d03b6e60c54 --- /dev/null +++ b/tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts @@ -0,0 +1,24 @@ +/// + +// @declaration: true +// @out: out.js +// @allowJs: true +// @Filename: b.js +// @emitThisFile: true +////function foo() { return 10; }/*1*/ + +// @Filename: a.ts +// @emitThisFile: true +////function foo() { return 30; }/*2*/ + +goTo.marker("1"); +verify.getSemanticDiagnostics('[]'); +goTo.marker("2"); +verify.getSemanticDiagnostics('[\n {\n "message": "Duplicate function implementation.",\n "start": 9,\n "length": 3,\n "category": "error",\n "code": 2393\n }\n]'); +verify.verifyGetEmitOutputContentsForCurrentFile([ + { name: "out.js", text: "function foo() { return 10; }\r\nfunction foo() { return 30; }\r\n", writeByteOrderMark: false }, + { name: "out.d.ts", text: "", writeByteOrderMark: false }]); +goTo.marker("2"); +verify.getSemanticDiagnostics('[\n {\n "message": "Duplicate function implementation.",\n "start": 9,\n "length": 3,\n "category": "error",\n "code": 2393\n }\n]'); +goTo.marker("1"); +verify.getSemanticDiagnostics('[]'); \ No newline at end of file diff --git a/tests/cases/fourslash/overloadOnConstCallSignature.ts b/tests/cases/fourslash/overloadOnConstCallSignature.ts index d729fd4da6f8d..101d7750e0424 100644 --- a/tests/cases/fourslash/overloadOnConstCallSignature.ts +++ b/tests/cases/fourslash/overloadOnConstCallSignature.ts @@ -11,7 +11,7 @@ goTo.marker('1'); verify.signatureHelpCountIs(4); -verify.currentSignatureHelpIs('foo(name: \'order\'): string'); +verify.currentSignatureHelpIs('foo(name: "order"): string'); edit.insert('"hi"'); goTo.marker('2'); diff --git a/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.ts b/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.ts new file mode 100644 index 0000000000000..b6ae5ea1c6b05 --- /dev/null +++ b/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.ts @@ -0,0 +1,22 @@ +/// + +//// type MixinCtor = new () => /*0*/A & { constructor: MixinCtor }; +//// type MixinCtor = new () => A & { constructor: { constructor: MixinCtor } }; + +let typeAliashDisplayParts = [{ text: "type", kind: "keyword" }, { text: " ", kind: "space" }, { text: "MixinCtor", kind: "aliasName" }, + { text: "<", kind: "punctuation" }, { text: "A", kind: "typeParameterName" }, { text: ">", kind: "punctuation" }]; + +let typeParameterDisplayParts = [{ text: "(", kind: "punctuation" }, { text: "type parameter", kind: "text" }, { text: ")", kind: "punctuation" }, { text: " ", kind: "space" }, + { text: "A", kind: "typeParameterName" }, { text: " ", kind: "space" }, { text: "in", kind: "keyword" }, { text: " ", kind: "space" }]; + +goTo.marker('0'); +verify.verifyQuickInfoDisplayParts("type parameter", "", { start: test.markerByName("0").position, length: "A".length }, + typeParameterDisplayParts.concat(typeAliashDisplayParts), []); + +goTo.marker('1'); +verify.verifyQuickInfoDisplayParts("type parameter", "", { start: test.markerByName("1").position, length: "A".length }, + typeParameterDisplayParts.concat(typeAliashDisplayParts), []);; + +goTo.marker('2'); +verify.verifyQuickInfoDisplayParts("type parameter", "", { start: test.markerByName("2").position, length: "A".length }, + typeParameterDisplayParts.concat(typeAliashDisplayParts), []); \ No newline at end of file diff --git a/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts b/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts index b6a10e086c25b..5dbcfa93d783e 100644 --- a/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts +++ b/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts @@ -3,9 +3,6 @@ ////type /*0*/List = /*2*/T[] ////type /*3*/List2 = /*5*/T[]; -type List2 = T[]; - -type L = T[] let typeAliashDisplayParts = [{ text: "type", kind: "keyword" }, { text: " ", kind: "space" }, { text: "List", kind: "aliasName" }, { text: "<", kind: "punctuation" }, { text: "T", kind: "typeParameterName" }, { text: ">", kind: "punctuation" }]; diff --git a/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterOfFunctionLikeInTypeAlias.ts b/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterOfFunctionLikeInTypeAlias.ts new file mode 100644 index 0000000000000..917358fde570b --- /dev/null +++ b/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterOfFunctionLikeInTypeAlias.ts @@ -0,0 +1,41 @@ +/// + +//// type jamming = new () => jamming; +//// type jamming = (new () => jamming) & { constructor: /*2*/A }; +//// type jamming = new () => jamming & { constructor: /*3*/A }; + +let typeAliashDisplayParts = [{ text: "type", kind: "keyword" }, { text: " ", kind: "space" }, { text: "jamming", kind: "aliasName" }, + { text: "<", kind: "punctuation" }, { text: "A", kind: "typeParameterName" }, { text: ">", kind: "punctuation" }]; + +let typeParameterDisplayParts = [{ text: "(", kind: "punctuation" }, { text: "type parameter", kind: "text" }, { text: ")", kind: "punctuation" }, { text: " ", kind: "space" }, + { text: "A", kind: "typeParameterName" }, { text: " ", kind: "space" }, { text: "in", kind: "keyword" }, { text: " ", kind: "space" }]; + +let constructorTypeDisplayParts = [{ text: "<", kind: "punctuation" }, { text: "A", kind: "typeParameterName" }, { text: ">", kind: "punctuation" }, + { text: "(", kind: "punctuation" }, { text: ")", kind: "punctuation" }, { text: ":", kind: "punctuation" }, { text: " ", kind: "space" }, + { text: "new", kind: "keyword" }, { "text": " ", kind: "space" }, { text: "<", kind: "punctuation" }, { text: "A", kind: "typeParameterName" }, + { text: ">", kind: "punctuation" }, { text: "(", kind: "punctuation" }, { text: ")", kind: "punctuation" }, {"text": " ", kind: "space" }, + { text: "=>", kind: "punctuation" }, { "text": " ", kind: "space" }, { text: "jamming", kind: "aliasName" }]; + +let constructorTypeWithLongReturnTypeDisplayParts = [{ "text": "<", kind: "punctuation" }, { "text": "A", kind: "typeParameterName" }, { "text": ">", kind: "punctuation" }, + { "text": "(", kind: "punctuation" }, { "text": ")", kind: "punctuation" }, { "text": ":", kind: "punctuation" }, { "text": " ", kind: "space" }, { "text": "(", kind: "punctuation" }, + { "text": "new", kind: "keyword" }, { "text": " ", kind: "space" }, { "text": "<", kind: "punctuation" }, { "text": "A", kind: "typeParameterName" }, { "text": ">", kind: "punctuation" }, + { "text": "(", kind: "punctuation" }, { "text": ")", kind: "punctuation" }, { "text": " ", kind: "space" }, { "text": "=>", kind: "punctuation" }, { "text": " ", kind: "space" }, + { "text": "jamming", kind: "aliasName" }, { "text": ")", kind: "punctuation" }, { "text": " ", kind: "space" }, { "text": "&", kind: "punctuation" }, { "text": " ", kind: "space" }, + { "text": "{", kind: "punctuation" }, { "text": "\n", kind: "lineBreak" }, { "text": " ", kind: "space" }, { "text": "constructor", kind: "propertyName" }, { "text": ":", kind: "punctuation" }, + { "text": " ", kind: "space" }, { "text": "A", kind: "typeParameterName" }, {"text":";", kind: "punctuation" }, {"text":"\n", kind: "lineBreak" }, {"text":"}", kind: "punctuation" }]; + +goTo.marker('0'); +verify.verifyQuickInfoDisplayParts("type parameter", "", { start: test.markerByName("0").position, length: "A".length }, + typeParameterDisplayParts.concat(constructorTypeDisplayParts), []); + +goTo.marker('1'); +verify.verifyQuickInfoDisplayParts("type parameter", "", { start: test.markerByName("1").position, length: "A".length }, + typeParameterDisplayParts.concat(constructorTypeDisplayParts), []); + +goTo.marker('2'); +verify.verifyQuickInfoDisplayParts("type parameter", "", { start: test.markerByName("2").position, length: "A".length }, + typeParameterDisplayParts.concat(typeAliashDisplayParts), []); + +goTo.marker('3'); +verify.verifyQuickInfoDisplayParts("type parameter", "", { start: test.markerByName("3").position, length: "A".length }, + typeParameterDisplayParts.concat(constructorTypeWithLongReturnTypeDisplayParts), []); \ No newline at end of file diff --git a/tests/cases/fourslash/quickInfoDisplayPartsVarWithStringTypes01.ts b/tests/cases/fourslash/quickInfoDisplayPartsVarWithStringTypes01.ts new file mode 100644 index 0000000000000..b48c7cfa3de19 --- /dev/null +++ b/tests/cases/fourslash/quickInfoDisplayPartsVarWithStringTypes01.ts @@ -0,0 +1,41 @@ +/// + +////let /*1*/hello: "hello" | 'hello' = "hello"; +////let /*2*/world: 'world' = "world"; +////let /*3*/helloOrWorld: "hello" | 'world'; + +goTo.marker("1"); +verify.verifyQuickInfoDisplayParts("let", "", { start: test.markerByName('1').position, length: "hello".length }, [ + { text: "let", kind: "keyword" }, + { text: " ", kind: "space" }, + { text: "hello", kind: "localName" }, + { text: ":", kind: "punctuation" }, + { text: " ", kind: "space" }, + { text: '"hello"', kind: "stringLiteral" }, ], + /*documentation*/ []); + +goTo.marker("2"); +verify.verifyQuickInfoDisplayParts("let", "", { start: test.markerByName('2').position, length: "world".length }, [ + { text: "let", kind: "keyword" }, + { text: " ", kind: "space" }, + { text: "world", kind: "localName" }, + { text: ":", kind: "punctuation" }, + { text: " ", kind: "space" }, + { text: '"world"', kind: "stringLiteral" }, + ], + /*documentation*/[]); + +goTo.marker("3"); +verify.verifyQuickInfoDisplayParts("let", "", { start: test.markerByName('3').position, length: "helloOrWorld".length }, [ + { text: "let", kind: "keyword" }, + { text: " ", kind: "space" }, + { text: "helloOrWorld", kind: "localName" }, + { text: ":", kind: "punctuation" }, + { text: " ", kind: "space" }, + { text: '"hello"', kind: "stringLiteral" }, + { text: " ", kind: "space" }, + { text: "|", kind: "punctuation" }, + { text: " ", kind: "space" }, + { text: '"world"', kind: "stringLiteral" }, + ], + /*documentation*/[]); \ No newline at end of file diff --git a/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts b/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts index f2ee37aa675db..948c2fde99911 100644 --- a/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts +++ b/tests/cases/fourslash/quickInfoForOverloadOnConst1.ts @@ -20,22 +20,22 @@ ////c.x1(1, (x/*10*/x) => { return 1; } ); goTo.marker('1'); -verify.quickInfoIs("(method) I.x1(a: number, callback: (x: 'hi') => number): any"); +verify.quickInfoIs("(method) I.x1(a: number, callback: (x: \"hi\") => number): any"); goTo.marker('2'); -verify.quickInfoIs("(method) C.x1(a: number, callback: (x: 'hi') => number): any"); +verify.quickInfoIs("(method) C.x1(a: number, callback: (x: \"hi\") => number): any"); goTo.marker('3'); -verify.quickInfoIs("(parameter) callback: (x: 'hi') => number"); +verify.quickInfoIs("(parameter) callback: (x: \"hi\") => number"); goTo.marker('4'); -verify.quickInfoIs("(method) C.x1(a: number, callback: (x: 'hi') => number): any"); +verify.quickInfoIs("(method) C.x1(a: number, callback: (x: \"hi\") => number): any"); goTo.marker('5'); verify.quickInfoIs('(parameter) callback: (x: string) => number'); goTo.marker('6'); verify.quickInfoIs('(parameter) callback: (x: string) => number'); goTo.marker('7'); -verify.quickInfoIs("(method) C.x1(a: number, callback: (x: 'hi') => number): any"); +verify.quickInfoIs("(method) C.x1(a: number, callback: (x: \"hi\") => number): any"); goTo.marker('8'); -verify.quickInfoIs("(parameter) xx: 'hi'"); +verify.quickInfoIs("(parameter) xx: \"hi\""); goTo.marker('9'); -verify.quickInfoIs("(parameter) xx: 'bye'"); +verify.quickInfoIs("(parameter) xx: \"bye\""); goTo.marker('10'); -verify.quickInfoIs("(parameter) xx: 'hi'"); \ No newline at end of file +verify.quickInfoIs("(parameter) xx: \"hi\""); \ No newline at end of file diff --git a/tests/cases/fourslash/recursiveClassReference.ts b/tests/cases/fourslash/recursiveClassReference.ts index d0e96ac90e380..81843711d6517 100644 --- a/tests/cases/fourslash/recursiveClassReference.ts +++ b/tests/cases/fourslash/recursiveClassReference.ts @@ -11,4 +11,4 @@ //// } goTo.marker(); -fs.verify.quickInfoExists(); +verify.quickInfoExists(); diff --git a/tests/cases/fourslash/renameModuleToVar.ts b/tests/cases/fourslash/renameModuleToVar.ts index 023b0fa1c74aa..fc31f4040e8e3 100644 --- a/tests/cases/fourslash/renameModuleToVar.ts +++ b/tests/cases/fourslash/renameModuleToVar.ts @@ -10,7 +10,7 @@ //// var z = y + 5; ////} -fs.goTo.marker(); -fs.edit.backspace(6); -fs.edit.insert("var"); -fs.verify.numberOfErrorsInCurrentFile(0); \ No newline at end of file +goTo.marker(); +edit.backspace(6); +edit.insert("var"); +verify.numberOfErrorsInCurrentFile(0); diff --git a/tests/cases/fourslash/server/openFile.ts b/tests/cases/fourslash/server/openFile.ts new file mode 100644 index 0000000000000..320e52c9f5e1a --- /dev/null +++ b/tests/cases/fourslash/server/openFile.ts @@ -0,0 +1,16 @@ +/// + +// @Filename: test1.ts +////t. + +// @Filename: test.ts +////var t = '10'; + +// @Filename: tsconfig.json +////{ "files": ["test.ts", "test1.ts"] } + +var overridingContent = "var t = 10; t."; +goTo.file("test.ts", overridingContent); +goTo.file("test1.ts"); +goTo.eof(); +verify.completionListContains("toExponential"); diff --git a/tests/cases/fourslash/signatureHelpConstructorCallParamProperties.ts b/tests/cases/fourslash/signatureHelpConstructorCallParamProperties.ts new file mode 100644 index 0000000000000..aab276403fe2d --- /dev/null +++ b/tests/cases/fourslash/signatureHelpConstructorCallParamProperties.ts @@ -0,0 +1,18 @@ +/// + +////class Circle { +//// /** +//// * Initialize a circle. +//// * @param radius The radius of the circle. +//// */ +//// constructor(private radius: number) { +//// } +////} +////var a = new Circle(/**/ + +goTo.marker(''); +verify.signatureHelpCountIs(1); +verify.currentSignatureHelpIs("Circle(radius: number): Circle"); +verify.currentParameterHelpArgumentNameIs("radius"); +verify.currentParameterSpanIs("radius: number"); +verify.currentParameterHelpArgumentDocCommentIs("The radius of the circle."); \ No newline at end of file diff --git a/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts b/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts index 8edd0617d70ab..e312b71aebe58 100644 --- a/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts +++ b/tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts @@ -18,9 +18,9 @@ verify.currentParameterSpanIs("z: string"); goTo.marker('2'); verify.signatureHelpCountIs(3); verify.currentParameterHelpArgumentNameIs("x"); -verify.currentParameterSpanIs("x: 'hi'"); +verify.currentParameterSpanIs("x: \"hi\""); goTo.marker('3'); verify.signatureHelpCountIs(3); verify.currentParameterHelpArgumentNameIs("y"); -verify.currentParameterSpanIs("y: 'bye'"); +verify.currentParameterSpanIs("y: \"bye\""); diff --git a/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json new file mode 100644 index 0000000000000..253d6f0f1d4ad --- /dev/null +++ b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecified" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..c25902b499e34 --- /dev/null +++ b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify any files and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecifiedWithAllowJs" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationDifferentNamesSpecified.json b/tests/cases/project/jsFileCompilationDifferentNamesSpecified.json new file mode 100644 index 0000000000000..a8b0087521401 --- /dev/null +++ b/tests/cases/project/jsFileCompilationDifferentNamesSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when different .ts and .js file exist and their names are specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesSpecified" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json b/tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..7e48c8b32d1dd --- /dev/null +++ b/tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when different .ts and .js file exist and their names are specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesSpecifiedWithAllowJs" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameDTsSpecified.json b/tests/cases/project/jsFileCompilationSameNameDTsSpecified.json new file mode 100644 index 0000000000000..5f484c20e30e8 --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameDTsSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but .d.ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsSpecified" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json b/tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..9990f37cbd6dc --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but .d.ts file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsSpecifiedWithAllowJs" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecified.json b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecified.json new file mode 100644 index 0000000000000..7b4a7efc0428a --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecified" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..b96d4e758ff58 --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .d.ts and .js file exists in the folder but no file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameDTsNotSpecifiedWithAllowJs" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameFilesNotSpecified.json b/tests/cases/project/jsFileCompilationSameNameFilesNotSpecified.json new file mode 100644 index 0000000000000..75582ff44024d --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameFilesNotSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecified" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json b/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..badca871288b4 --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but no file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameFilesNotSpecifiedWithAllowJs" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameFilesSpecified.json b/tests/cases/project/jsFileCompilationSameNameFilesSpecified.json new file mode 100644 index 0000000000000..656c973a98116 --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameFilesSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameTsSpecified" +} \ No newline at end of file diff --git a/tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json b/tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json new file mode 100644 index 0000000000000..d3176d3f60700 --- /dev/null +++ b/tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when same named .ts and .js file exists in the folder but .ts file is specified in tsconfig.json and .js files are consumed", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "SameNameTsSpecifiedWithAllowJs" +} \ No newline at end of file diff --git a/tests/cases/project/noProjectOptionAndInputFiles.json b/tests/cases/project/noProjectOptionAndInputFiles.json new file mode 100644 index 0000000000000..b391da41dc308 --- /dev/null +++ b/tests/cases/project/noProjectOptionAndInputFiles.json @@ -0,0 +1,6 @@ +{ + "scenario": "Verify project option", + "projectRoot": "tests/cases/projects/projectOption/Test", + "baselineCheck": true, + "declaration": true +} \ No newline at end of file diff --git a/tests/cases/project/projectOptionTest.json b/tests/cases/project/projectOptionTest.json new file mode 100644 index 0000000000000..70ae0435eee6b --- /dev/null +++ b/tests/cases/project/projectOptionTest.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify project option", + "projectRoot": "tests/cases/projects/projectOption", + "baselineCheck": true, + "declaration": true, + "project": "Test" +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/a.ts b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/a.ts new file mode 100644 index 0000000000000..6d820a0093e01 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js new file mode 100644 index 0000000000000..7ba71c35654a9 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js @@ -0,0 +1 @@ +var test2 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/tsconfig.json new file mode 100644 index 0000000000000..1b726957fddd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/tsconfig.json @@ -0,0 +1,3 @@ +{ + "compilerOptions": { "out": "test.js" } +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/a.ts b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/a.ts new file mode 100644 index 0000000000000..6d820a0093e01 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/b.js new file mode 100644 index 0000000000000..9fdf6253b8006 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/b.js @@ -0,0 +1 @@ +var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/tsconfig.json b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/tsconfig.json new file mode 100644 index 0000000000000..167eaebec3ad9 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecifiedWithAllowJs/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "out": "test.js", + "allowJs": true + } +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/a.ts b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/a.ts new file mode 100644 index 0000000000000..6d820a0093e01 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/b.js new file mode 100644 index 0000000000000..9fdf6253b8006 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/b.js @@ -0,0 +1 @@ +var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/tsconfig.json new file mode 100644 index 0000000000000..582826bdceb79 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecified/tsconfig.json @@ -0,0 +1,4 @@ +{ + "compilerOptions": { "out": "test.js" }, + "files": [ "a.ts", "b.js" ] +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/a.ts b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/a.ts new file mode 100644 index 0000000000000..6d820a0093e01 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/b.js new file mode 100644 index 0000000000000..9fdf6253b8006 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/b.js @@ -0,0 +1 @@ +var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/tsconfig.json b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/tsconfig.json new file mode 100644 index 0000000000000..1a5a6f6189fc0 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesSpecifiedWithAllowJs/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "out": "test.js", + "allowJs": true + }, + "files": [ "a.ts", "b.js" ] +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.d.ts new file mode 100644 index 0000000000000..16cb2db6fd7cc --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.d.ts @@ -0,0 +1 @@ +declare var a: number; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.js b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.js new file mode 100644 index 0000000000000..bbad8b11e3dd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecified/tsconfig.json new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/a.d.ts new file mode 100644 index 0000000000000..16cb2db6fd7cc --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/a.d.ts @@ -0,0 +1 @@ +declare var a: number; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/a.js b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/a.js new file mode 100644 index 0000000000000..bbad8b11e3dd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/tsconfig.json new file mode 100644 index 0000000000000..05e6c95dddf65 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsNotSpecifiedWithAllowJs/tsconfig.json @@ -0,0 +1 @@ +{ "compilerOptions": { "allowJs": true } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.d.ts new file mode 100644 index 0000000000000..d9e24d329b733 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.d.ts @@ -0,0 +1 @@ +declare var test: number; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.js b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.js new file mode 100644 index 0000000000000..bbad8b11e3dd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/tsconfig.json new file mode 100644 index 0000000000000..e50280fa0d3a2 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecified/tsconfig.json @@ -0,0 +1 @@ +{ "files": [ "a.d.ts" ] } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/a.d.ts b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/a.d.ts new file mode 100644 index 0000000000000..d9e24d329b733 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/a.d.ts @@ -0,0 +1 @@ +declare var test: number; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/a.js b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/a.js new file mode 100644 index 0000000000000..bbad8b11e3dd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/tsconfig.json new file mode 100644 index 0000000000000..44fcccf5b22bd --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameDTsSpecifiedWithAllowJs/tsconfig.json @@ -0,0 +1,4 @@ +{ + "compilerOptions": { "allowJs": true }, + "files": [ "a.d.ts" ] +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.js b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.js new file mode 100644 index 0000000000000..bbad8b11e3dd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.ts b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.ts new file mode 100644 index 0000000000000..6d820a0093e01 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecified/tsconfig.json new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/a.js b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/a.js new file mode 100644 index 0000000000000..bbad8b11e3dd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/a.ts b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/a.ts new file mode 100644 index 0000000000000..6d820a0093e01 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/tsconfig.json new file mode 100644 index 0000000000000..05e6c95dddf65 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameFilesNotSpecifiedWithAllowJs/tsconfig.json @@ -0,0 +1 @@ +{ "compilerOptions": { "allowJs": true } } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.js b/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.js new file mode 100644 index 0000000000000..bbad8b11e3dd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.ts b/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.ts new file mode 100644 index 0000000000000..6d820a0093e01 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/tsconfig.json new file mode 100644 index 0000000000000..1c0fb803356f6 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecified/tsconfig.json @@ -0,0 +1 @@ +{ "files": [ "a.ts" ] } \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/a.js b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/a.js new file mode 100644 index 0000000000000..bbad8b11e3dd7 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/a.js @@ -0,0 +1 @@ +var test1 = 10; // Shouldnt get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/a.ts b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/a.ts new file mode 100644 index 0000000000000..6d820a0093e01 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/tsconfig.json b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/tsconfig.json new file mode 100644 index 0000000000000..cbc35e9b9dbc8 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/SameNameTsSpecifiedWithAllowJs/tsconfig.json @@ -0,0 +1,4 @@ +{ + "compilerOptions": { "allowJs": true }, + "files": [ "a.ts" ] +} \ No newline at end of file diff --git a/tests/cases/projects/projectOption/Test/a.ts b/tests/cases/projects/projectOption/Test/a.ts new file mode 100644 index 0000000000000..6d820a0093e01 --- /dev/null +++ b/tests/cases/projects/projectOption/Test/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/projectOption/Test/b.ts b/tests/cases/projects/projectOption/Test/b.ts new file mode 100644 index 0000000000000..a6bd8e8d430e9 --- /dev/null +++ b/tests/cases/projects/projectOption/Test/b.ts @@ -0,0 +1 @@ +var test = 10; // Shouldnt get compiled so shouldnt error \ No newline at end of file diff --git a/tests/cases/projects/projectOption/Test/tsconfig.json b/tests/cases/projects/projectOption/Test/tsconfig.json new file mode 100644 index 0000000000000..1c0fb803356f6 --- /dev/null +++ b/tests/cases/projects/projectOption/Test/tsconfig.json @@ -0,0 +1 @@ +{ "files": [ "a.ts" ] } \ No newline at end of file diff --git a/tests/cases/unittests/moduleResolution.ts b/tests/cases/unittests/moduleResolution.ts index c53cad5725abc..c4c17ebb223eb 100644 --- a/tests/cases/unittests/moduleResolution.ts +++ b/tests/cases/unittests/moduleResolution.ts @@ -50,16 +50,16 @@ module ts { describe("Node module resolution - relative paths", () => { function testLoadAsFile(containingFileName: string, moduleFileNameNoExt: string, moduleName: string): void { - for (let ext of supportedExtensions) { + for (let ext of supportedTypeScriptExtensions) { let containingFile = { name: containingFileName } let moduleFile = { name: moduleFileNameNoExt + ext } - let resolution = nodeModuleNameResolver(moduleName, containingFile.name, createModuleResolutionHost(containingFile, moduleFile)); + let resolution = nodeModuleNameResolver(moduleName, containingFile.name, {}, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); let failedLookupLocations: string[] = []; let dir = getDirectoryPath(containingFileName); - for (let e of supportedExtensions) { + for (let e of supportedTypeScriptExtensions) { if (e === ext) { break; } @@ -92,11 +92,11 @@ module ts { let containingFile = { name: containingFileName }; let packageJson = { name: packageJsonFileName, content: JSON.stringify({ "typings": fieldRef }) }; let moduleFile = { name: moduleFileName }; - let resolution = nodeModuleNameResolver(moduleName, containingFile.name, createModuleResolutionHost(containingFile, packageJson, moduleFile)); + let resolution = nodeModuleNameResolver(moduleName, containingFile.name, {}, createModuleResolutionHost(containingFile, packageJson, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); - // expect five failed lookup location - attempt to load module as file with all supported extensions - assert.equal(resolution.failedLookupLocations.length, 5); + // expect three failed lookup location - attempt to load module as file with all supported extensions + assert.equal(resolution.failedLookupLocations.length, supportedTypeScriptExtensions.length); } it("module name as directory - load from typings", () => { @@ -110,15 +110,13 @@ module ts { let containingFile = { name: "/a/b/c.ts" }; let packageJson = { name: "/a/b/foo/package.json", content: JSON.stringify({ main: "/c/d" }) }; let indexFile = { name: "/a/b/foo/index.d.ts" }; - let resolution = nodeModuleNameResolver("./foo", containingFile.name, createModuleResolutionHost(containingFile, packageJson, indexFile)); + let resolution = nodeModuleNameResolver("./foo", containingFile.name, {}, createModuleResolutionHost(containingFile, packageJson, indexFile)); assert.equal(resolution.resolvedModule.resolvedFileName, indexFile.name); assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); assert.deepEqual(resolution.failedLookupLocations, [ "/a/b/foo.ts", "/a/b/foo.tsx", "/a/b/foo.d.ts", - "/a/b/foo.js", - "/a/b/foo.jsx", "/a/b/foo/index.ts", "/a/b/foo/index.tsx", ]); @@ -129,7 +127,7 @@ module ts { it("load module as file - ts files not loaded", () => { let containingFile = { name: "/a/b/c/d/e.ts" }; let moduleFile = { name: "/a/b/node_modules/foo.ts" }; - let resolution = nodeModuleNameResolver("foo", containingFile.name, createModuleResolutionHost(containingFile, moduleFile)); + let resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.deepEqual(resolution.failedLookupLocations, [ "/a/b/c/d/node_modules/foo.ts", @@ -152,7 +150,7 @@ module ts { it("load module as file", () => { let containingFile = { name: "/a/b/c/d/e.ts" }; let moduleFile = { name: "/a/b/node_modules/foo.d.ts" }; - let resolution = nodeModuleNameResolver("foo", containingFile.name, createModuleResolutionHost(containingFile, moduleFile)); + let resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(resolution.resolvedModule.isExternalLibraryImport, true); }); @@ -160,7 +158,7 @@ module ts { it("load module as directory", () => { let containingFile = { name: "/a/node_modules/b/c/node_modules/d/e.ts" }; let moduleFile = { name: "/a/node_modules/foo/index.d.ts" }; - let resolution = nodeModuleNameResolver("foo", containingFile.name, createModuleResolutionHost(containingFile, moduleFile)); + let resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(containingFile, moduleFile)); assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(resolution.resolvedModule.isExternalLibraryImport, true); assert.deepEqual(resolution.failedLookupLocations, [ @@ -354,6 +352,31 @@ export = C; "moduleC.ts": "export var x" }; test(files, { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true }, "", /* useCaseSensitiveFileNames */ false, ["moduleA.ts", "moduleB.ts", "moduleC.ts"], [1149, 1149]); + }); + + it("should fail when module names in 'require' calls has inconsistent casing and current directory has uppercase chars", () => { + const files: Map = { + "/a/B/c/moduleA.ts": `import a = require("./ModuleC")`, + "/a/B/c/moduleB.ts": `import a = require("./moduleC")`, + "/a/B/c/moduleC.ts": "export var x", + "/a/B/c/moduleD.ts": ` +import a = require("./moduleA.ts"); +import b = require("./moduleB.ts"); + ` + }; + test(files, { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true }, "/a/B/c", /* useCaseSensitiveFileNames */ false, ["moduleD.ts"], [1149]); + }); + it("should not fail when module names in 'require' calls has consistent casing and current directory has uppercase chars", () => { + const files: Map = { + "/a/B/c/moduleA.ts": `import a = require("./moduleC")`, + "/a/B/c/moduleB.ts": `import a = require("./moduleC")`, + "/a/B/c/moduleC.ts": "export var x", + "/a/B/c/moduleD.ts": ` +import a = require("./moduleA.ts"); +import b = require("./moduleB.ts"); + ` + }; + test(files, { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true }, "/a/B/c", /* useCaseSensitiveFileNames */ false, ["moduleD.ts"], []); }) }); } \ No newline at end of file diff --git a/tests/cases/unittests/transpile.ts b/tests/cases/unittests/transpile.ts index 1d688f091a467..4781182224bae 100644 --- a/tests/cases/unittests/transpile.ts +++ b/tests/cases/unittests/transpile.ts @@ -120,7 +120,7 @@ var x = 0;`, test(`var x = 0;`, { options: { compilerOptions: { module: ModuleKind.AMD } }, - expectedOutput: `define(["require", "exports"], function (require, exports) {\r\n var x = 0;\r\n});\r\n` + expectedOutput: `define(["require", "exports"], function (require, exports) {\r\n "use strict";\r\n var x = 0;\r\n});\r\n` }); }); @@ -128,13 +128,13 @@ var x = 0;`, test(`var x = 0;`, { options: { compilerOptions: { module: ModuleKind.CommonJS, newLine: NewLineKind.LineFeed } }, - expectedOutput: `var x = 0;\n` + expectedOutput: `"use strict";\nvar x = 0;\n` }); }); it("Sets module name", () => { let output = - `System.register("NamedModule", [], function(exports_1) {\n var x;\n` + + `System.register("NamedModule", [], function(exports_1) {\n "use strict";\n var x;\n` + ` return {\n` + ` setters:[],\n` + ` execute: function() {\n` + @@ -150,7 +150,7 @@ var x = 0;`, }); it("No extra errors for file without extension", () => { - test(`var x = 0;`, { options: { compilerOptions: { module: ModuleKind.CommonJS }, fileName: "file" } }); + test(`"use strict";\r\nvar x = 0;`, { options: { compilerOptions: { module: ModuleKind.CommonJS }, fileName: "file" } }); }); it("Rename dependencies - System", () => { @@ -160,6 +160,7 @@ var x = 0;`, `use(foo);` let output = `System.register(["SomeOtherName"], function(exports_1) {\n` + + ` "use strict";\n` + ` var SomeName_1;\n` + ` return {\n` + ` setters:[\n` + @@ -186,6 +187,7 @@ var x = 0;`, `use(foo);` let output = `define(["require", "exports", "SomeOtherName"], function (require, exports, SomeName_1) {\n` + + ` "use strict";\n` + ` use(SomeName_1.foo);\n` + `});\n`; @@ -210,6 +212,7 @@ var x = 0;`, ` define(["require", "exports", "SomeOtherName"], factory);\n` + ` }\n` + `})(function (require, exports) {\n` + + ` "use strict";\n` + ` var SomeName_1 = require("SomeOtherName");\n` + ` use(SomeName_1.foo);\n` + `});\n`; @@ -237,6 +240,7 @@ var x = 0;`, `}\n` + `export {MyClass}; \n` let output = + `"use strict";\n` + `var db_1 = require(\'./db\');\n` + `function someDecorator(target) {\n` + ` return target;\n` + @@ -272,12 +276,12 @@ var x = 0;`, }); it("Supports backslashes in file name", () => { - test("var x", { expectedOutput: "var x;\r\n", options: { fileName: "a\\b.ts" }}); + test("var x", { expectedOutput: `"use strict";\r\nvar x;\r\n`, options: { fileName: "a\\b.ts" }}); }); it("transpile file as 'tsx' if 'jsx' is specified", () => { let input = `var x =
`; - let output = `var x = React.createElement("div", null);\n`; + let output = `"use strict";\nvar x = React.createElement("div", null);\n`; test(input, { expectedOutput: output, options: { compilerOptions: { jsx: JsxEmit.React, newLine: NewLineKind.LineFeed } } diff --git a/tests/cases/unittests/versionCache.ts b/tests/cases/unittests/versionCache.ts index 06c2cadbfe97e..c1d283ca8cd2a 100644 --- a/tests/cases/unittests/versionCache.ts +++ b/tests/cases/unittests/versionCache.ts @@ -20,7 +20,10 @@ module ts { } describe('VersionCache TS code', () => { - var testContent = `/// + let validateEditAtLineCharIndex: (line: number, char: number, deleteLength: number, insertString: string) => void; + + before(() => { + let testContent = `/// var x = 10; var y = { zebra: 12, giraffe: "ell" }; z.a; @@ -31,16 +34,21 @@ k=y; var p:Point=new Point(); var q:Point=p;` - let {lines, lineMap} = server.LineIndex.linesFromText(testContent); - assert.isTrue(lines.length > 0, "Failed to initialize test text. Expected text to have at least one line"); + let {lines, lineMap} = server.LineIndex.linesFromText(testContent); + assert.isTrue(lines.length > 0, "Failed to initialize test text. Expected text to have at least one line"); - let lineIndex = new server.LineIndex(); - lineIndex.load(lines); + let lineIndex = new server.LineIndex(); + lineIndex.load(lines); - function validateEditAtLineCharIndex(line: number, char: number, deleteLength: number, insertString: string): void { - let position = lineColToPosition(lineIndex, line, char); - validateEdit(lineIndex, testContent, position, deleteLength, insertString); - } + validateEditAtLineCharIndex = (line: number, char: number, deleteLength: number, insertString: string) => { + let position = lineColToPosition(lineIndex, line, char); + validateEdit(lineIndex, testContent, position, deleteLength, insertString); + }; + }); + + after(() => { + validateEditAtLineCharIndex = undefined; + }) it('change 9 1 0 1 {"y"}', () => { validateEditAtLineCharIndex(9, 1, 0, "y"); @@ -68,22 +76,35 @@ var q:Point=p;` }); describe('VersionCache simple text', () => { - let testContent = `in this story: + let validateEditAtPosition: (position: number, deleteLength: number, insertString: string) => void; + let testContent: string; + let lines: string[]; + let lineMap: number[]; + before(() => { + testContent = `in this story: the lazy brown fox jumped over the cow that ate the grass that was purple at the tips and grew 1cm per day`; - let {lines, lineMap} = server.LineIndex.linesFromText(testContent); - assert.isTrue(lines.length > 0, "Failed to initialize test text. Expected text to have at least one line"); + ({lines, lineMap} = server.LineIndex.linesFromText(testContent)); + assert.isTrue(lines.length > 0, "Failed to initialize test text. Expected text to have at least one line"); + + let lineIndex = new server.LineIndex(); + lineIndex.load(lines); - let lineIndex = new server.LineIndex(); - lineIndex.load(lines); + validateEditAtPosition = (position: number, deleteLength: number, insertString: string) => { + validateEdit(lineIndex, testContent, position, deleteLength, insertString); + } + }); - function validateEditAtPosition(position: number, deleteLength: number, insertString: string): void { - validateEdit(lineIndex, testContent, position, deleteLength, insertString); - } + after(() => { + validateEditAtPosition = undefined; + testContent = undefined; + lines = undefined; + lineMap = undefined; + }); it('Insert at end of file', () => { validateEditAtPosition(testContent.length, 0, "hmmmm...\r\n"); @@ -159,50 +180,69 @@ and grew 1cm per day`; }); describe('VersionCache stress test', () => { - const iterationCount = 20; - //const interationCount = 20000; // uncomment for testing - - // Use scanner.ts, decent size, does not change frequentlly - let testFileName = "src/compiler/scanner.ts"; - let testContent = Harness.IO.readFile(testFileName); - let totalChars = testContent.length; - assert.isTrue(totalChars > 0, "Failed to read test file."); - - let {lines, lineMap} = server.LineIndex.linesFromText(testContent); - assert.isTrue(lines.length > 0, "Failed to initialize test text. Expected text to have at least one line"); - - let lineIndex = new server.LineIndex(); - lineIndex.load(lines); - let rsa: number[] = []; let la: number[] = []; let las: number[] = []; let elas: number[] = []; let ersa: number[] = []; let ela: number[] = []; - let etotalChars = totalChars; - - for (let j = 0; j < 100000; j++) { - rsa[j] = Math.floor(Math.random() * totalChars); - la[j] = Math.floor(Math.random() * (totalChars - rsa[j])); - if (la[j] > 4) { - las[j] = 4; - } - else { - las[j] = la[j]; - } - if (j < 4000) { - ersa[j] = Math.floor(Math.random() * etotalChars); - ela[j] = Math.floor(Math.random() * (etotalChars - ersa[j])); - if (ela[j] > 4) { - elas[j] = 4; + const iterationCount = 20; + //const iterationCount = 20000; // uncomment for testing + let lines: string[]; + let lineMap: number[]; + let lineIndex: server.LineIndex; + let testContent: string; + + before(() => { + // Use scanner.ts, decent size, does not change frequently + let testFileName = "src/compiler/scanner.ts"; + testContent = Harness.IO.readFile(testFileName); + let totalChars = testContent.length; + assert.isTrue(totalChars > 0, "Failed to read test file."); + + ({lines, lineMap} = server.LineIndex.linesFromText(testContent)); + assert.isTrue(lines.length > 0, "Failed to initialize test text. Expected text to have at least one line"); + + lineIndex = new server.LineIndex(); + lineIndex.load(lines); + + let etotalChars = totalChars; + + for (let j = 0; j < 100000; j++) { + rsa[j] = Math.floor(Math.random() * totalChars); + la[j] = Math.floor(Math.random() * (totalChars - rsa[j])); + if (la[j] > 4) { + las[j] = 4; } else { - elas[j] = ela[j]; + las[j] = la[j]; + } + if (j < 4000) { + ersa[j] = Math.floor(Math.random() * etotalChars); + ela[j] = Math.floor(Math.random() * (etotalChars - ersa[j])); + if (ela[j] > 4) { + elas[j] = 4; + } + else { + elas[j] = ela[j]; + } + etotalChars += (las[j] - elas[j]); } - etotalChars += (las[j] - elas[j]); } - } + }); + + after(() => { + rsa = undefined; + la = undefined; + las = undefined; + elas = undefined; + ersa = undefined; + ela = undefined; + lines = undefined; + lineMap = undefined; + lineIndex = undefined; + testContent = undefined; + }); it("Range (average length 1/4 file size)", () => { for (let i = 0; i < iterationCount; i++) { diff --git a/tests/webTestServer.ts b/tests/webTestServer.ts index 6bd15359e3f6b..dab552e26194e 100644 --- a/tests/webTestServer.ts +++ b/tests/webTestServer.ts @@ -269,6 +269,9 @@ if ((browser && browser === 'chrome')) { case "win64": defaultChromePath = "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"; break; + case "darwin": + defaultChromePath = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"; + break; case "linux": defaultChromePath = "/opt/google/chrome/chrome" break;